Diff
Modified: trunk/Source/_javascript_Core/CMakeLists.txt (202026 => 202027)
--- trunk/Source/_javascript_Core/CMakeLists.txt 2016-06-14 06:04:29 UTC (rev 202026)
+++ trunk/Source/_javascript_Core/CMakeLists.txt 2016-06-14 06:04:32 UTC (rev 202027)
@@ -685,10 +685,10 @@
runtime/JSArrayBufferView.cpp
runtime/JSArrayIterator.cpp
runtime/JSBoundFunction.cpp
- runtime/JSBoundSlotBaseFunction.cpp
runtime/JSCJSValue.cpp
runtime/JSCallee.cpp
runtime/JSCell.cpp
+ runtime/JSCustomGetterSetterFunction.cpp
runtime/JSDataView.cpp
runtime/JSDataViewPrototype.cpp
runtime/JSDateMath.cpp
Modified: trunk/Source/_javascript_Core/ChangeLog (202026 => 202027)
--- trunk/Source/_javascript_Core/ChangeLog 2016-06-14 06:04:29 UTC (rev 202026)
+++ trunk/Source/_javascript_Core/ChangeLog 2016-06-14 06:04:32 UTC (rev 202027)
@@ -1,3 +1,74 @@
+2016-06-13 Gavin & Ellie Barraclough <[email protected]>
+
+ JSBoundSlotBaseFunction no longer binds slot base
+ https://bugs.webkit.org/show_bug.cgi?id=157978
+
+ Reviewed by Geoff Garen.
+
+ This class is basically currently named after a bug. We should never have
+ been binding function to slot bases - this was not ever correct behavior.
+ This was fixed earlier in the year, but there is still some cruft including
+ the class name to clean up.
+
+ - renamed JSBoundSlotBaseFunction -> JSCustomGetterSetterFunction
+ - removed m_boundSlotBase - don't retain the original slot base
+ (we were not really using it anyway).
+ - ASSERT customGetterSetter->getter/setter are non-null, rather than checking.
+ - Store the PropertyName such that we can pass this to the getter
+ (we're currently reperforming the String->Identifier conversion every time).
+ - Removed JSFunction::lookUpOrCreateNativeExecutable - this is just overhead,
+ and not used consistently.
+
+ * CMakeLists.txt:
+ * _javascript_Core.xcodeproj/project.pbxproj:
+ * runtime/JSBoundSlotBaseFunction.cpp: Removed.
+ * runtime/JSBoundSlotBaseFunction.h: Removed.
+ - JSBoundSlotBaseFunction -> JSCustomGetterSetterFunction
+ * runtime/JSCustomGetterSetterFunction.cpp: Copied from Source/_javascript_Core/runtime/JSBoundSlotBaseFunction.cpp.
+ (JSC::JSCustomGetterSetterFunction::customGetterSetterFunctionCall):
+ - made a static function on JSCustomGetterSetterFunction such that accessor
+ to member properties could be made private. Call variant of callCustomSetter
+ that does not require slotBase, ASSERT getter/setter present, pass stored
+ PropertyName to getter.
+ (JSC::JSCustomGetterSetterFunction::JSCustomGetterSetterFunction):
+ - renamed, store propertyName.
+ (JSC::JSCustomGetterSetterFunction::create):
+ - use same function name to Executable as is being passed to Function::finishCreation.
+ (JSC::JSCustomGetterSetterFunction::visitChildren):
+ (JSC::JSCustomGetterSetterFunction::finishCreation):
+ - removed m_boundSlotBase.
+ * runtime/JSCustomGetterSetterFunction.h: Copied from Source/_javascript_Core/runtime/JSBoundSlotBaseFunction.h.
+ (JSC::JSCustomGetterSetterFunction::customGetterSetter):
+ (JSC::JSCustomGetterSetterFunction::isSetter):
+ - made private.
+ (JSC::JSCustomGetterSetterFunction::propertyName):
+ - new accessor.
+ (JSC::JSBoundSlotBaseFunction::boundSlotBase): Deleted.
+ - removed.
+ * runtime/JSFunction.cpp:
+ (JSC::JSFunction::create):
+ (JSC::JSFunction::lookUpOrCreateNativeExecutable): Deleted.
+ - removed lookUpOrCreateNativeExecutable. This inconsistently used wrapper was providing no value, only bloat.
+ * runtime/JSFunction.h:
+ * runtime/JSGlobalObject.cpp:
+ (JSC::JSGlobalObject::init):
+ (JSC::JSGlobalObject::visitChildren):
+ - renamed JSBoundSlotBaseFunction -> JSCustomGetterSetterFunction, etc.
+ * runtime/JSGlobalObject.h:
+ (JSC::JSGlobalObject::customGetterSetterFunctionStructure):
+ (JSC::JSGlobalObject::boundSlotBaseFunctionStructure): Deleted.
+ - renamed JSBoundSlotBaseFunction -> JSCustomGetterSetterFunction, etc.
+ * runtime/JSNativeStdFunction.cpp:
+ (JSC::JSNativeStdFunction::create):
+ - removed lookUpOrCreateNativeExecutable.
+ * runtime/JSObject.cpp:
+ (JSC::getCustomGetterSetterFunctionForGetterSetter):
+ (JSC::JSObject::getOwnPropertyDescriptor):
+ (JSC::getBoundSlotBaseFunctionForGetterSetter): Deleted.
+ - renamed JSBoundSlotBaseFunction -> JSCustomGetterSetterFunction, etc.
+ * runtime/VM.h:
+ - renamed JSBoundSlotBaseFunction -> JSCustomGetterSetterFunction, etc.
+
2016-06-13 Saam Barati <[email protected]>
The sampling profiler should further protect itself against certain forms of sampling bias that arise due to the sampling interval being in sync with some other system process
Modified: trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj (202026 => 202027)
--- trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj 2016-06-14 06:04:29 UTC (rev 202026)
+++ trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj 2016-06-14 06:04:32 UTC (rev 202027)
@@ -1157,8 +1157,6 @@
43C392AB1C3BEB0500241F53 /* AssemblerCommon.h in Headers */ = {isa = PBXBuildFile; fileRef = 43C392AA1C3BEB0000241F53 /* AssemblerCommon.h */; settings = {ATTRIBUTES = (Private, ); }; };
4443AE3316E188D90076F110 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 51F0EB6105C86C6B00E6DF1B /* Foundation.framework */; };
451539B912DC994500EF7AC4 /* Yarr.h in Headers */ = {isa = PBXBuildFile; fileRef = 451539B812DC994500EF7AC4 /* Yarr.h */; settings = {ATTRIBUTES = (Private, ); }; };
- 46D4DCBD1C5AB2D500D8D321 /* JSBoundSlotBaseFunction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46D4DCBB1C5AB2D500D8D321 /* JSBoundSlotBaseFunction.cpp */; };
- 46D4DCBE1C5AB2D500D8D321 /* JSBoundSlotBaseFunction.h in Headers */ = {isa = PBXBuildFile; fileRef = 46D4DCBC1C5AB2D500D8D321 /* JSBoundSlotBaseFunction.h */; };
52678F8E1A031009006A306D /* BasicBlockLocation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 52678F8C1A031009006A306D /* BasicBlockLocation.cpp */; };
52678F8F1A031009006A306D /* BasicBlockLocation.h in Headers */ = {isa = PBXBuildFile; fileRef = 52678F8D1A031009006A306D /* BasicBlockLocation.h */; settings = {ATTRIBUTES = (Private, ); }; };
52678F911A04177C006A306D /* ControlFlowProfiler.h in Headers */ = {isa = PBXBuildFile; fileRef = 52678F901A04177C006A306D /* ControlFlowProfiler.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -1272,6 +1270,8 @@
70ECA6071AFDBEA200449739 /* TemplateRegistry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 70ECA6021AFDBEA200449739 /* TemplateRegistry.cpp */; };
70ECA6081AFDBEA200449739 /* TemplateRegistry.h in Headers */ = {isa = PBXBuildFile; fileRef = 70ECA6031AFDBEA200449739 /* TemplateRegistry.h */; settings = {ATTRIBUTES = (Private, ); }; };
70ECA6091AFDBEA200449739 /* TemplateRegistryKey.h in Headers */ = {isa = PBXBuildFile; fileRef = 70ECA6041AFDBEA200449739 /* TemplateRegistryKey.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 72AAF7CD1D0D31B3005E60BE /* JSCustomGetterSetterFunction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 72AAF7CB1D0D318B005E60BE /* JSCustomGetterSetterFunction.cpp */; };
+ 72AAF7CE1D0D31B3005E60BE /* JSCustomGetterSetterFunction.h in Headers */ = {isa = PBXBuildFile; fileRef = 72AAF7CC1D0D318B005E60BE /* JSCustomGetterSetterFunction.h */; };
79160DBD1C8E3EC8008C085A /* ProxyRevoke.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 79160DBB1C8E3EC8008C085A /* ProxyRevoke.cpp */; };
79160DBE1C8E3EC8008C085A /* ProxyRevoke.h in Headers */ = {isa = PBXBuildFile; fileRef = 79160DBC1C8E3EC8008C085A /* ProxyRevoke.h */; settings = {ATTRIBUTES = (Private, ); }; };
792CB3491C4EED5C00D13AF3 /* PCToCodeOriginMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 792CB3471C4EED5C00D13AF3 /* PCToCodeOriginMap.cpp */; };
@@ -3295,8 +3295,6 @@
449097EE0F8F81B50076A327 /* FeatureDefines.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = FeatureDefines.xcconfig; sourceTree = "<group>"; };
451539B812DC994500EF7AC4 /* Yarr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Yarr.h; path = yarr/Yarr.h; sourceTree = "<group>"; };
45E12D8806A49B0F00E9DF84 /* jsc.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = jsc.cpp; sourceTree = "<group>"; tabWidth = 4; };
- 46D4DCBB1C5AB2D500D8D321 /* JSBoundSlotBaseFunction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSBoundSlotBaseFunction.cpp; sourceTree = "<group>"; };
- 46D4DCBC1C5AB2D500D8D321 /* JSBoundSlotBaseFunction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSBoundSlotBaseFunction.h; sourceTree = "<group>"; };
51F0EB6105C86C6B00E6DF1B /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
51F0EC0705C86C9A00E6DF1B /* libobjc.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libobjc.dylib; path = /usr/lib/libobjc.dylib; sourceTree = "<absolute>"; };
52678F8C1A031009006A306D /* BasicBlockLocation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BasicBlockLocation.cpp; sourceTree = "<group>"; };
@@ -3453,6 +3451,8 @@
70ECA6021AFDBEA200449739 /* TemplateRegistry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TemplateRegistry.cpp; sourceTree = "<group>"; };
70ECA6031AFDBEA200449739 /* TemplateRegistry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TemplateRegistry.h; sourceTree = "<group>"; };
70ECA6041AFDBEA200449739 /* TemplateRegistryKey.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TemplateRegistryKey.h; sourceTree = "<group>"; };
+ 72AAF7CB1D0D318B005E60BE /* JSCustomGetterSetterFunction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCustomGetterSetterFunction.cpp; sourceTree = "<group>"; };
+ 72AAF7CC1D0D318B005E60BE /* JSCustomGetterSetterFunction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCustomGetterSetterFunction.h; sourceTree = "<group>"; };
79160DBB1C8E3EC8008C085A /* ProxyRevoke.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ProxyRevoke.cpp; sourceTree = "<group>"; };
79160DBC1C8E3EC8008C085A /* ProxyRevoke.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProxyRevoke.h; sourceTree = "<group>"; };
792CB3471C4EED5C00D13AF3 /* PCToCodeOriginMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PCToCodeOriginMap.cpp; sourceTree = "<group>"; };
@@ -5708,8 +5708,6 @@
A7BDAEC517F4EA1400F6140C /* JSArrayIterator.h */,
86FA9E8F142BBB2D001773B7 /* JSBoundFunction.cpp */,
86FA9E90142BBB2E001773B7 /* JSBoundFunction.h */,
- 46D4DCBB1C5AB2D500D8D321 /* JSBoundSlotBaseFunction.cpp */,
- 46D4DCBC1C5AB2D500D8D321 /* JSBoundSlotBaseFunction.h */,
657CF45619BF6662004ACBF2 /* JSCallee.cpp */,
657CF45719BF6662004ACBF2 /* JSCallee.h */,
BC7F8FBA0E19D1EF008632C0 /* JSCell.cpp */,
@@ -5719,6 +5717,8 @@
F692A8870255597D01FF60F7 /* JSCJSValue.cpp */,
14ABB36E099C076400E2A24F /* JSCJSValue.h */,
865A30F0135007E100CDB49E /* JSCJSValueInlines.h */,
+ 72AAF7CB1D0D318B005E60BE /* JSCustomGetterSetterFunction.cpp */,
+ 72AAF7CC1D0D318B005E60BE /* JSCustomGetterSetterFunction.h */,
0F2B66BD17B6B5AB00A7AE3F /* JSDataView.cpp */,
0F2B66BE17B6B5AB00A7AE3F /* JSDataView.h */,
0F2B66BF17B6B5AB00A7AE3F /* JSDataViewPrototype.cpp */,
@@ -7353,6 +7353,7 @@
A741017F179DAF80002EB8BA /* DFGSaneStringGetByValSlowPathGenerator.h in Headers */,
0F2FCCFD18A60070001A27F8 /* DFGScannable.h in Headers */,
86ECA3FA132DF25A002B2AD7 /* DFGScoreBoard.h in Headers */,
+ 72AAF7CE1D0D31B3005E60BE /* JSCustomGetterSetterFunction.h in Headers */,
0F1E3A67153A21E2000F9456 /* DFGSilentRegisterSavePlan.h in Headers */,
0FFB921D16D02F300055A5DB /* DFGSlowPathGenerator.h in Headers */,
86EC9DD31328DF82002B2AD7 /* DFGSpeculativeJIT.h in Headers */,
@@ -7978,7 +7979,6 @@
A5FD0070189B00AA00633231 /* ScriptCallStack.h in Headers */,
A5FD007E189B0B4C00633231 /* ScriptCallStackFactory.h in Headers */,
A503FA22188EFF6800110F14 /* ScriptDebugListener.h in Headers */,
- 46D4DCBE1C5AB2D500D8D321 /* JSBoundSlotBaseFunction.h in Headers */,
A503FA26188EFFFD00110F14 /* ScriptDebugServer.h in Headers */,
A55D93A6185012A800400DED /* ScriptFunctionCall.h in Headers */,
A54CF2FA184EAEDA00237F19 /* ScriptObject.h in Headers */,
@@ -8852,7 +8852,6 @@
0F1725FF1B48719A00AC3A55 /* DFGMinifiedGraph.cpp in Sources */,
0F2BDC4D1522818600CD8910 /* DFGMinifiedNode.cpp in Sources */,
0F8F14351ADF090100ED792C /* DFGMovHintRemovalPhase.cpp in Sources */,
- 46D4DCBD1C5AB2D500D8D321 /* JSBoundSlotBaseFunction.cpp in Sources */,
0FF2CD5B1B61A4F8004955A8 /* DFGMultiGetByOffsetData.cpp in Sources */,
A737810D1799EA2E00817533 /* DFGNaturalLoops.cpp in Sources */,
79B00CBE1C6AB07E0088C65D /* ProxyObject.cpp in Sources */,
@@ -9256,6 +9255,7 @@
0FF9CE731B9CD6D0004EDCA6 /* PolymorphicAccess.cpp in Sources */,
0FE834171A6EF97B00D04847 /* PolymorphicCallStubRoutine.cpp in Sources */,
0F338E141BF0276C0013C88F /* B3ValueKey.cpp in Sources */,
+ 72AAF7CD1D0D31B3005E60BE /* JSCustomGetterSetterFunction.cpp in Sources */,
0F98206016BFE38100240D02 /* PreciseJumpTargets.cpp in Sources */,
0FF729AD166AD35C000F5BA3 /* ProfilerBytecode.cpp in Sources */,
0FF729AE166AD35C000F5BA3 /* ProfilerBytecodes.cpp in Sources */,
Deleted: trunk/Source/_javascript_Core/runtime/JSBoundSlotBaseFunction.cpp (202026 => 202027)
--- trunk/Source/_javascript_Core/runtime/JSBoundSlotBaseFunction.cpp 2016-06-14 06:04:29 UTC (rev 202026)
+++ trunk/Source/_javascript_Core/runtime/JSBoundSlotBaseFunction.cpp 2016-06-14 06:04:32 UTC (rev 202027)
@@ -1,96 +0,0 @@
-/*
- * Copyright (C) 2015, 2016 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "JSBoundSlotBaseFunction.h"
-
-#include "CustomGetterSetter.h"
-#include "GetterSetter.h"
-#include "JSCInlines.h"
-#include "JSGlobalObject.h"
-
-namespace JSC {
-
-const ClassInfo JSBoundSlotBaseFunction::s_info = { "Function", &Base::s_info, 0, CREATE_METHOD_TABLE(JSBoundSlotBaseFunction) };
-
-EncodedJSValue JSC_HOST_CALL boundSlotBaseFunctionCall(ExecState* exec)
-{
- JSBoundSlotBaseFunction* boundSlotBaseFunction = jsCast<JSBoundSlotBaseFunction*>(exec->callee());
- JSObject* baseObject = boundSlotBaseFunction->boundSlotBase();
- CustomGetterSetter* customGetterSetter = boundSlotBaseFunction->customGetterSetter();
-
- if (boundSlotBaseFunction->isSetter()) {
- callCustomSetter(exec, customGetterSetter, true, baseObject, exec->thisValue(), exec->argument(0));
- return JSValue::encode(jsUndefined());
- }
-
- CustomGetterSetter::CustomGetter getter = customGetterSetter->getter();
- if (!getter)
- return JSValue::encode(jsUndefined());
-
- const String& name = boundSlotBaseFunction->name();
- return getter(exec, JSValue::encode(exec->thisValue()), PropertyName(Identifier::fromString(exec, name)));
-}
-
-JSBoundSlotBaseFunction::JSBoundSlotBaseFunction(VM& vm, JSGlobalObject* globalObject, Structure* structure, const Type type)
- : Base(vm, globalObject, structure)
- , m_type(type)
-{
-}
-
-JSBoundSlotBaseFunction* JSBoundSlotBaseFunction::create(VM& vm, JSGlobalObject* globalObject, JSObject* boundSlotBase, CustomGetterSetter* getterSetter, const Type type, const String& name)
-{
- NativeExecutable* executable = vm.getHostFunction(boundSlotBaseFunctionCall, callHostFunctionAsConstructor, name);
-
- Structure* structure = globalObject->boundSlotBaseFunctionStructure();
- JSBoundSlotBaseFunction* function = new (NotNull, allocateCell<JSBoundSlotBaseFunction>(vm.heap)) JSBoundSlotBaseFunction(vm, globalObject, structure, type);
-
- // Can't do this during initialization because getHostFunction might do a GC allocation.
- const char* prefix = (type == Type::Getter) ? "get " : "set ";
- function->finishCreation(vm, executable, boundSlotBase, getterSetter, makeString(prefix, name));
- return function;
-}
-
-void JSBoundSlotBaseFunction::visitChildren(JSCell* cell, SlotVisitor& visitor)
-{
- JSBoundSlotBaseFunction* thisObject = jsCast<JSBoundSlotBaseFunction*>(cell);
- ASSERT_GC_OBJECT_INHERITS(thisObject, info());
- Base::visitChildren(thisObject, visitor);
-
- visitor.append(&thisObject->m_boundSlotBase);
- visitor.append(&thisObject->m_getterSetter);
-}
-
-void JSBoundSlotBaseFunction::finishCreation(VM& vm, NativeExecutable* executable, JSObject* boundSlotBase, CustomGetterSetter* getterSetter, const String& name)
-{
- Base::finishCreation(vm, executable, isSetter(), name);
- ASSERT(inherits(info()));
- ASSERT(boundSlotBase);
- ASSERT(getterSetter);
- m_boundSlotBase.set(vm, this, boundSlotBase);
- m_getterSetter.set(vm, this, getterSetter);
-}
-
-} // namespace JSC
Deleted: trunk/Source/_javascript_Core/runtime/JSBoundSlotBaseFunction.h (202026 => 202027)
--- trunk/Source/_javascript_Core/runtime/JSBoundSlotBaseFunction.h 2016-06-14 06:04:29 UTC (rev 202026)
+++ trunk/Source/_javascript_Core/runtime/JSBoundSlotBaseFunction.h 2016-06-14 06:04:32 UTC (rev 202027)
@@ -1,75 +0,0 @@
-/*
- * Copyright (C) 2015, 2016 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef JSBoundSlotBaseFunction_h
-#define JSBoundSlotBaseFunction_h
-
-#include "JSFunction.h"
-
-namespace JSC {
-
-class CustomGetterSetter;
-
-EncodedJSValue JSC_HOST_CALL boundSlotBaseFunctionCall(ExecState*);
-
-class JSBoundSlotBaseFunction : public JSFunction {
-public:
- typedef JSFunction Base;
-
- // The Type is set to the number of arguments the resultant function will have.
- enum class Type { Getter = 0, Setter = 1 };
-
- static const unsigned StructureFlags = Base::StructureFlags;
-
- static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype)
- {
- ASSERT(globalObject);
- return Structure::create(vm, globalObject, prototype, TypeInfo(JSFunctionType, StructureFlags), info());
- }
-
- static JSBoundSlotBaseFunction* create(VM&, JSGlobalObject*, JSObject*, CustomGetterSetter*, const Type, const String&);
-
- JSObject* boundSlotBase() const { return m_boundSlotBase.get(); }
- CustomGetterSetter* customGetterSetter() const { return m_getterSetter.get(); }
- bool isSetter() const { return m_type == Type::Setter; }
-
- DECLARE_EXPORT_INFO;
-
-protected:
- static void visitChildren(JSCell*, SlotVisitor&);
-
-private:
- JSBoundSlotBaseFunction(VM&, JSGlobalObject*, Structure*, Type);
-
- void finishCreation(VM&, NativeExecutable*, JSObject*, CustomGetterSetter*, const String&);
-
- WriteBarrier<JSObject> m_boundSlotBase;
- WriteBarrier<CustomGetterSetter> m_getterSetter;
- Type m_type;
-};
-
-} // namespace JSC
-
-#endif // JSBoundSlotBaseFunction_h
Copied: trunk/Source/_javascript_Core/runtime/JSCustomGetterSetterFunction.cpp (from rev 201951, trunk/Source/_javascript_Core/runtime/JSBoundSlotBaseFunction.cpp) (0 => 202027)
--- trunk/Source/_javascript_Core/runtime/JSCustomGetterSetterFunction.cpp (rev 0)
+++ trunk/Source/_javascript_Core/runtime/JSCustomGetterSetterFunction.cpp 2016-06-14 06:04:32 UTC (rev 202027)
@@ -0,0 +1,96 @@
+/*
+ * Copyright (C) 2015, 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "JSCustomGetterSetterFunction.h"
+
+#include "CustomGetterSetter.h"
+#include "GetterSetter.h"
+#include "JSCInlines.h"
+#include "JSGlobalObject.h"
+
+namespace JSC {
+
+const ClassInfo JSCustomGetterSetterFunction::s_info = { "Function", &Base::s_info, 0, CREATE_METHOD_TABLE(JSCustomGetterSetterFunction) };
+
+EncodedJSValue JSC_HOST_CALL JSCustomGetterSetterFunction::customGetterSetterFunctionCall(ExecState* exec)
+{
+ JSCustomGetterSetterFunction* customGetterSetterFunction = jsCast<JSCustomGetterSetterFunction*>(exec->callee());
+ CustomGetterSetter* customGetterSetter = customGetterSetterFunction->customGetterSetter();
+
+ if (customGetterSetterFunction->isSetter()) {
+ CustomGetterSetter::CustomSetter setter = customGetterSetter->setter();
+ ASSERT(setter);
+ callCustomSetter(exec, setter, true, exec->thisValue(), exec->argument(0));
+ return JSValue::encode(jsUndefined());
+ }
+
+ CustomGetterSetter::CustomGetter getter = customGetterSetter->getter();
+ ASSERT(getter);
+ return getter(exec, JSValue::encode(exec->thisValue()), customGetterSetterFunction->propertyName());
+}
+
+JSCustomGetterSetterFunction::JSCustomGetterSetterFunction(VM& vm, JSGlobalObject* globalObject, Structure* structure, const Type type, const PropertyName& propertyName)
+ : Base(vm, globalObject, structure)
+ , m_type(type)
+ , m_propertyName(propertyName)
+{
+}
+
+JSCustomGetterSetterFunction* JSCustomGetterSetterFunction::create(VM& vm, JSGlobalObject* globalObject, CustomGetterSetter* getterSetter, const Type type, const PropertyName& propertyName)
+{
+ ASSERT(type == Type::Getter ? !!getterSetter->getter() : !!getterSetter->setter());
+
+ const char* prefix = (type == Type::Getter) ? "get " : "set ";
+ String name = makeString(prefix, String(propertyName.publicName()));
+
+ NativeExecutable* executable = vm.getHostFunction(customGetterSetterFunctionCall, callHostFunctionAsConstructor, String(propertyName.publicName()));
+
+ Structure* structure = globalObject->customGetterSetterFunctionStructure();
+ JSCustomGetterSetterFunction* function = new (NotNull, allocateCell<JSCustomGetterSetterFunction>(vm.heap)) JSCustomGetterSetterFunction(vm, globalObject, structure, type, propertyName);
+
+ // Can't do this during initialization because getHostFunction might do a GC allocation.
+ function->finishCreation(vm, executable, getterSetter, name);
+ return function;
+}
+
+void JSCustomGetterSetterFunction::visitChildren(JSCell* cell, SlotVisitor& visitor)
+{
+ JSCustomGetterSetterFunction* thisObject = jsCast<JSCustomGetterSetterFunction*>(cell);
+ ASSERT_GC_OBJECT_INHERITS(thisObject, info());
+ Base::visitChildren(thisObject, visitor);
+
+ visitor.append(&thisObject->m_getterSetter);
+}
+
+void JSCustomGetterSetterFunction::finishCreation(VM& vm, NativeExecutable* executable, CustomGetterSetter* getterSetter, const String& name)
+{
+ Base::finishCreation(vm, executable, isSetter(), name);
+ ASSERT(inherits(info()));
+ ASSERT(getterSetter);
+ m_getterSetter.set(vm, this, getterSetter);
+}
+
+} // namespace JSC
Copied: trunk/Source/_javascript_Core/runtime/JSCustomGetterSetterFunction.h (from rev 201951, trunk/Source/_javascript_Core/runtime/JSBoundSlotBaseFunction.h) (0 => 202027)
--- trunk/Source/_javascript_Core/runtime/JSCustomGetterSetterFunction.h (rev 0)
+++ trunk/Source/_javascript_Core/runtime/JSCustomGetterSetterFunction.h 2016-06-14 06:04:32 UTC (rev 202027)
@@ -0,0 +1,74 @@
+/*
+ * Copyright (C) 2015, 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef JSCustomGetterSetterFunction_h
+#define JSCustomGetterSetterFunction_h
+
+#include "JSFunction.h"
+
+namespace JSC {
+
+class CustomGetterSetter;
+
+class JSCustomGetterSetterFunction : public JSFunction {
+public:
+ typedef JSFunction Base;
+
+ // The Type is set to the number of arguments the resultant function will have.
+ enum class Type { Getter = 0, Setter = 1 };
+
+ static const unsigned StructureFlags = Base::StructureFlags;
+
+ static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype)
+ {
+ ASSERT(globalObject);
+ return Structure::create(vm, globalObject, prototype, TypeInfo(JSFunctionType, StructureFlags), info());
+ }
+
+ static JSCustomGetterSetterFunction* create(VM&, JSGlobalObject*, CustomGetterSetter*, const Type, const PropertyName&);
+
+ DECLARE_EXPORT_INFO;
+
+protected:
+ static void visitChildren(JSCell*, SlotVisitor&);
+
+private:
+ JSCustomGetterSetterFunction(VM&, JSGlobalObject*, Structure*, Type, const PropertyName&);
+ void finishCreation(VM&, NativeExecutable*, CustomGetterSetter*, const String&);
+
+ static EncodedJSValue JSC_HOST_CALL customGetterSetterFunctionCall(ExecState*);
+
+ CustomGetterSetter* customGetterSetter() const { return m_getterSetter.get(); }
+ bool isSetter() const { return m_type == Type::Setter; }
+ const PropertyName& propertyName() const { return m_propertyName; }
+
+ WriteBarrier<CustomGetterSetter> m_getterSetter;
+ Type m_type;
+ PropertyName m_propertyName;
+};
+
+} // namespace JSC
+
+#endif // JSCustomGetterSetterFunction_h
Modified: trunk/Source/_javascript_Core/runtime/JSFunction.cpp (202026 => 202027)
--- trunk/Source/_javascript_Core/runtime/JSFunction.cpp 2016-06-14 06:04:29 UTC (rev 202026)
+++ trunk/Source/_javascript_Core/runtime/JSFunction.cpp 2016-06-14 06:04:32 UTC (rev 202027)
@@ -82,14 +82,9 @@
}
#endif
-NativeExecutable* JSFunction::lookUpOrCreateNativeExecutable(VM& vm, NativeFunction nativeFunction, Intrinsic intrinsic, NativeFunction nativeConstructor, const String& name)
-{
- return vm.getHostFunction(nativeFunction, intrinsic, nativeConstructor, name);
-}
-
JSFunction* JSFunction::create(VM& vm, JSGlobalObject* globalObject, int length, const String& name, NativeFunction nativeFunction, Intrinsic intrinsic, NativeFunction nativeConstructor)
{
- NativeExecutable* executable = lookUpOrCreateNativeExecutable(vm, nativeFunction, intrinsic, nativeConstructor, name);
+ NativeExecutable* executable = vm.getHostFunction(nativeFunction, intrinsic, nativeConstructor, name);
JSFunction* function = new (NotNull, allocateCell<JSFunction>(vm.heap)) JSFunction(vm, globalObject, globalObject->functionStructure());
// Can't do this during initialization because getHostFunction might do a GC allocation.
function->finishCreation(vm, executable, length, name);
Modified: trunk/Source/_javascript_Core/runtime/JSFunction.h (202026 => 202027)
--- trunk/Source/_javascript_Core/runtime/JSFunction.h 2016-06-14 06:04:29 UTC (rev 202026)
+++ trunk/Source/_javascript_Core/runtime/JSFunction.h 2016-06-14 06:04:32 UTC (rev 202027)
@@ -178,8 +178,6 @@
static void visitChildren(JSCell*, SlotVisitor&);
- static NativeExecutable* lookUpOrCreateNativeExecutable(VM&, NativeFunction, Intrinsic, NativeFunction nativeConstructor, const String& name);
-
private:
static JSFunction* createImpl(VM& vm, FunctionExecutable* executable, JSScope* scope, Structure* structure)
{
Modified: trunk/Source/_javascript_Core/runtime/JSGlobalObject.cpp (202026 => 202027)
--- trunk/Source/_javascript_Core/runtime/JSGlobalObject.cpp 2016-06-14 06:04:29 UTC (rev 202026)
+++ trunk/Source/_javascript_Core/runtime/JSGlobalObject.cpp 2016-06-14 06:04:32 UTC (rev 202027)
@@ -65,11 +65,11 @@
#include "JSArrayBufferPrototype.h"
#include "JSArrayIterator.h"
#include "JSBoundFunction.h"
-#include "JSBoundSlotBaseFunction.h"
#include "JSCInlines.h"
#include "JSCallbackConstructor.h"
#include "JSCallbackFunction.h"
#include "JSCallbackObject.h"
+#include "JSCustomGetterSetterFunction.h"
#include "JSDataView.h"
#include "JSDataViewPrototype.h"
#include "JSDollarVM.h"
@@ -343,9 +343,9 @@
exec->setCallee(m_globalCallee.get());
m_functionStructure.set(vm, this, JSFunction::createStructure(vm, this, m_functionPrototype.get()));
- m_boundSlotBaseFunctionStructure.initLater(
+ m_customGetterSetterFunctionStructure.initLater(
[] (const Initializer<Structure>& init) {
- init.set(JSBoundSlotBaseFunction::createStructure(init.vm, init.owner, init.owner->m_functionPrototype.get()));
+ init.set(JSCustomGetterSetterFunction::createStructure(init.vm, init.owner, init.owner->m_functionPrototype.get()));
});
m_boundFunctionStructure.initLater(
[] (const Initializer<Structure>& init) {
@@ -1095,7 +1095,7 @@
visitor.append(&thisObject->m_errorStructure);
visitor.append(&thisObject->m_calleeStructure);
visitor.append(&thisObject->m_functionStructure);
- thisObject->m_boundSlotBaseFunctionStructure.visit(visitor);
+ thisObject->m_customGetterSetterFunctionStructure.visit(visitor);
thisObject->m_boundFunctionStructure.visit(visitor);
visitor.append(&thisObject->m_getterSetterStructure);
thisObject->m_nativeStdFunctionStructure.visit(visitor);
Modified: trunk/Source/_javascript_Core/runtime/JSGlobalObject.h (202026 => 202027)
--- trunk/Source/_javascript_Core/runtime/JSGlobalObject.h 2016-06-14 06:04:29 UTC (rev 202026)
+++ trunk/Source/_javascript_Core/runtime/JSGlobalObject.h 2016-06-14 06:04:32 UTC (rev 202027)
@@ -288,7 +288,7 @@
WriteBarrier<Structure> m_calleeStructure;
WriteBarrier<Structure> m_functionStructure;
LazyProperty<JSGlobalObject, Structure> m_boundFunctionStructure;
- LazyProperty<JSGlobalObject, Structure> m_boundSlotBaseFunctionStructure;
+ LazyProperty<JSGlobalObject, Structure> m_customGetterSetterFunctionStructure;
WriteBarrier<Structure> m_getterSetterStructure;
LazyProperty<JSGlobalObject, Structure> m_nativeStdFunctionStructure;
LazyProperty<JSGlobalObject, Structure> m_namedFunctionStructure;
@@ -557,7 +557,7 @@
Structure* calleeStructure() const { return m_calleeStructure.get(); }
Structure* functionStructure() const { return m_functionStructure.get(); }
Structure* boundFunctionStructure() const { return m_boundFunctionStructure.get(this); }
- Structure* boundSlotBaseFunctionStructure() const { return m_boundSlotBaseFunctionStructure.get(this); }
+ Structure* customGetterSetterFunctionStructure() const { return m_customGetterSetterFunctionStructure.get(this); }
Structure* getterSetterStructure() const { return m_getterSetterStructure.get(); }
Structure* nativeStdFunctionStructure() const { return m_nativeStdFunctionStructure.get(this); }
Structure* namedFunctionStructure() const { return m_namedFunctionStructure.get(this); }
Modified: trunk/Source/_javascript_Core/runtime/JSNativeStdFunction.cpp (202026 => 202027)
--- trunk/Source/_javascript_Core/runtime/JSNativeStdFunction.cpp 2016-06-14 06:04:29 UTC (rev 202026)
+++ trunk/Source/_javascript_Core/runtime/JSNativeStdFunction.cpp 2016-06-14 06:04:32 UTC (rev 202027)
@@ -66,7 +66,7 @@
JSNativeStdFunction* JSNativeStdFunction::create(VM& vm, JSGlobalObject* globalObject, int length, const String& name, NativeStdFunction&& nativeStdFunction, Intrinsic intrinsic, NativeFunction nativeConstructor)
{
- NativeExecutable* executable = lookUpOrCreateNativeExecutable(vm, runStdFunction, intrinsic, nativeConstructor, name);
+ NativeExecutable* executable = vm.getHostFunction(runStdFunction, intrinsic, nativeConstructor, name);
NativeStdFunctionCell* functionCell = NativeStdFunctionCell::create(vm, WTFMove(nativeStdFunction));
Structure* structure = globalObject->nativeStdFunctionStructure();
JSNativeStdFunction* function = new (NotNull, allocateCell<JSNativeStdFunction>(vm.heap)) JSNativeStdFunction(vm, globalObject, structure);
Modified: trunk/Source/_javascript_Core/runtime/JSObject.cpp (202026 => 202027)
--- trunk/Source/_javascript_Core/runtime/JSObject.cpp 2016-06-14 06:04:29 UTC (rev 202026)
+++ trunk/Source/_javascript_Core/runtime/JSObject.cpp 2016-06-14 06:04:32 UTC (rev 202027)
@@ -37,8 +37,8 @@
#include "GetterSetter.h"
#include "HeapSnapshotBuilder.h"
#include "IndexingHeaderInlines.h"
-#include "JSBoundSlotBaseFunction.h"
#include "JSCInlines.h"
+#include "JSCustomGetterSetterFunction.h"
#include "JSFunction.h"
#include "JSGlobalObject.h"
#include "Lookup.h"
@@ -2827,15 +2827,15 @@
return Butterfly::createOrGrowPropertyStorage(m_butterfly.get(), vm, this, structure(vm), oldSize, newSize);
}
-static JSBoundSlotBaseFunction* getBoundSlotBaseFunctionForGetterSetter(ExecState* exec, PropertyName propertyName, JSC::PropertySlot& slot, CustomGetterSetter* getterSetter, JSBoundSlotBaseFunction::Type type)
+static JSCustomGetterSetterFunction* getCustomGetterSetterFunctionForGetterSetter(ExecState* exec, PropertyName propertyName, CustomGetterSetter* getterSetter, JSCustomGetterSetterFunction::Type type)
{
auto key = std::make_pair(getterSetter, (int)type);
- JSBoundSlotBaseFunction* boundSlotBase = exec->vm().customGetterSetterFunctionMap.get(key);
- if (!boundSlotBase) {
- boundSlotBase = JSBoundSlotBaseFunction::create(exec->vm(), exec->lexicalGlobalObject(), slot.slotBase(), getterSetter, type, propertyName.publicName());
- exec->vm().customGetterSetterFunctionMap.set(key, boundSlotBase);
+ JSCustomGetterSetterFunction* customGetterSetterFunction = exec->vm().customGetterSetterFunctionMap.get(key);
+ if (!customGetterSetterFunction) {
+ customGetterSetterFunction = JSCustomGetterSetterFunction::create(exec->vm(), exec->lexicalGlobalObject(), getterSetter, type, propertyName.publicName());
+ exec->vm().customGetterSetterFunctionMap.set(key, customGetterSetterFunction);
}
- return boundSlotBase;
+ return customGetterSetterFunction;
}
bool JSObject::getOwnPropertyDescriptor(ExecState* exec, PropertyName propertyName, PropertyDescriptor& descriptor)
@@ -2875,9 +2875,9 @@
ASSERT(maybeGetterSetter);
auto* getterSetter = jsCast<CustomGetterSetter*>(maybeGetterSetter);
if (getterSetter->getter())
- descriptor.setGetter(getBoundSlotBaseFunctionForGetterSetter(exec, propertyName, slot, getterSetter, JSBoundSlotBaseFunction::Type::Getter));
+ descriptor.setGetter(getCustomGetterSetterFunctionForGetterSetter(exec, propertyName, getterSetter, JSCustomGetterSetterFunction::Type::Getter));
if (getterSetter->setter())
- descriptor.setSetter(getBoundSlotBaseFunctionForGetterSetter(exec, propertyName, slot, getterSetter, JSBoundSlotBaseFunction::Type::Setter));
+ descriptor.setSetter(getCustomGetterSetterFunctionForGetterSetter(exec, propertyName, getterSetter, JSCustomGetterSetterFunction::Type::Setter));
} else
descriptor.setDescriptor(slot.getValue(exec, propertyName), slot.attributes());
return true;
Modified: trunk/Source/_javascript_Core/runtime/VM.h (202026 => 202027)
--- trunk/Source/_javascript_Core/runtime/VM.h 2016-06-14 06:04:29 UTC (rev 202026)
+++ trunk/Source/_javascript_Core/runtime/VM.h 2016-06-14 06:04:32 UTC (rev 202027)
@@ -88,7 +88,7 @@
class HeapProfiler;
class Identifier;
class Interpreter;
-class JSBoundSlotBaseFunction;
+class JSCustomGetterSetterFunction;
class JSGlobalObject;
class JSObject;
class LLIntOffsetsExtractor;
@@ -337,7 +337,7 @@
NumericStrings numericStrings;
DateInstanceCache dateInstanceCache;
WTF::SimpleStats machineCodeBytesPerBytecodeWordForBaselineJIT;
- WeakGCMap<std::pair<CustomGetterSetter*, int>, JSBoundSlotBaseFunction> customGetterSetterFunctionMap;
+ WeakGCMap<std::pair<CustomGetterSetter*, int>, JSCustomGetterSetterFunction> customGetterSetterFunctionMap;
WeakGCMap<StringImpl*, JSString, PtrHash<StringImpl*>> stringCache;
Strong<JSString> lastCachedString;