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 #if V8_TARGET_ARCH_X64 | 5 #if V8_TARGET_ARCH_X64 |
6 | 6 |
7 #include "src/crankshaft/x64/lithium-codegen-x64.h" | 7 #include "src/crankshaft/x64/lithium-codegen-x64.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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 } | 161 } |
162 } | 162 } |
163 return !is_aborted(); | 163 return !is_aborted(); |
164 } | 164 } |
165 | 165 |
166 | 166 |
167 void LCodeGen::DoPrologue(LPrologue* instr) { | 167 void LCodeGen::DoPrologue(LPrologue* instr) { |
168 Comment(";;; Prologue begin"); | 168 Comment(";;; Prologue begin"); |
169 | 169 |
170 // Possibly allocate a local context. | 170 // Possibly allocate a local context. |
171 if (info_->num_heap_slots() > 0) { | 171 if (info_->scope()->num_heap_slots() > 0) { |
172 Comment(";;; Allocate local context"); | 172 Comment(";;; Allocate local context"); |
173 bool need_write_barrier = true; | 173 bool need_write_barrier = true; |
174 // Argument to NewContext is the function, which is still in rdi. | 174 // Argument to NewContext is the function, which is still in rdi. |
175 int slots = info_->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; | 175 int slots = info_->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; |
176 Safepoint::DeoptMode deopt_mode = Safepoint::kNoLazyDeopt; | 176 Safepoint::DeoptMode deopt_mode = Safepoint::kNoLazyDeopt; |
177 if (info()->scope()->is_script_scope()) { | 177 if (info()->scope()->is_script_scope()) { |
178 __ Push(rdi); | 178 __ Push(rdi); |
179 __ Push(info()->scope()->GetScopeInfo(info()->isolate())); | 179 __ Push(info()->scope()->GetScopeInfo(info()->isolate())); |
180 __ CallRuntime(Runtime::kNewScriptContext); | 180 __ CallRuntime(Runtime::kNewScriptContext); |
181 deopt_mode = Safepoint::kLazyDeopt; | 181 deopt_mode = Safepoint::kLazyDeopt; |
182 } else if (slots <= FastNewContextStub::kMaximumSlots) { | 182 } else if (slots <= FastNewContextStub::kMaximumSlots) { |
183 FastNewContextStub stub(isolate(), slots); | 183 FastNewContextStub stub(isolate(), slots); |
184 __ CallStub(&stub); | 184 __ CallStub(&stub); |
185 // Result of FastNewContextStub is always in new space. | 185 // Result of FastNewContextStub is always in new space. |
(...skipping 5406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5592 __ bind(deferred->exit()); | 5592 __ bind(deferred->exit()); |
5593 __ bind(&done); | 5593 __ bind(&done); |
5594 } | 5594 } |
5595 | 5595 |
5596 #undef __ | 5596 #undef __ |
5597 | 5597 |
5598 } // namespace internal | 5598 } // namespace internal |
5599 } // namespace v8 | 5599 } // namespace v8 |
5600 | 5600 |
5601 #endif // V8_TARGET_ARCH_X64 | 5601 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |