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_IA32 | 5 #if V8_TARGET_ARCH_IA32 |
6 | 6 |
7 #include "src/crankshaft/ia32/lithium-codegen-ia32.h" | 7 #include "src/crankshaft/ia32/lithium-codegen-ia32.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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 if (info()->saves_caller_doubles()) SaveCallerDoubles(); | 158 if (info()->saves_caller_doubles()) SaveCallerDoubles(); |
159 } | 159 } |
160 return !is_aborted(); | 160 return !is_aborted(); |
161 } | 161 } |
162 | 162 |
163 | 163 |
164 void LCodeGen::DoPrologue(LPrologue* instr) { | 164 void LCodeGen::DoPrologue(LPrologue* instr) { |
165 Comment(";;; Prologue begin"); | 165 Comment(";;; Prologue begin"); |
166 | 166 |
167 // Possibly allocate a local context. | 167 // Possibly allocate a local context. |
168 if (info_->num_heap_slots() > 0) { | 168 if (info_->scope()->num_heap_slots() > 0) { |
169 Comment(";;; Allocate local context"); | 169 Comment(";;; Allocate local context"); |
170 bool need_write_barrier = true; | 170 bool need_write_barrier = true; |
171 // Argument to NewContext is the function, which is still in edi. | 171 // Argument to NewContext is the function, which is still in edi. |
172 int slots = info_->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; | 172 int slots = info_->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; |
173 Safepoint::DeoptMode deopt_mode = Safepoint::kNoLazyDeopt; | 173 Safepoint::DeoptMode deopt_mode = Safepoint::kNoLazyDeopt; |
174 if (info()->scope()->is_script_scope()) { | 174 if (info()->scope()->is_script_scope()) { |
175 __ push(edi); | 175 __ push(edi); |
176 __ Push(info()->scope()->GetScopeInfo(info()->isolate())); | 176 __ Push(info()->scope()->GetScopeInfo(info()->isolate())); |
177 __ CallRuntime(Runtime::kNewScriptContext); | 177 __ CallRuntime(Runtime::kNewScriptContext); |
178 deopt_mode = Safepoint::kLazyDeopt; | 178 deopt_mode = Safepoint::kLazyDeopt; |
179 } else if (slots <= FastNewContextStub::kMaximumSlots) { | 179 } else if (slots <= FastNewContextStub::kMaximumSlots) { |
180 FastNewContextStub stub(isolate(), slots); | 180 FastNewContextStub stub(isolate(), slots); |
181 __ CallStub(&stub); | 181 __ CallStub(&stub); |
182 // Result of FastNewContextStub is always in new space. | 182 // Result of FastNewContextStub is always in new space. |
(...skipping 5097 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5280 __ bind(deferred->exit()); | 5280 __ bind(deferred->exit()); |
5281 __ bind(&done); | 5281 __ bind(&done); |
5282 } | 5282 } |
5283 | 5283 |
5284 #undef __ | 5284 #undef __ |
5285 | 5285 |
5286 } // namespace internal | 5286 } // namespace internal |
5287 } // namespace v8 | 5287 } // namespace v8 |
5288 | 5288 |
5289 #endif // V8_TARGET_ARCH_IA32 | 5289 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |