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

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

Issue 633423002: Teach TurboFan to call vector-based ICs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed nits. Created 6 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « src/code-factory.h ('k') | src/compiler/ast-graph-builder.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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/bootstrapper.h" 7 #include "src/bootstrapper.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/ic/ic.h" 9 #include "src/ic/ic.h"
10 10
11 namespace v8 { 11 namespace v8 {
12 namespace internal { 12 namespace internal {
13 13
14 // static 14 // static
15 Callable CodeFactory::LoadIC(Isolate* isolate, ContextualMode mode) { 15 Callable CodeFactory::LoadIC(Isolate* isolate, ContextualMode mode) {
16 return Callable( 16 return Callable(
17 LoadIC::initialize_stub(isolate, LoadICState(mode).GetExtraICState()), 17 LoadIC::initialize_stub(isolate, LoadICState(mode).GetExtraICState()),
18 LoadDescriptor(isolate)); 18 LoadDescriptor(isolate));
19 } 19 }
20 20
21 21
22 // static 22 // static
23 Callable CodeFactory::LoadICInOptimizedCode(Isolate* isolate,
24 ContextualMode mode) {
25 if (FLAG_vector_ics) {
26 return Callable(LoadIC::initialize_stub_in_optimized_code(
27 isolate, LoadICState(mode).GetExtraICState()),
28 VectorLoadICDescriptor(isolate));
29 }
30 return CodeFactory::LoadIC(isolate, mode);
31 }
32
33
34 // static
23 Callable CodeFactory::KeyedLoadIC(Isolate* isolate) { 35 Callable CodeFactory::KeyedLoadIC(Isolate* isolate) {
24 return Callable(isolate->builtins()->KeyedLoadIC_Initialize(), 36 return Callable(KeyedLoadIC::initialize_stub(isolate),
25 LoadDescriptor(isolate)); 37 LoadDescriptor(isolate));
26 } 38 }
27 39
28 40
29 // static 41 // static
42 Callable CodeFactory::KeyedLoadICInOptimizedCode(Isolate* isolate) {
43 if (FLAG_vector_ics) {
44 return Callable(KeyedLoadIC::initialize_stub_in_optimized_code(isolate),
45 VectorLoadICDescriptor(isolate));
46 }
47 return CodeFactory::KeyedLoadIC(isolate);
48 }
49
50
51 // static
30 Callable CodeFactory::StoreIC(Isolate* isolate, StrictMode mode) { 52 Callable CodeFactory::StoreIC(Isolate* isolate, StrictMode mode) {
31 return Callable(StoreIC::initialize_stub(isolate, mode), 53 return Callable(StoreIC::initialize_stub(isolate, mode),
32 StoreDescriptor(isolate)); 54 StoreDescriptor(isolate));
33 } 55 }
34 56
35 57
36 // static 58 // static
37 Callable CodeFactory::KeyedStoreIC(Isolate* isolate, StrictMode mode) { 59 Callable CodeFactory::KeyedStoreIC(Isolate* isolate, StrictMode mode) {
38 Handle<Code> ic = mode == SLOPPY 60 Handle<Code> ic = mode == SLOPPY
39 ? isolate->builtins()->KeyedStoreIC_Initialize() 61 ? isolate->builtins()->KeyedStoreIC_Initialize()
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 105
84 // static 106 // static
85 Callable CodeFactory::CallFunction(Isolate* isolate, int argc, 107 Callable CodeFactory::CallFunction(Isolate* isolate, int argc,
86 CallFunctionFlags flags) { 108 CallFunctionFlags flags) {
87 CallFunctionStub stub(isolate, argc, flags); 109 CallFunctionStub stub(isolate, argc, flags);
88 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor()); 110 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor());
89 } 111 }
90 112
91 } // namespace internal 113 } // namespace internal
92 } // namespace v8 114 } // namespace v8
OLDNEW
« no previous file with comments | « src/code-factory.h ('k') | src/compiler/ast-graph-builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698