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

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

Issue 2862213002: [turbofan] Optimized support for CreateGeneratorObject. (Closed)
Patch Set: Add control input. Created 3 years, 7 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 | « no previous file | 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/compiler/js-generic-lowering.h" 5 #include "src/compiler/js-generic-lowering.h"
6 6
7 #include "src/ast/ast.h" 7 #include "src/ast/ast.h"
8 #include "src/builtins/builtins-constructor.h" 8 #include "src/builtins/builtins-constructor.h"
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 Callable callable = 416 Callable callable =
417 CodeFactory::FastNewFunctionContext(isolate(), scope_type); 417 CodeFactory::FastNewFunctionContext(isolate(), scope_type);
418 node->InsertInput(zone(), 1, jsgraph()->Int32Constant(slot_count)); 418 node->InsertInput(zone(), 1, jsgraph()->Int32Constant(slot_count));
419 ReplaceWithStubCall(node, callable, flags); 419 ReplaceWithStubCall(node, callable, flags);
420 } else { 420 } else {
421 node->InsertInput(zone(), 1, jsgraph()->SmiConstant(scope_type)); 421 node->InsertInput(zone(), 1, jsgraph()->SmiConstant(scope_type));
422 ReplaceWithRuntimeCall(node, Runtime::kNewFunctionContext); 422 ReplaceWithRuntimeCall(node, Runtime::kNewFunctionContext);
423 } 423 }
424 } 424 }
425 425
426 void JSGenericLowering::LowerJSCreateGeneratorObject(Node* node) {
427 CallDescriptor::Flags flags = FrameStateFlagForCall(node);
428 Callable callable =
429 Builtins::CallableFor(isolate(), Builtins::kCreateGeneratorObject);
430 node->RemoveInput(4); // control
431 ReplaceWithStubCall(node, callable, flags);
432 }
426 433
427 void JSGenericLowering::LowerJSCreateIterResultObject(Node* node) { 434 void JSGenericLowering::LowerJSCreateIterResultObject(Node* node) {
428 ReplaceWithRuntimeCall(node, Runtime::kCreateIterResultObject); 435 ReplaceWithRuntimeCall(node, Runtime::kCreateIterResultObject);
429 } 436 }
430 437
431 void JSGenericLowering::LowerJSCreateKeyValueArray(Node* node) { 438 void JSGenericLowering::LowerJSCreateKeyValueArray(Node* node) {
432 ReplaceWithRuntimeCall(node, Runtime::kCreateKeyValueArray); 439 ReplaceWithRuntimeCall(node, Runtime::kCreateKeyValueArray);
433 } 440 }
434 441
435 void JSGenericLowering::LowerJSCreateLiteralArray(Node* node) { 442 void JSGenericLowering::LowerJSCreateLiteralArray(Node* node) {
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
722 } 729 }
723 730
724 731
725 MachineOperatorBuilder* JSGenericLowering::machine() const { 732 MachineOperatorBuilder* JSGenericLowering::machine() const {
726 return jsgraph()->machine(); 733 return jsgraph()->machine();
727 } 734 }
728 735
729 } // namespace compiler 736 } // namespace compiler
730 } // namespace internal 737 } // namespace internal
731 } // namespace v8 738 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/js-intrinsic-lowering.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698