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

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

Issue 1104453006: [turbofan] Introduce explicit JSCreateLiteral[Array|Object]. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased. Created 5 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 | « src/compiler/ast-graph-builder.cc ('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 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 415
416 416
417 void JSGenericLowering::LowerJSCreateClosure(Node* node) { 417 void JSGenericLowering::LowerJSCreateClosure(Node* node) {
418 CreateClosureParameters p = CreateClosureParametersOf(node->op()); 418 CreateClosureParameters p = CreateClosureParametersOf(node->op());
419 node->InsertInput(zone(), 1, jsgraph()->HeapConstant(p.shared_info())); 419 node->InsertInput(zone(), 1, jsgraph()->HeapConstant(p.shared_info()));
420 node->InsertInput(zone(), 2, jsgraph()->BooleanConstant(p.pretenure())); 420 node->InsertInput(zone(), 2, jsgraph()->BooleanConstant(p.pretenure()));
421 ReplaceWithRuntimeCall(node, Runtime::kNewClosure); 421 ReplaceWithRuntimeCall(node, Runtime::kNewClosure);
422 } 422 }
423 423
424 424
425 void JSGenericLowering::LowerJSCreateLiteralArray(Node* node) {
426 int literal_flags = OpParameter<int>(node->op());
427 node->InsertInput(zone(), 3, jsgraph()->SmiConstant(literal_flags));
428 ReplaceWithRuntimeCall(node, Runtime::kCreateArrayLiteral);
429 }
430
431
432 void JSGenericLowering::LowerJSCreateLiteralObject(Node* node) {
433 int literal_flags = OpParameter<int>(node->op());
434 node->InsertInput(zone(), 3, jsgraph()->SmiConstant(literal_flags));
435 ReplaceWithRuntimeCall(node, Runtime::kCreateObjectLiteral);
436 }
437
438
425 void JSGenericLowering::LowerJSCreateCatchContext(Node* node) { 439 void JSGenericLowering::LowerJSCreateCatchContext(Node* node) {
426 Unique<String> name = OpParameter<Unique<String>>(node); 440 Unique<String> name = OpParameter<Unique<String>>(node);
427 node->InsertInput(zone(), 0, jsgraph()->HeapConstant(name)); 441 node->InsertInput(zone(), 0, jsgraph()->HeapConstant(name));
428 ReplaceWithRuntimeCall(node, Runtime::kPushCatchContext); 442 ReplaceWithRuntimeCall(node, Runtime::kPushCatchContext);
429 } 443 }
430 444
431 445
432 void JSGenericLowering::LowerJSCallConstruct(Node* node) { 446 void JSGenericLowering::LowerJSCallConstruct(Node* node) {
433 int arity = OpParameter<int>(node); 447 int arity = OpParameter<int>(node);
434 CallConstructStub stub(isolate(), NO_CALL_CONSTRUCTOR_FLAGS); 448 CallConstructStub stub(isolate(), NO_CALL_CONSTRUCTOR_FLAGS);
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 } 570 }
557 571
558 572
559 MachineOperatorBuilder* JSGenericLowering::machine() const { 573 MachineOperatorBuilder* JSGenericLowering::machine() const {
560 return jsgraph()->machine(); 574 return jsgraph()->machine();
561 } 575 }
562 576
563 } // namespace compiler 577 } // namespace compiler
564 } // namespace internal 578 } // namespace internal
565 } // namespace v8 579 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | src/compiler/js-intrinsic-lowering.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698