]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - runtime/RegExpMatchesArray.cpp
JavaScriptCore-7600.1.4.9.tar.gz
[apple/javascriptcore.git] / runtime / RegExpMatchesArray.cpp
index 062650a86a0600c8d4d5330ec67463b329f9bf2e..f0cc10b5afef0c830c834e505950062a791a0282 100644 (file)
@@ -27,7 +27,7 @@
 #include "RegExpMatchesArray.h"
 
 #include "ButterflyInlines.h"
-#include "Operations.h"
+#include "JSCInlines.h"
 
 namespace JSC {
 
@@ -46,7 +46,7 @@ RegExpMatchesArray* RegExpMatchesArray::create(ExecState* exec, JSString* input,
 {
     ASSERT(result);
     VM& vm = exec->vm();
-    Butterfly* butterfly = createArrayButterfly(vm, regExp->numSubpatterns() + 1);
+    Butterfly* butterfly = createArrayButterfly(vm, 0, regExp->numSubpatterns() + 1);
     RegExpMatchesArray* array = new (NotNull, allocateCell<RegExpMatchesArray>(vm.heap)) RegExpMatchesArray(vm, butterfly, exec->lexicalGlobalObject(), input, regExp, result);
     array->finishCreation(vm);
     return array;
@@ -60,7 +60,7 @@ void RegExpMatchesArray::finishCreation(VM& vm)
 void RegExpMatchesArray::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     RegExpMatchesArray* thisObject = jsCast<RegExpMatchesArray*>(cell);
-    ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
+    ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     COMPILE_ASSERT(StructureFlags & OverridesVisitChildren, OverridesVisitChildrenWithoutSettingFlag);
     ASSERT(thisObject->structure()->typeInfo().overridesVisitChildren());
 
@@ -92,9 +92,8 @@ void RegExpMatchesArray::reifyAllProperties(ExecState* exec)
         }
     }
 
-    PutPropertySlot slot;
-    JSArray::put(this, exec, exec->propertyNames().index, jsNumber(m_result.start), slot);
-    JSArray::put(this, exec, exec->propertyNames().input, m_input.get(), slot);
+    putDirect(exec->vm(), exec->propertyNames().index, jsNumber(m_result.start));
+    putDirect(exec->vm(), exec->propertyNames().input, m_input.get());
 
     m_state = ReifiedAll;
 }