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

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

Issue 1410003002: [turbofan] Remove locally constructed simplified builders. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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/js-intrinsic-lowering.h ('k') | src/compiler/js-type-feedback.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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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-intrinsic-lowering.h" 5 #include "src/compiler/js-intrinsic-lowering.h"
6 6
7 #include <stack> 7 #include <stack>
8 8
9 #include "src/compiler/access-builder.h" 9 #include "src/compiler/access-builder.h"
10 #include "src/compiler/js-graph.h" 10 #include "src/compiler/js-graph.h"
11 #include "src/compiler/node-matchers.h" 11 #include "src/compiler/node-matchers.h"
12 #include "src/compiler/node-properties.h" 12 #include "src/compiler/node-properties.h"
13 #include "src/compiler/operator-properties.h" 13 #include "src/compiler/operator-properties.h"
14 #include "src/counters.h" 14 #include "src/counters.h"
15 #include "src/objects-inl.h" 15 #include "src/objects-inl.h"
16 16
17 namespace v8 { 17 namespace v8 {
18 namespace internal { 18 namespace internal {
19 namespace compiler { 19 namespace compiler {
20 20
21 JSIntrinsicLowering::JSIntrinsicLowering(Editor* editor, JSGraph* jsgraph, 21 JSIntrinsicLowering::JSIntrinsicLowering(Editor* editor, JSGraph* jsgraph,
22 DeoptimizationMode mode) 22 DeoptimizationMode mode)
23 : AdvancedReducer(editor), 23 : AdvancedReducer(editor), jsgraph_(jsgraph), mode_(mode) {}
24 jsgraph_(jsgraph),
25 mode_(mode),
26 simplified_(jsgraph->zone()) {}
27 24
28 25
29 Reduction JSIntrinsicLowering::Reduce(Node* node) { 26 Reduction JSIntrinsicLowering::Reduce(Node* node) {
30 if (node->opcode() != IrOpcode::kJSCallRuntime) return NoChange(); 27 if (node->opcode() != IrOpcode::kJSCallRuntime) return NoChange();
31 const Runtime::Function* const f = 28 const Runtime::Function* const f =
32 Runtime::FunctionForId(CallRuntimeParametersOf(node->op()).id()); 29 Runtime::FunctionForId(CallRuntimeParametersOf(node->op()).id());
33 if (f->intrinsic_type != Runtime::IntrinsicType::INLINE) return NoChange(); 30 if (f->intrinsic_type != Runtime::IntrinsicType::INLINE) return NoChange();
34 switch (f->function_id) { 31 switch (f->function_id) {
35 case Runtime::kInlineConstructDouble: 32 case Runtime::kInlineConstructDouble:
36 return ReduceConstructDouble(node); 33 return ReduceConstructDouble(node);
(...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 598
602 JSOperatorBuilder* JSIntrinsicLowering::javascript() const { 599 JSOperatorBuilder* JSIntrinsicLowering::javascript() const {
603 return jsgraph_->javascript(); 600 return jsgraph_->javascript();
604 } 601 }
605 602
606 603
607 MachineOperatorBuilder* JSIntrinsicLowering::machine() const { 604 MachineOperatorBuilder* JSIntrinsicLowering::machine() const {
608 return jsgraph()->machine(); 605 return jsgraph()->machine();
609 } 606 }
610 607
608
609 SimplifiedOperatorBuilder* JSIntrinsicLowering::simplified() const {
610 return jsgraph()->simplified();
611 }
612
611 } // namespace compiler 613 } // namespace compiler
612 } // namespace internal 614 } // namespace internal
613 } // namespace v8 615 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-intrinsic-lowering.h ('k') | src/compiler/js-type-feedback.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698