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

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

Issue 1679683004: Revert of Do not eagerly instantiate accessors' JSFunction. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 months 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/call-optimization.h » ('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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 } 191 }
192 192
193 Isolate* isolate = masm->isolate(); 193 Isolate* isolate = masm->isolate();
194 Handle<CallHandlerInfo> api_call_info = optimization.api_call_info(); 194 Handle<CallHandlerInfo> api_call_info = optimization.api_call_info();
195 bool call_data_undefined = false; 195 bool call_data_undefined = false;
196 // Put call data in place. 196 // Put call data in place.
197 if (api_call_info->data()->IsUndefined()) { 197 if (api_call_info->data()->IsUndefined()) {
198 call_data_undefined = true; 198 call_data_undefined = true;
199 __ LoadRoot(data, Heap::kUndefinedValueRootIndex); 199 __ LoadRoot(data, Heap::kUndefinedValueRootIndex);
200 } else { 200 } else {
201 if (optimization.is_constant_call()) { 201 __ Ldr(data,
202 __ Ldr(data, 202 FieldMemOperand(callee, JSFunction::kSharedFunctionInfoOffset));
203 FieldMemOperand(callee, JSFunction::kSharedFunctionInfoOffset)); 203 __ Ldr(data,
204 __ Ldr(data, 204 FieldMemOperand(data, SharedFunctionInfo::kFunctionDataOffset));
205 FieldMemOperand(data, SharedFunctionInfo::kFunctionDataOffset)); 205 __ Ldr(data, FieldMemOperand(data, FunctionTemplateInfo::kCallCodeOffset));
206 __ Ldr(data,
207 FieldMemOperand(data, FunctionTemplateInfo::kCallCodeOffset));
208 } else {
209 __ Ldr(data,
210 FieldMemOperand(callee, FunctionTemplateInfo::kCallCodeOffset));
211 }
212 __ Ldr(data, FieldMemOperand(data, CallHandlerInfo::kDataOffset)); 206 __ Ldr(data, FieldMemOperand(data, CallHandlerInfo::kDataOffset));
213 } 207 }
214 208
215 if (api_call_info->fast_handler()->IsCode()) { 209 if (api_call_info->fast_handler()->IsCode()) {
216 // Just tail call into the fast handler if present. 210 // Just tail call into the fast handler if present.
217 __ Jump(handle(Code::cast(api_call_info->fast_handler())), 211 __ Jump(handle(Code::cast(api_call_info->fast_handler())),
218 RelocInfo::CODE_TARGET); 212 RelocInfo::CODE_TARGET);
219 return; 213 return;
220 } 214 }
221 215
222 // Put api_function_address in place. 216 // Put api_function_address in place.
223 Address function_address = v8::ToCData<Address>(api_call_info->callback()); 217 Address function_address = v8::ToCData<Address>(api_call_info->callback());
224 ApiFunction fun(function_address); 218 ApiFunction fun(function_address);
225 ExternalReference ref = ExternalReference( 219 ExternalReference ref = ExternalReference(
226 &fun, ExternalReference::DIRECT_API_CALL, masm->isolate()); 220 &fun, ExternalReference::DIRECT_API_CALL, masm->isolate());
227 __ Mov(api_function_address, ref); 221 __ Mov(api_function_address, ref);
228 222
229 // Jump to stub. 223 // Jump to stub.
230 CallApiAccessorStub stub(isolate, is_store, call_data_undefined, 224 CallApiAccessorStub stub(isolate, is_store, call_data_undefined);
231 !optimization.is_constant_call());
232 __ TailCallStub(&stub); 225 __ TailCallStub(&stub);
233 } 226 }
234 227
235 228
236 void NamedStoreHandlerCompiler::GenerateStoreViaSetter( 229 void NamedStoreHandlerCompiler::GenerateStoreViaSetter(
237 MacroAssembler* masm, Handle<Map> map, Register receiver, Register holder, 230 MacroAssembler* masm, Handle<Map> map, Register receiver, Register holder,
238 int accessor_index, int expected_arguments, Register scratch) { 231 int accessor_index, int expected_arguments, Register scratch) {
239 // ----------- S t a t e ------------- 232 // ----------- S t a t e -------------
240 // -- lr : return address 233 // -- lr : return address
241 // ----------------------------------- 234 // -----------------------------------
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
792 // Return the generated code. 785 // Return the generated code.
793 return GetCode(kind(), Code::FAST, name); 786 return GetCode(kind(), Code::FAST, name);
794 } 787 }
795 788
796 789
797 #undef __ 790 #undef __
798 } // namespace internal 791 } // namespace internal
799 } // namespace v8 792 } // namespace v8
800 793
801 #endif // V8_TARGET_ARCH_IA32 794 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ic/arm/handler-compiler-arm.cc ('k') | src/ic/call-optimization.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698