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_MIPS | 5 #if V8_TARGET_ARCH_MIPS |
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 5423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5434 // ----------------------------------- | 5434 // ----------------------------------- |
5435 | 5435 |
5436 Register callee = a0; | 5436 Register callee = a0; |
5437 Register call_data = t0; | 5437 Register call_data = t0; |
5438 Register holder = a2; | 5438 Register holder = a2; |
5439 Register api_function_address = a1; | 5439 Register api_function_address = a1; |
5440 Register context = cp; | 5440 Register context = cp; |
5441 | 5441 |
5442 typedef FunctionCallbackArguments FCA; | 5442 typedef FunctionCallbackArguments FCA; |
5443 | 5443 |
5444 STATIC_ASSERT(FCA::kContextSaveIndex == 5); | 5444 STATIC_ASSERT(FCA::kContextSaveIndex == 6); |
| 5445 STATIC_ASSERT(FCA::kCalleeIndex == 5); |
5445 STATIC_ASSERT(FCA::kDataIndex == 4); | 5446 STATIC_ASSERT(FCA::kDataIndex == 4); |
5446 STATIC_ASSERT(FCA::kReturnValueOffset == 3); | 5447 STATIC_ASSERT(FCA::kReturnValueOffset == 3); |
5447 STATIC_ASSERT(FCA::kReturnValueDefaultValueIndex == 2); | 5448 STATIC_ASSERT(FCA::kReturnValueDefaultValueIndex == 2); |
5448 STATIC_ASSERT(FCA::kIsolateIndex == 1); | 5449 STATIC_ASSERT(FCA::kIsolateIndex == 1); |
5449 STATIC_ASSERT(FCA::kHolderIndex == 0); | 5450 STATIC_ASSERT(FCA::kHolderIndex == 0); |
5450 STATIC_ASSERT(FCA::kArgsLength == 6); | 5451 STATIC_ASSERT(FCA::kArgsLength == 7); |
5451 | 5452 |
5452 DCHECK(argc.is_immediate() || a3.is(argc.reg())); | 5453 DCHECK(argc.is_immediate() || a3.is(argc.reg())); |
5453 | 5454 |
5454 // Save context, callee and call data. | 5455 // Save context, callee and call data. |
5455 __ Push(context, call_data); | 5456 __ Push(context, callee, call_data); |
5456 // Load context from callee. | 5457 // Load context from callee. |
5457 __ lw(context, FieldMemOperand(callee, JSFunction::kContextOffset)); | 5458 __ lw(context, FieldMemOperand(callee, JSFunction::kContextOffset)); |
5458 | 5459 |
5459 Register scratch = call_data; | 5460 Register scratch = call_data; |
5460 if (!call_data_undefined) { | 5461 if (!call_data_undefined) { |
5461 __ LoadRoot(scratch, Heap::kUndefinedValueRootIndex); | 5462 __ LoadRoot(scratch, Heap::kUndefinedValueRootIndex); |
5462 } | 5463 } |
5463 // Push return value and default return value. | 5464 // Push return value and default return value. |
5464 __ Push(scratch, scratch); | 5465 __ Push(scratch, scratch); |
5465 __ li(scratch, Operand(ExternalReference::isolate_address(masm->isolate()))); | 5466 __ li(scratch, Operand(ExternalReference::isolate_address(masm->isolate()))); |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5580 MemOperand(fp, 6 * kPointerSize), NULL); | 5581 MemOperand(fp, 6 * kPointerSize), NULL); |
5581 } | 5582 } |
5582 | 5583 |
5583 | 5584 |
5584 #undef __ | 5585 #undef __ |
5585 | 5586 |
5586 } // namespace internal | 5587 } // namespace internal |
5587 } // namespace v8 | 5588 } // namespace v8 |
5588 | 5589 |
5589 #endif // V8_TARGET_ARCH_MIPS | 5590 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |