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

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

Issue 1609233002: Do not eagerly instantiate accessors' JSFunction. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Make GCMole happy again. 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/ia32/code-stubs-ia32.cc ('k') | src/ic/arm64/handler-compiler-arm64.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_ARM 5 #if V8_TARGET_ARCH_ARM
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 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 } 279 }
280 280
281 Isolate* isolate = masm->isolate(); 281 Isolate* isolate = masm->isolate();
282 Handle<CallHandlerInfo> api_call_info = optimization.api_call_info(); 282 Handle<CallHandlerInfo> api_call_info = optimization.api_call_info();
283 bool call_data_undefined = false; 283 bool call_data_undefined = false;
284 // Put call data in place. 284 // Put call data in place.
285 if (api_call_info->data()->IsUndefined()) { 285 if (api_call_info->data()->IsUndefined()) {
286 call_data_undefined = true; 286 call_data_undefined = true;
287 __ LoadRoot(data, Heap::kUndefinedValueRootIndex); 287 __ LoadRoot(data, Heap::kUndefinedValueRootIndex);
288 } else { 288 } else {
289 __ ldr(data, 289 if (optimization.is_constant_call()) {
290 FieldMemOperand(callee, JSFunction::kSharedFunctionInfoOffset)); 290 __ ldr(data,
291 __ ldr(data, 291 FieldMemOperand(callee, JSFunction::kSharedFunctionInfoOffset));
292 FieldMemOperand(data, SharedFunctionInfo::kFunctionDataOffset)); 292 __ ldr(data,
293 __ ldr(data, FieldMemOperand(data, FunctionTemplateInfo::kCallCodeOffset)); 293 FieldMemOperand(data, SharedFunctionInfo::kFunctionDataOffset));
294 __ ldr(data,
295 FieldMemOperand(data, FunctionTemplateInfo::kCallCodeOffset));
296 } else {
297 __ ldr(data,
298 FieldMemOperand(callee, FunctionTemplateInfo::kCallCodeOffset));
299 }
294 __ ldr(data, FieldMemOperand(data, CallHandlerInfo::kDataOffset)); 300 __ ldr(data, FieldMemOperand(data, CallHandlerInfo::kDataOffset));
295 } 301 }
296 302
297 if (api_call_info->fast_handler()->IsCode()) { 303 if (api_call_info->fast_handler()->IsCode()) {
298 // Just tail call into the fast handler if present. 304 // Just tail call into the fast handler if present.
299 __ Jump(handle(Code::cast(api_call_info->fast_handler())), 305 __ Jump(handle(Code::cast(api_call_info->fast_handler())),
300 RelocInfo::CODE_TARGET); 306 RelocInfo::CODE_TARGET);
301 return; 307 return;
302 } 308 }
303 309
304 // Put api_function_address in place. 310 // Put api_function_address in place.
305 Address function_address = v8::ToCData<Address>(api_call_info->callback()); 311 Address function_address = v8::ToCData<Address>(api_call_info->callback());
306 ApiFunction fun(function_address); 312 ApiFunction fun(function_address);
307 ExternalReference::Type type = ExternalReference::DIRECT_API_CALL; 313 ExternalReference::Type type = ExternalReference::DIRECT_API_CALL;
308 ExternalReference ref = ExternalReference(&fun, type, masm->isolate()); 314 ExternalReference ref = ExternalReference(&fun, type, masm->isolate());
309 __ mov(api_function_address, Operand(ref)); 315 __ mov(api_function_address, Operand(ref));
310 316
311 // Jump to stub. 317 // Jump to stub.
312 CallApiAccessorStub stub(isolate, is_store, call_data_undefined); 318 CallApiAccessorStub stub(isolate, is_store, call_data_undefined,
319 !optimization.is_constant_call());
313 __ TailCallStub(&stub); 320 __ TailCallStub(&stub);
314 } 321 }
315 322
316 323
317 static void StoreIC_PushArgs(MacroAssembler* masm) { 324 static void StoreIC_PushArgs(MacroAssembler* masm) {
318 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(), 325 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(),
319 StoreDescriptor::ValueRegister(), 326 StoreDescriptor::ValueRegister(),
320 VectorStoreICDescriptor::SlotRegister(), 327 VectorStoreICDescriptor::SlotRegister(),
321 VectorStoreICDescriptor::VectorRegister()); 328 VectorStoreICDescriptor::VectorRegister());
322 } 329 }
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
783 // Return the generated code. 790 // Return the generated code.
784 return GetCode(kind(), Code::NORMAL, name); 791 return GetCode(kind(), Code::NORMAL, name);
785 } 792 }
786 793
787 794
788 #undef __ 795 #undef __
789 } // namespace internal 796 } // namespace internal
790 } // namespace v8 797 } // namespace v8
791 798
792 #endif // V8_TARGET_ARCH_ARM 799 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | src/ic/arm64/handler-compiler-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698