| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // | 2 // |
| 3 // Use of this source code is governed by a BSD-style license that can be | 3 // Use of this source code is governed by a BSD-style license that can be |
| 4 // found in the LICENSE file. | 4 // found in the LICENSE file. |
| 5 | 5 |
| 6 #include "src/crankshaft/s390/lithium-codegen-s390.h" | 6 #include "src/crankshaft/s390/lithium-codegen-s390.h" |
| 7 | 7 |
| 8 #include "src/base/bits.h" | 8 #include "src/base/bits.h" |
| 9 #include "src/builtins/builtins-constructor.h" | 9 #include "src/builtins/builtins-constructor.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 bool need_write_barrier = true; | 171 bool need_write_barrier = true; |
| 172 // Argument to NewContext is the function, which is in r3. | 172 // Argument to NewContext is the function, which is in r3. |
| 173 int slots = info()->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; | 173 int slots = info()->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; |
| 174 Safepoint::DeoptMode deopt_mode = Safepoint::kNoLazyDeopt; | 174 Safepoint::DeoptMode deopt_mode = Safepoint::kNoLazyDeopt; |
| 175 if (info()->scope()->is_script_scope()) { | 175 if (info()->scope()->is_script_scope()) { |
| 176 __ push(r3); | 176 __ push(r3); |
| 177 __ Push(info()->scope()->scope_info()); | 177 __ Push(info()->scope()->scope_info()); |
| 178 __ CallRuntime(Runtime::kNewScriptContext); | 178 __ CallRuntime(Runtime::kNewScriptContext); |
| 179 deopt_mode = Safepoint::kLazyDeopt; | 179 deopt_mode = Safepoint::kLazyDeopt; |
| 180 } else { | 180 } else { |
| 181 if (slots <= | 181 if (slots <= ConstructorBuiltins::MaximumFunctionContextSlots()) { |
| 182 ConstructorBuiltinsAssembler::MaximumFunctionContextSlots()) { | |
| 183 Callable callable = CodeFactory::FastNewFunctionContext( | 182 Callable callable = CodeFactory::FastNewFunctionContext( |
| 184 isolate(), info()->scope()->scope_type()); | 183 isolate(), info()->scope()->scope_type()); |
| 185 __ mov(FastNewFunctionContextDescriptor::SlotsRegister(), | 184 __ mov(FastNewFunctionContextDescriptor::SlotsRegister(), |
| 186 Operand(slots)); | 185 Operand(slots)); |
| 187 __ Call(callable.code(), RelocInfo::CODE_TARGET); | 186 __ Call(callable.code(), RelocInfo::CODE_TARGET); |
| 188 // Result of the FastNewFunctionContext builtin is always in new space. | 187 // Result of the FastNewFunctionContext builtin is always in new space. |
| 189 need_write_barrier = false; | 188 need_write_barrier = false; |
| 190 } else { | 189 } else { |
| 191 __ push(r3); | 190 __ push(r3); |
| 192 __ Push(Smi::FromInt(info()->scope()->scope_type())); | 191 __ Push(Smi::FromInt(info()->scope()->scope_type())); |
| (...skipping 5357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5550 __ LoadP(result, | 5549 __ LoadP(result, |
| 5551 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); | 5550 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); |
| 5552 __ bind(deferred->exit()); | 5551 __ bind(deferred->exit()); |
| 5553 __ bind(&done); | 5552 __ bind(&done); |
| 5554 } | 5553 } |
| 5555 | 5554 |
| 5556 #undef __ | 5555 #undef __ |
| 5557 | 5556 |
| 5558 } // namespace internal | 5557 } // namespace internal |
| 5559 } // namespace v8 | 5558 } // namespace v8 |
| OLD | NEW |