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 2874 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2885 // Push a copy of the function (found below the arguments) and | 2885 // Push a copy of the function (found below the arguments) and |
2886 // resolve eval. | 2886 // resolve eval. |
2887 __ ldr(r1, MemOperand(sp, (arg_count + 1) * kPointerSize)); | 2887 __ ldr(r1, MemOperand(sp, (arg_count + 1) * kPointerSize)); |
2888 __ push(r1); | 2888 __ push(r1); |
2889 EmitResolvePossiblyDirectEval(arg_count); | 2889 EmitResolvePossiblyDirectEval(arg_count); |
2890 | 2890 |
2891 // The runtime call returns a pair of values in r0 (function) and | 2891 // The runtime call returns a pair of values in r0 (function) and |
2892 // r1 (receiver). Touch up the stack with the right values. | 2892 // r1 (receiver). Touch up the stack with the right values. |
2893 __ str(r0, MemOperand(sp, (arg_count + 1) * kPointerSize)); | 2893 __ str(r0, MemOperand(sp, (arg_count + 1) * kPointerSize)); |
2894 __ str(r1, MemOperand(sp, arg_count * kPointerSize)); | 2894 __ str(r1, MemOperand(sp, arg_count * kPointerSize)); |
| 2895 |
| 2896 PrepareForBailoutForId(expr->EvalOrLookupId(), NO_REGISTERS); |
2895 } | 2897 } |
2896 | 2898 |
2897 // Record source position for debugger. | 2899 // Record source position for debugger. |
2898 SetSourcePosition(expr->position()); | 2900 SetSourcePosition(expr->position()); |
2899 CallFunctionStub stub(isolate(), arg_count, NO_CALL_FUNCTION_FLAGS); | 2901 CallFunctionStub stub(isolate(), arg_count, NO_CALL_FUNCTION_FLAGS); |
2900 __ ldr(r1, MemOperand(sp, (arg_count + 1) * kPointerSize)); | 2902 __ ldr(r1, MemOperand(sp, (arg_count + 1) * kPointerSize)); |
2901 __ CallStub(&stub); | 2903 __ CallStub(&stub); |
2902 RecordJSReturnSite(expr); | 2904 RecordJSReturnSite(expr); |
2903 // Restore context register. | 2905 // Restore context register. |
2904 __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 2906 __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
(...skipping 13 matching lines...) Expand all Loading... |
2918 } | 2920 } |
2919 | 2921 |
2920 __ bind(&slow); | 2922 __ bind(&slow); |
2921 // Call the runtime to find the function to call (returned in r0) | 2923 // Call the runtime to find the function to call (returned in r0) |
2922 // and the object holding it (returned in edx). | 2924 // and the object holding it (returned in edx). |
2923 DCHECK(!context_register().is(r2)); | 2925 DCHECK(!context_register().is(r2)); |
2924 __ mov(r2, Operand(proxy->name())); | 2926 __ mov(r2, Operand(proxy->name())); |
2925 __ Push(context_register(), r2); | 2927 __ Push(context_register(), r2); |
2926 __ CallRuntime(Runtime::kLoadLookupSlot, 2); | 2928 __ CallRuntime(Runtime::kLoadLookupSlot, 2); |
2927 __ Push(r0, r1); // Function, receiver. | 2929 __ Push(r0, r1); // Function, receiver. |
| 2930 PrepareForBailoutForId(expr->EvalOrLookupId(), NO_REGISTERS); |
2928 | 2931 |
2929 // If fast case code has been generated, emit code to push the | 2932 // If fast case code has been generated, emit code to push the |
2930 // function and receiver and have the slow path jump around this | 2933 // function and receiver and have the slow path jump around this |
2931 // code. | 2934 // code. |
2932 if (done.is_linked()) { | 2935 if (done.is_linked()) { |
2933 Label call; | 2936 Label call; |
2934 __ b(&call); | 2937 __ b(&call); |
2935 __ bind(&done); | 2938 __ bind(&done); |
2936 // Push function. | 2939 // Push function. |
2937 __ push(r0); | 2940 __ push(r0); |
(...skipping 2118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5056 | 5059 |
5057 DCHECK(interrupt_address == | 5060 DCHECK(interrupt_address == |
5058 isolate->builtins()->OsrAfterStackCheck()->entry()); | 5061 isolate->builtins()->OsrAfterStackCheck()->entry()); |
5059 return OSR_AFTER_STACK_CHECK; | 5062 return OSR_AFTER_STACK_CHECK; |
5060 } | 5063 } |
5061 | 5064 |
5062 | 5065 |
5063 } } // namespace v8::internal | 5066 } } // namespace v8::internal |
5064 | 5067 |
5065 #endif // V8_TARGET_ARCH_ARM | 5068 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |