OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/ast.h" | 7 #include "src/ast.h" |
8 #include "src/ast-numbering.h" | 8 #include "src/ast-numbering.h" |
9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
331 unsigned table_offset = cgen.EmitBackEdgeTable(); | 331 unsigned table_offset = cgen.EmitBackEdgeTable(); |
332 | 332 |
333 Code::Flags flags = Code::ComputeFlags(Code::FUNCTION); | 333 Code::Flags flags = Code::ComputeFlags(Code::FUNCTION); |
334 Handle<Code> code = CodeGenerator::MakeCodeEpilogue(&masm, flags, info); | 334 Handle<Code> code = CodeGenerator::MakeCodeEpilogue(&masm, flags, info); |
335 code->set_optimizable(info->IsOptimizable() && | 335 code->set_optimizable(info->IsOptimizable() && |
336 !info->function()->dont_optimize() && | 336 !info->function()->dont_optimize() && |
337 info->function()->scope()->AllowsLazyCompilation()); | 337 info->function()->scope()->AllowsLazyCompilation()); |
338 cgen.PopulateDeoptimizationData(code); | 338 cgen.PopulateDeoptimizationData(code); |
339 cgen.PopulateTypeFeedbackInfo(code); | 339 cgen.PopulateTypeFeedbackInfo(code); |
340 code->set_has_deoptimization_support(info->HasDeoptimizationSupport()); | 340 code->set_has_deoptimization_support(info->HasDeoptimizationSupport()); |
| 341 code->set_has_reloc_info_for_serialization(info->will_serialize()); |
341 code->set_handler_table(*cgen.handler_table()); | 342 code->set_handler_table(*cgen.handler_table()); |
342 code->set_compiled_optimizable(info->IsOptimizable()); | 343 code->set_compiled_optimizable(info->IsOptimizable()); |
343 code->set_allow_osr_at_loop_nesting_level(0); | 344 code->set_allow_osr_at_loop_nesting_level(0); |
344 code->set_profiler_ticks(0); | 345 code->set_profiler_ticks(0); |
345 code->set_back_edge_table_offset(table_offset); | 346 code->set_back_edge_table_offset(table_offset); |
346 CodeGenerator::PrintCode(code, info); | 347 CodeGenerator::PrintCode(code, info); |
347 info->SetCode(code); | 348 info->SetCode(code); |
348 void* line_info = masm.positions_recorder()->DetachJITHandlerData(); | 349 void* line_info = masm.positions_recorder()->DetachJITHandlerData(); |
349 LOG_CODE_EVENT(isolate, CodeEndLinePosInfoRecordEvent(*code, line_info)); | 350 LOG_CODE_EVENT(isolate, CodeEndLinePosInfoRecordEvent(*code, line_info)); |
350 | 351 |
(...skipping 1467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1818 } | 1819 } |
1819 codegen_->PrepareForBailoutForId(exit_id_, NO_REGISTERS); | 1820 codegen_->PrepareForBailoutForId(exit_id_, NO_REGISTERS); |
1820 codegen_->scope_ = saved_scope_; | 1821 codegen_->scope_ = saved_scope_; |
1821 } | 1822 } |
1822 | 1823 |
1823 | 1824 |
1824 #undef __ | 1825 #undef __ |
1825 | 1826 |
1826 | 1827 |
1827 } } // namespace v8::internal | 1828 } } // namespace v8::internal |
OLD | NEW |