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

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

Issue 2484003002: [builtins] implement JSBuiltinReducer for ArrayIteratorNext() (Closed)
Patch Set: bunch of changes Created 4 years, 1 month 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
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 1084 matching lines...) Expand 10 before | Expand all | Expand 10 after
1095 1095
1096 Type* Typer::Visitor::TypeJSCreateClosure(Node* node) { 1096 Type* Typer::Visitor::TypeJSCreateClosure(Node* node) {
1097 return Type::Function(); 1097 return Type::Function();
1098 } 1098 }
1099 1099
1100 1100
1101 Type* Typer::Visitor::TypeJSCreateIterResultObject(Node* node) { 1101 Type* Typer::Visitor::TypeJSCreateIterResultObject(Node* node) {
1102 return Type::OtherObject(); 1102 return Type::OtherObject();
1103 } 1103 }
1104 1104
1105 Type* Typer::Visitor::TypeJSCreateKeyValueArray(Node* node) {
1106 return Type::OtherObject();
1107 }
1105 1108
1106 Type* Typer::Visitor::TypeJSCreateLiteralArray(Node* node) { 1109 Type* Typer::Visitor::TypeJSCreateLiteralArray(Node* node) {
1107 return Type::OtherObject(); 1110 return Type::OtherObject();
1108 } 1111 }
1109 1112
1110 1113
1111 Type* Typer::Visitor::TypeJSCreateLiteralObject(Node* node) { 1114 Type* Typer::Visitor::TypeJSCreateLiteralObject(Node* node) {
1112 return Type::OtherObject(); 1115 return Type::OtherObject();
1113 } 1116 }
1114 1117
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
1376 case kStringFromCharCode: 1379 case kStringFromCharCode:
1377 case kStringSubstr: 1380 case kStringSubstr:
1378 case kStringToLowerCase: 1381 case kStringToLowerCase:
1379 case kStringToUpperCase: 1382 case kStringToUpperCase:
1380 return Type::String(); 1383 return Type::String();
1381 1384
1382 case kStringIterator: 1385 case kStringIterator:
1383 case kStringIteratorNext: 1386 case kStringIteratorNext:
1384 return Type::OtherObject(); 1387 return Type::OtherObject();
1385 1388
1389 case kArrayEntries:
1390 case kArrayKeys:
1391 case kArrayValues:
1392 case kTypedArrayEntries:
1393 case kTypedArrayKeys:
1394 case kTypedArrayValues:
1395 case kArrayIteratorNext:
1396 return Type::OtherObject();
1397
1386 // Array functions. 1398 // Array functions.
1387 case kArrayIndexOf: 1399 case kArrayIndexOf:
1388 case kArrayLastIndexOf: 1400 case kArrayLastIndexOf:
1389 return Type::Range(-1, kMaxSafeInteger, t->zone()); 1401 return Type::Range(-1, kMaxSafeInteger, t->zone());
1390 case kArrayPush: 1402 case kArrayPush:
1391 return t->cache_.kPositiveSafeInteger; 1403 return t->cache_.kPositiveSafeInteger;
1392 // Object functions. 1404 // Object functions.
1393 case kObjectHasOwnProperty: 1405 case kObjectHasOwnProperty:
1394 return Type::Boolean(); 1406 return Type::Boolean();
1395 // Global functions. 1407 // Global functions.
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
1734 Type* Typer::Visitor::TypeConstant(Handle<Object> value) { 1746 Type* Typer::Visitor::TypeConstant(Handle<Object> value) {
1735 if (Type::IsInteger(*value)) { 1747 if (Type::IsInteger(*value)) {
1736 return Type::Range(value->Number(), value->Number(), zone()); 1748 return Type::Range(value->Number(), value->Number(), zone());
1737 } 1749 }
1738 return Type::NewConstant(value, zone()); 1750 return Type::NewConstant(value, zone());
1739 } 1751 }
1740 1752
1741 } // namespace compiler 1753 } // namespace compiler
1742 } // namespace internal 1754 } // namespace internal
1743 } // namespace v8 1755 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698