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 5075 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5086 __ add(ip, scratch, Operand((FCA::kArgsLength - 1 + argc) * kPointerSize)); | 5086 __ add(ip, scratch, Operand((FCA::kArgsLength - 1 + argc) * kPointerSize)); |
5087 __ str(ip, MemOperand(r0, 1 * kPointerSize)); | 5087 __ str(ip, MemOperand(r0, 1 * kPointerSize)); |
5088 // FunctionCallbackInfo::length_ = argc | 5088 // FunctionCallbackInfo::length_ = argc |
5089 __ mov(ip, Operand(argc)); | 5089 __ mov(ip, Operand(argc)); |
5090 __ str(ip, MemOperand(r0, 2 * kPointerSize)); | 5090 __ str(ip, MemOperand(r0, 2 * kPointerSize)); |
5091 // FunctionCallbackInfo::is_construct_call = 0 | 5091 // FunctionCallbackInfo::is_construct_call = 0 |
5092 __ mov(ip, Operand::Zero()); | 5092 __ mov(ip, Operand::Zero()); |
5093 __ str(ip, MemOperand(r0, 3 * kPointerSize)); | 5093 __ str(ip, MemOperand(r0, 3 * kPointerSize)); |
5094 | 5094 |
5095 const int kStackUnwindSpace = argc + FCA::kArgsLength + 1; | 5095 const int kStackUnwindSpace = argc + FCA::kArgsLength + 1; |
5096 Address thunk_address = FUNCTION_ADDR(&InvokeFunctionCallback); | 5096 ExternalReference thunk_ref = |
5097 ExternalReference::Type thunk_type = ExternalReference::PROFILING_API_CALL; | 5097 ExternalReference::invoke_function_callback(isolate()); |
5098 ApiFunction thunk_fun(thunk_address); | |
5099 ExternalReference thunk_ref = ExternalReference(&thunk_fun, thunk_type, | |
5100 isolate()); | |
5101 | 5098 |
5102 AllowExternalCallThatCantCauseGC scope(masm); | 5099 AllowExternalCallThatCantCauseGC scope(masm); |
5103 MemOperand context_restore_operand( | 5100 MemOperand context_restore_operand( |
5104 fp, (2 + FCA::kContextSaveIndex) * kPointerSize); | 5101 fp, (2 + FCA::kContextSaveIndex) * kPointerSize); |
5105 // Stores return the first js argument | 5102 // Stores return the first js argument |
5106 int return_value_offset = 0; | 5103 int return_value_offset = 0; |
5107 if (is_store) { | 5104 if (is_store) { |
5108 return_value_offset = 2 + FCA::kArgsLength; | 5105 return_value_offset = 2 + FCA::kArgsLength; |
5109 } else { | 5106 } else { |
5110 return_value_offset = 2 + FCA::kReturnValueOffset; | 5107 return_value_offset = 2 + FCA::kReturnValueOffset; |
(...skipping 25 matching lines...) Expand all Loading... |
5136 FrameScope frame_scope(masm, StackFrame::MANUAL); | 5133 FrameScope frame_scope(masm, StackFrame::MANUAL); |
5137 __ EnterExitFrame(false, kApiStackSpace); | 5134 __ EnterExitFrame(false, kApiStackSpace); |
5138 | 5135 |
5139 // Create PropertyAccessorInfo instance on the stack above the exit frame with | 5136 // Create PropertyAccessorInfo instance on the stack above the exit frame with |
5140 // r1 (internal::Object** args_) as the data. | 5137 // r1 (internal::Object** args_) as the data. |
5141 __ str(r1, MemOperand(sp, 1 * kPointerSize)); | 5138 __ str(r1, MemOperand(sp, 1 * kPointerSize)); |
5142 __ add(r1, sp, Operand(1 * kPointerSize)); // r1 = AccessorInfo& | 5139 __ add(r1, sp, Operand(1 * kPointerSize)); // r1 = AccessorInfo& |
5143 | 5140 |
5144 const int kStackUnwindSpace = PropertyCallbackArguments::kArgsLength + 1; | 5141 const int kStackUnwindSpace = PropertyCallbackArguments::kArgsLength + 1; |
5145 | 5142 |
5146 Address thunk_address = FUNCTION_ADDR(&InvokeAccessorGetterCallback); | 5143 ExternalReference thunk_ref = |
5147 ExternalReference::Type thunk_type = | 5144 ExternalReference::invoke_accessor_getter_callback(isolate()); |
5148 ExternalReference::PROFILING_GETTER_CALL; | |
5149 ApiFunction thunk_fun(thunk_address); | |
5150 ExternalReference thunk_ref = ExternalReference(&thunk_fun, thunk_type, | |
5151 isolate()); | |
5152 __ CallApiFunctionAndReturn(api_function_address, | 5145 __ CallApiFunctionAndReturn(api_function_address, |
5153 thunk_ref, | 5146 thunk_ref, |
5154 kStackUnwindSpace, | 5147 kStackUnwindSpace, |
5155 MemOperand(fp, 6 * kPointerSize), | 5148 MemOperand(fp, 6 * kPointerSize), |
5156 NULL); | 5149 NULL); |
5157 } | 5150 } |
5158 | 5151 |
5159 | 5152 |
5160 #undef __ | 5153 #undef __ |
5161 | 5154 |
5162 } } // namespace v8::internal | 5155 } } // namespace v8::internal |
5163 | 5156 |
5164 #endif // V8_TARGET_ARCH_ARM | 5157 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |