| 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 1324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1335 } | 1335 } |
| 1336 | 1336 |
| 1337 // JS other operators. | 1337 // JS other operators. |
| 1338 | 1338 |
| 1339 Type* Typer::Visitor::TypeJSConstructForwardVarargs(Node* node) { | 1339 Type* Typer::Visitor::TypeJSConstructForwardVarargs(Node* node) { |
| 1340 return Type::Receiver(); | 1340 return Type::Receiver(); |
| 1341 } | 1341 } |
| 1342 | 1342 |
| 1343 Type* Typer::Visitor::TypeJSConstruct(Node* node) { return Type::Receiver(); } | 1343 Type* Typer::Visitor::TypeJSConstruct(Node* node) { return Type::Receiver(); } |
| 1344 | 1344 |
| 1345 Type* Typer::Visitor::TypeJSConstructWithArrayLike(Node* node) { |
| 1346 return Type::Receiver(); |
| 1347 } |
| 1348 |
| 1345 Type* Typer::Visitor::TypeJSConstructWithSpread(Node* node) { | 1349 Type* Typer::Visitor::TypeJSConstructWithSpread(Node* node) { |
| 1346 return Type::Receiver(); | 1350 return Type::Receiver(); |
| 1347 } | 1351 } |
| 1348 | 1352 |
| 1349 Type* Typer::Visitor::JSCallTyper(Type* fun, Typer* t) { | 1353 Type* Typer::Visitor::JSCallTyper(Type* fun, Typer* t) { |
| 1350 if (fun->IsHeapConstant() && fun->AsHeapConstant()->Value()->IsJSFunction()) { | 1354 if (fun->IsHeapConstant() && fun->AsHeapConstant()->Value()->IsJSFunction()) { |
| 1351 Handle<JSFunction> function = | 1355 Handle<JSFunction> function = |
| 1352 Handle<JSFunction>::cast(fun->AsHeapConstant()->Value()); | 1356 Handle<JSFunction>::cast(fun->AsHeapConstant()->Value()); |
| 1353 if (function->shared()->HasBuiltinFunctionId()) { | 1357 if (function->shared()->HasBuiltinFunctionId()) { |
| 1354 switch (function->shared()->builtin_function_id()) { | 1358 switch (function->shared()->builtin_function_id()) { |
| (...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2014 Type* Typer::Visitor::TypeConstant(Handle<Object> value) { | 2018 Type* Typer::Visitor::TypeConstant(Handle<Object> value) { |
| 2015 if (Type::IsInteger(*value)) { | 2019 if (Type::IsInteger(*value)) { |
| 2016 return Type::Range(value->Number(), value->Number(), zone()); | 2020 return Type::Range(value->Number(), value->Number(), zone()); |
| 2017 } | 2021 } |
| 2018 return Type::NewConstant(value, zone()); | 2022 return Type::NewConstant(value, zone()); |
| 2019 } | 2023 } |
| 2020 | 2024 |
| 2021 } // namespace compiler | 2025 } // namespace compiler |
| 2022 } // namespace internal | 2026 } // namespace internal |
| 2023 } // namespace v8 | 2027 } // namespace v8 |
| OLD | NEW |