Lines Matching refs:code
2 // Use of this source code is governed by a BSD-style license that can be
7 #include "src/code-stubs.h"
39 explicit V8NameConverter(Code* code) : code_(code) {}
42 Code* code() const { return code_; }
44 Code* code_;
59 // print as code offset, if it seems reasonable
71 // The V8NameConverter is used for well known code, so we can "safely"
72 // dereference pointers in generated code.
106 if (converter.code() != NULL) {
107 it = new RelocIterator(converter.code());
109 // No relocation information when printing code stubs.
132 // raw pointer embedded in code stream, e.g., jump table
180 RelocInfo relocinfo(pcs[i], rmodes[i], datas[i], converter.code());
210 out.AddFormatted(" ;; code:");
214 Code* code = Code::GetCodeFromTargetAddress(relocinfo.target_address());
215 Code::Kind kind = code->kind();
216 if (code->is_inline_cache_stub()) {
217 if (kind == Code::LOAD_IC &&
218 LoadIC::GetContextualMode(code->extra_ic_state()) == CONTEXTUAL) {
221 InlineCacheState ic_state = code->ic_state();
222 out.AddFormatted(" %s, %s", Code::Kind2String(kind),
223 Code::ICState2String(ic_state));
225 Code::StubType type = code->type();
226 out.AddFormatted(", %s", Code::StubType2String(type));
228 } else if (kind == Code::STUB || kind == Code::HANDLER) {
230 // from the code object.
231 Object* obj = heap->code_stubs()->SlowReverseLookup(code);
237 CodeStub::Major major_key = CodeStub::GetMajorKey(code);
240 Code::Kind2String(kind),
254 out.AddFormatted(" %s", Code::Kind2String(kind));
314 // Called by Code::CodePrint.
315 void Disassembler::Decode(FILE* f, Code* code) {
316 Isolate* isolate = code->GetIsolate();
317 int decode_size = code->is_crankshafted()
318 ? static_cast<int>(code->safepoint_table_offset())
319 : code->instruction_size();
321 if (code->kind() == Code::FUNCTION) {
323 Min(decode_size, static_cast<int>(code->back_edge_table_offset()));
326 byte* begin = code->instruction_start();
328 V8NameConverter v8NameConverter(code);
340 void Disassembler::Decode(FILE* f, Code* code) {}