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/typer.h" | 5 #include "src/compiler/typer.h" |
6 | 6 |
7 #include "src/base/flags.h" | 7 #include "src/base/flags.h" |
8 #include "src/bootstrapper.h" | 8 #include "src/bootstrapper.h" |
9 #include "src/compilation-dependencies.h" | 9 #include "src/compilation-dependencies.h" |
10 #include "src/compiler/common-operator.h" | 10 #include "src/compiler/common-operator.h" |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 #define DECLARE_CASE(x) case IrOpcode::k##x: | 107 #define DECLARE_CASE(x) case IrOpcode::k##x: |
108 DECLARE_CASE(Loop) | 108 DECLARE_CASE(Loop) |
109 DECLARE_CASE(Branch) | 109 DECLARE_CASE(Branch) |
110 DECLARE_CASE(IfTrue) | 110 DECLARE_CASE(IfTrue) |
111 DECLARE_CASE(IfFalse) | 111 DECLARE_CASE(IfFalse) |
112 DECLARE_CASE(IfSuccess) | 112 DECLARE_CASE(IfSuccess) |
113 DECLARE_CASE(Switch) | 113 DECLARE_CASE(Switch) |
114 DECLARE_CASE(IfValue) | 114 DECLARE_CASE(IfValue) |
115 DECLARE_CASE(IfDefault) | 115 DECLARE_CASE(IfDefault) |
116 DECLARE_CASE(Merge) | 116 DECLARE_CASE(Merge) |
| 117 DECLARE_CASE(DebugBreak) |
117 DECLARE_CASE(Deoptimize) | 118 DECLARE_CASE(Deoptimize) |
118 DECLARE_CASE(DeoptimizeIf) | 119 DECLARE_CASE(DeoptimizeIf) |
119 DECLARE_CASE(DeoptimizeUnless) | 120 DECLARE_CASE(DeoptimizeUnless) |
120 DECLARE_CASE(Return) | 121 DECLARE_CASE(Return) |
121 DECLARE_CASE(TailCall) | 122 DECLARE_CASE(TailCall) |
122 DECLARE_CASE(Terminate) | 123 DECLARE_CASE(Terminate) |
123 DECLARE_CASE(OsrNormalEntry) | 124 DECLARE_CASE(OsrNormalEntry) |
124 DECLARE_CASE(OsrLoopEntry) | 125 DECLARE_CASE(OsrLoopEntry) |
125 DECLARE_CASE(Throw) | 126 DECLARE_CASE(Throw) |
126 DECLARE_CASE(End) | 127 DECLARE_CASE(End) |
(...skipping 27 matching lines...) Expand all Loading... |
154 #define DECLARE_CASE(x) case IrOpcode::k##x: | 155 #define DECLARE_CASE(x) case IrOpcode::k##x: |
155 DECLARE_CASE(Loop) | 156 DECLARE_CASE(Loop) |
156 DECLARE_CASE(Branch) | 157 DECLARE_CASE(Branch) |
157 DECLARE_CASE(IfTrue) | 158 DECLARE_CASE(IfTrue) |
158 DECLARE_CASE(IfFalse) | 159 DECLARE_CASE(IfFalse) |
159 DECLARE_CASE(IfSuccess) | 160 DECLARE_CASE(IfSuccess) |
160 DECLARE_CASE(Switch) | 161 DECLARE_CASE(Switch) |
161 DECLARE_CASE(IfValue) | 162 DECLARE_CASE(IfValue) |
162 DECLARE_CASE(IfDefault) | 163 DECLARE_CASE(IfDefault) |
163 DECLARE_CASE(Merge) | 164 DECLARE_CASE(Merge) |
| 165 DECLARE_CASE(DebugBreak) |
164 DECLARE_CASE(Deoptimize) | 166 DECLARE_CASE(Deoptimize) |
165 DECLARE_CASE(DeoptimizeIf) | 167 DECLARE_CASE(DeoptimizeIf) |
166 DECLARE_CASE(DeoptimizeUnless) | 168 DECLARE_CASE(DeoptimizeUnless) |
167 DECLARE_CASE(Return) | 169 DECLARE_CASE(Return) |
168 DECLARE_CASE(TailCall) | 170 DECLARE_CASE(TailCall) |
169 DECLARE_CASE(Terminate) | 171 DECLARE_CASE(Terminate) |
170 DECLARE_CASE(OsrNormalEntry) | 172 DECLARE_CASE(OsrNormalEntry) |
171 DECLARE_CASE(OsrLoopEntry) | 173 DECLARE_CASE(OsrLoopEntry) |
172 DECLARE_CASE(Throw) | 174 DECLARE_CASE(Throw) |
173 DECLARE_CASE(End) | 175 DECLARE_CASE(End) |
(...skipping 2399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2573 } | 2575 } |
2574 if (Type::IsInteger(*value)) { | 2576 if (Type::IsInteger(*value)) { |
2575 return Type::Range(value->Number(), value->Number(), zone()); | 2577 return Type::Range(value->Number(), value->Number(), zone()); |
2576 } | 2578 } |
2577 return Type::Constant(value, zone()); | 2579 return Type::Constant(value, zone()); |
2578 } | 2580 } |
2579 | 2581 |
2580 } // namespace compiler | 2582 } // namespace compiler |
2581 } // namespace internal | 2583 } // namespace internal |
2582 } // namespace v8 | 2584 } // namespace v8 |
OLD | NEW |