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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 bool need_write_barrier = true; | 169 bool need_write_barrier = true; |
170 // Argument to NewContext is the function, which is still in edi. | 170 // Argument to NewContext is the function, which is still in edi. |
171 int slots = info_->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; | 171 int slots = info_->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; |
172 Safepoint::DeoptMode deopt_mode = Safepoint::kNoLazyDeopt; | 172 Safepoint::DeoptMode deopt_mode = Safepoint::kNoLazyDeopt; |
173 if (info()->scope()->is_script_scope()) { | 173 if (info()->scope()->is_script_scope()) { |
174 __ push(edi); | 174 __ push(edi); |
175 __ Push(info()->scope()->scope_info()); | 175 __ Push(info()->scope()->scope_info()); |
176 __ CallRuntime(Runtime::kNewScriptContext); | 176 __ CallRuntime(Runtime::kNewScriptContext); |
177 deopt_mode = Safepoint::kLazyDeopt; | 177 deopt_mode = Safepoint::kLazyDeopt; |
178 } else { | 178 } else { |
179 FastNewFunctionContextStub stub(isolate()); | 179 FastNewFunctionContextStub stub(isolate(), |
| 180 info()->scope()->is_eval_scope()); |
180 __ mov(FastNewFunctionContextDescriptor::SlotsRegister(), | 181 __ mov(FastNewFunctionContextDescriptor::SlotsRegister(), |
181 Immediate(slots)); | 182 Immediate(slots)); |
182 __ CallStub(&stub); | 183 __ CallStub(&stub); |
183 // Result of FastNewFunctionContextStub is always in new space. | 184 // Result of FastNewFunctionContextStub is always in new space. |
184 need_write_barrier = false; | 185 need_write_barrier = false; |
185 } | 186 } |
186 RecordSafepoint(deopt_mode); | 187 RecordSafepoint(deopt_mode); |
187 | 188 |
188 // Context is returned in eax. It replaces the context passed to us. | 189 // Context is returned in eax. It replaces the context passed to us. |
189 // It's saved in the stack and kept live in esi. | 190 // It's saved in the stack and kept live in esi. |
(...skipping 4972 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5162 __ bind(deferred->exit()); | 5163 __ bind(deferred->exit()); |
5163 __ bind(&done); | 5164 __ bind(&done); |
5164 } | 5165 } |
5165 | 5166 |
5166 #undef __ | 5167 #undef __ |
5167 | 5168 |
5168 } // namespace internal | 5169 } // namespace internal |
5169 } // namespace v8 | 5170 } // namespace v8 |
5170 | 5171 |
5171 #endif // V8_TARGET_ARCH_IA32 | 5172 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |