| 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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 Comment(";;; Allocate local context"); | 171 Comment(";;; Allocate local context"); |
| 172 bool need_write_barrier = true; | 172 bool need_write_barrier = true; |
| 173 // Argument to NewContext is the function, which is still in edi. | 173 // Argument to NewContext is the function, which is still in edi. |
| 174 int slots = info_->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; | 174 int slots = info_->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; |
| 175 Safepoint::DeoptMode deopt_mode = Safepoint::kNoLazyDeopt; | 175 Safepoint::DeoptMode deopt_mode = Safepoint::kNoLazyDeopt; |
| 176 if (info()->scope()->is_script_scope()) { | 176 if (info()->scope()->is_script_scope()) { |
| 177 __ push(edi); | 177 __ push(edi); |
| 178 __ Push(info()->scope()->GetScopeInfo(info()->isolate())); | 178 __ Push(info()->scope()->GetScopeInfo(info()->isolate())); |
| 179 __ CallRuntime(Runtime::kNewScriptContext); | 179 __ CallRuntime(Runtime::kNewScriptContext); |
| 180 deopt_mode = Safepoint::kLazyDeopt; | 180 deopt_mode = Safepoint::kLazyDeopt; |
| 181 } else if (slots <= FastNewContextStub::kMaximumSlots) { | 181 } else if (slots <= FastNewFunctionContextStub::kMaximumSlots) { |
| 182 FastNewContextStub stub(isolate(), slots); | 182 FastNewFunctionContextStub stub(isolate(), slots); |
| 183 __ CallStub(&stub); | 183 __ CallStub(&stub); |
| 184 // Result of FastNewContextStub is always in new space. | 184 // Result of FastNewFunctionContextStub is always in new space. |
| 185 need_write_barrier = false; | 185 need_write_barrier = false; |
| 186 } else { | 186 } else { |
| 187 __ push(edi); | 187 __ push(edi); |
| 188 __ CallRuntime(Runtime::kNewFunctionContext); | 188 __ CallRuntime(Runtime::kNewFunctionContext); |
| 189 } | 189 } |
| 190 RecordSafepoint(deopt_mode); | 190 RecordSafepoint(deopt_mode); |
| 191 | 191 |
| 192 // Context is returned in eax. It replaces the context passed to us. | 192 // Context is returned in eax. It replaces the context passed to us. |
| 193 // It's saved in the stack and kept live in esi. | 193 // It's saved in the stack and kept live in esi. |
| 194 __ mov(esi, eax); | 194 __ mov(esi, eax); |
| (...skipping 5094 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5289 __ bind(deferred->exit()); | 5289 __ bind(deferred->exit()); |
| 5290 __ bind(&done); | 5290 __ bind(&done); |
| 5291 } | 5291 } |
| 5292 | 5292 |
| 5293 #undef __ | 5293 #undef __ |
| 5294 | 5294 |
| 5295 } // namespace internal | 5295 } // namespace internal |
| 5296 } // namespace v8 | 5296 } // namespace v8 |
| 5297 | 5297 |
| 5298 #endif // V8_TARGET_ARCH_IA32 | 5298 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |