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

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

Issue 894683003: Introduce LanguageMode, drop StrictMode. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebased (w/ conflicts) Created 5 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/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/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
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 // static 59 // static
60 Callable CodeFactory::CallICInOptimizedCode(Isolate* isolate, int argc, 60 Callable CodeFactory::CallICInOptimizedCode(Isolate* isolate, int argc,
61 CallICState::CallType call_type) { 61 CallICState::CallType call_type) {
62 return Callable( 62 return Callable(
63 CallIC::initialize_stub_in_optimized_code(isolate, argc, call_type), 63 CallIC::initialize_stub_in_optimized_code(isolate, argc, call_type),
64 CallFunctionWithFeedbackAndVectorDescriptor(isolate)); 64 CallFunctionWithFeedbackAndVectorDescriptor(isolate));
65 } 65 }
66 66
67 67
68 // static 68 // static
69 Callable CodeFactory::StoreIC(Isolate* isolate, StrictMode mode) { 69 Callable CodeFactory::StoreIC(Isolate* isolate, LanguageMode language_mode) {
70 return Callable(StoreIC::initialize_stub(isolate, mode), 70 return Callable(StoreIC::initialize_stub(isolate, language_mode),
71 StoreDescriptor(isolate)); 71 StoreDescriptor(isolate));
72 } 72 }
73 73
74 74
75 // static 75 // static
76 Callable CodeFactory::KeyedStoreIC(Isolate* isolate, StrictMode mode) { 76 Callable CodeFactory::KeyedStoreIC(Isolate* isolate,
77 Handle<Code> ic = mode == SLOPPY 77 LanguageMode language_mode) {
78 ? isolate->builtins()->KeyedStoreIC_Initialize() 78 Handle<Code> ic = is_strict(language_mode)
79 : isolate->builtins()->KeyedStoreIC_Initialize_Strict(); 79 ? isolate->builtins()->KeyedStoreIC_Initialize_Strict()
80 : isolate->builtins()->KeyedStoreIC_Initialize();
80 return Callable(ic, StoreDescriptor(isolate)); 81 return Callable(ic, StoreDescriptor(isolate));
81 } 82 }
82 83
83 84
84 // static 85 // static
85 Callable CodeFactory::CompareIC(Isolate* isolate, Token::Value op) { 86 Callable CodeFactory::CompareIC(Isolate* isolate, Token::Value op) {
86 Handle<Code> code = CompareIC::GetUninitialized(isolate, op); 87 Handle<Code> code = CompareIC::GetUninitialized(isolate, op);
87 return Callable(code, BinaryOpDescriptor(isolate)); 88 return Callable(code, BinaryOpDescriptor(isolate));
88 } 89 }
89 90
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 130
130 // static 131 // static
131 Callable CodeFactory::CallFunction(Isolate* isolate, int argc, 132 Callable CodeFactory::CallFunction(Isolate* isolate, int argc,
132 CallFunctionFlags flags) { 133 CallFunctionFlags flags) {
133 CallFunctionStub stub(isolate, argc, flags); 134 CallFunctionStub stub(isolate, argc, flags);
134 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor()); 135 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor());
135 } 136 }
136 137
137 } // namespace internal 138 } // namespace internal
138 } // namespace v8 139 } // 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