WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
152706
[ES6] Arrays should be subclassable.
https://bugs.webkit.org/show_bug.cgi?id=152706
Summary
[ES6] Arrays should be subclassable.
Keith Miller
Reported
2016-01-04 12:14:49 PST
This patch allows for subclassing JS Arrays with the correct prototype chain on the created objects.
Attachments
Patch
(15.98 KB, patch)
2016-01-04 13:01 PST
,
Keith Miller
no flags
Details
Formatted Diff
Diff
Patch
(16.84 KB, patch)
2016-01-04 17:07 PST
,
Keith Miller
no flags
Details
Formatted Diff
Diff
Patch
(18.22 KB, patch)
2016-01-05 12:03 PST
,
Keith Miller
no flags
Details
Formatted Diff
Diff
Patch
(18.41 KB, patch)
2016-01-05 12:53 PST
,
Keith Miller
benjamin
: review+
Details
Formatted Diff
Diff
Benchmark results
(64.33 KB, text/plain)
2016-01-05 14:12 PST
,
Keith Miller
no flags
Details
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Keith Miller
Comment 1
2016-01-04 13:01:32 PST
Created
attachment 268225
[details]
Patch
Geoffrey Garen
Comment 2
2016-01-04 15:16:47 PST
Last 500 characters of output: "__ZN3JSC12PrototypeMap12addPrototypeEPNS_8JSObjectE", referenced from: __ZNK3JSC14JSGlobalObject45arrayStructureForIndexingTypeDuringAllocationERNS_2VMEhNS_7JSValueE in IDBBindingUtilities.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
Keith Miller
Comment 3
2016-01-04 17:07:13 PST
Created
attachment 268250
[details]
Patch
Keith Miller
Comment 4
2016-01-05 12:03:20 PST
Created
attachment 268301
[details]
Patch
Geoffrey Garen
Comment 5
2016-01-05 12:45:28 PST
JSCBuiltins.cpp Creating library C:/cygwin/home/buildbot/WebKit/WebKitBuild/Release/lib32/JavaScriptCore.lib and object C:/cygwin/home/buildbot/WebKit/WebKitBuild/Release/lib32/JavaScriptCore.exp AdaptiveInferredPropertyValueWatchpointBase.obj : error LNK2019: unresolved external symbol "public: __thiscall JSC::JSValue::operator bool(void)const " (??BJSValue@JSC@@QBE_NXZ) referenced in function "public: static class JSC::Structure * __cdecl JSC::Structure::createSubclassStructure(class JSC::VM &,class JSC::Structure *,class JSC::JSValue)" (?createSubclassStructure@Structure@JSC@@SAPAV12@AAVVM@
2@PAV12@VJSValue@2@@Z
) [C:\cygwin\home\buildbot\WebKit\WebKitBuild\Release\Source\JavaScriptCore\JavaScriptCore.vcxproj] AdaptiveInferredPropertyValueWatchpointBase.obj : error LNK2019: unresolved external symbol "public: class JSC::JSObject * __thiscall JSC::JSValue::getObject(void)const " (?getObject@JSValue@JSC@@QBEPAVJSObject@
2@XZ
) referenced in function "public: static class JSC::Structure * __cdecl JSC::Structure::createSubclassStructure(class JSC::VM &,class JSC::Structure *,class JSC::JSValue)" (?createSubclassStructure@Structure@JSC@@SAPAV12@AAVVM@
2@PAV12@VJSValue@2@@Z
) [C:\cygwin\home\buildbot\WebKit\WebKitBuild\Release\Source\JavaScriptCore\JavaScriptCore.vcxproj] C:\cygwin\home\buildbot\WebKit\WebKitBuild\Release\bin32\JavaScriptCore.dll : fatal error LNK1120: 2 unresolved externals [C:\cygwin\home\buildbot\WebKit\WebKitBuild\Release\Source\JavaScriptCore\JavaScriptCore.vcxproj] Generating ../../DerivedSources/WebKit/autoversion.h
Keith Miller
Comment 6
2016-01-05 12:53:05 PST
Created
attachment 268314
[details]
Patch
Keith Miller
Comment 7
2016-01-05 12:54:09 PST
Hopefully, including JSCJSValueInlines.h fixes the problem but the patch should be done other than the windows build issue.
Keith Miller
Comment 8
2016-01-05 14:12:55 PST
Created
attachment 268324
[details]
Benchmark results
Benjamin Poulain
Comment 9
2016-01-05 14:14:42 PST
Comment on
attachment 268314
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=268314&action=review
> Source/JavaScriptCore/runtime/JSGlobalObject.h:732 > + return ArrayAllocationProfile::updateLastAllocationFor(profile, JSArray::create(vm, initialLength >= MIN_ARRAY_STORAGE_CONSTRUCTION_LENGTH ? globalObject->arrayStructureForIndexingTypeDuringAllocation(vm, ArrayWithArrayStorage, prototype) : globalObject->arrayStructureForProfileDuringAllocation(vm, profile, prototype), initialLength));
Please split this over multiple lines. The ternary operator is a bit messy on this line.
Keith Miller
Comment 10
2016-01-05 14:15:35 PST
Comment on
attachment 268314
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=268314&action=review
>> Source/JavaScriptCore/runtime/JSGlobalObject.h:732 >> + return ArrayAllocationProfile::updateLastAllocationFor(profile, JSArray::create(vm, initialLength >= MIN_ARRAY_STORAGE_CONSTRUCTION_LENGTH ? globalObject->arrayStructureForIndexingTypeDuringAllocation(vm, ArrayWithArrayStorage, prototype) : globalObject->arrayStructureForProfileDuringAllocation(vm, profile, prototype), initialLength)); > > Please split this over multiple lines. The ternary operator is a bit messy on this line.
Fair point. Fixed.
Keith Miller
Comment 11
2016-01-05 14:50:05 PST
Committed
r194612
: <
http://trac.webkit.org/changeset/194612
>
Alexey Shvayka
Comment 12
2020-03-10 15:31:31 PDT
***
Bug 145155
has been marked as a duplicate of this bug. ***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug