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/code-factory.h" | 5 #include "src/code-factory.h" |
6 #include "src/compiler/access-builder.h" | 6 #include "src/compiler/access-builder.h" |
7 #include "src/compiler/js-graph.h" | 7 #include "src/compiler/js-graph.h" |
8 #include "src/compiler/js-operator.h" | 8 #include "src/compiler/js-operator.h" |
9 #include "src/compiler/js-typed-lowering.h" | 9 #include "src/compiler/js-typed-lowering.h" |
10 #include "src/compiler/machine-operator.h" | 10 #include "src/compiler/machine-operator.h" |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 class JSTypedLoweringTest : public TypedGraphTest { | 74 class JSTypedLoweringTest : public TypedGraphTest { |
75 public: | 75 public: |
76 JSTypedLoweringTest() : TypedGraphTest(3), javascript_(zone()) {} | 76 JSTypedLoweringTest() : TypedGraphTest(3), javascript_(zone()) {} |
77 ~JSTypedLoweringTest() override {} | 77 ~JSTypedLoweringTest() override {} |
78 | 78 |
79 protected: | 79 protected: |
80 Reduction Reduce(Node* node) { | 80 Reduction Reduce(Node* node) { |
81 MachineOperatorBuilder machine(zone()); | 81 MachineOperatorBuilder machine(zone()); |
82 JSGraph jsgraph(isolate(), graph(), common(), javascript(), &machine); | 82 JSGraph jsgraph(isolate(), graph(), common(), javascript(), &machine); |
83 // TODO(titzer): mock the GraphReducer here for better unit testing. | 83 // TODO(titzer): mock the GraphReducer here for better unit testing. |
84 GraphReducer graph_reducer(graph(), zone()); | 84 GraphReducer graph_reducer(zone(), graph()); |
85 JSTypedLowering reducer(&graph_reducer, &jsgraph, zone()); | 85 JSTypedLowering reducer(&graph_reducer, &jsgraph, zone()); |
86 return reducer.Reduce(node); | 86 return reducer.Reduce(node); |
87 } | 87 } |
88 | 88 |
89 Handle<JSArrayBuffer> NewArrayBuffer(void* bytes, size_t byte_length) { | 89 Handle<JSArrayBuffer> NewArrayBuffer(void* bytes, size_t byte_length) { |
90 Handle<JSArrayBuffer> buffer = factory()->NewJSArrayBuffer(); | 90 Handle<JSArrayBuffer> buffer = factory()->NewJSArrayBuffer(); |
91 Runtime::SetupArrayBuffer(isolate(), buffer, true, bytes, byte_length); | 91 Runtime::SetupArrayBuffer(isolate(), buffer, true, bytes, byte_length); |
92 return buffer; | 92 return buffer; |
93 } | 93 } |
94 | 94 |
(...skipping 958 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1053 EXPECT_THAT(r.replacement(), | 1053 EXPECT_THAT(r.replacement(), |
1054 IsFinish(IsAllocate(IsNumberConstant(Context::SizeFor( | 1054 IsFinish(IsAllocate(IsNumberConstant(Context::SizeFor( |
1055 Context::MIN_CONTEXT_SLOTS)), | 1055 Context::MIN_CONTEXT_SLOTS)), |
1056 effect, control), | 1056 effect, control), |
1057 _)); | 1057 _)); |
1058 } | 1058 } |
1059 | 1059 |
1060 } // namespace compiler | 1060 } // namespace compiler |
1061 } // namespace internal | 1061 } // namespace internal |
1062 } // namespace v8 | 1062 } // namespace v8 |
OLD | NEW |