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 1384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1395 case Runtime::kInlineIsJSReceiver: | 1395 case Runtime::kInlineIsJSReceiver: |
1396 return TypeUnaryOp(node, ObjectIsReceiver); | 1396 return TypeUnaryOp(node, ObjectIsReceiver); |
1397 case Runtime::kInlineIsSmi: | 1397 case Runtime::kInlineIsSmi: |
1398 return TypeUnaryOp(node, ObjectIsSmi); | 1398 return TypeUnaryOp(node, ObjectIsSmi); |
1399 case Runtime::kInlineIsArray: | 1399 case Runtime::kInlineIsArray: |
1400 case Runtime::kInlineIsDate: | 1400 case Runtime::kInlineIsDate: |
1401 case Runtime::kInlineIsTypedArray: | 1401 case Runtime::kInlineIsTypedArray: |
1402 case Runtime::kInlineIsRegExp: | 1402 case Runtime::kInlineIsRegExp: |
1403 return Type::Boolean(); | 1403 return Type::Boolean(); |
1404 case Runtime::kInlineCreateIterResultObject: | 1404 case Runtime::kInlineCreateIterResultObject: |
1405 case Runtime::kInlineRegExpConstructResult: | |
1406 return Type::OtherObject(); | 1405 return Type::OtherObject(); |
1407 case Runtime::kInlineSubString: | 1406 case Runtime::kInlineSubString: |
1408 case Runtime::kInlineStringCharFromCode: | 1407 case Runtime::kInlineStringCharFromCode: |
1409 return Type::String(); | 1408 return Type::String(); |
1410 case Runtime::kInlineToInteger: | 1409 case Runtime::kInlineToInteger: |
1411 return TypeUnaryOp(node, ToInteger); | 1410 return TypeUnaryOp(node, ToInteger); |
1412 case Runtime::kInlineToLength: | 1411 case Runtime::kInlineToLength: |
1413 return TypeUnaryOp(node, ToLength); | 1412 return TypeUnaryOp(node, ToLength); |
1414 case Runtime::kInlineToNumber: | 1413 case Runtime::kInlineToNumber: |
1415 return TypeUnaryOp(node, ToNumber); | 1414 return TypeUnaryOp(node, ToNumber); |
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1706 Type* Typer::Visitor::TypeConstant(Handle<Object> value) { | 1705 Type* Typer::Visitor::TypeConstant(Handle<Object> value) { |
1707 if (Type::IsInteger(*value)) { | 1706 if (Type::IsInteger(*value)) { |
1708 return Type::Range(value->Number(), value->Number(), zone()); | 1707 return Type::Range(value->Number(), value->Number(), zone()); |
1709 } | 1708 } |
1710 return Type::NewConstant(value, zone()); | 1709 return Type::NewConstant(value, zone()); |
1711 } | 1710 } |
1712 | 1711 |
1713 } // namespace compiler | 1712 } // namespace compiler |
1714 } // namespace internal | 1713 } // namespace internal |
1715 } // namespace v8 | 1714 } // namespace v8 |
OLD | NEW |