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

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

Issue 2862213002: [turbofan] Optimized support for CreateGeneratorObject. (Closed)
Patch Set: Cleanup. 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') | src/compiler/js-operator.cc » ('J')
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 ReplaceWithStubCall(node, callable, flags);
431 }
426 432
427 void JSGenericLowering::LowerJSCreateIterResultObject(Node* node) { 433 void JSGenericLowering::LowerJSCreateIterResultObject(Node* node) {
428 ReplaceWithRuntimeCall(node, Runtime::kCreateIterResultObject); 434 ReplaceWithRuntimeCall(node, Runtime::kCreateIterResultObject);
429 } 435 }
430 436
431 void JSGenericLowering::LowerJSCreateKeyValueArray(Node* node) { 437 void JSGenericLowering::LowerJSCreateKeyValueArray(Node* node) {
432 ReplaceWithRuntimeCall(node, Runtime::kCreateKeyValueArray); 438 ReplaceWithRuntimeCall(node, Runtime::kCreateKeyValueArray);
433 } 439 }
434 440
435 void JSGenericLowering::LowerJSCreateLiteralArray(Node* node) { 441 void JSGenericLowering::LowerJSCreateLiteralArray(Node* node) {
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
722 } 728 }
723 729
724 730
725 MachineOperatorBuilder* JSGenericLowering::machine() const { 731 MachineOperatorBuilder* JSGenericLowering::machine() const {
726 return jsgraph()->machine(); 732 return jsgraph()->machine();
727 } 733 }
728 734
729 } // namespace compiler 735 } // namespace compiler
730 } // namespace internal 736 } // namespace internal
731 } // namespace v8 737 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/js-intrinsic-lowering.h » ('j') | src/compiler/js-operator.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698