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

Unified Diff: src/objects.h

Issue 1645001: Native construction of RegExp result objects, with in-object index and input. (Closed)
Patch Set: Created 10 years, 8 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.h
diff --git a/src/objects.h b/src/objects.h
index 9197466e85e4564cfe29e38e814e4865e5c06a64..a658cc21a49fb78f568f2cb4c6d4467c9d156046 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -4623,6 +4623,11 @@ class JSArray: public JSObject {
static const int kLengthOffset = JSObject::kHeaderSize;
static const int kSize = kLengthOffset + kPointerSize;
+ // RegExp results are arrays with index and input as internal fields.
Søren Thygesen Gjesse 2010/04/13 07:22:29 How about creating the class JSRegExpResult inheri
Lasse Reichstein 2010/04/13 09:50:56 Done.
+ static const int kRegExpResultSize = kSize + 2 * kPointerSize;
+ static const int kIndexIndex = 0;
+ static const int kInputIndex = 1;
+
private:
// Expand the fixed array backing of a fast-case JSArray to at least
// the requested size.

Powered by Google App Engine
This is Rietveld 408576698