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

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

Issue 2422383002: [turbofan] Implement JSBuiltinReducer for String.prototype[Symbol.iterator]. (Closed)
Patch Set: pass input context twice to LoadContext. fixes tests. Created 4 years, 2 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 | « src/compiler/js-builtin-reducer.cc ('k') | src/objects.h » ('j') | 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 1332 matching lines...) Expand 10 before | Expand all | Expand 10 after
1343 return Type::Union(Type::Range(0, kMaxUInt16, t->zone()), Type::NaN(), 1343 return Type::Union(Type::Range(0, kMaxUInt16, t->zone()), Type::NaN(),
1344 t->zone()); 1344 t->zone());
1345 case kStringCharAt: 1345 case kStringCharAt:
1346 case kStringConcat: 1346 case kStringConcat:
1347 case kStringFromCharCode: 1347 case kStringFromCharCode:
1348 case kStringSubstr: 1348 case kStringSubstr:
1349 case kStringToLowerCase: 1349 case kStringToLowerCase:
1350 case kStringToUpperCase: 1350 case kStringToUpperCase:
1351 return Type::String(); 1351 return Type::String();
1352 1352
1353 case kStringIterator:
1353 case kStringIteratorNext: 1354 case kStringIteratorNext:
1354 return Type::OtherObject(); 1355 return Type::OtherObject();
1355 1356
1356 // Array functions. 1357 // Array functions.
1357 case kArrayIndexOf: 1358 case kArrayIndexOf:
1358 case kArrayLastIndexOf: 1359 case kArrayLastIndexOf:
1359 return Type::Range(-1, kMaxSafeInteger, t->zone()); 1360 return Type::Range(-1, kMaxSafeInteger, t->zone());
1360 // Object functions. 1361 // Object functions.
1361 case kObjectHasOwnProperty: 1362 case kObjectHasOwnProperty:
1362 return Type::Boolean(); 1363 return Type::Boolean();
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
1703 Type* Typer::Visitor::TypeConstant(Handle<Object> value) { 1704 Type* Typer::Visitor::TypeConstant(Handle<Object> value) {
1704 if (Type::IsInteger(*value)) { 1705 if (Type::IsInteger(*value)) {
1705 return Type::Range(value->Number(), value->Number(), zone()); 1706 return Type::Range(value->Number(), value->Number(), zone());
1706 } 1707 }
1707 return Type::NewConstant(value, zone()); 1708 return Type::NewConstant(value, zone());
1708 } 1709 }
1709 1710
1710 } // namespace compiler 1711 } // namespace compiler
1711 } // namespace internal 1712 } // namespace internal
1712 } // namespace v8 1713 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-builtin-reducer.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698