Lines Matching defs:code

2 // Use of this source code is governed by a BSD-style license that can be
22 #include "src/objects/code.h"
32 #include "src/wasm/wasm-code-manager.h"
50 // field. StackHandlers allocated from generated code have 0 as padding.
125 // frame code that computes the caller state to access the top
446 // code. INTERPRETED frames refer to bytecode.
562 return isolate->inner_pointer_to_code_cache()->GetCacheEntry(pc)->code;
579 Object code = holder;
580 v->VisitRunningCode(FullObjectSlot(&code));
581 if (code == holder) return;
582 holder = Code::unchecked_cast(code);
634 // If the {pc} does not point into WebAssembly code we can rely on the
652 // Look up the code object to figure out the type of the stack frame.
761 return FromCodeT(isolate()->builtins()->code(Builtin::kJSEntry));
783 return FromCodeT(isolate()->builtins()->code(Builtin::kJSConstructEntry));
878 Code code = LookupCode();
879 int code_offset = code.GetOffsetFromInstructionStart(isolate(), pc());
881 isolate(), receiver(), function(), AbstractCode::cast(code), code_offset,
961 Code code;
963 accumulator->PrintFunction(function, receiver, &code);
991 Code code = LookupCode();
992 int code_offset = code.GetOffsetFromInstructionStart(isolate(), pc());
993 return AbstractCode::cast(code).SourcePosition(code_offset);
1033 // Find the code and compute the safepoint information.
1037 Code code;
1066 entry->code.GetSafepointEntry(isolate(), inner_pointer);
1070 entry->code.GetSafepointEntry(isolate(), inner_pointer));
1073 code = entry->code;
1075 stack_slots = code.stack_slots();
1077 has_tagged_outgoing_params = code.has_tagged_outgoing_params();
1188 // When external code space is enabled the spill slot could contain both
1256 // For the off-heap code cases, we can skip this.
1257 if (!code.is_null()) {
1259 IteratePc(v, pc_address(), constant_pool_address(), code);
1279 Code code = LookupCode();
1280 DCHECK(code.is_turbofanned());
1281 DCHECK_EQ(code.kind(), CodeKind::BUILTIN);
1282 HandlerTable table(code);
1283 int pc_offset = code.GetOffsetFromInstructionStart(isolate(), pc());
1304 return FromCodeT(function().code());
1308 Code code = LookupCode();
1309 if (code.kind() == CodeKind::BUILTIN) {
1346 Code code = LookupCode();
1347 int offset = code.GetOffsetFromInstructionStart(isolate(), pc());
1348 Handle<AbstractCode> abstract_code(AbstractCode::cast(code), isolate());
1391 AbstractCode code, int code_offset,
1394 PrintF(file, "%s", CodeKindToMarker(code.kind()));
1399 int source_pos = code.SourcePosition(code_offset);
1435 // TODO(pthier): AbstractCode should fully support Baseline code.
1440 Code code = frame->unchecked_code();
1441 code_offset = code.GetOffsetFromInstructionStart(isolate, frame->pc());
1465 AbstractCode code,
1474 int source_pos = code.SourcePosition(code_offset);
1523 kJavaScriptCallArgCountRegister.code());
1641 Isolate* isolate, Handle<WasmInstanceObject> instance, wasm::WasmCode* code,
1646 code_(code),
1654 return code()->index();
1762 Code code = LookupCode();
1763 if (code.kind() == CodeKind::BUILTIN) {
1803 // Determine the underlying code object and the position within it from
1839 // We cannot perform exception prediction on optimized code. Instead, we need
1840 // to use FrameSummary to find the corresponding code offset in unoptimized
1841 // code to perform prediction there.
1843 Code code = LookupCode();
1844 HandlerTable table(code);
1845 int pc_offset = code.GetOffsetFromInstructionStart(isolate(), pc());
1851 if (CodeKindCanDeoptimize(code.kind()) && code.marked_for_deoptimization()) {
1852 SafepointTable safepoints(isolate(), pc(), code);
1863 Code code = FromCodeT(opt_function.code());
1865 // The code object may have been replaced by lazy deoptimization. Fall
1867 // code object.
1868 if (!code.contains(isolate(), pc())) {
1869 code = isolate()->heap()->GcSafeFindCodeForInnerPointer(pc());
1871 DCHECK(!code.is_null());
1872 DCHECK(CodeKindCanDeoptimize(code.kind()));
1874 SafepointEntry safepoint_entry = code.GetSafepointEntry(isolate(), pc());
1877 return DeoptimizationData::cast(code.deoptimization_data());
1890 Code code = LookupCode();
1891 if (code.kind() == CodeKind::BUILTIN) {
1944 AbstractCode code = AbstractCode::cast(GetBytecodeArray());
1946 return code.SourcePosition(code_offset);
2069 int func_code_offset = module->functions[func_index].code.offset();
2110 wasm::WasmCode* code = wasm_code();
2111 int offset = static_cast<int>(pc() - code->instruction_start());
2112 return code->GetSourcePositionBefore(offset);
2125 // since this code object is part of our stack.
2127 wasm::WasmCode* code = wasm_code();
2128 int offset = static_cast<int>(pc() - code->instruction_start());
2130 FrameSummary::WasmFrameSummary summary(isolate(), instance, code, offset,
2138 wasm::WasmCode* code =
2142 if (!code || code->kind() != wasm::WasmCode::kWasmToJsWrapper) return false;
2143 int offset = static_cast<int>(callee_pc() - code->instruction_start());
2144 int pos = code->GetSourcePositionBefore(offset);
2152 wasm::WasmCode* code = wasm::GetWasmCodeManager()->LookupCode(pc());
2153 if (!code->IsAnonymous() && code->handler_table_size() > 0) {
2154 HandlerTable table(code);
2155 int pc_offset = static_cast<int>(pc() - code->instruction_start());
2163 wasm::WasmCode* code = wasm::GetWasmCodeManager()->LookupCode(caller_pc());
2164 DCHECK(code);
2165 SafepointTable table(code);
2188 Code code = GetContainingCode(isolate(), pc());
2203 if (code.is_null() || !code.is_builtin() ||
2204 code.builtin_id() != Builtin::kGenericJSToWasmWrapper) {
2224 // We cannot DCHECK that the pc matches the expected builtin code here,
2268 Code code) {
2269 if (FLAG_max_stack_trace_source_length != 0 && !code.is_null()) {
2292 Code code;
2294 accumulator->PrintFunction(function, receiver, &code);
2297 // Get scope information for nicer output, if possible. If code is nullptr, or
2339 PrintFunctionSource(accumulator, *shared, code);
2389 PrintFunctionSource(accumulator, *shared, code);
2422 Code code = LookupCode();
2423 IteratePc(v, pc_address(), constant_pool_address(), code);
2430 if (code.has_tagged_outgoing_params()) IterateExpressions(v);
2460 DCHECK(entry->code ==
2463 // Because this code may be interrupted by a profiling signal that
2464 // also queries the cache, we cannot update inner_pointer before the code
2466 // the code has been computed.
2467 entry->code =