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

Function setValue

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

Source from the content-addressed store, hash-verified

2568 }, "loadDylibs");
2569 var noExitRuntime = true;
2570 function setValue(ptr, value, type = "i8") {
2571 if (type.endsWith("*")) type = "*";
2572 switch (type) {
2573 case "i1":
2574 HEAP8[ptr] = value;
2575 break;
2576 case "i8":
2577 HEAP8[ptr] = value;
2578 break;
2579 case "i16":
2580 LE_HEAP_STORE_I16((ptr >> 1) * 2, value);
2581 break;
2582 case "i32":
2583 LE_HEAP_STORE_I32((ptr >> 2) * 4, value);
2584 break;
2585 case "i64":
2586 LE_HEAP_STORE_I64((ptr >> 3) * 8, BigInt(value));
2587 break;
2588 case "float":
2589 LE_HEAP_STORE_F32((ptr >> 2) * 4, value);
2590 break;
2591 case "double":
2592 LE_HEAP_STORE_F64((ptr >> 3) * 8, value);
2593 break;
2594 case "*":
2595 LE_HEAP_STORE_U32((ptr >> 2) * 4, value);
2596 break;
2597 default:
2598 abort(`invalid type for setValue: ${type}`);
2599 }
2600 }
2601 __name(setValue, "setValue");
2602 var ___memory_base = new WebAssembly.Global({
2603 "value": "i32",

Callers 10

descendantsOfTypeMethod · 0.85
descendantForIndexMethod · 0.85
marshalNodeMethod · 0.85
marshalTreeCursorMethod · 0.85
marshalPointMethod · 0.85
marshalRangeMethod · 0.85
marshalEditMethod · 0.85

Calls 1

abortFunction · 0.85

Tested by

no test coverage detected