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" |
11 #include "src/compiler/common-operator.h" | 11 #include "src/compiler/common-operator.h" |
12 #include "src/compiler/graph-reducer.h" | 12 #include "src/compiler/graph-reducer.h" |
13 #include "src/compiler/js-operator.h" | 13 #include "src/compiler/js-operator.h" |
14 #include "src/compiler/loop-variable-optimizer.h" | 14 #include "src/compiler/loop-variable-optimizer.h" |
15 #include "src/compiler/node-properties.h" | 15 #include "src/compiler/node-properties.h" |
16 #include "src/compiler/node.h" | 16 #include "src/compiler/node.h" |
17 #include "src/compiler/operation-typer.h" | 17 #include "src/compiler/operation-typer.h" |
18 #include "src/compiler/simplified-operator.h" | 18 #include "src/compiler/simplified-operator.h" |
| 19 #include "src/compiler/type-cache.h" |
19 #include "src/objects-inl.h" | 20 #include "src/objects-inl.h" |
20 #include "src/type-cache.h" | |
21 | 21 |
22 namespace v8 { | 22 namespace v8 { |
23 namespace internal { | 23 namespace internal { |
24 namespace compiler { | 24 namespace compiler { |
25 | 25 |
26 class Typer::Decorator final : public GraphDecorator { | 26 class Typer::Decorator final : public GraphDecorator { |
27 public: | 27 public: |
28 explicit Decorator(Typer* typer) : typer_(typer) {} | 28 explicit Decorator(Typer* typer) : typer_(typer) {} |
29 void Decorate(Node* node) final; | 29 void Decorate(Node* node) final; |
30 | 30 |
(...skipping 2293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2324 } | 2324 } |
2325 if (Type::IsInteger(*value)) { | 2325 if (Type::IsInteger(*value)) { |
2326 return Type::Range(value->Number(), value->Number(), zone()); | 2326 return Type::Range(value->Number(), value->Number(), zone()); |
2327 } | 2327 } |
2328 return Type::Constant(value, zone()); | 2328 return Type::Constant(value, zone()); |
2329 } | 2329 } |
2330 | 2330 |
2331 } // namespace compiler | 2331 } // namespace compiler |
2332 } // namespace internal | 2332 } // namespace internal |
2333 } // namespace v8 | 2333 } // namespace v8 |
OLD | NEW |