| 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 2276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2287 | 2287 |
| 2288 Type* Typer::Visitor::TypeWord32PairShl(Node* node) { return Type::Internal(); } | 2288 Type* Typer::Visitor::TypeWord32PairShl(Node* node) { return Type::Internal(); } |
| 2289 | 2289 |
| 2290 Type* Typer::Visitor::TypeWord32PairShr(Node* node) { return Type::Internal(); } | 2290 Type* Typer::Visitor::TypeWord32PairShr(Node* node) { return Type::Internal(); } |
| 2291 | 2291 |
| 2292 Type* Typer::Visitor::TypeWord32PairSar(Node* node) { return Type::Internal(); } | 2292 Type* Typer::Visitor::TypeWord32PairSar(Node* node) { return Type::Internal(); } |
| 2293 | 2293 |
| 2294 // Heap constants. | 2294 // Heap constants. |
| 2295 | 2295 |
| 2296 Type* Typer::Visitor::TypeConstant(Handle<Object> value) { | 2296 Type* Typer::Visitor::TypeConstant(Handle<Object> value) { |
| 2297 if (value->IsJSTypedArray()) { | |
| 2298 switch (JSTypedArray::cast(*value)->type()) { | |
| 2299 #define TYPED_ARRAY_CASE(Type, type, TYPE, ctype, size) \ | |
| 2300 case kExternal##Type##Array: \ | |
| 2301 return typer_->cache_.k##Type##Array; | |
| 2302 TYPED_ARRAYS(TYPED_ARRAY_CASE) | |
| 2303 #undef TYPED_ARRAY_CASE | |
| 2304 } | |
| 2305 } | |
| 2306 if (Type::IsInteger(*value)) { | 2297 if (Type::IsInteger(*value)) { |
| 2307 return Type::Range(value->Number(), value->Number(), zone()); | 2298 return Type::Range(value->Number(), value->Number(), zone()); |
| 2308 } | 2299 } |
| 2309 return Type::Constant(value, zone()); | 2300 return Type::Constant(value, zone()); |
| 2310 } | 2301 } |
| 2311 | 2302 |
| 2312 } // namespace compiler | 2303 } // namespace compiler |
| 2313 } // namespace internal | 2304 } // namespace internal |
| 2314 } // namespace v8 | 2305 } // namespace v8 |
| OLD | NEW |