| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 #include "src/crankshaft/arm64/lithium-codegen-arm64.h" | 5 #include "src/crankshaft/arm64/lithium-codegen-arm64.h" |
| 6 | 6 |
| 7 #include "src/arm64/frames-arm64.h" | 7 #include "src/arm64/frames-arm64.h" |
| 8 #include "src/base/bits.h" | 8 #include "src/base/bits.h" |
| 9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 576 SaveCallerDoubles(); | 576 SaveCallerDoubles(); |
| 577 } | 577 } |
| 578 return !is_aborted(); | 578 return !is_aborted(); |
| 579 } | 579 } |
| 580 | 580 |
| 581 | 581 |
| 582 void LCodeGen::DoPrologue(LPrologue* instr) { | 582 void LCodeGen::DoPrologue(LPrologue* instr) { |
| 583 Comment(";;; Prologue begin"); | 583 Comment(";;; Prologue begin"); |
| 584 | 584 |
| 585 // Allocate a local context if needed. | 585 // Allocate a local context if needed. |
| 586 if (info()->scope()->num_heap_slots() > 0) { | 586 if (info()->scope()->NeedsContext()) { |
| 587 Comment(";;; Allocate local context"); | 587 Comment(";;; Allocate local context"); |
| 588 bool need_write_barrier = true; | 588 bool need_write_barrier = true; |
| 589 // Argument to NewContext is the function, which is in x1. | 589 // Argument to NewContext is the function, which is in x1. |
| 590 int slots = info()->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; | 590 int slots = info()->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; |
| 591 Safepoint::DeoptMode deopt_mode = Safepoint::kNoLazyDeopt; | 591 Safepoint::DeoptMode deopt_mode = Safepoint::kNoLazyDeopt; |
| 592 if (info()->scope()->is_script_scope()) { | 592 if (info()->scope()->is_script_scope()) { |
| 593 __ Mov(x10, Operand(info()->scope()->GetScopeInfo(info()->isolate()))); | 593 __ Mov(x10, Operand(info()->scope()->GetScopeInfo(info()->isolate()))); |
| 594 __ Push(x1, x10); | 594 __ Push(x1, x10); |
| 595 __ CallRuntime(Runtime::kNewScriptContext); | 595 __ CallRuntime(Runtime::kNewScriptContext); |
| 596 deopt_mode = Safepoint::kLazyDeopt; | 596 deopt_mode = Safepoint::kLazyDeopt; |
| (...skipping 5097 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5694 // Index is equal to negated out of object property index plus 1. | 5694 // Index is equal to negated out of object property index plus 1. |
| 5695 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); | 5695 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); |
| 5696 __ Ldr(result, FieldMemOperand(result, | 5696 __ Ldr(result, FieldMemOperand(result, |
| 5697 FixedArray::kHeaderSize - kPointerSize)); | 5697 FixedArray::kHeaderSize - kPointerSize)); |
| 5698 __ Bind(deferred->exit()); | 5698 __ Bind(deferred->exit()); |
| 5699 __ Bind(&done); | 5699 __ Bind(&done); |
| 5700 } | 5700 } |
| 5701 | 5701 |
| 5702 } // namespace internal | 5702 } // namespace internal |
| 5703 } // namespace v8 | 5703 } // namespace v8 |
| OLD | NEW |