| 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 1287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1298 return Type::OtherInternal(); | 1298 return Type::OtherInternal(); |
| 1299 } | 1299 } |
| 1300 | 1300 |
| 1301 // JS other operators. | 1301 // JS other operators. |
| 1302 | 1302 |
| 1303 | 1303 |
| 1304 Type* Typer::Visitor::TypeJSCallConstruct(Node* node) { | 1304 Type* Typer::Visitor::TypeJSCallConstruct(Node* node) { |
| 1305 return Type::Receiver(); | 1305 return Type::Receiver(); |
| 1306 } | 1306 } |
| 1307 | 1307 |
| 1308 Type* Typer::Visitor::TypeJSCallConstructWithSpread(Node* node) { |
| 1309 return Type::Receiver(); |
| 1310 } |
| 1311 |
| 1308 Type* Typer::Visitor::JSCallFunctionTyper(Type* fun, Typer* t) { | 1312 Type* Typer::Visitor::JSCallFunctionTyper(Type* fun, Typer* t) { |
| 1309 if (fun->IsHeapConstant() && fun->AsHeapConstant()->Value()->IsJSFunction()) { | 1313 if (fun->IsHeapConstant() && fun->AsHeapConstant()->Value()->IsJSFunction()) { |
| 1310 Handle<JSFunction> function = | 1314 Handle<JSFunction> function = |
| 1311 Handle<JSFunction>::cast(fun->AsHeapConstant()->Value()); | 1315 Handle<JSFunction>::cast(fun->AsHeapConstant()->Value()); |
| 1312 if (function->shared()->HasBuiltinFunctionId()) { | 1316 if (function->shared()->HasBuiltinFunctionId()) { |
| 1313 switch (function->shared()->builtin_function_id()) { | 1317 switch (function->shared()->builtin_function_id()) { |
| 1314 case kMathRandom: | 1318 case kMathRandom: |
| 1315 return Type::PlainNumber(); | 1319 return Type::PlainNumber(); |
| 1316 case kMathFloor: | 1320 case kMathFloor: |
| 1317 case kMathCeil: | 1321 case kMathCeil: |
| (...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1835 Type* Typer::Visitor::TypeConstant(Handle<Object> value) { | 1839 Type* Typer::Visitor::TypeConstant(Handle<Object> value) { |
| 1836 if (Type::IsInteger(*value)) { | 1840 if (Type::IsInteger(*value)) { |
| 1837 return Type::Range(value->Number(), value->Number(), zone()); | 1841 return Type::Range(value->Number(), value->Number(), zone()); |
| 1838 } | 1842 } |
| 1839 return Type::NewConstant(value, zone()); | 1843 return Type::NewConstant(value, zone()); |
| 1840 } | 1844 } |
| 1841 | 1845 |
| 1842 } // namespace compiler | 1846 } // namespace compiler |
| 1843 } // namespace internal | 1847 } // namespace internal |
| 1844 } // namespace v8 | 1848 } // namespace v8 |
| OLD | NEW |