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-typed-lowering.h" | 8 #include "src/compiler/js-typed-lowering.h" |
9 #include "src/compiler/linkage.h" | 9 #include "src/compiler/linkage.h" |
10 #include "src/compiler/node-matchers.h" | 10 #include "src/compiler/node-matchers.h" |
11 #include "src/compiler/node-properties.h" | 11 #include "src/compiler/node-properties.h" |
12 #include "src/compiler/operator-properties.h" | 12 #include "src/compiler/operator-properties.h" |
13 #include "src/types.h" | 13 #include "src/types.h" |
14 | 14 |
15 namespace v8 { | 15 namespace v8 { |
16 namespace internal { | 16 namespace internal { |
17 namespace compiler { | 17 namespace compiler { |
18 | 18 |
19 // TODO(turbofan): js-typed-lowering improvements possible | 19 // TODO(turbofan): js-typed-lowering improvements possible |
20 // - immediately put in type bounds for all new nodes | 20 // - immediately put in type bounds for all new nodes |
21 // - relax effects from generic but not-side-effecting operations | 21 // - relax effects from generic but not-side-effecting operations |
22 | 22 |
23 | 23 |
24 JSTypedLowering::JSTypedLowering(Editor* editor, JSGraph* jsgraph, Zone* zone) | 24 JSTypedLowering::JSTypedLowering(Editor* editor, JSGraph* jsgraph, Zone* zone) |
25 : AdvancedReducer(editor), jsgraph_(jsgraph), simplified_(graph()->zone()) { | 25 : AdvancedReducer(editor), jsgraph_(jsgraph) { |
26 for (size_t k = 0; k < arraysize(shifted_int32_ranges_); ++k) { | 26 for (size_t k = 0; k < arraysize(shifted_int32_ranges_); ++k) { |
27 double min = kMinInt / (1 << k); | 27 double min = kMinInt / (1 << k); |
28 double max = kMaxInt / (1 << k); | 28 double max = kMaxInt / (1 << k); |
29 shifted_int32_ranges_[k] = Type::Range(min, max, graph()->zone()); | 29 shifted_int32_ranges_[k] = Type::Range(min, max, graph()->zone()); |
30 } | 30 } |
31 } | 31 } |
32 | 32 |
33 | 33 |
34 // A helper class to construct inline allocations on the simplified operator | 34 // A helper class to construct inline allocations on the simplified operator |
35 // level. This keeps track of the effect chain for initial stores on a newly | 35 // level. This keeps track of the effect chain for initial stores on a newly |
(...skipping 1793 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1829 JSOperatorBuilder* JSTypedLowering::javascript() const { | 1829 JSOperatorBuilder* JSTypedLowering::javascript() const { |
1830 return jsgraph()->javascript(); | 1830 return jsgraph()->javascript(); |
1831 } | 1831 } |
1832 | 1832 |
1833 | 1833 |
1834 CommonOperatorBuilder* JSTypedLowering::common() const { | 1834 CommonOperatorBuilder* JSTypedLowering::common() const { |
1835 return jsgraph()->common(); | 1835 return jsgraph()->common(); |
1836 } | 1836 } |
1837 | 1837 |
1838 | 1838 |
| 1839 SimplifiedOperatorBuilder* JSTypedLowering::simplified() const { |
| 1840 return jsgraph()->simplified(); |
| 1841 } |
| 1842 |
| 1843 |
1839 MachineOperatorBuilder* JSTypedLowering::machine() const { | 1844 MachineOperatorBuilder* JSTypedLowering::machine() const { |
1840 return jsgraph()->machine(); | 1845 return jsgraph()->machine(); |
1841 } | 1846 } |
1842 | 1847 |
1843 } // namespace compiler | 1848 } // namespace compiler |
1844 } // namespace internal | 1849 } // namespace internal |
1845 } // namespace v8 | 1850 } // namespace v8 |
OLD | NEW |