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 #if V8_TARGET_ARCH_ARM64 | 7 #if V8_TARGET_ARCH_ARM64 |
8 | 8 |
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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 } | 190 } |
191 | 191 |
192 bool function_in_register_x1 = true; | 192 bool function_in_register_x1 = true; |
193 | 193 |
194 int heap_slots = info->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; | 194 int heap_slots = info->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; |
195 if (heap_slots > 0) { | 195 if (heap_slots > 0) { |
196 // Argument to NewContext is the function, which is still in x1. | 196 // Argument to NewContext is the function, which is still in x1. |
197 Comment cmnt(masm_, "[ Allocate context"); | 197 Comment cmnt(masm_, "[ Allocate context"); |
198 bool need_write_barrier = true; | 198 bool need_write_barrier = true; |
199 if (FLAG_harmony_scoping && info->scope()->is_script_scope()) { | 199 if (FLAG_harmony_scoping && info->scope()->is_script_scope()) { |
200 __ Mov(x10, Operand(info->scope()->GetScopeInfo())); | 200 __ Mov(x10, Operand(info->scope()->GetScopeInfo(info->isolate()))); |
201 __ Push(x1, x10); | 201 __ Push(x1, x10); |
202 __ CallRuntime(Runtime::kNewScriptContext, 2); | 202 __ CallRuntime(Runtime::kNewScriptContext, 2); |
203 } else if (heap_slots <= FastNewContextStub::kMaximumSlots) { | 203 } else if (heap_slots <= FastNewContextStub::kMaximumSlots) { |
204 FastNewContextStub stub(isolate(), heap_slots); | 204 FastNewContextStub stub(isolate(), heap_slots); |
205 __ CallStub(&stub); | 205 __ CallStub(&stub); |
206 // Result of FastNewContextStub is always in new space. | 206 // Result of FastNewContextStub is always in new space. |
207 need_write_barrier = false; | 207 need_write_barrier = false; |
208 } else { | 208 } else { |
209 __ Push(x1); | 209 __ Push(x1); |
210 __ CallRuntime(Runtime::kNewFunctionContext, 1); | 210 __ CallRuntime(Runtime::kNewFunctionContext, 1); |
(...skipping 5194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5405 return previous_; | 5405 return previous_; |
5406 } | 5406 } |
5407 | 5407 |
5408 | 5408 |
5409 #undef __ | 5409 #undef __ |
5410 | 5410 |
5411 | 5411 |
5412 } } // namespace v8::internal | 5412 } } // namespace v8::internal |
5413 | 5413 |
5414 #endif // V8_TARGET_ARCH_ARM64 | 5414 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |