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

Unified Diff: src/objects-inl.h

Issue 2394713003: [regexp] Port test, match, and search (Closed)
Patch Set: Rebase 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 side-by-side diff with in-line comments
Download patch
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index a48d7c8576dd03b1daa745ee9a6f7b1282a591b7..9bbcddf0c7daf151bbc5c8f17d40d6cc8ca2a13c 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -7031,6 +7031,18 @@ void JSRegExp::SetDataAt(int index, Object* value) {
FixedArray::cast(data())->set(index, value);
}
+void JSRegExp::SetLastIndex(int index) {
+ static const int offset =
+ kSize + JSRegExp::kLastIndexFieldIndex * kPointerSize;
+ Smi* value = Smi::FromInt(index);
+ WRITE_FIELD(this, offset, value);
+}
+
+Object* JSRegExp::LastIndex() {
+ static const int offset =
+ kSize + JSRegExp::kLastIndexFieldIndex * kPointerSize;
+ return READ_FIELD(this, offset);
+}
ElementsKind JSObject::GetElementsKind() {
ElementsKind kind = map()->elements_kind();

Powered by Google App Engine
This is Rietveld 408576698