| 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_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
| 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 2690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2701 | 2701 |
| 2702 | 2702 |
| 2703 void FullCodeGenerator::EmitResolvePossiblyDirectEval(int arg_count) { | 2703 void FullCodeGenerator::EmitResolvePossiblyDirectEval(int arg_count) { |
| 2704 // Push copy of the first argument or undefined if it doesn't exist. | 2704 // Push copy of the first argument or undefined if it doesn't exist. |
| 2705 if (arg_count > 0) { | 2705 if (arg_count > 0) { |
| 2706 __ push(Operand(esp, arg_count * kPointerSize)); | 2706 __ push(Operand(esp, arg_count * kPointerSize)); |
| 2707 } else { | 2707 } else { |
| 2708 __ push(Immediate(isolate()->factory()->undefined_value())); | 2708 __ push(Immediate(isolate()->factory()->undefined_value())); |
| 2709 } | 2709 } |
| 2710 | 2710 |
| 2711 // Push the enclosing function. |
| 2712 __ push(Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); |
| 2711 // Push the receiver of the enclosing function. | 2713 // Push the receiver of the enclosing function. |
| 2712 __ push(Operand(ebp, (2 + info_->scope()->num_parameters()) * kPointerSize)); | 2714 __ push(Operand(ebp, (2 + info_->scope()->num_parameters()) * kPointerSize)); |
| 2713 // Push the language mode. | 2715 // Push the language mode. |
| 2714 __ push(Immediate(Smi::FromInt(strict_mode()))); | 2716 __ push(Immediate(Smi::FromInt(strict_mode()))); |
| 2715 | 2717 |
| 2716 // Push the start position of the scope the calls resides in. | 2718 // Push the start position of the scope the calls resides in. |
| 2717 __ push(Immediate(Smi::FromInt(scope()->start_position()))); | 2719 __ push(Immediate(Smi::FromInt(scope()->start_position()))); |
| 2718 | 2720 |
| 2719 // Do the runtime call. | 2721 // Do the runtime call. |
| 2720 __ CallRuntime(Runtime::kResolvePossiblyDirectEval, 5); | 2722 __ CallRuntime(Runtime::kResolvePossiblyDirectEval, 6); |
| 2721 } | 2723 } |
| 2722 | 2724 |
| 2723 | 2725 |
| 2724 void FullCodeGenerator::VisitCall(Call* expr) { | 2726 void FullCodeGenerator::VisitCall(Call* expr) { |
| 2725 #ifdef DEBUG | 2727 #ifdef DEBUG |
| 2726 // We want to verify that RecordJSReturnSite gets called on all paths | 2728 // We want to verify that RecordJSReturnSite gets called on all paths |
| 2727 // through this function. Avoid early returns. | 2729 // through this function. Avoid early returns. |
| 2728 expr->return_is_recorded_ = false; | 2730 expr->return_is_recorded_ = false; |
| 2729 #endif | 2731 #endif |
| 2730 | 2732 |
| (...skipping 2173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4904 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 4906 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
| 4905 Assembler::target_address_at(call_target_address, | 4907 Assembler::target_address_at(call_target_address, |
| 4906 unoptimized_code)); | 4908 unoptimized_code)); |
| 4907 return OSR_AFTER_STACK_CHECK; | 4909 return OSR_AFTER_STACK_CHECK; |
| 4908 } | 4910 } |
| 4909 | 4911 |
| 4910 | 4912 |
| 4911 } } // namespace v8::internal | 4913 } } // namespace v8::internal |
| 4912 | 4914 |
| 4913 #endif // V8_TARGET_ARCH_IA32 | 4915 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |