| 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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 bool need_write_barrier = true; | 139 bool need_write_barrier = true; |
| 140 // Argument to NewContext is the function, which is still in edi. | 140 // Argument to NewContext is the function, which is still in edi. |
| 141 int slots = info_->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; | 141 int slots = info_->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; |
| 142 Safepoint::DeoptMode deopt_mode = Safepoint::kNoLazyDeopt; | 142 Safepoint::DeoptMode deopt_mode = Safepoint::kNoLazyDeopt; |
| 143 if (info()->scope()->is_script_scope()) { | 143 if (info()->scope()->is_script_scope()) { |
| 144 __ push(edi); | 144 __ push(edi); |
| 145 __ Push(info()->scope()->scope_info()); | 145 __ Push(info()->scope()->scope_info()); |
| 146 __ CallRuntime(Runtime::kNewScriptContext); | 146 __ CallRuntime(Runtime::kNewScriptContext); |
| 147 deopt_mode = Safepoint::kLazyDeopt; | 147 deopt_mode = Safepoint::kLazyDeopt; |
| 148 } else { | 148 } else { |
| 149 FastNewFunctionContextStub stub(isolate()); | 149 FastNewFunctionContextStub stub(isolate(), |
| 150 info()->scope()->is_eval_scope()); |
| 150 __ mov(FastNewFunctionContextDescriptor::SlotsRegister(), | 151 __ mov(FastNewFunctionContextDescriptor::SlotsRegister(), |
| 151 Immediate(slots)); | 152 Immediate(slots)); |
| 152 __ CallStub(&stub); | 153 __ CallStub(&stub); |
| 153 // Result of FastNewFunctionContextStub is always in new space. | 154 // Result of FastNewFunctionContextStub is always in new space. |
| 154 need_write_barrier = false; | 155 need_write_barrier = false; |
| 155 } | 156 } |
| 156 RecordSafepoint(deopt_mode); | 157 RecordSafepoint(deopt_mode); |
| 157 | 158 |
| 158 // Context is returned in eax. It replaces the context passed to us. | 159 // Context is returned in eax. It replaces the context passed to us. |
| 159 // It's saved in the stack and kept live in esi. | 160 // It's saved in the stack and kept live in esi. |
| (...skipping 5493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5653 __ bind(deferred->exit()); | 5654 __ bind(deferred->exit()); |
| 5654 __ bind(&done); | 5655 __ bind(&done); |
| 5655 } | 5656 } |
| 5656 | 5657 |
| 5657 #undef __ | 5658 #undef __ |
| 5658 | 5659 |
| 5659 } // namespace internal | 5660 } // namespace internal |
| 5660 } // namespace v8 | 5661 } // namespace v8 |
| 5661 | 5662 |
| 5662 #endif // V8_TARGET_ARCH_X87 | 5663 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |