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 1507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1518 | 1518 |
1519 | 1519 |
1520 Type* Typer::Visitor::TypeJSCreateScriptContext(Node* node) { | 1520 Type* Typer::Visitor::TypeJSCreateScriptContext(Node* node) { |
1521 return WrapContextTypeForInput(node); | 1521 return WrapContextTypeForInput(node); |
1522 } | 1522 } |
1523 | 1523 |
1524 | 1524 |
1525 // JS other operators. | 1525 // JS other operators. |
1526 | 1526 |
1527 | 1527 |
1528 Type* Typer::Visitor::TypeJSYield(Node* node) { return Type::Any(); } | |
1529 | |
1530 | |
1531 Type* Typer::Visitor::TypeJSCallConstruct(Node* node) { | 1528 Type* Typer::Visitor::TypeJSCallConstruct(Node* node) { |
1532 return Type::Receiver(); | 1529 return Type::Receiver(); |
1533 } | 1530 } |
1534 | 1531 |
1535 | 1532 |
1536 Type* Typer::Visitor::JSCallFunctionTyper(Type* fun, Typer* t) { | 1533 Type* Typer::Visitor::JSCallFunctionTyper(Type* fun, Typer* t) { |
1537 if (fun->IsFunction()) { | 1534 if (fun->IsFunction()) { |
1538 return fun->AsFunction()->Result(); | 1535 return fun->AsFunction()->Result(); |
1539 } | 1536 } |
1540 if (fun->IsConstant() && fun->AsConstant()->Value()->IsJSFunction()) { | 1537 if (fun->IsConstant() && fun->AsConstant()->Value()->IsJSFunction()) { |
(...skipping 1032 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2573 } | 2570 } |
2574 if (Type::IsInteger(*value)) { | 2571 if (Type::IsInteger(*value)) { |
2575 return Type::Range(value->Number(), value->Number(), zone()); | 2572 return Type::Range(value->Number(), value->Number(), zone()); |
2576 } | 2573 } |
2577 return Type::Constant(value, zone()); | 2574 return Type::Constant(value, zone()); |
2578 } | 2575 } |
2579 | 2576 |
2580 } // namespace compiler | 2577 } // namespace compiler |
2581 } // namespace internal | 2578 } // namespace internal |
2582 } // namespace v8 | 2579 } // namespace v8 |
OLD | NEW |