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

Unified Diff: src/objects-inl.h

Issue 2348493003: [builtins] move String.prototype[@@iterator] to C++ builtin (Closed)
Patch Set: V8 (rebase + fix bytecode expectations) 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects-debug.cc ('k') | src/v8.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index a589484b5e03ce23e91a96c7442e0941388fb681..faff3b4ba438c7db67434f94dd43c704a6f41004 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -701,6 +701,7 @@ TYPE_CHECKER(Map, MAP_TYPE)
TYPE_CHECKER(FixedDoubleArray, FIXED_DOUBLE_ARRAY_TYPE)
TYPE_CHECKER(WeakFixedArray, FIXED_ARRAY_TYPE)
TYPE_CHECKER(TransitionArray, TRANSITION_ARRAY_TYPE)
+TYPE_CHECKER(JSStringIterator, JS_STRING_ITERATOR_TYPE)
bool HeapObject::IsJSWeakCollection() const {
return IsJSWeakMap() || IsJSWeakSet();
@@ -2113,6 +2114,8 @@ int JSObject::GetHeaderSize(InstanceType type) {
return JSArgumentsObject::kHeaderSize;
case JS_ERROR_TYPE:
return JSObject::kHeaderSize;
+ case JS_STRING_ITERATOR_TYPE:
+ return JSStringIterator::kSize;
default:
UNREACHABLE();
return 0;
@@ -3282,6 +3285,7 @@ CAST_ACCESSOR(JSReceiver)
CAST_ACCESSOR(JSRegExp)
CAST_ACCESSOR(JSSet)
CAST_ACCESSOR(JSSetIterator)
+CAST_ACCESSOR(JSStringIterator)
CAST_ACCESSOR(JSTypedArray)
CAST_ACCESSOR(JSValue)
CAST_ACCESSOR(JSWeakCollection)
@@ -8270,6 +8274,12 @@ static inline Handle<Object> MakeEntryPair(Isolate* isolate, Handle<Name> key,
FAST_ELEMENTS, 2);
}
+ACCESSORS(JSIteratorResult, value, Object, kValueOffset)
+ACCESSORS(JSIteratorResult, done, Object, kDoneOffset)
+
+ACCESSORS(JSStringIterator, string, String, kStringOffset)
+SMI_ACCESSORS(JSStringIterator, index, kNextIndexOffset)
+
#undef TYPE_CHECKER
#undef CAST_ACCESSOR
#undef INT_ACCESSORS
« no previous file with comments | « src/objects-debug.cc ('k') | src/v8.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698