+RegExpMatchesArray::RegExpMatchesArray(VM& vm, Butterfly* butterfly, JSGlobalObject* globalObject, JSString* input, RegExp* regExp, MatchResult result)
+ : JSArray(vm, globalObject->regExpMatchesArrayStructure(), butterfly)
+ , m_result(result)
+ , m_state(ReifiedNone)
+{
+ m_input.set(vm, this, input);
+ m_regExp.set(vm, this, regExp);
+}
+
+RegExpMatchesArray* RegExpMatchesArray::create(ExecState* exec, JSString* input, RegExp* regExp, MatchResult result)
+{
+ ASSERT(result);
+ VM& vm = exec->vm();
+ Butterfly* butterfly = createArrayButterfly(vm, regExp->numSubpatterns() + 1);
+ RegExpMatchesArray* array = new (NotNull, allocateCell<RegExpMatchesArray>(vm.heap)) RegExpMatchesArray(vm, butterfly, exec->lexicalGlobalObject(), input, regExp, result);
+ array->finishCreation(vm);
+ return array;
+}
+
+void RegExpMatchesArray::finishCreation(VM& vm)