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/base/flags.h" | 5 #include "src/base/flags.h" |
6 #include "src/bootstrapper.h" | 6 #include "src/bootstrapper.h" |
7 #include "src/compiler/graph-reducer.h" | 7 #include "src/compiler/graph-reducer.h" |
8 #include "src/compiler/js-operator.h" | 8 #include "src/compiler/js-operator.h" |
9 #include "src/compiler/node.h" | 9 #include "src/compiler/node.h" |
10 #include "src/compiler/node-properties.h" | 10 #include "src/compiler/node-properties.h" |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 DECLARE_CASE(IfTrue) | 246 DECLARE_CASE(IfTrue) |
247 DECLARE_CASE(IfFalse) | 247 DECLARE_CASE(IfFalse) |
248 DECLARE_CASE(IfSuccess) | 248 DECLARE_CASE(IfSuccess) |
249 DECLARE_CASE(Switch) | 249 DECLARE_CASE(Switch) |
250 DECLARE_CASE(IfValue) | 250 DECLARE_CASE(IfValue) |
251 DECLARE_CASE(IfDefault) | 251 DECLARE_CASE(IfDefault) |
252 DECLARE_CASE(Merge) | 252 DECLARE_CASE(Merge) |
253 DECLARE_CASE(Deoptimize) | 253 DECLARE_CASE(Deoptimize) |
254 DECLARE_CASE(Return) | 254 DECLARE_CASE(Return) |
255 DECLARE_CASE(TailCall) | 255 DECLARE_CASE(TailCall) |
| 256 DECLARE_CASE(Terminate) |
256 DECLARE_CASE(OsrNormalEntry) | 257 DECLARE_CASE(OsrNormalEntry) |
257 DECLARE_CASE(OsrLoopEntry) | 258 DECLARE_CASE(OsrLoopEntry) |
258 DECLARE_CASE(Throw) | 259 DECLARE_CASE(Throw) |
259 DECLARE_CASE(End) | 260 DECLARE_CASE(End) |
260 #undef DECLARE_CASE | 261 #undef DECLARE_CASE |
261 break; | 262 break; |
262 } | 263 } |
263 return NoChange(); | 264 return NoChange(); |
264 } | 265 } |
265 | 266 |
(...skipping 24 matching lines...) Expand all Loading... |
290 DECLARE_CASE(IfTrue) | 291 DECLARE_CASE(IfTrue) |
291 DECLARE_CASE(IfFalse) | 292 DECLARE_CASE(IfFalse) |
292 DECLARE_CASE(IfSuccess) | 293 DECLARE_CASE(IfSuccess) |
293 DECLARE_CASE(Switch) | 294 DECLARE_CASE(Switch) |
294 DECLARE_CASE(IfValue) | 295 DECLARE_CASE(IfValue) |
295 DECLARE_CASE(IfDefault) | 296 DECLARE_CASE(IfDefault) |
296 DECLARE_CASE(Merge) | 297 DECLARE_CASE(Merge) |
297 DECLARE_CASE(Deoptimize) | 298 DECLARE_CASE(Deoptimize) |
298 DECLARE_CASE(Return) | 299 DECLARE_CASE(Return) |
299 DECLARE_CASE(TailCall) | 300 DECLARE_CASE(TailCall) |
| 301 DECLARE_CASE(Terminate) |
300 DECLARE_CASE(OsrNormalEntry) | 302 DECLARE_CASE(OsrNormalEntry) |
301 DECLARE_CASE(OsrLoopEntry) | 303 DECLARE_CASE(OsrLoopEntry) |
302 DECLARE_CASE(Throw) | 304 DECLARE_CASE(Throw) |
303 DECLARE_CASE(End) | 305 DECLARE_CASE(End) |
304 #undef DECLARE_CASE | 306 #undef DECLARE_CASE |
305 break; | 307 break; |
306 } | 308 } |
307 UNREACHABLE(); | 309 UNREACHABLE(); |
308 return Bounds(); | 310 return Bounds(); |
309 } | 311 } |
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
636 | 638 |
637 | 639 |
638 Bounds Typer::Visitor::TypeIfException(Node* node) { | 640 Bounds Typer::Visitor::TypeIfException(Node* node) { |
639 return Bounds::Unbounded(zone()); | 641 return Bounds::Unbounded(zone()); |
640 } | 642 } |
641 | 643 |
642 | 644 |
643 // Common operators. | 645 // Common operators. |
644 | 646 |
645 | 647 |
646 Bounds Typer::Visitor::TypeAlways(Node* node) { | |
647 return Bounds(Type::None(zone()), Type::Boolean(zone())); | |
648 } | |
649 | |
650 | |
651 Bounds Typer::Visitor::TypeParameter(Node* node) { | 648 Bounds Typer::Visitor::TypeParameter(Node* node) { |
652 return Bounds::Unbounded(zone()); | 649 return Bounds::Unbounded(zone()); |
653 } | 650 } |
654 | 651 |
655 | 652 |
656 Bounds Typer::Visitor::TypeOsrValue(Node* node) { | 653 Bounds Typer::Visitor::TypeOsrValue(Node* node) { |
657 if (node->InputAt(0)->opcode() == IrOpcode::kOsrLoopEntry) { | 654 if (node->InputAt(0)->opcode() == IrOpcode::kOsrLoopEntry) { |
658 // Before deconstruction, OSR values have type {None} to avoid polluting | 655 // Before deconstruction, OSR values have type {None} to avoid polluting |
659 // the types of phis and other nodes in the graph. | 656 // the types of phis and other nodes in the graph. |
660 return Bounds(Type::None(), Type::None()); | 657 return Bounds(Type::None(), Type::None()); |
(...skipping 1707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2368 TYPED_ARRAYS(TYPED_ARRAY_CASE) | 2365 TYPED_ARRAYS(TYPED_ARRAY_CASE) |
2369 #undef TYPED_ARRAY_CASE | 2366 #undef TYPED_ARRAY_CASE |
2370 } | 2367 } |
2371 } | 2368 } |
2372 return Type::Constant(value, zone()); | 2369 return Type::Constant(value, zone()); |
2373 } | 2370 } |
2374 | 2371 |
2375 } // namespace compiler | 2372 } // namespace compiler |
2376 } // namespace internal | 2373 } // namespace internal |
2377 } // namespace v8 | 2374 } // namespace v8 |
OLD | NEW |