| 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/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/arm64/lithium-codegen-arm64.h" | 7 #include "src/arm64/lithium-codegen-arm64.h" |
| 8 #include "src/arm64/lithium-gap-resolver-arm64.h" | 8 #include "src/arm64/lithium-gap-resolver-arm64.h" |
| 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 685 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 696 if (info()->saves_caller_doubles()) { | 696 if (info()->saves_caller_doubles()) { |
| 697 SaveCallerDoubles(); | 697 SaveCallerDoubles(); |
| 698 } | 698 } |
| 699 | 699 |
| 700 // Allocate a local context if needed. | 700 // Allocate a local context if needed. |
| 701 int heap_slots = info()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; | 701 int heap_slots = info()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; |
| 702 if (heap_slots > 0) { | 702 if (heap_slots > 0) { |
| 703 Comment(";;; Allocate local context"); | 703 Comment(";;; Allocate local context"); |
| 704 bool need_write_barrier = true; | 704 bool need_write_barrier = true; |
| 705 // Argument to NewContext is the function, which is in x1. | 705 // Argument to NewContext is the function, which is in x1. |
| 706 DCHECK(!info()->scope()->is_script_scope()); |
| 706 if (heap_slots <= FastNewContextStub::kMaximumSlots) { | 707 if (heap_slots <= FastNewContextStub::kMaximumSlots) { |
| 707 FastNewContextStub stub(isolate(), heap_slots); | 708 FastNewContextStub stub(isolate(), heap_slots); |
| 708 __ CallStub(&stub); | 709 __ CallStub(&stub); |
| 709 // Result of FastNewContextStub is always in new space. | 710 // Result of FastNewContextStub is always in new space. |
| 710 need_write_barrier = false; | 711 need_write_barrier = false; |
| 711 } else { | 712 } else { |
| 712 __ Push(x1); | 713 __ Push(x1); |
| 713 __ CallRuntime(Runtime::kNewFunctionContext, 1); | 714 __ CallRuntime(Runtime::kNewFunctionContext, 1); |
| 714 } | 715 } |
| 715 RecordSafepoint(Safepoint::kNoLazyDeopt); | 716 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| (...skipping 5314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6030 Handle<ScopeInfo> scope_info = instr->scope_info(); | 6031 Handle<ScopeInfo> scope_info = instr->scope_info(); |
| 6031 __ Push(scope_info); | 6032 __ Push(scope_info); |
| 6032 __ Push(ToRegister(instr->function())); | 6033 __ Push(ToRegister(instr->function())); |
| 6033 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 6034 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
| 6034 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6035 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 6035 } | 6036 } |
| 6036 | 6037 |
| 6037 | 6038 |
| 6038 | 6039 |
| 6039 } } // namespace v8::internal | 6040 } } // namespace v8::internal |
| OLD | NEW |