OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_X64 | 5 #if V8_TARGET_ARCH_X64 |
6 | 6 |
7 #include "src/bootstrapper.h" | 7 #include "src/bootstrapper.h" |
8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
10 #include "src/ic/handler-compiler.h" | 10 #include "src/ic/handler-compiler.h" |
(...skipping 5202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5213 | 5213 |
5214 Register callee = rdi; | 5214 Register callee = rdi; |
5215 Register call_data = rbx; | 5215 Register call_data = rbx; |
5216 Register holder = rcx; | 5216 Register holder = rcx; |
5217 Register api_function_address = rdx; | 5217 Register api_function_address = rdx; |
5218 Register context = rsi; | 5218 Register context = rsi; |
5219 Register return_address = r8; | 5219 Register return_address = r8; |
5220 | 5220 |
5221 typedef FunctionCallbackArguments FCA; | 5221 typedef FunctionCallbackArguments FCA; |
5222 | 5222 |
5223 STATIC_ASSERT(FCA::kContextSaveIndex == 6); | 5223 STATIC_ASSERT(FCA::kContextSaveIndex == 5); |
5224 STATIC_ASSERT(FCA::kCalleeIndex == 5); | |
5225 STATIC_ASSERT(FCA::kDataIndex == 4); | 5224 STATIC_ASSERT(FCA::kDataIndex == 4); |
5226 STATIC_ASSERT(FCA::kReturnValueOffset == 3); | 5225 STATIC_ASSERT(FCA::kReturnValueOffset == 3); |
5227 STATIC_ASSERT(FCA::kReturnValueDefaultValueIndex == 2); | 5226 STATIC_ASSERT(FCA::kReturnValueDefaultValueIndex == 2); |
5228 STATIC_ASSERT(FCA::kIsolateIndex == 1); | 5227 STATIC_ASSERT(FCA::kIsolateIndex == 1); |
5229 STATIC_ASSERT(FCA::kHolderIndex == 0); | 5228 STATIC_ASSERT(FCA::kHolderIndex == 0); |
5230 STATIC_ASSERT(FCA::kArgsLength == 7); | 5229 STATIC_ASSERT(FCA::kArgsLength == 6); |
5231 | 5230 |
5232 DCHECK(argc.is_immediate() || rax.is(argc.reg())); | 5231 DCHECK(argc.is_immediate() || rax.is(argc.reg())); |
5233 | 5232 |
5234 __ PopReturnAddressTo(return_address); | 5233 __ PopReturnAddressTo(return_address); |
5235 | 5234 |
5236 // context save | 5235 // context save |
5237 __ Push(context); | 5236 __ Push(context); |
5238 | 5237 |
5239 // callee | |
5240 __ Push(callee); | |
5241 | |
5242 // call data | 5238 // call data |
5243 __ Push(call_data); | 5239 __ Push(call_data); |
5244 Register scratch = call_data; | 5240 Register scratch = call_data; |
5245 if (!call_data_undefined) { | 5241 if (!call_data_undefined) { |
5246 __ LoadRoot(scratch, Heap::kUndefinedValueRootIndex); | 5242 __ LoadRoot(scratch, Heap::kUndefinedValueRootIndex); |
5247 } | 5243 } |
5248 // return value | 5244 // return value |
5249 __ Push(scratch); | 5245 __ Push(scratch); |
5250 // return value default | 5246 // return value default |
5251 __ Push(scratch); | 5247 __ Push(scratch); |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5403 kStackSpace, nullptr, return_value_operand, NULL); | 5399 kStackSpace, nullptr, return_value_operand, NULL); |
5404 } | 5400 } |
5405 | 5401 |
5406 | 5402 |
5407 #undef __ | 5403 #undef __ |
5408 | 5404 |
5409 } // namespace internal | 5405 } // namespace internal |
5410 } // namespace v8 | 5406 } // namespace v8 |
5411 | 5407 |
5412 #endif // V8_TARGET_ARCH_X64 | 5408 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |