| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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/compiler/code-generator.h" | 5 #include "src/compiler/code-generator.h" |
| 6 | 6 |
| 7 #include "src/compiler/code-generator-impl.h" | 7 #include "src/compiler/code-generator-impl.h" |
| 8 #include "src/compiler/linkage.h" | 8 #include "src/compiler/linkage.h" |
| 9 #include "src/compiler/pipeline.h" | 9 #include "src/compiler/pipeline.h" |
| 10 | 10 |
| 11 namespace v8 { | 11 namespace v8 { |
| 12 namespace internal { | 12 namespace internal { |
| 13 namespace compiler { | 13 namespace compiler { |
| 14 | 14 |
| 15 CodeGenerator::CodeGenerator(InstructionSequence* code) | 15 CodeGenerator::CodeGenerator(InstructionSequence* code) |
| 16 : code_(code), | 16 : code_(code), |
| 17 current_block_(NULL), | 17 current_block_(NULL), |
| 18 current_source_position_(SourcePosition::Invalid()), | 18 current_source_position_(SourcePosition::Invalid()), |
| 19 masm_(code->zone()->isolate(), NULL, 0), | 19 masm_(code->zone()->isolate(), NULL, 0), |
| 20 resolver_(this), | 20 resolver_(this), |
| 21 safepoints_(code->zone()), | 21 safepoints_(code->zone()), |
| 22 lazy_deoptimization_entries_( | 22 lazy_deoptimization_entries_(code->zone()), |
| 23 LazyDeoptimizationEntries::allocator_type(code->zone())), | 23 deoptimization_states_(code->zone()), |
| 24 deoptimization_states_( | 24 deoptimization_literals_(code->zone()), |
| 25 DeoptimizationStates::allocator_type(code->zone())), | |
| 26 deoptimization_literals_(Literals::allocator_type(code->zone())), | |
| 27 translations_(code->zone()) { | 25 translations_(code->zone()) { |
| 28 deoptimization_states_.resize(code->GetDeoptimizationEntryCount(), NULL); | 26 deoptimization_states_.resize(code->GetDeoptimizationEntryCount(), NULL); |
| 29 } | 27 } |
| 30 | 28 |
| 31 | 29 |
| 32 Handle<Code> CodeGenerator::GenerateCode() { | 30 Handle<Code> CodeGenerator::GenerateCode() { |
| 33 CompilationInfo* info = linkage()->info(); | 31 CompilationInfo* info = linkage()->info(); |
| 34 | 32 |
| 35 // Emit a code line info recording start event. | 33 // Emit a code line info recording start event. |
| 36 PositionsRecorder* recorder = masm()->positions_recorder(); | 34 PositionsRecorder* recorder = masm()->positions_recorder(); |
| (...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 } | 409 } |
| 412 | 410 |
| 413 | 411 |
| 414 void CodeGenerator::AddNopForSmiCodeInlining() { UNIMPLEMENTED(); } | 412 void CodeGenerator::AddNopForSmiCodeInlining() { UNIMPLEMENTED(); } |
| 415 | 413 |
| 416 #endif // !V8_TURBOFAN_BACKEND | 414 #endif // !V8_TURBOFAN_BACKEND |
| 417 | 415 |
| 418 } // namespace compiler | 416 } // namespace compiler |
| 419 } // namespace internal | 417 } // namespace internal |
| 420 } // namespace v8 | 418 } // namespace v8 |
| OLD | NEW |