Changeset 212620 in webkit


Ignore:
Timestamp:
Feb 19, 2017 7:59:19 PM (7 years ago)
Author:
mark.lam@apple.com
Message:

functionTestWasmModuleFunctions() should use a MarkedArgumentBuffer for storing args instead of a Vector.
https://bugs.webkit.org/show_bug.cgi?id=168574

Reviewed by Filip Pizlo.

  • jsc.cpp:

(callWasmFunction):
(functionTestWasmModuleFunctions):

  • runtime/ArgList.h:
Location:
trunk/Source/JavaScriptCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r212618 r212620  
     12017-02-19  Mark Lam  <mark.lam@apple.com>
     2
     3        functionTestWasmModuleFunctions() should use a MarkedArgumentBuffer for storing args instead of a Vector.
     4        https://bugs.webkit.org/show_bug.cgi?id=168574
     5
     6        Reviewed by Filip Pizlo.
     7
     8        * jsc.cpp:
     9        (callWasmFunction):
     10        (functionTestWasmModuleFunctions):
     11        * runtime/ArgList.h:
     12
    1132017-02-19  Mark Lam  <mark.lam@apple.com>
    214
  • trunk/Source/JavaScriptCore/jsc.cpp

    r212616 r212620  
    30703070}
    30713071
    3072 static JSValue callWasmFunction(VM* vm, JSGlobalObject* globalObject, JSWebAssemblyCallee* wasmCallee, Vector<JSValue>& boxedArgs)
     3072// FIXME: https://bugs.webkit.org/show_bug.cgi?id=168582.
     3073static JSValue callWasmFunction(VM* vm, JSGlobalObject* globalObject, JSWebAssemblyCallee* wasmCallee, const ArgList& boxedArgs)
    30733074{
    30743075    JSValue firstArgument;
     
    31363137            JSArray* arguments = jsCast<JSArray*>(test->getIndexQuickly(1));
    31373138
    3138             Vector<JSValue> boxedArgs;
     3139            MarkedArgumentBuffer boxedArgs;
    31393140            for (unsigned argIndex = 0; argIndex < arguments->length(); ++argIndex)
    31403141                boxedArgs.append(box(exec, vm, arguments->getIndexQuickly(argIndex)));
     
    31513152                CommaPrinter comma(", ");
    31523153                for (unsigned argIndex = 0; argIndex < arguments->length(); ++argIndex)
    3153                     dataLog(comma, valueWithTypeOfWasmValue(exec, vm, boxedArgs[argIndex], arguments->getIndexQuickly(argIndex)));
     3154                    dataLog(comma, valueWithTypeOfWasmValue(exec, vm, boxedArgs.at(argIndex), arguments->getIndexQuickly(argIndex)));
    31543155                dataLogLn();
    31553156
  • trunk/Source/JavaScriptCore/runtime/ArgList.h

    r212618 r212620  
    165165    JS_EXPORT_PRIVATE void getSlice(int startIndex, ArgList& result) const;
    166166
    167 private:
     167    // FIXME: This is only made public as a work around for jsc's test helper function,
     168    // callWasmFunction() to use. Make this a private method again once we can remove
     169    // callWasmFunction().
     170    // https://bugs.webkit.org/show_bug.cgi?id=168582
    168171    JSValue* data() const { return m_args; }
    169172
     173private:
    170174    JSValue* m_args;
    171175    int m_argCount;
Note: See TracChangeset for help on using the changeset viewer.