Lines Matching refs:pc
735 void Bind(ControlTransferMap* map, const byte* start, const byte* pc) { in ControlTransfers()
737 target = pc; in ControlTransfers()
762 const byte* pc; in ControlTransfers() member
788 control_stack.push_back({i.pc(), label, nullptr}); in ControlTransfers()
794 control_stack.push_back({i.pc(), label, nullptr}); in ControlTransfers()
795 label->Bind(&map_, start, i.pc()); in ControlTransfers()
802 control_stack.push_back({i.pc(), end_label, else_label}); in ControlTransfers()
803 else_label->Ref(&map_, start, i.pc()); in ControlTransfers()
809 c->end_label->Ref(&map_, start, i.pc()); in ControlTransfers()
811 c->else_label->Bind(&map_, start, i.pc() + 1); in ControlTransfers()
820 DCHECK_EQ(kExprLoop, *c->pc); in ControlTransfers()
822 if (c->else_label) c->else_label->Bind(&map_, start, i.pc()); in ControlTransfers()
823 c->end_label->Bind(&map_, start, i.pc() + 1); in ControlTransfers()
829 BreakDepthOperand operand(&i, i.pc()); in ControlTransfers()
832 c->Ref(&map_, start, i.pc()); in ControlTransfers()
836 BreakDepthOperand operand(&i, i.pc()); in ControlTransfers()
839 c->Ref(&map_, start, i.pc()); in ControlTransfers()
843 BranchTableOperand operand(&i, i.pc()); in ControlTransfers()
851 c->Ref(&map_, start, i.pc() + j); in ControlTransfers()
882 const byte* at(pc_t pc) { return start + pc; } in at()
1079 pc_t pc; member
1099 void DoTrap(TrapReason trap, pc_t pc) { in DoTrap() argument
1102 CommitPc(pc); in DoTrap()
1148 void CommitPc(pc_t pc) { in CommitPc() argument
1150 frames_.back().ret_pc = pc; in CommitPc()
1154 bool SkipBreakpoint(InterpreterCode* code, pc_t pc) { in SkipBreakpoint() argument
1155 if (pc == break_pc_) { in SkipBreakpoint()
1163 int LookupTarget(InterpreterCode* code, pc_t pc) { in LookupTarget() argument
1164 return static_cast<int>(code->targets->Lookup(pc)); in LookupTarget()
1167 int DoBreak(InterpreterCode* code, pc_t pc, size_t depth) { in DoBreak() argument
1172 return LookupTarget(code, pc); in DoBreak()
1175 bool DoReturn(InterpreterCode** code, pc_t* pc, pc_t* limit, size_t arity) { in DoReturn() argument
1194 *pc = top->ret_pc; in DoReturn()
1196 TRACE(" => pop func#%u @%zu\n", (*code)->function->func_index, *pc); in DoReturn()
1202 void DoCall(InterpreterCode* target, pc_t* pc, pc_t ret_pc, pc_t* limit) { in DoCall() argument
1203 PushFrame(target, *pc, ret_pc); in DoCall()
1204 *pc = frames_.back().ret_pc; in DoCall()
1225 void Execute(InterpreterCode* code, pc_t pc, int max) { in Execute() argument
1232 return CommitPc(pc); in Execute()
1235 if (pc >= limit) { in Execute()
1237 TRACE("@%-3zu: ImplicitReturn\n", pc); in Execute()
1238 if (!DoReturn(&code, &pc, &limit, code->function->sig->return_count())) in Execute()
1246 byte opcode = code->start[pc]; in Execute()
1249 orig = code->orig_start[pc]; in Execute()
1250 if (SkipBreakpoint(code, pc)) { in Execute()
1255 TRACE("@%-3zu: [break] %-24s:", pc, in Execute()
1259 break_pc_ = pc; in Execute()
1260 return CommitPc(pc); in Execute()
1265 TRACE("@%-3zu: %s%-24s:", pc, skip, in Execute()
1274 BlockTypeOperand operand(&decoder, code->at(pc)); in Execute()
1275 blocks_.push_back({pc, stack_.size(), frames_.size(), operand.arity}); in Execute()
1280 BlockTypeOperand operand(&decoder, code->at(pc)); in Execute()
1281 blocks_.push_back({pc, stack_.size(), frames_.size(), 0}); in Execute()
1286 BlockTypeOperand operand(&decoder, code->at(pc)); in Execute()
1289 blocks_.push_back({pc, stack_.size(), frames_.size(), operand.arity}); in Execute()
1295 len = LookupTarget(code, pc); in Execute()
1296 TRACE(" false => @%zu\n", pc + len); in Execute()
1302 len = LookupTarget(code, pc); in Execute()
1303 TRACE(" end => @%zu\n", pc + len); in Execute()
1310 Push(pc, cond.to<int32_t>() != 0 ? tval : fval); in Execute()
1314 BreakDepthOperand operand(&decoder, code->at(pc)); in Execute()
1315 len = DoBreak(code, pc, operand.depth); in Execute()
1316 TRACE(" br => @%zu\n", pc + len); in Execute()
1320 BreakDepthOperand operand(&decoder, code->at(pc)); in Execute()
1324 len = DoBreak(code, pc, operand.depth); in Execute()
1325 TRACE(" br_if => @%zu\n", pc + len); in Execute()
1333 BranchTableOperand operand(&decoder, code->at(pc)); in Execute()
1342 len = key + DoBreak(code, pc + key, static_cast<size_t>(depth)); in Execute()
1343 TRACE(" br[%u] => @%zu\n", key, pc + key + len); in Execute()
1348 if (!DoReturn(&code, &pc, &limit, arity)) return; in Execute()
1353 DoTrap(kTrapUnreachable, pc); in Execute()
1354 return CommitPc(pc); in Execute()
1361 ImmI8Operand operand(&decoder, code->at(pc)); in Execute()
1362 Push(pc, WasmVal(operand.value)); in Execute()
1367 ImmI32Operand operand(&decoder, code->at(pc)); in Execute()
1368 Push(pc, WasmVal(operand.value)); in Execute()
1373 ImmI64Operand operand(&decoder, code->at(pc)); in Execute()
1374 Push(pc, WasmVal(operand.value)); in Execute()
1379 ImmF32Operand operand(&decoder, code->at(pc)); in Execute()
1380 Push(pc, WasmVal(operand.value)); in Execute()
1385 ImmF64Operand operand(&decoder, code->at(pc)); in Execute()
1386 Push(pc, WasmVal(operand.value)); in Execute()
1391 LocalIndexOperand operand(&decoder, code->at(pc)); in Execute()
1392 Push(pc, stack_[frames_.back().sp + operand.index]); in Execute()
1397 LocalIndexOperand operand(&decoder, code->at(pc)); in Execute()
1404 LocalIndexOperand operand(&decoder, code->at(pc)); in Execute()
1407 Push(pc, val); in Execute()
1416 CallFunctionOperand operand(&decoder, code->at(pc)); in Execute()
1418 DoCall(target, &pc, pc + 1 + operand.length, &limit); in Execute()
1424 CallIndirectOperand operand(&decoder, code->at(pc)); in Execute()
1430 return DoTrap(kTrapFuncInvalid, pc); in Execute()
1440 return DoTrap(kTrapFuncSigMismatch, pc); in Execute()
1444 DoCall(target, &pc, pc + 1 + operand.length, &limit); in Execute()
1450 GlobalIndexOperand operand(&decoder, code->at(pc)); in Execute()
1466 Push(pc, val); in Execute()
1471 GlobalIndexOperand operand(&decoder, code->at(pc)); in Execute()
1493 MemoryAccessOperand operand(&decoder, code->at(pc), sizeof(ctype)); \ in Execute()
1498 return DoTrap(kTrapMemOutOfBounds, pc); \ in Execute()
1502 Push(pc, result); \ in Execute()
1525 MemoryAccessOperand operand(&decoder, code->at(pc), sizeof(ctype)); \ in Execute()
1531 return DoTrap(kTrapMemOutOfBounds, pc); \ in Execute()
1561 Push(pc, WasmVal(result)); \ in Execute()
1584 Push(pc, val); \ in Execute()
1595 MemoryIndexOperand operand(&decoder, code->at(pc)); in Execute()
1597 Push(pc, WasmVal(ExecuteGrowMemory(delta_pages, instance()))); in Execute()
1602 MemoryIndexOperand operand(&decoder, code->at(pc)); in Execute()
1603 Push(pc, WasmVal(static_cast<uint32_t>(instance()->mem_size / in Execute()
1613 Push(pc, result); \ in Execute()
1626 Push(pc, result_val); \ in Execute()
1638 if (trap != kTrapCount) return DoTrap(trap, pc); \ in Execute()
1639 Push(pc, result); \ in Execute()
1650 if (trap != kTrapCount) return DoTrap(trap, pc); \ in Execute()
1651 Push(pc, result); \ in Execute()
1664 if (trap != kTrapCount) return DoTrap(trap, pc); \ in Execute()
1665 Push(pc, result_val); \ in Execute()
1673 code->start[pc], OpcodeName(code->start[pc])); in Execute()
1677 pc += len; in Execute()
1705 void Push(pc_t pc, WasmVal val) { in Push() argument
1710 void TraceStack(const char* phase, pc_t pc) { in TraceStack() argument
1712 PrintF("%s @%zu", phase, pc); in TraceStack()
1794 bool WasmInterpreter::SetBreakpoint(const WasmFunction* function, pc_t pc, in SetBreakpoint() argument
1800 if (pc < code->locals.decls_encoded_size || pc >= size) return false; in SetBreakpoint()
1807 bool prev = code->start[pc] == kInternalBreakpoint; in SetBreakpoint()
1809 code->start[pc] = kInternalBreakpoint; in SetBreakpoint()
1811 code->start[pc] = code->orig_start[pc]; in SetBreakpoint()
1816 bool WasmInterpreter::GetBreakpoint(const WasmFunction* function, pc_t pc) { in GetBreakpoint() argument
1821 if (pc < code->locals.decls_encoded_size || pc >= size) return false; in GetBreakpoint()
1823 return code->start[pc] == kInternalBreakpoint; in GetBreakpoint()
1848 WasmVal WasmInterpreter::GetExprVal(const WasmFrame* frame, int pc) { in GetExprVal() argument
1859 void WasmInterpreter::SetExprVal(WasmFrame* frame, int pc, WasmVal val) { in SetExprVal() argument