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

Side by Side Diff: src/code-factory.cc

Issue 2182103002: [KeyedLoadIC] Support Smi "handlers" for simple field loads (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: implement KeyedLoadIC stub in CodeStubAssembler Created 4 years, 4 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
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 #include "src/code-factory.h" 5 #include "src/code-factory.h"
6 6
7 #include "src/bootstrapper.h" 7 #include "src/bootstrapper.h"
8 #include "src/ic/ic.h" 8 #include "src/ic/ic.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 // static 42 // static
43 Callable CodeFactory::LoadGlobalICInOptimizedCode(Isolate* isolate, 43 Callable CodeFactory::LoadGlobalICInOptimizedCode(Isolate* isolate,
44 TypeofMode typeof_mode) { 44 TypeofMode typeof_mode) {
45 auto code = LoadGlobalIC::initialize_stub_in_optimized_code( 45 auto code = LoadGlobalIC::initialize_stub_in_optimized_code(
46 isolate, LoadGlobalICState(typeof_mode).GetExtraICState()); 46 isolate, LoadGlobalICState(typeof_mode).GetExtraICState());
47 return Callable(code, LoadGlobalWithVectorDescriptor(isolate)); 47 return Callable(code, LoadGlobalWithVectorDescriptor(isolate));
48 } 48 }
49 49
50 // static 50 // static
51 Callable CodeFactory::KeyedLoadIC(Isolate* isolate) { 51 Callable CodeFactory::KeyedLoadIC(Isolate* isolate) {
52 if (FLAG_tf_load_ic_stub) {
53 KeyedLoadICTrampolineTFStub stub(isolate);
54 return Callable(stub.GetCode(), LoadDescriptor(isolate));
55 }
52 KeyedLoadICTrampolineStub stub(isolate); 56 KeyedLoadICTrampolineStub stub(isolate);
53 return Callable(stub.GetCode(), LoadDescriptor(isolate)); 57 return Callable(stub.GetCode(), LoadDescriptor(isolate));
54 } 58 }
55 59
56 60
57 // static 61 // static
58 Callable CodeFactory::KeyedLoadICInOptimizedCode(Isolate* isolate) { 62 Callable CodeFactory::KeyedLoadICInOptimizedCode(Isolate* isolate) {
59 auto code = 63 auto code = KeyedLoadIC::initialize_stub_in_optimized_code(isolate);
60 KeyedLoadIC::initialize_stub_in_optimized_code(isolate, kNoExtraICState);
61 return Callable(code, LoadWithVectorDescriptor(isolate)); 64 return Callable(code, LoadWithVectorDescriptor(isolate));
62 } 65 }
63 66
67 // static
68 Callable CodeFactory::KeyedLoadIC_Megamorphic(Isolate* isolate) {
69 return Callable(isolate->builtins()->KeyedLoadIC_Megamorphic(),
70 LoadWithVectorDescriptor(isolate));
71 }
64 72
65 // static 73 // static
66 Callable CodeFactory::CallIC(Isolate* isolate, int argc, 74 Callable CodeFactory::CallIC(Isolate* isolate, int argc,
67 ConvertReceiverMode mode, 75 ConvertReceiverMode mode,
68 TailCallMode tail_call_mode) { 76 TailCallMode tail_call_mode) {
69 CallICTrampolineStub stub(isolate, CallICState(argc, mode, tail_call_mode)); 77 CallICTrampolineStub stub(isolate, CallICState(argc, mode, tail_call_mode));
70 return Callable(stub.GetCode(), CallFunctionWithFeedbackDescriptor(isolate)); 78 return Callable(stub.GetCode(), CallFunctionWithFeedbackDescriptor(isolate));
71 } 79 }
72 80
73 81
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 // static 604 // static
597 Callable CodeFactory::InterpreterCEntry(Isolate* isolate, int result_size) { 605 Callable CodeFactory::InterpreterCEntry(Isolate* isolate, int result_size) {
598 // Note: If we ever use fpregs in the interpreter then we will need to 606 // Note: If we ever use fpregs in the interpreter then we will need to
599 // save fpregs too. 607 // save fpregs too.
600 CEntryStub stub(isolate, result_size, kDontSaveFPRegs, kArgvInRegister); 608 CEntryStub stub(isolate, result_size, kDontSaveFPRegs, kArgvInRegister);
601 return Callable(stub.GetCode(), InterpreterCEntryDescriptor(isolate)); 609 return Callable(stub.GetCode(), InterpreterCEntryDescriptor(isolate));
602 } 610 }
603 611
604 } // namespace internal 612 } // namespace internal
605 } // namespace v8 613 } // namespace v8
OLDNEW
« no previous file with comments | « src/code-factory.h ('k') | src/code-stub-assembler.h » ('j') | src/code-stub-assembler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698