| 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_X87 | 5 #if V8_TARGET_ARCH_X87 |
| 6 | 6 |
| 7 #include "src/code-stubs.h" | 7 #include "src/code-stubs.h" |
| 8 #include "src/api-arguments.h" | 8 #include "src/api-arguments.h" |
| 9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
| 10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
| (...skipping 5373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5384 | 5384 |
| 5385 STATIC_ASSERT(FCA::kContextSaveIndex == 6); | 5385 STATIC_ASSERT(FCA::kContextSaveIndex == 6); |
| 5386 STATIC_ASSERT(FCA::kCalleeIndex == 5); | 5386 STATIC_ASSERT(FCA::kCalleeIndex == 5); |
| 5387 STATIC_ASSERT(FCA::kDataIndex == 4); | 5387 STATIC_ASSERT(FCA::kDataIndex == 4); |
| 5388 STATIC_ASSERT(FCA::kReturnValueOffset == 3); | 5388 STATIC_ASSERT(FCA::kReturnValueOffset == 3); |
| 5389 STATIC_ASSERT(FCA::kReturnValueDefaultValueIndex == 2); | 5389 STATIC_ASSERT(FCA::kReturnValueDefaultValueIndex == 2); |
| 5390 STATIC_ASSERT(FCA::kIsolateIndex == 1); | 5390 STATIC_ASSERT(FCA::kIsolateIndex == 1); |
| 5391 STATIC_ASSERT(FCA::kHolderIndex == 0); | 5391 STATIC_ASSERT(FCA::kHolderIndex == 0); |
| 5392 STATIC_ASSERT(FCA::kArgsLength == 7); | 5392 STATIC_ASSERT(FCA::kArgsLength == 7); |
| 5393 | 5393 |
| 5394 DCHECK(argc.is_immediate() || eax.is(argc.reg())); | |
| 5395 | |
| 5396 __ pop(return_address); | 5394 __ pop(return_address); |
| 5397 // context save. | 5395 // context save. |
| 5398 __ push(context); | 5396 __ push(context); |
| 5399 | 5397 |
| 5400 // callee | 5398 // callee |
| 5401 __ push(callee); | 5399 __ push(callee); |
| 5402 | 5400 |
| 5403 // call data | 5401 // call data |
| 5404 __ push(call_data); | 5402 __ push(call_data); |
| 5405 | 5403 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5441 const int kApiStackSpace = 4; | 5439 const int kApiStackSpace = 4; |
| 5442 | 5440 |
| 5443 PrepareCallApiFunction(masm, kApiArgc + kApiStackSpace); | 5441 PrepareCallApiFunction(masm, kApiArgc + kApiStackSpace); |
| 5444 | 5442 |
| 5445 // FunctionCallbackInfo::implicit_args_. | 5443 // FunctionCallbackInfo::implicit_args_. |
| 5446 __ mov(ApiParameterOperand(2), scratch); | 5444 __ mov(ApiParameterOperand(2), scratch); |
| 5447 __ add(scratch, Immediate((argc() + FCA::kArgsLength - 1) * kPointerSize)); | 5445 __ add(scratch, Immediate((argc() + FCA::kArgsLength - 1) * kPointerSize)); |
| 5448 // FunctionCallbackInfo::values_. | 5446 // FunctionCallbackInfo::values_. |
| 5449 __ mov(ApiParameterOperand(3), scratch); | 5447 __ mov(ApiParameterOperand(3), scratch); |
| 5450 // FunctionCallbackInfo::length_. | 5448 // FunctionCallbackInfo::length_. |
| 5451 __ Move(ApiParameterOperand(4), Immediate(argc)); | 5449 __ Move(ApiParameterOperand(4), Immediate(argc())); |
| 5452 // FunctionCallbackInfo::is_construct_call_. | 5450 // FunctionCallbackInfo::is_construct_call_. |
| 5453 __ Move(ApiParameterOperand(5), Immediate(0)); | 5451 __ Move(ApiParameterOperand(5), Immediate(0)); |
| 5454 | 5452 |
| 5455 // v8::InvocationCallback's argument. | 5453 // v8::InvocationCallback's argument. |
| 5456 __ lea(scratch, ApiParameterOperand(2)); | 5454 __ lea(scratch, ApiParameterOperand(2)); |
| 5457 __ mov(ApiParameterOperand(0), scratch); | 5455 __ mov(ApiParameterOperand(0), scratch); |
| 5458 | 5456 |
| 5459 ExternalReference thunk_ref = | 5457 ExternalReference thunk_ref = |
| 5460 ExternalReference::invoke_function_callback(masm->isolate()); | 5458 ExternalReference::invoke_function_callback(masm->isolate()); |
| 5461 | 5459 |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5529 return_value_operand, NULL); | 5527 return_value_operand, NULL); |
| 5530 } | 5528 } |
| 5531 | 5529 |
| 5532 | 5530 |
| 5533 #undef __ | 5531 #undef __ |
| 5534 | 5532 |
| 5535 } // namespace internal | 5533 } // namespace internal |
| 5536 } // namespace v8 | 5534 } // namespace v8 |
| 5537 | 5535 |
| 5538 #endif // V8_TARGET_ARCH_X87 | 5536 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |