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

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

Issue 1912633002: [ic] Split LoadIC into LoadGlobalIC and LoadIC. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebasing Created 4 years, 6 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/code-factory.h ('k') | src/code-stubs.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 #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 {
11 namespace internal { 11 namespace internal {
12 12
13 13
14 // static 14 // static
15 Callable CodeFactory::LoadIC(Isolate* isolate, TypeofMode typeof_mode) { 15 Callable CodeFactory::LoadIC(Isolate* isolate) {
16 if (FLAG_tf_load_ic_stub) { 16 if (FLAG_tf_load_ic_stub) {
17 LoadICTrampolineTFStub stub(isolate, LoadICState(typeof_mode)); 17 LoadICTrampolineTFStub stub(isolate, LoadICState(NOT_INSIDE_TYPEOF));
18 return Callable(stub.GetCode(), LoadDescriptor(isolate)); 18 return Callable(stub.GetCode(), LoadDescriptor(isolate));
19 } 19 }
20 LoadICTrampolineStub stub(isolate, LoadICState(typeof_mode)); 20 LoadICTrampolineStub stub(isolate, LoadICState(NOT_INSIDE_TYPEOF));
21 return Callable(stub.GetCode(), LoadDescriptor(isolate)); 21 return Callable(stub.GetCode(), LoadDescriptor(isolate));
22 } 22 }
23 23
24 // static 24 // static
25 Callable CodeFactory::ApiGetter(Isolate* isolate) { 25 Callable CodeFactory::ApiGetter(Isolate* isolate) {
26 CallApiGetterStub stub(isolate); 26 CallApiGetterStub stub(isolate);
27 return Callable(stub.GetCode(), ApiGetterDescriptor(isolate)); 27 return Callable(stub.GetCode(), ApiGetterDescriptor(isolate));
28 } 28 }
29 29
30 // static 30 // static
31 Callable CodeFactory::LoadICInOptimizedCode(Isolate* isolate, 31 Callable CodeFactory::LoadICInOptimizedCode(Isolate* isolate) {
32 TypeofMode typeof_mode) {
33 auto code = LoadIC::initialize_stub_in_optimized_code( 32 auto code = LoadIC::initialize_stub_in_optimized_code(
33 isolate, LoadICState(NOT_INSIDE_TYPEOF).GetExtraICState());
34 return Callable(code, LoadWithVectorDescriptor(isolate));
35 }
36
37 // static
38 Callable CodeFactory::LoadGlobalIC(Isolate* isolate, TypeofMode typeof_mode) {
39 LoadGlobalICTrampolineStub stub(isolate, LoadICState(typeof_mode));
40 return Callable(stub.GetCode(), LoadDescriptor(isolate));
41 }
42
43 // static
44 Callable CodeFactory::LoadGlobalICInOptimizedCode(Isolate* isolate,
45 TypeofMode typeof_mode) {
46 auto code = LoadGlobalIC::initialize_stub_in_optimized_code(
34 isolate, LoadICState(typeof_mode).GetExtraICState()); 47 isolate, LoadICState(typeof_mode).GetExtraICState());
35 return Callable(code, LoadWithVectorDescriptor(isolate)); 48 return Callable(code, LoadWithVectorDescriptor(isolate));
36 } 49 }
37 50
38
39 // static 51 // static
40 Callable CodeFactory::KeyedLoadIC(Isolate* isolate) { 52 Callable CodeFactory::KeyedLoadIC(Isolate* isolate) {
41 KeyedLoadICTrampolineStub stub(isolate, LoadICState(kNoExtraICState)); 53 KeyedLoadICTrampolineStub stub(isolate, LoadICState(kNoExtraICState));
42 return Callable(stub.GetCode(), LoadDescriptor(isolate)); 54 return Callable(stub.GetCode(), LoadDescriptor(isolate));
43 } 55 }
44 56
45 57
46 // static 58 // static
47 Callable CodeFactory::KeyedLoadICInOptimizedCode(Isolate* isolate) { 59 Callable CodeFactory::KeyedLoadICInOptimizedCode(Isolate* isolate) {
48 auto code = 60 auto code =
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 // static 574 // static
563 Callable CodeFactory::InterpreterCEntry(Isolate* isolate, int result_size) { 575 Callable CodeFactory::InterpreterCEntry(Isolate* isolate, int result_size) {
564 // Note: If we ever use fpregs in the interpreter then we will need to 576 // Note: If we ever use fpregs in the interpreter then we will need to
565 // save fpregs too. 577 // save fpregs too.
566 CEntryStub stub(isolate, result_size, kDontSaveFPRegs, kArgvInRegister); 578 CEntryStub stub(isolate, result_size, kDontSaveFPRegs, kArgvInRegister);
567 return Callable(stub.GetCode(), InterpreterCEntryDescriptor(isolate)); 579 return Callable(stub.GetCode(), InterpreterCEntryDescriptor(isolate));
568 } 580 }
569 581
570 } // namespace internal 582 } // namespace internal
571 } // namespace v8 583 } // namespace v8
OLDNEW
« no previous file with comments | « src/code-factory.h ('k') | src/code-stubs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698