MCPcopy Index your code
hub / github.com/CodeGraphContext/CodeGraphContext / getValue

Function getValue

website/public/wasm/web-tree-sitter.js:1997–2019  ·  view source on GitHub ↗
(ptr, type = "i8")

Source from the content-addressed store, hash-verified

1995 return customSection;
1996 }, "getDylinkMetadata");
1997 function getValue(ptr, type = "i8") {
1998 if (type.endsWith("*")) type = "*";
1999 switch (type) {
2000 case "i1":
2001 return HEAP8[ptr];
2002 case "i8":
2003 return HEAP8[ptr];
2004 case "i16":
2005 return LE_HEAP_LOAD_I16((ptr >> 1) * 2);
2006 case "i32":
2007 return LE_HEAP_LOAD_I32((ptr >> 2) * 4);
2008 case "i64":
2009 return LE_HEAP_LOAD_I64((ptr >> 3) * 8);
2010 case "float":
2011 return LE_HEAP_LOAD_F32((ptr >> 2) * 4);
2012 case "double":
2013 return LE_HEAP_LOAD_F64((ptr >> 3) * 8);
2014 case "*":
2015 return LE_HEAP_LOAD_U32((ptr >> 2) * 4);
2016 default:
2017 abort(`invalid type for getValue: ${type}`);
2018 }
2019 }
2020 __name(getValue, "getValue");
2021 var newDSO = /* @__PURE__ */ __name((name2, handle2, syms) => {
2022 var dso = {

Callers 14

initMethod · 0.85
initializeMethod · 0.85
getChangedRangesMethod · 0.85
childrenMethod · 0.85
namedChildrenMethod · 0.85
descendantsOfTypeMethod · 0.85
queryMethod · 0.85
matchesMethod · 0.85
capturesMethod · 0.85
unmarshalCapturesMethod · 0.85
unmarshalNodeMethod · 0.85
unmarshalTreeCursorMethod · 0.85

Calls 1

abortFunction · 0.85

Tested by

no test coverage detected