OLD | NEW |
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/access-builder.h" | 5 #include "src/compiler/access-builder.h" |
6 #include "src/compiler/js-graph.h" | 6 #include "src/compiler/js-graph.h" |
7 #include "src/compiler/js-operator.h" | 7 #include "src/compiler/js-operator.h" |
8 #include "src/compiler/js-typed-lowering.h" | 8 #include "src/compiler/js-typed-lowering.h" |
9 #include "src/compiler/machine-operator.h" | 9 #include "src/compiler/machine-operator.h" |
10 #include "src/compiler/node-properties-inl.h" | 10 #include "src/compiler/node-properties-inl.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 TYPED_ARRAYS(TYPED_ARRAY_CASE) | 24 TYPED_ARRAYS(TYPED_ARRAY_CASE) |
25 #undef TYPED_ARRAY_CASE | 25 #undef TYPED_ARRAY_CASE |
26 }; | 26 }; |
27 | 27 |
28 | 28 |
29 const StrictMode kStrictModes[] = {SLOPPY, STRICT}; | 29 const StrictMode kStrictModes[] = {SLOPPY, STRICT}; |
30 | 30 |
31 } // namespace | 31 } // namespace |
32 | 32 |
33 | 33 |
34 class JSTypedLoweringTest : public GraphTest { | 34 class JSTypedLoweringTest : public TypedGraphTest { |
35 public: | 35 public: |
36 JSTypedLoweringTest() : GraphTest(3), javascript_(zone()) {} | 36 JSTypedLoweringTest() : TypedGraphTest(3), javascript_(zone()) {} |
37 virtual ~JSTypedLoweringTest() {} | 37 virtual ~JSTypedLoweringTest() {} |
38 | 38 |
39 protected: | 39 protected: |
40 Reduction Reduce(Node* node) { | 40 Reduction Reduce(Node* node) { |
41 Typer typer(zone()); | |
42 MachineOperatorBuilder machine; | 41 MachineOperatorBuilder machine; |
43 JSGraph jsgraph(graph(), common(), javascript(), &typer, &machine); | 42 JSGraph jsgraph(graph(), common(), javascript(), &machine); |
44 JSTypedLowering reducer(&jsgraph); | 43 JSTypedLowering reducer(&jsgraph); |
45 return reducer.Reduce(node); | 44 return reducer.Reduce(node); |
46 } | 45 } |
47 | 46 |
48 Node* Parameter(Type* type, int index = 0) { | 47 Node* Parameter(Type* type, int index = 0) { |
49 Node* node = graph()->NewNode(common()->Parameter(index), graph()->start()); | 48 Node* node = graph()->NewNode(common()->Parameter(index), graph()->start()); |
50 NodeProperties::SetBounds(node, Bounds(Type::None(), type)); | 49 NodeProperties::SetBounds(node, Bounds(Type::None(), type)); |
51 return node; | 50 return node; |
52 } | 51 } |
53 | 52 |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 IsIntPtrConstant(bit_cast<intptr_t>(&backing_store[0])), | 144 IsIntPtrConstant(bit_cast<intptr_t>(&backing_store[0])), |
146 key, IsInt32Constant(static_cast<int>(kLength)), value, | 145 key, IsInt32Constant(static_cast<int>(kLength)), value, |
147 effect, control)); | 146 effect, control)); |
148 } | 147 } |
149 } | 148 } |
150 } | 149 } |
151 | 150 |
152 } // namespace compiler | 151 } // namespace compiler |
153 } // namespace internal | 152 } // namespace internal |
154 } // namespace v8 | 153 } // namespace v8 |
OLD | NEW |