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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_ARM | 7 #if V8_TARGET_ARCH_ARM |
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 bool function_in_register = true; | 190 bool function_in_register = true; |
191 | 191 |
192 // Possibly allocate a local context. | 192 // Possibly allocate a local context. |
193 int heap_slots = info->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; | 193 int heap_slots = info->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; |
194 if (heap_slots > 0) { | 194 if (heap_slots > 0) { |
195 // Argument to NewContext is the function, which is still in r1. | 195 // Argument to NewContext is the function, which is still in r1. |
196 Comment cmnt(masm_, "[ Allocate context"); | 196 Comment cmnt(masm_, "[ Allocate context"); |
197 bool need_write_barrier = true; | 197 bool need_write_barrier = true; |
198 if (FLAG_harmony_scoping && info->scope()->is_script_scope()) { | 198 if (FLAG_harmony_scoping && info->scope()->is_script_scope()) { |
199 __ push(r1); | 199 __ push(r1); |
200 __ Push(info->scope()->GetScopeInfo()); | 200 __ Push(info->scope()->GetScopeInfo(info->isolate())); |
201 __ CallRuntime(Runtime::kNewScriptContext, 2); | 201 __ CallRuntime(Runtime::kNewScriptContext, 2); |
202 } else if (heap_slots <= FastNewContextStub::kMaximumSlots) { | 202 } else if (heap_slots <= FastNewContextStub::kMaximumSlots) { |
203 FastNewContextStub stub(isolate(), heap_slots); | 203 FastNewContextStub stub(isolate(), heap_slots); |
204 __ CallStub(&stub); | 204 __ CallStub(&stub); |
205 // Result of FastNewContextStub is always in new space. | 205 // Result of FastNewContextStub is always in new space. |
206 need_write_barrier = false; | 206 need_write_barrier = false; |
207 } else { | 207 } else { |
208 __ push(r1); | 208 __ push(r1); |
209 __ CallRuntime(Runtime::kNewFunctionContext, 1); | 209 __ CallRuntime(Runtime::kNewFunctionContext, 1); |
210 } | 210 } |
(...skipping 5215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5426 | 5426 |
5427 DCHECK(interrupt_address == | 5427 DCHECK(interrupt_address == |
5428 isolate->builtins()->OsrAfterStackCheck()->entry()); | 5428 isolate->builtins()->OsrAfterStackCheck()->entry()); |
5429 return OSR_AFTER_STACK_CHECK; | 5429 return OSR_AFTER_STACK_CHECK; |
5430 } | 5430 } |
5431 | 5431 |
5432 | 5432 |
5433 } } // namespace v8::internal | 5433 } } // namespace v8::internal |
5434 | 5434 |
5435 #endif // V8_TARGET_ARCH_ARM | 5435 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |