Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/ic/arm64/handler-compiler-arm64.cc

Issue 1407313004: Adds the possibility of setting a Code object as the callback of a FunctionTemplate. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Update. Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/ic/arm/handler-compiler-arm.cc ('k') | src/ic/ia32/handler-compiler-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_ARM64 5 #if V8_TARGET_ARCH_ARM64
6 6
7 #include "src/ic/call-optimization.h" 7 #include "src/ic/call-optimization.h"
8 #include "src/ic/handler-compiler.h" 8 #include "src/ic/handler-compiler.h"
9 #include "src/ic/ic.h" 9 #include "src/ic/ic.h"
10 #include "src/isolate-inl.h" 10 #include "src/isolate-inl.h"
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 __ LoadRoot(data, Heap::kUndefinedValueRootIndex); 200 __ LoadRoot(data, Heap::kUndefinedValueRootIndex);
201 } else { 201 } else {
202 __ Ldr(data, 202 __ Ldr(data,
203 FieldMemOperand(callee, JSFunction::kSharedFunctionInfoOffset)); 203 FieldMemOperand(callee, JSFunction::kSharedFunctionInfoOffset));
204 __ Ldr(data, 204 __ Ldr(data,
205 FieldMemOperand(data, SharedFunctionInfo::kFunctionDataOffset)); 205 FieldMemOperand(data, SharedFunctionInfo::kFunctionDataOffset));
206 __ Ldr(data, FieldMemOperand(data, FunctionTemplateInfo::kCallCodeOffset)); 206 __ Ldr(data, FieldMemOperand(data, FunctionTemplateInfo::kCallCodeOffset));
207 __ Ldr(data, FieldMemOperand(data, CallHandlerInfo::kDataOffset)); 207 __ Ldr(data, FieldMemOperand(data, CallHandlerInfo::kDataOffset));
208 } 208 }
209 209
210 if (api_call_info->fast_handler()->IsCode()) {
211 // Just tail call into the fast handler if present.
212 __ Jump(handle(Code::cast(api_call_info->fast_handler())),
213 RelocInfo::CODE_TARGET);
214 return;
215 }
216
210 // Put api_function_address in place. 217 // Put api_function_address in place.
211 Address function_address = v8::ToCData<Address>(api_call_info->callback()); 218 Address function_address = v8::ToCData<Address>(api_call_info->callback());
212 ApiFunction fun(function_address); 219 ApiFunction fun(function_address);
213 ExternalReference ref = ExternalReference( 220 ExternalReference ref = ExternalReference(
214 &fun, ExternalReference::DIRECT_API_CALL, masm->isolate()); 221 &fun, ExternalReference::DIRECT_API_CALL, masm->isolate());
215 __ Mov(api_function_address, ref); 222 __ Mov(api_function_address, ref);
216 223
217 // Jump to stub. 224 // Jump to stub.
218 CallApiAccessorStub stub(isolate, is_store, call_data_undefined); 225 CallApiAccessorStub stub(isolate, is_store, call_data_undefined);
219 __ TailCallStub(&stub); 226 __ TailCallStub(&stub);
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after
795 // Return the generated code. 802 // Return the generated code.
796 return GetCode(kind(), Code::FAST, name); 803 return GetCode(kind(), Code::FAST, name);
797 } 804 }
798 805
799 806
800 #undef __ 807 #undef __
801 } // namespace internal 808 } // namespace internal
802 } // namespace v8 809 } // namespace v8
803 810
804 #endif // V8_TARGET_ARCH_IA32 811 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ic/arm/handler-compiler-arm.cc ('k') | src/ic/ia32/handler-compiler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698