Chromium Code Reviews

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

Issue 2484003002: [builtins] implement JSBuiltinReducer for ArrayIteratorNext() (Closed)
Patch Set: CheckIf() for ArrayBufferWasNeutered() rather than a branch, which hopefully can be eliminated, and… Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
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 1365 matching lines...)
1376 case kStringFromCharCode: 1376 case kStringFromCharCode:
1377 case kStringSubstr: 1377 case kStringSubstr:
1378 case kStringToLowerCase: 1378 case kStringToLowerCase:
1379 case kStringToUpperCase: 1379 case kStringToUpperCase:
1380 return Type::String(); 1380 return Type::String();
1381 1381
1382 case kStringIterator: 1382 case kStringIterator:
1383 case kStringIteratorNext: 1383 case kStringIteratorNext:
1384 return Type::OtherObject(); 1384 return Type::OtherObject();
1385 1385
1386 case kArrayEntries:
1387 case kArrayKeys:
1388 case kArrayValues:
1389 case kTypedArrayEntries:
1390 case kTypedArrayKeys:
1391 case kTypedArrayValues:
1392 case kArrayIteratorNext:
1393 return Type::OtherObject();
1394
1386 // Array functions. 1395 // Array functions.
1387 case kArrayIndexOf: 1396 case kArrayIndexOf:
1388 case kArrayLastIndexOf: 1397 case kArrayLastIndexOf:
1389 return Type::Range(-1, kMaxSafeInteger, t->zone()); 1398 return Type::Range(-1, kMaxSafeInteger, t->zone());
1390 case kArrayPush: 1399 case kArrayPush:
1391 return t->cache_.kPositiveSafeInteger; 1400 return t->cache_.kPositiveSafeInteger;
1392 // Object functions. 1401 // Object functions.
1393 case kObjectHasOwnProperty: 1402 case kObjectHasOwnProperty:
1394 return Type::Boolean(); 1403 return Type::Boolean();
1395 // Global functions. 1404 // Global functions.
(...skipping 338 matching lines...)
1734 Type* Typer::Visitor::TypeConstant(Handle<Object> value) { 1743 Type* Typer::Visitor::TypeConstant(Handle<Object> value) {
1735 if (Type::IsInteger(*value)) { 1744 if (Type::IsInteger(*value)) {
1736 return Type::Range(value->Number(), value->Number(), zone()); 1745 return Type::Range(value->Number(), value->Number(), zone());
1737 } 1746 }
1738 return Type::NewConstant(value, zone()); 1747 return Type::NewConstant(value, zone());
1739 } 1748 }
1740 1749
1741 } // namespace compiler 1750 } // namespace compiler
1742 } // namespace internal 1751 } // namespace internal
1743 } // namespace v8 1752 } // namespace v8
OLDNEW

Powered by Google App Engine