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

Side by Side Diff: test/unittests/compiler/machine-operator-reducer-unittest.cc

Issue 868883002: Remove the dependency of Zone on Isolate (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix compilation issues Created 5 years, 11 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
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/base/bits.h" 5 #include "src/base/bits.h"
6 #include "src/base/division-by-constant.h" 6 #include "src/base/division-by-constant.h"
7 #include "src/compiler/js-graph.h" 7 #include "src/compiler/js-graph.h"
8 #include "src/compiler/machine-operator-reducer.h" 8 #include "src/compiler/machine-operator-reducer.h"
9 #include "src/compiler/typer.h" 9 #include "src/compiler/typer.h"
10 #include "test/unittests/compiler/graph-unittest.h" 10 #include "test/unittests/compiler/graph-unittest.h"
(...skipping 10 matching lines...) Expand all
21 namespace compiler { 21 namespace compiler {
22 22
23 class MachineOperatorReducerTest : public TypedGraphTest { 23 class MachineOperatorReducerTest : public TypedGraphTest {
24 public: 24 public:
25 explicit MachineOperatorReducerTest(int num_parameters = 2) 25 explicit MachineOperatorReducerTest(int num_parameters = 2)
26 : TypedGraphTest(num_parameters), machine_(zone()) {} 26 : TypedGraphTest(num_parameters), machine_(zone()) {}
27 27
28 protected: 28 protected:
29 Reduction Reduce(Node* node) { 29 Reduction Reduce(Node* node) {
30 JSOperatorBuilder javascript(zone()); 30 JSOperatorBuilder javascript(zone());
31 JSGraph jsgraph(graph(), common(), &javascript, &machine_); 31 JSGraph jsgraph(isolate(), graph(), common(), &javascript, &machine_);
32 MachineOperatorReducer reducer(&jsgraph); 32 MachineOperatorReducer reducer(&jsgraph);
33 return reducer.Reduce(node); 33 return reducer.Reduce(node);
34 } 34 }
35 35
36 Matcher<Node*> IsTruncatingDiv(const Matcher<Node*>& dividend_matcher, 36 Matcher<Node*> IsTruncatingDiv(const Matcher<Node*>& dividend_matcher,
37 const int32_t divisor) { 37 const int32_t divisor) {
38 base::MagicNumbersForDivision<uint32_t> const mag = 38 base::MagicNumbersForDivision<uint32_t> const mag =
39 base::SignedDivisionByConstant(bit_cast<uint32_t>(divisor)); 39 base::SignedDivisionByConstant(bit_cast<uint32_t>(divisor));
40 int32_t const multiplier = bit_cast<int32_t>(mag.multiplier); 40 int32_t const multiplier = bit_cast<int32_t>(mag.multiplier);
41 int32_t const shift = bit_cast<int32_t>(mag.shift); 41 int32_t const shift = bit_cast<int32_t>(mag.shift);
(...skipping 1375 matching lines...) Expand 10 before | Expand all | Expand 10 after
1417 Reduction r = Reduce(node); 1417 Reduction r = Reduce(node);
1418 ASSERT_TRUE(r.Changed()); 1418 ASSERT_TRUE(r.Changed());
1419 EXPECT_THAT(r.replacement(), 1419 EXPECT_THAT(r.replacement(),
1420 IsStore(rep, base, index, value, effect, control)); 1420 IsStore(rep, base, index, value, effect, control));
1421 } 1421 }
1422 } 1422 }
1423 1423
1424 } // namespace compiler 1424 } // namespace compiler
1425 } // namespace internal 1425 } // namespace internal
1426 } // namespace v8 1426 } // namespace v8
OLDNEW
« no previous file with comments | « test/unittests/compiler/loop-peeling-unittest.cc ('k') | test/unittests/compiler/simplified-operator-reducer-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698