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

Side by Side Diff: src/compiler/js-generic-lowering.cc

Issue 1266013006: [stubs] Unify (and optimize) implementation of ToObject. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add missing support for %_ToObject in TurboFan and Crankshaft. Created 5 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
« no previous file with comments | « src/collection.js ('k') | src/compiler/js-intrinsic-lowering.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 #include "src/code-stubs.h" 6 #include "src/code-stubs.h"
7 #include "src/compiler/common-operator.h" 7 #include "src/compiler/common-operator.h"
8 #include "src/compiler/js-generic-lowering.h" 8 #include "src/compiler/js-generic-lowering.h"
9 #include "src/compiler/js-graph.h" 9 #include "src/compiler/js-graph.h"
10 #include "src/compiler/machine-operator.h" 10 #include "src/compiler/machine-operator.h"
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 ReplaceWithBuiltinCall(node, Builtins::TO_STRING, 1); 300 ReplaceWithBuiltinCall(node, Builtins::TO_STRING, 1);
301 } 301 }
302 302
303 303
304 void JSGenericLowering::LowerJSToName(Node* node) { 304 void JSGenericLowering::LowerJSToName(Node* node) {
305 ReplaceWithBuiltinCall(node, Builtins::TO_NAME, 1); 305 ReplaceWithBuiltinCall(node, Builtins::TO_NAME, 1);
306 } 306 }
307 307
308 308
309 void JSGenericLowering::LowerJSToObject(Node* node) { 309 void JSGenericLowering::LowerJSToObject(Node* node) {
310 ReplaceWithBuiltinCall(node, Builtins::TO_OBJECT, 1); 310 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node);
311 Callable callable = CodeFactory::ToObject(isolate());
312 ReplaceWithStubCall(node, callable, flags);
311 } 313 }
312 314
313 315
314 void JSGenericLowering::LowerJSLoadProperty(Node* node) { 316 void JSGenericLowering::LowerJSLoadProperty(Node* node) {
315 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node); 317 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node);
316 const LoadPropertyParameters& p = LoadPropertyParametersOf(node->op()); 318 const LoadPropertyParameters& p = LoadPropertyParametersOf(node->op());
317 Callable callable = CodeFactory::KeyedLoadICInOptimizedCode( 319 Callable callable = CodeFactory::KeyedLoadICInOptimizedCode(
318 isolate(), p.language_mode(), UNINITIALIZED); 320 isolate(), p.language_mode(), UNINITIALIZED);
319 node->InsertInput(zone(), 2, jsgraph()->SmiConstant(p.feedback().index())); 321 node->InsertInput(zone(), 2, jsgraph()->SmiConstant(p.feedback().index()));
320 ReplaceWithStubCall(node, callable, flags); 322 ReplaceWithStubCall(node, callable, flags);
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after
845 } 847 }
846 848
847 849
848 MachineOperatorBuilder* JSGenericLowering::machine() const { 850 MachineOperatorBuilder* JSGenericLowering::machine() const {
849 return jsgraph()->machine(); 851 return jsgraph()->machine();
850 } 852 }
851 853
852 } // namespace compiler 854 } // namespace compiler
853 } // namespace internal 855 } // namespace internal
854 } // namespace v8 856 } // namespace v8
OLDNEW
« no previous file with comments | « src/collection.js ('k') | src/compiler/js-intrinsic-lowering.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698