OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 5637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5648 Address thunk_address = FUNCTION_ADDR(&InvokeFunctionCallback); | 5648 Address thunk_address = FUNCTION_ADDR(&InvokeFunctionCallback); |
5649 ExternalReference::Type thunk_type = ExternalReference::PROFILING_API_CALL; | 5649 ExternalReference::Type thunk_type = ExternalReference::PROFILING_API_CALL; |
5650 ApiFunction thunk_fun(thunk_address); | 5650 ApiFunction thunk_fun(thunk_address); |
5651 ExternalReference thunk_ref = ExternalReference(&thunk_fun, thunk_type, | 5651 ExternalReference thunk_ref = ExternalReference(&thunk_fun, thunk_type, |
5652 masm->isolate()); | 5652 masm->isolate()); |
5653 | 5653 |
5654 AllowExternalCallThatCantCauseGC scope(masm); | 5654 AllowExternalCallThatCantCauseGC scope(masm); |
5655 MemOperand context_restore_operand( | 5655 MemOperand context_restore_operand( |
5656 fp, (2 + FCA::kContextSaveIndex) * kPointerSize); | 5656 fp, (2 + FCA::kContextSaveIndex) * kPointerSize); |
5657 // Stores return the first js argument | 5657 // Stores return the first js argument |
5658 int return_value_offset = | 5658 int return_value_offset = 0; |
5659 2 + (is_store ? FCA::kArgsLength : FCA::kReturnValueOffset); | 5659 if (is_store) { |
| 5660 return_value_offset = 2 + FCA::kArgsLength; |
| 5661 } else { |
| 5662 return_value_offset = 2 + FCA::kReturnValueOffset; |
| 5663 } |
5660 MemOperand return_value_operand(fp, return_value_offset * kPointerSize); | 5664 MemOperand return_value_operand(fp, return_value_offset * kPointerSize); |
5661 | 5665 |
5662 const int spill_offset = 1 + kApiStackSpace; | 5666 const int spill_offset = 1 + kApiStackSpace; |
5663 __ CallApiFunctionAndReturn(api_function_address, | 5667 __ CallApiFunctionAndReturn(api_function_address, |
5664 thunk_ref, | 5668 thunk_ref, |
5665 kStackUnwindSpace, | 5669 kStackUnwindSpace, |
5666 spill_offset, | 5670 spill_offset, |
5667 return_value_operand, | 5671 return_value_operand, |
5668 &context_restore_operand); | 5672 &context_restore_operand); |
5669 } | 5673 } |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5713 MemOperand(fp, 6 * kPointerSize), | 5717 MemOperand(fp, 6 * kPointerSize), |
5714 NULL); | 5718 NULL); |
5715 } | 5719 } |
5716 | 5720 |
5717 | 5721 |
5718 #undef __ | 5722 #undef __ |
5719 | 5723 |
5720 } } // namespace v8::internal | 5724 } } // namespace v8::internal |
5721 | 5725 |
5722 #endif // V8_TARGET_ARCH_A64 | 5726 #endif // V8_TARGET_ARCH_A64 |
OLD | NEW |