| 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 | 80 |
| 81 protected: | 81 protected: |
| 82 Reduction Reduce(Node* node) { | 82 Reduction Reduce(Node* node) { |
| 83 MachineOperatorBuilder machine(zone()); | 83 MachineOperatorBuilder machine(zone()); |
| 84 SimplifiedOperatorBuilder simplified(zone()); | 84 SimplifiedOperatorBuilder simplified(zone()); |
| 85 JSGraph jsgraph(isolate(), graph(), common(), javascript(), &simplified, | 85 JSGraph jsgraph(isolate(), graph(), common(), javascript(), &simplified, |
| 86 &machine); | 86 &machine); |
| 87 // TODO(titzer): mock the GraphReducer here for better unit testing. | 87 // TODO(titzer): mock the GraphReducer here for better unit testing. |
| 88 GraphReducer graph_reducer(zone(), graph()); | 88 GraphReducer graph_reducer(zone(), graph()); |
| 89 JSTypedLowering reducer(&graph_reducer, &deps_, | 89 JSTypedLowering reducer(&graph_reducer, &deps_, |
| 90 JSTypedLowering::kDeoptimizationEnabled | | 90 JSTypedLowering::kDeoptimizationEnabled, &jsgraph, |
| 91 JSTypedLowering::kTypeFeedbackEnabled, | 91 zone()); |
| 92 &jsgraph, zone()); | |
| 93 return reducer.Reduce(node); | 92 return reducer.Reduce(node); |
| 94 } | 93 } |
| 95 | 94 |
| 96 Handle<JSArrayBuffer> NewArrayBuffer(void* bytes, size_t byte_length) { | 95 Handle<JSArrayBuffer> NewArrayBuffer(void* bytes, size_t byte_length) { |
| 97 Handle<JSArrayBuffer> buffer = factory()->NewJSArrayBuffer(); | 96 Handle<JSArrayBuffer> buffer = factory()->NewJSArrayBuffer(); |
| 98 JSArrayBuffer::Setup(buffer, isolate(), true, bytes, byte_length); | 97 JSArrayBuffer::Setup(buffer, isolate(), true, bytes, byte_length); |
| 99 return buffer; | 98 return buffer; |
| 100 } | 99 } |
| 101 | 100 |
| 102 Matcher<Node*> IsIntPtrConstant(intptr_t value) { | 101 Matcher<Node*> IsIntPtrConstant(intptr_t value) { |
| (...skipping 844 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 947 Node* dummy = graph()->NewNode(javascript()->ToObject(), instanceOf, context, | 946 Node* dummy = graph()->NewNode(javascript()->ToObject(), instanceOf, context, |
| 948 frame_state, effect, control); | 947 frame_state, effect, control); |
| 949 Reduction r = Reduce(instanceOf); | 948 Reduction r = Reduce(instanceOf); |
| 950 ASSERT_FALSE(r.Changed()); | 949 ASSERT_FALSE(r.Changed()); |
| 951 ASSERT_EQ(instanceOf, dummy->InputAt(0)); | 950 ASSERT_EQ(instanceOf, dummy->InputAt(0)); |
| 952 } | 951 } |
| 953 | 952 |
| 954 } // namespace compiler | 953 } // namespace compiler |
| 955 } // namespace internal | 954 } // namespace internal |
| 956 } // namespace v8 | 955 } // namespace v8 |
| OLD | NEW |