Changeset 211110 in webkit
- Timestamp:
- Jan 24, 2017, 1:54:59 PM (10 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 9 edited
-
ChangeLog (modified) (1 diff)
-
dfg/DFGOperations.cpp (modified) (1 diff)
-
ftl/FTLOperations.cpp (modified) (2 diffs)
-
runtime/ArrayPrototype.cpp (modified) (2 diffs)
-
runtime/CommonSlowPaths.cpp (modified) (1 diff)
-
runtime/JSArray.cpp (modified) (2 diffs)
-
runtime/JSArray.h (modified) (5 diffs)
-
runtime/RegExpMatchesArray.cpp (modified) (1 diff)
-
runtime/RegExpMatchesArray.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r211091 r211110 1 2017-01-24 Michael Saboff <msaboff@apple.com> 2 3 JSArray::tryCreateUninitialized should be called JSArray::tryCreateForInitializationPrivate 4 https://bugs.webkit.org/show_bug.cgi?id=167334 5 6 Rubber-stamped by Filip Pizlo. 7 8 * dfg/DFGOperations.cpp: 9 * ftl/FTLOperations.cpp: 10 (JSC::FTL::operationMaterializeObjectInOSR): 11 * runtime/ArrayPrototype.cpp: 12 (JSC::arrayProtoFuncSplice): 13 (JSC::arrayProtoPrivateFuncConcatMemcpy): 14 * runtime/CommonSlowPaths.cpp: 15 (JSC::SLOW_PATH_DECL): 16 * runtime/JSArray.cpp: 17 (JSC::JSArray::tryCreateForInitializationPrivate): 18 (JSC::JSArray::fastSlice): 19 (JSC::JSArray::tryCreateUninitialized): Deleted. 20 * runtime/JSArray.h: 21 (JSC::JSArray::tryCreateForInitializationPrivate): 22 (JSC::constructArray): 23 (JSC::constructArrayNegativeIndexed): 24 (JSC::JSArray::tryCreateUninitialized): Deleted. 25 * runtime/RegExpMatchesArray.cpp: 26 (JSC::createEmptyRegExpMatchesArray): 27 * runtime/RegExpMatchesArray.h: 28 (JSC::createRegExpMatchesArray): 29 1 30 2017-01-23 Michael Saboff <msaboff@apple.com> 2 31 -
trunk/Source/JavaScriptCore/dfg/DFGOperations.cpp
r211070 r211110 1957 1957 Structure* structure = globalObject->arrayStructureForIndexingTypeDuringAllocation(ArrayWithContiguous); 1958 1958 1959 JSArray* result = JSArray::tryCreate Uninitialized(vm, structure, length);1959 JSArray* result = JSArray::tryCreateForInitializationPrivate(vm, structure, length); 1960 1960 RETURN_IF_EXCEPTION(scope, nullptr); 1961 1961 -
trunk/Source/JavaScriptCore/ftl/FTLOperations.cpp
r209121 r211110 356 356 ASSERT(argumentCount > 0); 357 357 unsigned arraySize = (argumentCount - 1) > numberOfArgumentsToSkip ? argumentCount - 1 - numberOfArgumentsToSkip : 0; 358 JSArray* array = JSArray::tryCreate Uninitialized(vm, structure, arraySize);358 JSArray* array = JSArray::tryCreateForInitializationPrivate(vm, structure, arraySize); 359 359 RELEASE_ASSERT(array); 360 360 … … 445 445 } 446 446 447 JSArray* result = JSArray::tryCreate Uninitialized(vm, structure, arraySize);447 JSArray* result = JSArray::tryCreateForInitializationPrivate(vm, structure, arraySize); 448 448 RELEASE_ASSERT(result); 449 449 -
trunk/Source/JavaScriptCore/runtime/ArrayPrototype.cpp
r210745 r211110 1042 1042 } 1043 1043 } else { 1044 result = JSArray::tryCreate Uninitialized(vm, exec->lexicalGlobalObject()->arrayStructureForIndexingTypeDuringAllocation(ArrayWithUndecided), actualDeleteCount);1044 result = JSArray::tryCreateForInitializationPrivate(vm, exec->lexicalGlobalObject()->arrayStructureForIndexingTypeDuringAllocation(ArrayWithUndecided), actualDeleteCount); 1045 1045 if (!result) 1046 1046 return JSValue::encode(throwOutOfMemoryError(exec, scope)); … … 1284 1284 1285 1285 Structure* resultStructure = exec->lexicalGlobalObject()->arrayStructureForIndexingTypeDuringAllocation(type); 1286 JSArray* result = JSArray::tryCreate Uninitialized(vm, resultStructure, firstArraySize + secondArraySize);1286 JSArray* result = JSArray::tryCreateForInitializationPrivate(vm, resultStructure, firstArraySize + secondArraySize); 1287 1287 if (!result) 1288 1288 return JSValue::encode(throwOutOfMemoryError(exec, scope)); -
trunk/Source/JavaScriptCore/runtime/CommonSlowPaths.cpp
r211070 r211110 1006 1006 Structure* structure = globalObject->arrayStructureForIndexingTypeDuringAllocation(ArrayWithContiguous); 1007 1007 1008 JSArray* result = JSArray::tryCreate Uninitialized(vm, structure, arraySize);1008 JSArray* result = JSArray::tryCreateForInitializationPrivate(vm, structure, arraySize); 1009 1009 CHECK_EXCEPTION(); 1010 1010 -
trunk/Source/JavaScriptCore/runtime/JSArray.cpp
r210935 r211110 59 59 } 60 60 61 JSArray* JSArray::tryCreate Uninitialized(VM& vm, GCDeferralContext* deferralContext, Structure* structure, unsigned initialLength)61 JSArray* JSArray::tryCreateForInitializationPrivate(VM& vm, GCDeferralContext* deferralContext, Structure* structure, unsigned initialLength) 62 62 { 63 63 if (initialLength > MAX_STORAGE_VECTOR_LENGTH) … … 847 847 848 848 Structure* resultStructure = exec.lexicalGlobalObject()->arrayStructureForIndexingTypeDuringAllocation(arrayType); 849 JSArray* resultArray = JSArray::tryCreate Uninitialized(vm, resultStructure, count);849 JSArray* resultArray = JSArray::tryCreateForInitializationPrivate(vm, resultStructure, count); 850 850 if (!resultArray) 851 851 return nullptr; -
trunk/Source/JavaScriptCore/runtime/JSArray.h
r211070 r211110 57 57 static JSArray* createWithButterfly(VM&, GCDeferralContext*, Structure*, Butterfly*); 58 58 59 // tryCreate Uninitializedis used for fast construction of arrays whose size and59 // tryCreateForInitializationPrivate is used for fast construction of arrays whose size and 60 60 // contents are known at time of creation. This should be considered a private API. 61 61 // Clients of this interface must: … … 65 65 // otherwise the caller can provide a null GCDefferalContext*. 66 66 // 67 JS_EXPORT_PRIVATE static JSArray* tryCreate Uninitialized(VM&, GCDeferralContext*, Structure*, unsigned initialLength);68 static JSArray* tryCreate Uninitialized(VM& vm, Structure* structure, unsigned initialLength)69 { 70 return tryCreate Uninitialized(vm, nullptr, structure, initialLength);67 JS_EXPORT_PRIVATE static JSArray* tryCreateForInitializationPrivate(VM&, GCDeferralContext*, Structure*, unsigned initialLength); 68 static JSArray* tryCreateForInitializationPrivate(VM& vm, Structure* structure, unsigned initialLength) 69 { 70 return tryCreateForInitializationPrivate(vm, nullptr, structure, initialLength); 71 71 } 72 72 … … 296 296 VM& vm = exec->vm(); 297 297 unsigned length = values.size(); 298 JSArray* array = JSArray::tryCreate Uninitialized(vm, arrayStructure, length);298 JSArray* array = JSArray::tryCreateForInitializationPrivate(vm, arrayStructure, length); 299 299 300 300 // FIXME: we should probably throw an out of memory error here, but … … 311 311 { 312 312 VM& vm = exec->vm(); 313 JSArray* array = JSArray::tryCreate Uninitialized(vm, arrayStructure, length);313 JSArray* array = JSArray::tryCreateForInitializationPrivate(vm, arrayStructure, length); 314 314 315 315 // FIXME: we should probably throw an out of memory error here, but … … 326 326 { 327 327 VM& vm = exec->vm(); 328 JSArray* array = JSArray::tryCreate Uninitialized(vm, arrayStructure, length);328 JSArray* array = JSArray::tryCreateForInitializationPrivate(vm, arrayStructure, length); 329 329 330 330 // FIXME: we should probably throw an out of memory error here, but -
trunk/Source/JavaScriptCore/runtime/RegExpMatchesArray.cpp
r206555 r211110 40 40 41 41 if (UNLIKELY(globalObject->isHavingABadTime())) { 42 array = JSArray::tryCreate Uninitialized(vm, &deferralContext, globalObject->regExpMatchesArrayStructure(), regExp->numSubpatterns() + 1);42 array = JSArray::tryCreateForInitializationPrivate(vm, &deferralContext, globalObject->regExpMatchesArrayStructure(), regExp->numSubpatterns() + 1); 43 43 44 44 array->initializeIndexWithoutBarrier(0, jsEmptyString(&vm)); -
trunk/Source/JavaScriptCore/runtime/RegExpMatchesArray.h
r210844 r211110 81 81 82 82 if (UNLIKELY(globalObject->isHavingABadTime())) { 83 array = JSArray::tryCreate Uninitialized(vm, &deferralContext, globalObject->regExpMatchesArrayStructure(), numSubpatterns + 1);83 array = JSArray::tryCreateForInitializationPrivate(vm, &deferralContext, globalObject->regExpMatchesArrayStructure(), numSubpatterns + 1); 84 84 85 85 setProperties();
Note:
See TracChangeset
for help on using the changeset viewer.