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 #if V8_TARGET_ARCH_X87 | 5 #if V8_TARGET_ARCH_X87 |
6 | 6 |
7 #include "src/crankshaft/x87/lithium-codegen-x87.h" | 7 #include "src/crankshaft/x87/lithium-codegen-x87.h" |
8 | 8 |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 __ fninit(); | 128 __ fninit(); |
129 | 129 |
130 return !is_aborted(); | 130 return !is_aborted(); |
131 } | 131 } |
132 | 132 |
133 | 133 |
134 void LCodeGen::DoPrologue(LPrologue* instr) { | 134 void LCodeGen::DoPrologue(LPrologue* instr) { |
135 Comment(";;; Prologue begin"); | 135 Comment(";;; Prologue begin"); |
136 | 136 |
137 // Possibly allocate a local context. | 137 // Possibly allocate a local context. |
138 if (info_->num_heap_slots() > 0) { | 138 if (info_->scope()->num_heap_slots() > 0) { |
139 Comment(";;; Allocate local context"); | 139 Comment(";;; Allocate local context"); |
140 bool need_write_barrier = true; | 140 bool need_write_barrier = true; |
141 // Argument to NewContext is the function, which is still in edi. | 141 // Argument to NewContext is the function, which is still in edi. |
142 int slots = info_->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; | 142 int slots = info_->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; |
143 Safepoint::DeoptMode deopt_mode = Safepoint::kNoLazyDeopt; | 143 Safepoint::DeoptMode deopt_mode = Safepoint::kNoLazyDeopt; |
144 if (info()->scope()->is_script_scope()) { | 144 if (info()->scope()->is_script_scope()) { |
145 __ push(edi); | 145 __ push(edi); |
146 __ Push(info()->scope()->GetScopeInfo(info()->isolate())); | 146 __ Push(info()->scope()->GetScopeInfo(info()->isolate())); |
147 __ CallRuntime(Runtime::kNewScriptContext); | 147 __ CallRuntime(Runtime::kNewScriptContext); |
148 deopt_mode = Safepoint::kLazyDeopt; | 148 deopt_mode = Safepoint::kLazyDeopt; |
149 } else if (slots <= FastNewContextStub::kMaximumSlots) { | 149 } else if (slots <= FastNewContextStub::kMaximumSlots) { |
150 FastNewContextStub stub(isolate(), slots); | 150 FastNewContextStub stub(isolate(), slots); |
151 __ CallStub(&stub); | 151 __ CallStub(&stub); |
152 // Result of FastNewContextStub is always in new space. | 152 // Result of FastNewContextStub is always in new space. |
(...skipping 5672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5825 __ bind(deferred->exit()); | 5825 __ bind(deferred->exit()); |
5826 __ bind(&done); | 5826 __ bind(&done); |
5827 } | 5827 } |
5828 | 5828 |
5829 #undef __ | 5829 #undef __ |
5830 | 5830 |
5831 } // namespace internal | 5831 } // namespace internal |
5832 } // namespace v8 | 5832 } // namespace v8 |
5833 | 5833 |
5834 #endif // V8_TARGET_ARCH_X87 | 5834 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |