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 #if V8_TARGET_ARCH_ARM | 5 #if V8_TARGET_ARCH_ARM |
6 | 6 |
7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
8 #include "src/bootstrapper.h" | 8 #include "src/bootstrapper.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 5213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5224 // ----------------------------------- | 5224 // ----------------------------------- |
5225 | 5225 |
5226 Register callee = r0; | 5226 Register callee = r0; |
5227 Register call_data = r4; | 5227 Register call_data = r4; |
5228 Register holder = r2; | 5228 Register holder = r2; |
5229 Register api_function_address = r1; | 5229 Register api_function_address = r1; |
5230 Register context = cp; | 5230 Register context = cp; |
5231 | 5231 |
5232 typedef FunctionCallbackArguments FCA; | 5232 typedef FunctionCallbackArguments FCA; |
5233 | 5233 |
5234 STATIC_ASSERT(FCA::kContextSaveIndex == 5); | 5234 STATIC_ASSERT(FCA::kContextSaveIndex == 6); |
| 5235 STATIC_ASSERT(FCA::kCalleeIndex == 5); |
5235 STATIC_ASSERT(FCA::kDataIndex == 4); | 5236 STATIC_ASSERT(FCA::kDataIndex == 4); |
5236 STATIC_ASSERT(FCA::kReturnValueOffset == 3); | 5237 STATIC_ASSERT(FCA::kReturnValueOffset == 3); |
5237 STATIC_ASSERT(FCA::kReturnValueDefaultValueIndex == 2); | 5238 STATIC_ASSERT(FCA::kReturnValueDefaultValueIndex == 2); |
5238 STATIC_ASSERT(FCA::kIsolateIndex == 1); | 5239 STATIC_ASSERT(FCA::kIsolateIndex == 1); |
5239 STATIC_ASSERT(FCA::kHolderIndex == 0); | 5240 STATIC_ASSERT(FCA::kHolderIndex == 0); |
5240 STATIC_ASSERT(FCA::kArgsLength == 6); | 5241 STATIC_ASSERT(FCA::kArgsLength == 7); |
5241 | 5242 |
5242 DCHECK(argc.is_immediate() || r3.is(argc.reg())); | 5243 DCHECK(argc.is_immediate() || r3.is(argc.reg())); |
5243 | 5244 |
5244 // context save | 5245 // context save |
5245 __ push(context); | 5246 __ push(context); |
5246 // load context from callee | 5247 // load context from callee |
5247 __ ldr(context, FieldMemOperand(callee, JSFunction::kContextOffset)); | 5248 __ ldr(context, FieldMemOperand(callee, JSFunction::kContextOffset)); |
5248 | 5249 |
| 5250 // callee |
| 5251 __ push(callee); |
| 5252 |
5249 // call data | 5253 // call data |
5250 __ push(call_data); | 5254 __ push(call_data); |
5251 | 5255 |
5252 Register scratch = call_data; | 5256 Register scratch = call_data; |
5253 if (!call_data_undefined) { | 5257 if (!call_data_undefined) { |
5254 __ LoadRoot(scratch, Heap::kUndefinedValueRootIndex); | 5258 __ LoadRoot(scratch, Heap::kUndefinedValueRootIndex); |
5255 } | 5259 } |
5256 // return value | 5260 // return value |
5257 __ push(scratch); | 5261 __ push(scratch); |
5258 // return value default | 5262 // return value default |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5378 MemOperand(fp, 6 * kPointerSize), NULL); | 5382 MemOperand(fp, 6 * kPointerSize), NULL); |
5379 } | 5383 } |
5380 | 5384 |
5381 | 5385 |
5382 #undef __ | 5386 #undef __ |
5383 | 5387 |
5384 } // namespace internal | 5388 } // namespace internal |
5385 } // namespace v8 | 5389 } // namespace v8 |
5386 | 5390 |
5387 #endif // V8_TARGET_ARCH_ARM | 5391 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |