Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(149)

Side by Side Diff: src/compiler/typer.cc

Issue 2291433003: [turbofan] Nuke the funny typing rule for JSTypedArray constants. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698