Ignore:
Timestamp:
Oct 12, 2012, 12:22:34 PM (13 years ago)
Author:
[email protected]
Message:

DFG array allocation calls should not return an encoded JSValue
https://bugs.webkit.org/show_bug.cgi?id=99196

Reviewed by Mark Hahnenberg.

The array allocation operations now return a pointer instead. This makes it
easier to share code between 32-bit and 64-bit.

  • dfg/DFGOperations.cpp:
  • dfg/DFGOperations.h:
  • dfg/DFGSpeculativeJIT.h:

(JSC::DFG::SpeculativeJIT::callOperation):

  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/dfg/DFGOperations.cpp

    r131087 r131210  
    11071107}
    11081108
    1109 EncodedJSValue DFG_OPERATION operationNewArray(ExecState* exec, Structure* arrayStructure, void* buffer, size_t size)
    1110 {
    1111     JSGlobalData* globalData = &exec->globalData();
    1112     NativeCallFrameTracer tracer(globalData, exec);
    1113 
    1114     return JSValue::encode(constructArray(exec, arrayStructure, static_cast<JSValue*>(buffer), size));
    1115 }
    1116 
    1117 EncodedJSValue DFG_OPERATION operationNewEmptyArray(ExecState* exec, Structure* arrayStructure)
    1118 {
    1119     return JSValue::encode(JSArray::create(exec->globalData(), arrayStructure));
    1120 }
    1121 
    1122 EncodedJSValue DFG_OPERATION operationNewArrayWithSize(ExecState* exec, Structure* arrayStructure, int32_t size)
    1123 {
    1124     return JSValue::encode(JSArray::create(exec->globalData(), arrayStructure, size));
    1125 }
    1126 
    1127 EncodedJSValue DFG_OPERATION operationNewArrayBuffer(ExecState* exec, Structure* arrayStructure, size_t start, size_t size)
    1128 {
    1129     JSGlobalData& globalData = exec->globalData();
    1130     NativeCallFrameTracer tracer(&globalData, exec);
    1131     return JSValue::encode(constructArray(exec, arrayStructure, exec->codeBlock()->constantBuffer(start), size));
     1109char* DFG_OPERATION operationNewArray(ExecState* exec, Structure* arrayStructure, void* buffer, size_t size)
     1110{
     1111    JSGlobalData* globalData = &exec->globalData();
     1112    NativeCallFrameTracer tracer(globalData, exec);
     1113
     1114    return bitwise_cast<char*>(constructArray(exec, arrayStructure, static_cast<JSValue*>(buffer), size));
     1115}
     1116
     1117char* DFG_OPERATION operationNewEmptyArray(ExecState* exec, Structure* arrayStructure)
     1118{
     1119    return bitwise_cast<char*>(JSArray::create(exec->globalData(), arrayStructure));
     1120}
     1121
     1122char* DFG_OPERATION operationNewArrayWithSize(ExecState* exec, Structure* arrayStructure, int32_t size)
     1123{
     1124    return bitwise_cast<char*>(JSArray::create(exec->globalData(), arrayStructure, size));
     1125}
     1126
     1127char* DFG_OPERATION operationNewArrayBuffer(ExecState* exec, Structure* arrayStructure, size_t start, size_t size)
     1128{
     1129    JSGlobalData& globalData = exec->globalData();
     1130    NativeCallFrameTracer tracer(&globalData, exec);
     1131    return bitwise_cast<char*>(constructArray(exec, arrayStructure, exec->codeBlock()->constantBuffer(start), size));
    11321132}
    11331133
Note: See TracChangeset for help on using the changeset viewer.