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

Side by Side Diff: src/compiler/simplified-operator-reducer-unittest.cc

Issue 562543002: Revert "Switch inlining to use simplified instead of machine loads.", "Fix size_t to int conversion… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « src/compiler/pipeline.cc ('k') | test/cctest/cctest.status » ('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/graph-unittest.h" 5 #include "src/compiler/graph-unittest.h"
6 #include "src/compiler/js-graph.h" 6 #include "src/compiler/js-graph.h"
7 #include "src/compiler/simplified-operator.h" 7 #include "src/compiler/simplified-operator.h"
8 #include "src/compiler/simplified-operator-reducer.h" 8 #include "src/compiler/simplified-operator-reducer.h"
9 #include "src/compiler/typer.h" 9 #include "src/compiler/typer.h"
10 #include "src/conversions.h" 10 #include "src/conversions.h"
11 11
12 namespace v8 { 12 namespace v8 {
13 namespace internal { 13 namespace internal {
14 namespace compiler { 14 namespace compiler {
15 15
16 class SimplifiedOperatorReducerTest : public GraphTest { 16 class SimplifiedOperatorReducerTest : public GraphTest {
17 public: 17 public:
18 explicit SimplifiedOperatorReducerTest(int num_parameters = 1) 18 explicit SimplifiedOperatorReducerTest(int num_parameters = 1)
19 : GraphTest(num_parameters), simplified_(zone()) {} 19 : GraphTest(num_parameters), simplified_(zone()) {}
20 virtual ~SimplifiedOperatorReducerTest() {} 20 virtual ~SimplifiedOperatorReducerTest() {}
21 21
22 protected: 22 protected:
23 Reduction Reduce(Node* node) { 23 Reduction Reduce(Node* node) {
24 Typer typer(zone()); 24 Typer typer(zone());
25 MachineOperatorBuilder machine(zone()); 25 MachineOperatorBuilder machine(zone());
26 JSOperatorBuilder javascript(zone()); 26 JSGraph jsgraph(graph(), common(), &typer);
27 JSGraph jsgraph(graph(), common(), &javascript, &typer, &machine);
28 SimplifiedOperatorReducer reducer(&jsgraph, &machine); 27 SimplifiedOperatorReducer reducer(&jsgraph, &machine);
29 return reducer.Reduce(node); 28 return reducer.Reduce(node);
30 } 29 }
31 30
32 SimplifiedOperatorBuilder* simplified() { return &simplified_; } 31 SimplifiedOperatorBuilder* simplified() { return &simplified_; }
33 32
34 private: 33 private:
35 SimplifiedOperatorBuilder simplified_; 34 SimplifiedOperatorBuilder simplified_;
36 }; 35 };
37 36
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 Reduce(graph()->NewNode(simplified()->ChangeUint32ToTagged(), 472 Reduce(graph()->NewNode(simplified()->ChangeUint32ToTagged(),
474 Int32Constant(bit_cast<int32_t>(n)))); 473 Int32Constant(bit_cast<int32_t>(n))));
475 ASSERT_TRUE(reduction.Changed()); 474 ASSERT_TRUE(reduction.Changed());
476 EXPECT_THAT(reduction.replacement(), IsNumberConstant(FastUI2D(n))); 475 EXPECT_THAT(reduction.replacement(), IsNumberConstant(FastUI2D(n)));
477 } 476 }
478 } 477 }
479 478
480 } // namespace compiler 479 } // namespace compiler
481 } // namespace internal 480 } // namespace internal
482 } // namespace v8 481 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/pipeline.cc ('k') | test/cctest/cctest.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698