[ES6] Boolean, Number, Map, RegExp, and Set should be subclassable
Created attachment 268351 [details] Patch
Comment on attachment 268351 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=268351&action=review > Source/JavaScriptCore/tests/es6.yaml:1090 > + cmd: runES6 :normal For some reason the other subclassing tests were already marked as passing. I'm not sure why.
Comment on attachment 268351 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=268351&action=review r=me with suggested changes. > Source/JavaScriptCore/runtime/BooleanConstructor.cpp:3 > - * Copyright (C) 2003, 2008 Apple Inc. All rights reserved. > + * Copyright (C) 2003-2016 Apple Inc. All rights reserved. I think you just want to add ", 2016" and not change it to a year range. > Source/JavaScriptCore/runtime/BooleanConstructor.h:3 > - * Copyright (C) 2008 Apple Inc. All rights reserved. > + * Copyright (C) 2008-2016 Apple Inc. All rights reserved. ditto > Source/JavaScriptCore/runtime/MapConstructor.cpp:2 > - * Copyright (C) 2013 Apple Inc. All rights reserved. > + * Copyright (C) 2013-2016 Apple Inc. All rights reserved. ditto > Source/JavaScriptCore/runtime/NumberConstructor.cpp:3 > - * Copyright (C) 2007, 2008, 2011, 2015 Apple Inc. All rights reserved. > + * Copyright (C) 2007-2016 Apple Inc. All rights reserved. ditto > Source/JavaScriptCore/runtime/RegExpConstructor.cpp:3 > - * Copyright (C) 2003, 2007, 2008 Apple Inc. All Rights Reserved. > + * Copyright (C) 2003-2016 Apple Inc. All Rights Reserved. ditto > Source/JavaScriptCore/runtime/SetConstructor.cpp:2 > - * Copyright (C) 2013 Apple Inc. All rights reserved. > + * Copyright (C) 2013-2016 Apple Inc. All rights reserved. ditto
Comment on attachment 268351 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=268351&action=review >> Source/JavaScriptCore/runtime/BooleanConstructor.cpp:3 >> + * Copyright (C) 2003-2016 Apple Inc. All rights reserved. > > I think you just want to add ", 2016" and not change it to a year range. Fixed. >> Source/JavaScriptCore/runtime/BooleanConstructor.h:3 >> + * Copyright (C) 2008-2016 Apple Inc. All rights reserved. > > ditto Fixed. >> Source/JavaScriptCore/runtime/MapConstructor.cpp:2 >> + * Copyright (C) 2013-2016 Apple Inc. All rights reserved. > > ditto Fixed. >> Source/JavaScriptCore/runtime/NumberConstructor.cpp:3 >> + * Copyright (C) 2007-2016 Apple Inc. All rights reserved. > > ditto Fixed. >> Source/JavaScriptCore/runtime/RegExpConstructor.cpp:3 >> + * Copyright (C) 2003-2016 Apple Inc. All Rights Reserved. > > ditto Fixed. >> Source/JavaScriptCore/runtime/SetConstructor.cpp:2 >> + * Copyright (C) 2013-2016 Apple Inc. All rights reserved. > > ditto Fixed.
Committed r194643: <http://trac.webkit.org/changeset/194643>
Comment on attachment 268351 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=268351&action=review > Source/JavaScriptCore/runtime/BooleanConstructor.cpp:53 > + JSValue prototype = JSValue(); This is the same thing as: JSValue prototype; Just more wordy. Would be nice to clean that up. > Source/JavaScriptCore/runtime/MapConstructor.cpp:56 > + JSValue prototype = JSValue(); Ditto. > Source/JavaScriptCore/runtime/NumberConstructor.cpp:85 > + JSValue prototype = JSValue(); Ditto. > Source/JavaScriptCore/runtime/SetConstructor.cpp:57 > + JSValue prototype = JSValue(); Ditto.
Comment on attachment 268351 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=268351&action=review >> Source/JavaScriptCore/runtime/BooleanConstructor.cpp:53 >> + JSValue prototype = JSValue(); > > This is the same thing as: > > JSValue prototype; > > Just more wordy. Would be nice to clean that up. I actually moved all the new.target.prototype stuff into a helper function in <http://trac.webkit.org/changeset/194863>. So it's already gone but I will look through some of my other patches and see if I put "JSValue prototype = JSValue();" anywhere else.