Revision f230a1cf deps/v8/src/codegen.cc
deps/v8/src/codegen.cc | ||
---|---|---|
113 | 113 |
masm->GetCode(&desc); |
114 | 114 |
Handle<Code> code = |
115 | 115 |
isolate->factory()->NewCode(desc, flags, masm->CodeObject(), |
116 |
false, is_crankshafted); |
|
116 |
false, is_crankshafted, |
|
117 |
info->prologue_offset()); |
|
117 | 118 |
isolate->counters()->total_compiled_code_size()->Increment( |
118 | 119 |
code->instruction_size()); |
119 |
code->set_prologue_offset(info->prologue_offset()); |
|
120 |
isolate->heap()->IncrementCodeGeneratedBytes(is_crankshafted, |
|
121 |
code->instruction_size()); |
|
120 | 122 |
return code; |
121 | 123 |
} |
122 | 124 |
|
... | ... | |
132 | 134 |
if (print_code) { |
133 | 135 |
// Print the source code if available. |
134 | 136 |
FunctionLiteral* function = info->function(); |
135 |
if (code->kind() == Code::OPTIMIZED_FUNCTION) { |
|
137 |
bool print_source = code->kind() == Code::OPTIMIZED_FUNCTION || |
|
138 |
code->kind() == Code::FUNCTION; |
|
139 |
if (print_source) { |
|
136 | 140 |
Handle<Script> script = info->script(); |
137 | 141 |
if (!script->IsUndefined() && !script->source()->IsUndefined()) { |
138 | 142 |
PrintF("--- Raw source ---\n"); |
... | ... | |
160 | 164 |
} else { |
161 | 165 |
PrintF("--- Code ---\n"); |
162 | 166 |
} |
167 |
if (print_source) { |
|
168 |
PrintF("source_position = %d\n", function->start_position()); |
|
169 |
} |
|
163 | 170 |
if (info->IsStub()) { |
164 | 171 |
CodeStub::Major major_key = info->code_stub()->MajorKey(); |
165 | 172 |
code->Disassemble(CodeStub::MajorName(major_key, false)); |
166 | 173 |
} else { |
167 | 174 |
code->Disassemble(*function->debug_name()->ToCString()); |
168 | 175 |
} |
176 |
PrintF("--- End code ---\n"); |
|
169 | 177 |
} |
170 | 178 |
#endif // ENABLE_DISASSEMBLER |
171 | 179 |
} |
Also available in: Unified diff