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_MIPS64 | 7 #if V8_TARGET_ARCH_MIPS64 |
8 | 8 |
9 // Note on Mips implementation: | 9 // Note on Mips implementation: |
10 // | 10 // |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 bool function_in_register = true; | 196 bool function_in_register = true; |
197 | 197 |
198 // Possibly allocate a local context. | 198 // Possibly allocate a local context. |
199 int heap_slots = info->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; | 199 int heap_slots = info->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; |
200 if (heap_slots > 0) { | 200 if (heap_slots > 0) { |
201 Comment cmnt(masm_, "[ Allocate context"); | 201 Comment cmnt(masm_, "[ Allocate context"); |
202 // Argument to NewContext is the function, which is still in a1. | 202 // Argument to NewContext is the function, which is still in a1. |
203 bool need_write_barrier = true; | 203 bool need_write_barrier = true; |
204 if (FLAG_harmony_scoping && info->scope()->is_script_scope()) { | 204 if (FLAG_harmony_scoping && info->scope()->is_script_scope()) { |
205 __ push(a1); | 205 __ push(a1); |
206 __ Push(info->scope()->GetScopeInfo()); | 206 __ Push(info->scope()->GetScopeInfo(info->isolate())); |
207 __ CallRuntime(Runtime::kNewScriptContext, 2); | 207 __ CallRuntime(Runtime::kNewScriptContext, 2); |
208 } else if (heap_slots <= FastNewContextStub::kMaximumSlots) { | 208 } else if (heap_slots <= FastNewContextStub::kMaximumSlots) { |
209 FastNewContextStub stub(isolate(), heap_slots); | 209 FastNewContextStub stub(isolate(), heap_slots); |
210 __ CallStub(&stub); | 210 __ CallStub(&stub); |
211 // Result of FastNewContextStub is always in new space. | 211 // Result of FastNewContextStub is always in new space. |
212 need_write_barrier = false; | 212 need_write_barrier = false; |
213 } else { | 213 } else { |
214 __ push(a1); | 214 __ push(a1); |
215 __ CallRuntime(Runtime::kNewFunctionContext, 1); | 215 __ CallRuntime(Runtime::kNewFunctionContext, 1); |
216 } | 216 } |
(...skipping 5151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5368 Assembler::target_address_at(pc_immediate_load_address)) == | 5368 Assembler::target_address_at(pc_immediate_load_address)) == |
5369 reinterpret_cast<uint64_t>( | 5369 reinterpret_cast<uint64_t>( |
5370 isolate->builtins()->OsrAfterStackCheck()->entry())); | 5370 isolate->builtins()->OsrAfterStackCheck()->entry())); |
5371 return OSR_AFTER_STACK_CHECK; | 5371 return OSR_AFTER_STACK_CHECK; |
5372 } | 5372 } |
5373 | 5373 |
5374 | 5374 |
5375 } } // namespace v8::internal | 5375 } } // namespace v8::internal |
5376 | 5376 |
5377 #endif // V8_TARGET_ARCH_MIPS64 | 5377 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |