| 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_X64 | 7 #if V8_TARGET_ARCH_X64 |
| 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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 } | 180 } |
| 181 | 181 |
| 182 bool function_in_register = true; | 182 bool function_in_register = true; |
| 183 | 183 |
| 184 // Possibly allocate a local context. | 184 // Possibly allocate a local context. |
| 185 int heap_slots = info->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; | 185 int heap_slots = info->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; |
| 186 if (heap_slots > 0) { | 186 if (heap_slots > 0) { |
| 187 Comment cmnt(masm_, "[ Allocate context"); | 187 Comment cmnt(masm_, "[ Allocate context"); |
| 188 bool need_write_barrier = true; | 188 bool need_write_barrier = true; |
| 189 // Argument to NewContext is the function, which is still in rdi. | 189 // Argument to NewContext is the function, which is still in rdi. |
| 190 if (FLAG_harmony_scoping && info->scope()->is_script_scope()) { | 190 if (info->scope()->is_script_scope()) { |
| 191 __ Push(rdi); | 191 __ Push(rdi); |
| 192 __ Push(info->scope()->GetScopeInfo(info->isolate())); | 192 __ Push(info->scope()->GetScopeInfo(info->isolate())); |
| 193 __ CallRuntime(Runtime::kNewScriptContext, 2); | 193 __ CallRuntime(Runtime::kNewScriptContext, 2); |
| 194 } else if (heap_slots <= FastNewContextStub::kMaximumSlots) { | 194 } else if (heap_slots <= FastNewContextStub::kMaximumSlots) { |
| 195 FastNewContextStub stub(isolate(), heap_slots); | 195 FastNewContextStub stub(isolate(), heap_slots); |
| 196 __ CallStub(&stub); | 196 __ CallStub(&stub); |
| 197 // Result of FastNewContextStub is always in new space. | 197 // Result of FastNewContextStub is always in new space. |
| 198 need_write_barrier = false; | 198 need_write_barrier = false; |
| 199 } else { | 199 } else { |
| 200 __ Push(rdi); | 200 __ Push(rdi); |
| (...skipping 5199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5400 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 5400 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
| 5401 Assembler::target_address_at(call_target_address, | 5401 Assembler::target_address_at(call_target_address, |
| 5402 unoptimized_code)); | 5402 unoptimized_code)); |
| 5403 return OSR_AFTER_STACK_CHECK; | 5403 return OSR_AFTER_STACK_CHECK; |
| 5404 } | 5404 } |
| 5405 | 5405 |
| 5406 | 5406 |
| 5407 } } // namespace v8::internal | 5407 } } // namespace v8::internal |
| 5408 | 5408 |
| 5409 #endif // V8_TARGET_ARCH_X64 | 5409 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |