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