| 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/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 5147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5158 | 5158 |
| 5159 Register callee = edi; | 5159 Register callee = edi; |
| 5160 Register call_data = ebx; | 5160 Register call_data = ebx; |
| 5161 Register holder = ecx; | 5161 Register holder = ecx; |
| 5162 Register api_function_address = edx; | 5162 Register api_function_address = edx; |
| 5163 Register context = esi; | 5163 Register context = esi; |
| 5164 Register return_address = eax; | 5164 Register return_address = eax; |
| 5165 | 5165 |
| 5166 typedef FunctionCallbackArguments FCA; | 5166 typedef FunctionCallbackArguments FCA; |
| 5167 | 5167 |
| 5168 STATIC_ASSERT(FCA::kContextSaveIndex == 6); | 5168 STATIC_ASSERT(FCA::kContextSaveIndex == 5); |
| 5169 STATIC_ASSERT(FCA::kCalleeIndex == 5); | |
| 5170 STATIC_ASSERT(FCA::kDataIndex == 4); | 5169 STATIC_ASSERT(FCA::kDataIndex == 4); |
| 5171 STATIC_ASSERT(FCA::kReturnValueOffset == 3); | 5170 STATIC_ASSERT(FCA::kReturnValueOffset == 3); |
| 5172 STATIC_ASSERT(FCA::kReturnValueDefaultValueIndex == 2); | 5171 STATIC_ASSERT(FCA::kReturnValueDefaultValueIndex == 2); |
| 5173 STATIC_ASSERT(FCA::kIsolateIndex == 1); | 5172 STATIC_ASSERT(FCA::kIsolateIndex == 1); |
| 5174 STATIC_ASSERT(FCA::kHolderIndex == 0); | 5173 STATIC_ASSERT(FCA::kHolderIndex == 0); |
| 5175 STATIC_ASSERT(FCA::kArgsLength == 7); | 5174 STATIC_ASSERT(FCA::kArgsLength == 6); |
| 5176 | 5175 |
| 5177 DCHECK(argc.is_immediate() || eax.is(argc.reg())); | 5176 DCHECK(argc.is_immediate() || eax.is(argc.reg())); |
| 5178 | 5177 |
| 5179 if (argc.is_immediate()) { | 5178 if (argc.is_immediate()) { |
| 5180 __ pop(return_address); | 5179 __ pop(return_address); |
| 5181 // context save. | 5180 // context save. |
| 5182 __ push(context); | 5181 __ push(context); |
| 5183 } else { | 5182 } else { |
| 5184 // pop return address and save context | 5183 // pop return address and save context |
| 5185 __ xchg(context, Operand(esp, 0)); | 5184 __ xchg(context, Operand(esp, 0)); |
| 5186 return_address = context; | 5185 return_address = context; |
| 5187 } | 5186 } |
| 5188 | 5187 |
| 5189 // callee | |
| 5190 __ push(callee); | |
| 5191 | |
| 5192 // call data | 5188 // call data |
| 5193 __ push(call_data); | 5189 __ push(call_data); |
| 5194 | 5190 |
| 5195 Register scratch = call_data; | 5191 Register scratch = call_data; |
| 5196 if (!call_data_undefined) { | 5192 if (!call_data_undefined) { |
| 5197 // return value | 5193 // return value |
| 5198 __ push(Immediate(masm->isolate()->factory()->undefined_value())); | 5194 __ push(Immediate(masm->isolate()->factory()->undefined_value())); |
| 5199 // return value default | 5195 // return value default |
| 5200 __ push(Immediate(masm->isolate()->factory()->undefined_value())); | 5196 __ push(Immediate(masm->isolate()->factory()->undefined_value())); |
| 5201 } else { | 5197 } else { |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5336 Operand(ebp, 7 * kPointerSize), NULL); | 5332 Operand(ebp, 7 * kPointerSize), NULL); |
| 5337 } | 5333 } |
| 5338 | 5334 |
| 5339 | 5335 |
| 5340 #undef __ | 5336 #undef __ |
| 5341 | 5337 |
| 5342 } // namespace internal | 5338 } // namespace internal |
| 5343 } // namespace v8 | 5339 } // namespace v8 |
| 5344 | 5340 |
| 5345 #endif // V8_TARGET_ARCH_X87 | 5341 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |