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 #ifndef V8_COMPILER_JS_TYPED_LOWERING_H_ | 5 #ifndef V8_COMPILER_JS_TYPED_LOWERING_H_ |
6 #define V8_COMPILER_JS_TYPED_LOWERING_H_ | 6 #define V8_COMPILER_JS_TYPED_LOWERING_H_ |
7 | 7 |
8 #include "src/base/flags.h" | 8 #include "src/base/flags.h" |
9 #include "src/compiler/graph-reducer.h" | 9 #include "src/compiler/graph-reducer.h" |
10 #include "src/compiler/opcodes.h" | 10 #include "src/compiler/opcodes.h" |
(...skipping 17 matching lines...) Expand all Loading... | |
28 class SimplifiedOperatorBuilder; | 28 class SimplifiedOperatorBuilder; |
29 | 29 |
30 | 30 |
31 // Lowers JS-level operators to simplified operators based on types. | 31 // Lowers JS-level operators to simplified operators based on types. |
32 class JSTypedLowering final : public AdvancedReducer { | 32 class JSTypedLowering final : public AdvancedReducer { |
33 public: | 33 public: |
34 // Flags that control the mode of operation. | 34 // Flags that control the mode of operation. |
35 enum Flag { | 35 enum Flag { |
36 kNoFlags = 0u, | 36 kNoFlags = 0u, |
37 kDeoptimizationEnabled = 1u << 0, | 37 kDeoptimizationEnabled = 1u << 0, |
38 kDisableBinaryOpReduction = 1u << 1, | |
Jarin
2015/12/13 20:26:30
Again, I do not think we really need to disable bi
rmcilroy
2015/12/16 15:40:57
As discussed, this is for eager deopt. Unfortunate
Jarin
2015/12/17 09:44:05
Acknowledged.
We could make this hack work in th
rmcilroy
2015/12/17 14:43:48
Yes, this was the general approach I was thinking
| |
38 }; | 39 }; |
39 typedef base::Flags<Flag> Flags; | 40 typedef base::Flags<Flag> Flags; |
40 | 41 |
41 JSTypedLowering(Editor* editor, CompilationDependencies* dependencies, | 42 JSTypedLowering(Editor* editor, CompilationDependencies* dependencies, |
42 Flags flags, JSGraph* jsgraph, Zone* zone); | 43 Flags flags, JSGraph* jsgraph, Zone* zone); |
43 ~JSTypedLowering() final {} | 44 ~JSTypedLowering() final {} |
44 | 45 |
45 Reduction Reduce(Node* node) final; | 46 Reduction Reduce(Node* node) final; |
46 | 47 |
47 private: | 48 private: |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
125 TypeCache const& type_cache_; | 126 TypeCache const& type_cache_; |
126 }; | 127 }; |
127 | 128 |
128 DEFINE_OPERATORS_FOR_FLAGS(JSTypedLowering::Flags) | 129 DEFINE_OPERATORS_FOR_FLAGS(JSTypedLowering::Flags) |
129 | 130 |
130 } // namespace compiler | 131 } // namespace compiler |
131 } // namespace internal | 132 } // namespace internal |
132 } // namespace v8 | 133 } // namespace v8 |
133 | 134 |
134 #endif // V8_COMPILER_JS_TYPED_LOWERING_H_ | 135 #endif // V8_COMPILER_JS_TYPED_LOWERING_H_ |
OLD | NEW |