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 2427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2438 | 2438 |
2439 Type* Typer::Visitor::TypeCheckedStore(Node* node) { | 2439 Type* Typer::Visitor::TypeCheckedStore(Node* node) { |
2440 UNREACHABLE(); | 2440 UNREACHABLE(); |
2441 return nullptr; | 2441 return nullptr; |
2442 } | 2442 } |
2443 | 2443 |
2444 Type* Typer::Visitor::TypeInt32PairAdd(Node* node) { return Type::Internal(); } | 2444 Type* Typer::Visitor::TypeInt32PairAdd(Node* node) { return Type::Internal(); } |
2445 | 2445 |
2446 Type* Typer::Visitor::TypeInt32PairSub(Node* node) { return Type::Internal(); } | 2446 Type* Typer::Visitor::TypeInt32PairSub(Node* node) { return Type::Internal(); } |
2447 | 2447 |
| 2448 Type* Typer::Visitor::TypeInt32PairMul(Node* node) { return Type::Internal(); } |
| 2449 |
2448 Type* Typer::Visitor::TypeWord32PairShl(Node* node) { return Type::Internal(); } | 2450 Type* Typer::Visitor::TypeWord32PairShl(Node* node) { return Type::Internal(); } |
2449 | 2451 |
2450 Type* Typer::Visitor::TypeWord32PairShr(Node* node) { return Type::Internal(); } | 2452 Type* Typer::Visitor::TypeWord32PairShr(Node* node) { return Type::Internal(); } |
2451 | 2453 |
2452 Type* Typer::Visitor::TypeWord32PairSar(Node* node) { return Type::Internal(); } | 2454 Type* Typer::Visitor::TypeWord32PairSar(Node* node) { return Type::Internal(); } |
2453 | 2455 |
2454 // Heap constants. | 2456 // Heap constants. |
2455 | 2457 |
2456 | 2458 |
2457 Type* Typer::Visitor::TypeConstant(Handle<Object> value) { | 2459 Type* Typer::Visitor::TypeConstant(Handle<Object> value) { |
2458 if (value->IsJSTypedArray()) { | 2460 if (value->IsJSTypedArray()) { |
2459 switch (JSTypedArray::cast(*value)->type()) { | 2461 switch (JSTypedArray::cast(*value)->type()) { |
2460 #define TYPED_ARRAY_CASE(Type, type, TYPE, ctype, size) \ | 2462 #define TYPED_ARRAY_CASE(Type, type, TYPE, ctype, size) \ |
2461 case kExternal##Type##Array: \ | 2463 case kExternal##Type##Array: \ |
2462 return typer_->cache_.k##Type##Array; | 2464 return typer_->cache_.k##Type##Array; |
2463 TYPED_ARRAYS(TYPED_ARRAY_CASE) | 2465 TYPED_ARRAYS(TYPED_ARRAY_CASE) |
2464 #undef TYPED_ARRAY_CASE | 2466 #undef TYPED_ARRAY_CASE |
2465 } | 2467 } |
2466 } | 2468 } |
2467 if (Type::IsInteger(*value)) { | 2469 if (Type::IsInteger(*value)) { |
2468 return Type::Range(value->Number(), value->Number(), zone()); | 2470 return Type::Range(value->Number(), value->Number(), zone()); |
2469 } | 2471 } |
2470 return Type::Constant(value, zone()); | 2472 return Type::Constant(value, zone()); |
2471 } | 2473 } |
2472 | 2474 |
2473 } // namespace compiler | 2475 } // namespace compiler |
2474 } // namespace internal | 2476 } // namespace internal |
2475 } // namespace v8 | 2477 } // namespace v8 |
OLD | NEW |