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 <iomanip> | 7 #include <iomanip> |
8 | 8 |
9 #include "src/base/flags.h" | 9 #include "src/base/flags.h" |
10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 DECLARE_CASE(IfTrue) | 115 DECLARE_CASE(IfTrue) |
116 DECLARE_CASE(IfFalse) | 116 DECLARE_CASE(IfFalse) |
117 DECLARE_CASE(IfSuccess) | 117 DECLARE_CASE(IfSuccess) |
118 DECLARE_CASE(Switch) | 118 DECLARE_CASE(Switch) |
119 DECLARE_CASE(IfValue) | 119 DECLARE_CASE(IfValue) |
120 DECLARE_CASE(IfDefault) | 120 DECLARE_CASE(IfDefault) |
121 DECLARE_CASE(Merge) | 121 DECLARE_CASE(Merge) |
122 DECLARE_CASE(Deoptimize) | 122 DECLARE_CASE(Deoptimize) |
123 DECLARE_CASE(DeoptimizeIf) | 123 DECLARE_CASE(DeoptimizeIf) |
124 DECLARE_CASE(DeoptimizeUnless) | 124 DECLARE_CASE(DeoptimizeUnless) |
| 125 DECLARE_CASE(TrapIf) |
| 126 DECLARE_CASE(TrapUnless) |
125 DECLARE_CASE(Return) | 127 DECLARE_CASE(Return) |
126 DECLARE_CASE(TailCall) | 128 DECLARE_CASE(TailCall) |
127 DECLARE_CASE(Terminate) | 129 DECLARE_CASE(Terminate) |
128 DECLARE_CASE(OsrNormalEntry) | 130 DECLARE_CASE(OsrNormalEntry) |
129 DECLARE_CASE(OsrLoopEntry) | 131 DECLARE_CASE(OsrLoopEntry) |
130 DECLARE_CASE(Throw) | 132 DECLARE_CASE(Throw) |
131 DECLARE_CASE(End) | 133 DECLARE_CASE(End) |
132 SIMPLIFIED_CHANGE_OP_LIST(DECLARE_CASE) | 134 SIMPLIFIED_CHANGE_OP_LIST(DECLARE_CASE) |
133 SIMPLIFIED_CHECKED_OP_LIST(DECLARE_CASE) | 135 SIMPLIFIED_CHECKED_OP_LIST(DECLARE_CASE) |
134 MACHINE_SIMD_OP_LIST(DECLARE_CASE) | 136 MACHINE_SIMD_OP_LIST(DECLARE_CASE) |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 DECLARE_CASE(IfTrue) | 180 DECLARE_CASE(IfTrue) |
179 DECLARE_CASE(IfFalse) | 181 DECLARE_CASE(IfFalse) |
180 DECLARE_CASE(IfSuccess) | 182 DECLARE_CASE(IfSuccess) |
181 DECLARE_CASE(Switch) | 183 DECLARE_CASE(Switch) |
182 DECLARE_CASE(IfValue) | 184 DECLARE_CASE(IfValue) |
183 DECLARE_CASE(IfDefault) | 185 DECLARE_CASE(IfDefault) |
184 DECLARE_CASE(Merge) | 186 DECLARE_CASE(Merge) |
185 DECLARE_CASE(Deoptimize) | 187 DECLARE_CASE(Deoptimize) |
186 DECLARE_CASE(DeoptimizeIf) | 188 DECLARE_CASE(DeoptimizeIf) |
187 DECLARE_CASE(DeoptimizeUnless) | 189 DECLARE_CASE(DeoptimizeUnless) |
| 190 DECLARE_CASE(TrapIf) |
| 191 DECLARE_CASE(TrapUnless) |
188 DECLARE_CASE(Return) | 192 DECLARE_CASE(Return) |
189 DECLARE_CASE(TailCall) | 193 DECLARE_CASE(TailCall) |
190 DECLARE_CASE(Terminate) | 194 DECLARE_CASE(Terminate) |
191 DECLARE_CASE(OsrNormalEntry) | 195 DECLARE_CASE(OsrNormalEntry) |
192 DECLARE_CASE(OsrLoopEntry) | 196 DECLARE_CASE(OsrLoopEntry) |
193 DECLARE_CASE(Throw) | 197 DECLARE_CASE(Throw) |
194 DECLARE_CASE(End) | 198 DECLARE_CASE(End) |
195 SIMPLIFIED_CHANGE_OP_LIST(DECLARE_CASE) | 199 SIMPLIFIED_CHANGE_OP_LIST(DECLARE_CASE) |
196 SIMPLIFIED_CHECKED_OP_LIST(DECLARE_CASE) | 200 SIMPLIFIED_CHECKED_OP_LIST(DECLARE_CASE) |
197 MACHINE_SIMD_OP_LIST(DECLARE_CASE) | 201 MACHINE_SIMD_OP_LIST(DECLARE_CASE) |
(...skipping 1649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1847 Type* Typer::Visitor::TypeConstant(Handle<Object> value) { | 1851 Type* Typer::Visitor::TypeConstant(Handle<Object> value) { |
1848 if (Type::IsInteger(*value)) { | 1852 if (Type::IsInteger(*value)) { |
1849 return Type::Range(value->Number(), value->Number(), zone()); | 1853 return Type::Range(value->Number(), value->Number(), zone()); |
1850 } | 1854 } |
1851 return Type::NewConstant(value, zone()); | 1855 return Type::NewConstant(value, zone()); |
1852 } | 1856 } |
1853 | 1857 |
1854 } // namespace compiler | 1858 } // namespace compiler |
1855 } // namespace internal | 1859 } // namespace internal |
1856 } // namespace v8 | 1860 } // namespace v8 |
OLD | NEW |