Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor() {
this.stdlib = compileStd(this);
this._opcode = new RuntimeOpImpl(this.heap);
}
export function debugSlice(context: TemplateCompilationContext, start: number, end: number) {
if (DEBUG) {
(console as any).group(`%c${start}:${end}`, 'color: #999');
let heap = context.syntax.program.heap;
let opcode = new RuntimeOpImpl(heap);
let _size = 0;
for (let i = start; i < end; i = i + _size) {
opcode.offset = i;
let [name, params] = debug(
context.syntax.program.constants as Recast,
context.syntax.program.resolverDelegate,
opcode,
opcode.isMachine
);
console.log(`${i}. ${logOpcode(name, params)}`);
_size = opcode.size;
}
opcode.offset = -_size;
console.groupEnd();
}