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

Side by Side Diff: src/ic/mips64/handler-compiler-mips64.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/ic/mips/handler-compiler-mips.cc ('k') | src/ic/ppc/handler-compiler-ppc.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_MIPS64 5 #if V8_TARGET_ARCH_MIPS64
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 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 } 272 }
273 273
274 Isolate* isolate = masm->isolate(); 274 Isolate* isolate = masm->isolate();
275 Handle<CallHandlerInfo> api_call_info = optimization.api_call_info(); 275 Handle<CallHandlerInfo> api_call_info = optimization.api_call_info();
276 bool call_data_undefined = false; 276 bool call_data_undefined = false;
277 // Put call data in place. 277 // Put call data in place.
278 if (api_call_info->data()->IsUndefined()) { 278 if (api_call_info->data()->IsUndefined()) {
279 call_data_undefined = true; 279 call_data_undefined = true;
280 __ LoadRoot(data, Heap::kUndefinedValueRootIndex); 280 __ LoadRoot(data, Heap::kUndefinedValueRootIndex);
281 } else { 281 } else {
282 __ ld(data, FieldMemOperand(callee, JSFunction::kSharedFunctionInfoOffset)); 282 if (optimization.is_constant_call()) {
283 __ ld(data, FieldMemOperand(data, SharedFunctionInfo::kFunctionDataOffset)); 283 __ ld(data,
284 __ ld(data, FieldMemOperand(data, FunctionTemplateInfo::kCallCodeOffset)); 284 FieldMemOperand(callee, JSFunction::kSharedFunctionInfoOffset));
285 __ ld(data,
286 FieldMemOperand(data, SharedFunctionInfo::kFunctionDataOffset));
287 __ ld(data, FieldMemOperand(data, FunctionTemplateInfo::kCallCodeOffset));
288 } else {
289 __ ld(data,
290 FieldMemOperand(callee, FunctionTemplateInfo::kCallCodeOffset));
291 }
285 __ ld(data, FieldMemOperand(data, CallHandlerInfo::kDataOffset)); 292 __ ld(data, FieldMemOperand(data, CallHandlerInfo::kDataOffset));
286 } 293 }
287 294
288 if (api_call_info->fast_handler()->IsCode()) { 295 if (api_call_info->fast_handler()->IsCode()) {
289 // Just tail call into the fast handler if present. 296 // Just tail call into the fast handler if present.
290 __ Jump(handle(Code::cast(api_call_info->fast_handler())), 297 __ Jump(handle(Code::cast(api_call_info->fast_handler())),
291 RelocInfo::CODE_TARGET); 298 RelocInfo::CODE_TARGET);
292 return; 299 return;
293 } 300 }
294 // Put api_function_address in place. 301 // Put api_function_address in place.
295 Address function_address = v8::ToCData<Address>(api_call_info->callback()); 302 Address function_address = v8::ToCData<Address>(api_call_info->callback());
296 ApiFunction fun(function_address); 303 ApiFunction fun(function_address);
297 ExternalReference::Type type = ExternalReference::DIRECT_API_CALL; 304 ExternalReference::Type type = ExternalReference::DIRECT_API_CALL;
298 ExternalReference ref = ExternalReference(&fun, type, masm->isolate()); 305 ExternalReference ref = ExternalReference(&fun, type, masm->isolate());
299 __ li(api_function_address, Operand(ref)); 306 __ li(api_function_address, Operand(ref));
300 307
301 // Jump to stub. 308 // Jump to stub.
302 CallApiAccessorStub stub(isolate, is_store, call_data_undefined); 309 CallApiAccessorStub stub(isolate, is_store, call_data_undefined,
310 !optimization.is_constant_call());
303 __ TailCallStub(&stub); 311 __ TailCallStub(&stub);
304 } 312 }
305 313
306 314
307 static void StoreIC_PushArgs(MacroAssembler* masm) { 315 static void StoreIC_PushArgs(MacroAssembler* masm) {
308 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(), 316 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(),
309 StoreDescriptor::ValueRegister(), 317 StoreDescriptor::ValueRegister(),
310 VectorStoreICDescriptor::SlotRegister(), 318 VectorStoreICDescriptor::SlotRegister(),
311 VectorStoreICDescriptor::VectorRegister()); 319 VectorStoreICDescriptor::VectorRegister());
312 } 320 }
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
780 // Return the generated code. 788 // Return the generated code.
781 return GetCode(kind(), Code::NORMAL, name); 789 return GetCode(kind(), Code::NORMAL, name);
782 } 790 }
783 791
784 792
785 #undef __ 793 #undef __
786 } // namespace internal 794 } // namespace internal
787 } // namespace v8 795 } // namespace v8
788 796
789 #endif // V8_TARGET_ARCH_MIPS64 797 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/ic/mips/handler-compiler-mips.cc ('k') | src/ic/ppc/handler-compiler-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698