| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 5388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5399 | 5399 |
| 5400 // v8::InvocationCallback's argument. | 5400 // v8::InvocationCallback's argument. |
| 5401 __ lea(scratch, ApiParameterOperand(2)); | 5401 __ lea(scratch, ApiParameterOperand(2)); |
| 5402 __ mov(ApiParameterOperand(0), scratch); | 5402 __ mov(ApiParameterOperand(0), scratch); |
| 5403 | 5403 |
| 5404 Address thunk_address = FUNCTION_ADDR(&InvokeFunctionCallback); | 5404 Address thunk_address = FUNCTION_ADDR(&InvokeFunctionCallback); |
| 5405 | 5405 |
| 5406 Operand context_restore_operand(ebp, | 5406 Operand context_restore_operand(ebp, |
| 5407 (2 + FCA::kContextSaveIndex) * kPointerSize); | 5407 (2 + FCA::kContextSaveIndex) * kPointerSize); |
| 5408 // Stores return the first js argument | 5408 // Stores return the first js argument |
| 5409 int return_value_offset = | 5409 int return_value_offset = 0; |
| 5410 2 + (is_store ? FCA::kArgsLength : FCA::kReturnValueOffset); | 5410 if (is_store) { |
| 5411 return_value_offset = 2 + FCA::kArgsLength; |
| 5412 } else { |
| 5413 return_value_offset = 2 + FCA::kReturnValueOffset; |
| 5414 } |
| 5411 Operand return_value_operand(ebp, return_value_offset * kPointerSize); | 5415 Operand return_value_operand(ebp, return_value_offset * kPointerSize); |
| 5412 __ CallApiFunctionAndReturn(api_function_address, | 5416 __ CallApiFunctionAndReturn(api_function_address, |
| 5413 thunk_address, | 5417 thunk_address, |
| 5414 ApiParameterOperand(1), | 5418 ApiParameterOperand(1), |
| 5415 argc + FCA::kArgsLength + 1, | 5419 argc + FCA::kArgsLength + 1, |
| 5416 return_value_operand, | 5420 return_value_operand, |
| 5417 &context_restore_operand); | 5421 &context_restore_operand); |
| 5418 } | 5422 } |
| 5419 | 5423 |
| 5420 | 5424 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5454 Operand(ebp, 7 * kPointerSize), | 5458 Operand(ebp, 7 * kPointerSize), |
| 5455 NULL); | 5459 NULL); |
| 5456 } | 5460 } |
| 5457 | 5461 |
| 5458 | 5462 |
| 5459 #undef __ | 5463 #undef __ |
| 5460 | 5464 |
| 5461 } } // namespace v8::internal | 5465 } } // namespace v8::internal |
| 5462 | 5466 |
| 5463 #endif // V8_TARGET_ARCH_IA32 | 5467 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |