| 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 #include "src/snapshot/serialize.h" // TODO(turbofan): RootIndexMap | 10 #include "src/snapshot/serialize.h" // TODO(turbofan): RootIndexMap |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 needs_frame_(frame->GetSpillSlotCount() > 0 || code->ContainsCall()) { | 55 needs_frame_(frame->GetSpillSlotCount() > 0 || code->ContainsCall()) { |
| 56 for (int i = 0; i < code->InstructionBlockCount(); ++i) { | 56 for (int i = 0; i < code->InstructionBlockCount(); ++i) { |
| 57 new (&labels_[i]) Label; | 57 new (&labels_[i]) Label; |
| 58 } | 58 } |
| 59 } | 59 } |
| 60 | 60 |
| 61 | 61 |
| 62 Handle<Code> CodeGenerator::GenerateCode() { | 62 Handle<Code> CodeGenerator::GenerateCode() { |
| 63 CompilationInfo* info = this->info(); | 63 CompilationInfo* info = this->info(); |
| 64 | 64 |
| 65 // Open a frame scope to indicate that there is a frame on the stack. The |
| 66 // MANUAL indicates that the scope shouldn't actually generate code to set up |
| 67 // the frame (that is done in AssemblePrologue). |
| 68 FrameScope frame_scope(masm(), StackFrame::MANUAL); |
| 69 |
| 65 // Emit a code line info recording start event. | 70 // Emit a code line info recording start event. |
| 66 PositionsRecorder* recorder = masm()->positions_recorder(); | 71 PositionsRecorder* recorder = masm()->positions_recorder(); |
| 67 LOG_CODE_EVENT(isolate(), CodeStartLinePosInfoRecordEvent(recorder)); | 72 LOG_CODE_EVENT(isolate(), CodeStartLinePosInfoRecordEvent(recorder)); |
| 68 | 73 |
| 69 // Place function entry hook if requested to do so. | 74 // Place function entry hook if requested to do so. |
| 70 if (linkage()->GetIncomingDescriptor()->IsJSFunctionCall()) { | 75 if (linkage()->GetIncomingDescriptor()->IsJSFunctionCall()) { |
| 71 ProfileEntryHookStub::MaybeCallEntryHook(masm()); | 76 ProfileEntryHookStub::MaybeCallEntryHook(masm()); |
| 72 } | 77 } |
| 73 | 78 |
| 74 // Architecture-specific, linkage-specific prologue. | 79 // Architecture-specific, linkage-specific prologue. |
| (...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 707 : masm_(gen->masm()), next_(gen->ools_) { | 712 : masm_(gen->masm()), next_(gen->ools_) { |
| 708 gen->ools_ = this; | 713 gen->ools_ = this; |
| 709 } | 714 } |
| 710 | 715 |
| 711 | 716 |
| 712 OutOfLineCode::~OutOfLineCode() {} | 717 OutOfLineCode::~OutOfLineCode() {} |
| 713 | 718 |
| 714 } // namespace compiler | 719 } // namespace compiler |
| 715 } // namespace internal | 720 } // namespace internal |
| 716 } // namespace v8 | 721 } // namespace v8 |
| OLD | NEW |