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_MIPS | 7 #if V8_TARGET_ARCH_MIPS |
8 | 8 |
9 // Note on Mips implementation: | 9 // Note on Mips implementation: |
10 // | 10 // |
(...skipping 2901 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2912 CallIC(ic); | 2912 CallIC(ic); |
2913 | 2913 |
2914 RecordJSReturnSite(expr); | 2914 RecordJSReturnSite(expr); |
2915 // Restore context register. | 2915 // Restore context register. |
2916 __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 2916 __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
2917 context()->DropAndPlug(1, v0); | 2917 context()->DropAndPlug(1, v0); |
2918 } | 2918 } |
2919 | 2919 |
2920 | 2920 |
2921 void FullCodeGenerator::EmitResolvePossiblyDirectEval(int arg_count) { | 2921 void FullCodeGenerator::EmitResolvePossiblyDirectEval(int arg_count) { |
2922 // t2: copy of the first argument or undefined if it doesn't exist. | 2922 // t3: copy of the first argument or undefined if it doesn't exist. |
2923 if (arg_count > 0) { | 2923 if (arg_count > 0) { |
2924 __ lw(t2, MemOperand(sp, arg_count * kPointerSize)); | 2924 __ lw(t3, MemOperand(sp, arg_count * kPointerSize)); |
2925 } else { | 2925 } else { |
2926 __ LoadRoot(t2, Heap::kUndefinedValueRootIndex); | 2926 __ LoadRoot(t3, Heap::kUndefinedValueRootIndex); |
2927 } | 2927 } |
2928 | 2928 |
| 2929 // t2: the receiver of the enclosing function. |
| 2930 __ lw(t2, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
| 2931 |
2929 // t1: the receiver of the enclosing function. | 2932 // t1: the receiver of the enclosing function. |
2930 int receiver_offset = 2 + info_->scope()->num_parameters(); | 2933 int receiver_offset = 2 + info_->scope()->num_parameters(); |
2931 __ lw(t1, MemOperand(fp, receiver_offset * kPointerSize)); | 2934 __ lw(t1, MemOperand(fp, receiver_offset * kPointerSize)); |
2932 | 2935 |
2933 // t0: the strict mode. | 2936 // t0: the strict mode. |
2934 __ li(t0, Operand(Smi::FromInt(strict_mode()))); | 2937 __ li(t0, Operand(Smi::FromInt(strict_mode()))); |
2935 | 2938 |
2936 // a1: the start position of the scope the calls resides in. | 2939 // a1: the start position of the scope the calls resides in. |
2937 __ li(a1, Operand(Smi::FromInt(scope()->start_position()))); | 2940 __ li(a1, Operand(Smi::FromInt(scope()->start_position()))); |
2938 | 2941 |
2939 // Do the runtime call. | 2942 // Do the runtime call. |
| 2943 __ Push(t3); |
2940 __ Push(t2, t1, t0, a1); | 2944 __ Push(t2, t1, t0, a1); |
2941 __ CallRuntime(Runtime::kResolvePossiblyDirectEval, 5); | 2945 __ CallRuntime(Runtime::kResolvePossiblyDirectEval, 6); |
2942 } | 2946 } |
2943 | 2947 |
2944 | 2948 |
2945 void FullCodeGenerator::EmitLoadSuperConstructor(SuperReference* super_ref) { | 2949 void FullCodeGenerator::EmitLoadSuperConstructor(SuperReference* super_ref) { |
2946 DCHECK(super_ref != NULL); | 2950 DCHECK(super_ref != NULL); |
2947 __ lw(a0, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); | 2951 __ lw(a0, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
2948 __ Push(a0); | 2952 __ Push(a0); |
2949 __ CallRuntime(Runtime::kGetPrototype, 1); | 2953 __ CallRuntime(Runtime::kGetPrototype, 1); |
2950 } | 2954 } |
2951 | 2955 |
(...skipping 2264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5216 Assembler::target_address_at(pc_immediate_load_address)) == | 5220 Assembler::target_address_at(pc_immediate_load_address)) == |
5217 reinterpret_cast<uint32_t>( | 5221 reinterpret_cast<uint32_t>( |
5218 isolate->builtins()->OsrAfterStackCheck()->entry())); | 5222 isolate->builtins()->OsrAfterStackCheck()->entry())); |
5219 return OSR_AFTER_STACK_CHECK; | 5223 return OSR_AFTER_STACK_CHECK; |
5220 } | 5224 } |
5221 | 5225 |
5222 | 5226 |
5223 } } // namespace v8::internal | 5227 } } // namespace v8::internal |
5224 | 5228 |
5225 #endif // V8_TARGET_ARCH_MIPS | 5229 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |