Unreviewed, rolling out r160133.

http://trac.webkit.org/changeset/160133
https://bugs.webkit.org/show_bug.cgi?id=125325

broke bindings tests on all the bots (Requested by thorton on
#webkit).

Source/JavaScriptCore:

* API/JSCallbackObject.h:
* API/JSCallbackObjectFunctions.h:
(JSC::::staticFunctionGetter):
(JSC::::callbackGetter):
* jit/JITOperations.cpp:
* runtime/JSActivation.cpp:
(JSC::JSActivation::argumentsGetter):
* runtime/JSActivation.h:
* runtime/JSFunction.cpp:
(JSC::JSFunction::argumentsGetter):
(JSC::JSFunction::callerGetter):
(JSC::JSFunction::lengthGetter):
(JSC::JSFunction::nameGetter):
* runtime/JSFunction.h:
* runtime/JSObject.h:
(JSC::PropertySlot::getValue):
* runtime/NumberConstructor.cpp:
(JSC::numberConstructorNaNValue):
(JSC::numberConstructorNegInfinity):
(JSC::numberConstructorPosInfinity):
(JSC::numberConstructorMaxValue):
(JSC::numberConstructorMinValue):
* runtime/PropertySlot.h:
* runtime/RegExpConstructor.cpp:
(JSC::regExpConstructorDollar1):
(JSC::regExpConstructorDollar2):
(JSC::regExpConstructorDollar3):
(JSC::regExpConstructorDollar4):
(JSC::regExpConstructorDollar5):
(JSC::regExpConstructorDollar6):
(JSC::regExpConstructorDollar7):
(JSC::regExpConstructorDollar8):
(JSC::regExpConstructorDollar9):
(JSC::regExpConstructorInput):
(JSC::regExpConstructorMultiline):
(JSC::regExpConstructorLastMatch):
(JSC::regExpConstructorLastParen):
(JSC::regExpConstructorLeftContext):
(JSC::regExpConstructorRightContext):
* runtime/RegExpObject.cpp:
(JSC::regExpObjectGlobal):
(JSC::regExpObjectIgnoreCase):
(JSC::regExpObjectMultiline):
(JSC::regExpObjectSource):

Source/WebCore:

* bindings/js/JSCSSStyleDeclarationCustom.cpp:
(WebCore::cssPropertyGetterPixelOrPosPrefixCallback):
(WebCore::cssPropertyGetterCallback):
* bindings/js/JSDOMBinding.cpp:
(WebCore::objectToStringFunctionGetter):
* bindings/js/JSDOMBinding.h:
* bindings/js/JSDOMMimeTypeArrayCustom.cpp:
(WebCore::JSDOMMimeTypeArray::nameGetter):
* bindings/js/JSDOMPluginArrayCustom.cpp:
(WebCore::JSDOMPluginArray::nameGetter):
* bindings/js/JSDOMPluginCustom.cpp:
(WebCore::JSDOMPlugin::nameGetter):
* bindings/js/JSDOMStringMapCustom.cpp:
(WebCore::JSDOMStringMap::nameGetter):
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::nonCachingStaticFunctionGetter):
(WebCore::childFrameGetter):
(WebCore::indexGetter):
(WebCore::namedItemGetter):
* bindings/js/JSHTMLAllCollectionCustom.cpp:
(WebCore::JSHTMLAllCollection::nameGetter):
* bindings/js/JSHTMLCollectionCustom.cpp:
(WebCore::JSHTMLCollection::nameGetter):
* bindings/js/JSHTMLDocumentCustom.cpp:
(WebCore::JSHTMLDocument::nameGetter):
* bindings/js/JSHTMLFormControlsCollectionCustom.cpp:
(WebCore::JSHTMLFormControlsCollection::nameGetter):
* bindings/js/JSHTMLFormElementCustom.cpp:
(WebCore::JSHTMLFormElement::nameGetter):
* bindings/js/JSHTMLFrameSetElementCustom.cpp:
(WebCore::JSHTMLFrameSetElement::nameGetter):
* bindings/js/JSHistoryCustom.cpp:
(WebCore::nonCachingStaticBackFunctionGetter):
(WebCore::nonCachingStaticForwardFunctionGetter):
(WebCore::nonCachingStaticGoFunctionGetter):
* bindings/js/JSJavaScriptCallFrameCustom.cpp:
(WebCore::JSJavaScriptCallFrame::scopeType):
* bindings/js/JSLocationCustom.cpp:
(WebCore::nonCachingStaticReplaceFunctionGetter):
(WebCore::nonCachingStaticReloadFunctionGetter):
(WebCore::nonCachingStaticAssignFunctionGetter):
* bindings/js/JSNamedNodeMapCustom.cpp:
(WebCore::JSNamedNodeMap::nameGetter):
* bindings/js/JSNodeListCustom.cpp:
(WebCore::JSNodeList::nameGetter):
* bindings/js/JSPluginElementFunctions.cpp:
(WebCore::pluginElementPropertyGetter):
* bindings/js/JSPluginElementFunctions.h:
* bindings/js/JSRTCStatsResponseCustom.cpp:
(WebCore::JSRTCStatsResponse::nameGetter):
* bindings/js/JSStorageCustom.cpp:
(WebCore::JSStorage::nameGetter):
* bindings/js/JSStyleSheetListCustom.cpp:
(WebCore::JSStyleSheetList::nameGetter):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GenerateImplementation):
(GenerateParametersCheck):
* bridge/runtime_array.cpp:
(JSC::RuntimeArray::lengthGetter):
(JSC::RuntimeArray::indexGetter):
* bridge/runtime_array.h:
* bridge/runtime_method.cpp:
(JSC::RuntimeMethod::lengthGetter):
* bridge/runtime_method.h:
* bridge/runtime_object.cpp:
(JSC::Bindings::RuntimeObject::fallbackObjectGetter):
(JSC::Bindings::RuntimeObject::fieldGetter):
(JSC::Bindings::RuntimeObject::methodGetter):
* bridge/runtime_object.h:

Source/WebKit2:

* WebProcess/Plugins/Netscape/JSNPMethod.cpp:
(WebKit::callMethod):
* WebProcess/Plugins/Netscape/JSNPObject.cpp:
(WebKit::callNPJSObject):
(WebKit::constructWithConstructor):
(WebKit::JSNPObject::propertyGetter):
(WebKit::JSNPObject::methodGetter):
* WebProcess/Plugins/Netscape/JSNPObject.h:
* WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
(WebKit::NPRuntimeObjectMap::getOrCreateNPObject):
(WebKit::NPRuntimeObjectMap::finalize):
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::counterValue):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160204 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 1eb5c051
......@@ -205,14 +205,13 @@ private:
void init(ExecState*);
static JSCallbackObject* asCallbackObject(JSValue);
static JSCallbackObject* asCallbackObject(EncodedJSValue);
static EncodedJSValue JSC_HOST_CALL call(ExecState*);
static EncodedJSValue JSC_HOST_CALL construct(ExecState*);
JSValue getStaticValue(ExecState*, PropertyName);
static EncodedJSValue staticFunctionGetter(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
static EncodedJSValue callbackGetter(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
static JSValue staticFunctionGetter(ExecState*, JSValue, PropertyName);
static JSValue callbackGetter(ExecState*, JSValue, PropertyName);
OwnPtr<JSCallbackObjectData> m_callbackObjectData;
};
......
......@@ -49,13 +49,6 @@ inline JSCallbackObject<Parent>* JSCallbackObject<Parent>::asCallbackObject(JSVa
return jsCast<JSCallbackObject*>(asObject(value));
}
template <class Parent>
inline JSCallbackObject<Parent>* JSCallbackObject<Parent>::asCallbackObject(EncodedJSValue value)
{
ASSERT(asObject(JSValue::decode(value))->inherits(info()));
return jsCast<JSCallbackObject*>(asObject(JSValue::decode(value)));
}
template <class Parent>
JSCallbackObject<Parent>::JSCallbackObject(ExecState* exec, Structure* structure, JSClassRef jsClass, void* data)
: Parent(exec->vm(), structure)
......@@ -591,14 +584,14 @@ JSValue JSCallbackObject<Parent>::getStaticValue(ExecState* exec, PropertyName p
}
template <class Parent>
EncodedJSValue JSCallbackObject<Parent>::staticFunctionGetter(ExecState* exec, EncodedJSValue slotParent, EncodedJSValue, PropertyName propertyName)
JSValue JSCallbackObject<Parent>::staticFunctionGetter(ExecState* exec, JSValue slotParent, PropertyName propertyName)
{
JSCallbackObject* thisObj = asCallbackObject(slotParent);
// Check for cached or override property.
PropertySlot slot2(thisObj);
if (Parent::getOwnPropertySlot(thisObj, exec, propertyName, slot2))
return JSValue::encode(slot2.getValue(exec, propertyName));
return slot2.getValue(exec, propertyName);
if (StringImpl* name = propertyName.publicName()) {
for (JSClassRef jsClass = thisObj->classRef(); jsClass; jsClass = jsClass->parentClass) {
......@@ -608,18 +601,18 @@ EncodedJSValue JSCallbackObject<Parent>::staticFunctionGetter(ExecState* exec, E
VM& vm = exec->vm();
JSObject* o = JSCallbackFunction::create(vm, thisObj->globalObject(), callAsFunction, name);
thisObj->putDirect(vm, propertyName, o, entry->attributes);
return JSValue::encode(o);
return o;
}
}
}
}
}
return JSValue::encode(exec->vm().throwException(exec, createReferenceError(exec, ASCIILiteral("Static function property defined with NULL callAsFunction callback."))));
return exec->vm().throwException(exec, createReferenceError(exec, ASCIILiteral("Static function property defined with NULL callAsFunction callback.")));
}
template <class Parent>
EncodedJSValue JSCallbackObject<Parent>::callbackGetter(ExecState* exec, EncodedJSValue slotParent, EncodedJSValue, PropertyName propertyName)
JSValue JSCallbackObject<Parent>::callbackGetter(ExecState* exec, JSValue slotParent, PropertyName propertyName)
{
JSCallbackObject* thisObj = asCallbackObject(slotParent);
......@@ -639,15 +632,15 @@ EncodedJSValue JSCallbackObject<Parent>::callbackGetter(ExecState* exec, Encoded
}
if (exception) {
exec->vm().throwException(exec, toJS(exec, exception));
return JSValue::encode(jsUndefined());
return jsUndefined();
}
if (value)
return JSValue::encode(toJS(exec, value));
return toJS(exec, value);
}
}
}
return JSValue::encode(exec->vm().throwException(exec, createReferenceError(exec, ASCIILiteral("hasProperty callback returned true for a property that doesn't exist."))));
return exec->vm().throwException(exec, createReferenceError(exec, ASCIILiteral("hasProperty callback returned true for a property that doesn't exist.")));
}
} // namespace JSC
2013-12-05 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r160133.
http://trac.webkit.org/changeset/160133
https://bugs.webkit.org/show_bug.cgi?id=125325
broke bindings tests on all the bots (Requested by thorton on
#webkit).
* API/JSCallbackObject.h:
* API/JSCallbackObjectFunctions.h:
(JSC::::staticFunctionGetter):
(JSC::::callbackGetter):
* jit/JITOperations.cpp:
* runtime/JSActivation.cpp:
(JSC::JSActivation::argumentsGetter):
* runtime/JSActivation.h:
* runtime/JSFunction.cpp:
(JSC::JSFunction::argumentsGetter):
(JSC::JSFunction::callerGetter):
(JSC::JSFunction::lengthGetter):
(JSC::JSFunction::nameGetter):
* runtime/JSFunction.h:
* runtime/JSObject.h:
(JSC::PropertySlot::getValue):
* runtime/NumberConstructor.cpp:
(JSC::numberConstructorNaNValue):
(JSC::numberConstructorNegInfinity):
(JSC::numberConstructorPosInfinity):
(JSC::numberConstructorMaxValue):
(JSC::numberConstructorMinValue):
* runtime/PropertySlot.h:
* runtime/RegExpConstructor.cpp:
(JSC::regExpConstructorDollar1):
(JSC::regExpConstructorDollar2):
(JSC::regExpConstructorDollar3):
(JSC::regExpConstructorDollar4):
(JSC::regExpConstructorDollar5):
(JSC::regExpConstructorDollar6):
(JSC::regExpConstructorDollar7):
(JSC::regExpConstructorDollar8):
(JSC::regExpConstructorDollar9):
(JSC::regExpConstructorInput):
(JSC::regExpConstructorMultiline):
(JSC::regExpConstructorLastMatch):
(JSC::regExpConstructorLastParen):
(JSC::regExpConstructorLeftContext):
(JSC::regExpConstructorRightContext):
* runtime/RegExpObject.cpp:
(JSC::regExpObjectGlobal):
(JSC::regExpObjectIgnoreCase):
(JSC::regExpObjectMultiline):
(JSC::regExpObjectSource):
2013-12-05 Mark Lam <mark.lam@apple.com>
Make the C Loop LLINT work with callToJavaScript.
......
......@@ -222,7 +222,7 @@ EncodedJSValue JIT_OPERATION operationCallCustomGetter(ExecState* exec, JSCell*
Identifier ident(vm, uid);
return function(exec, JSValue::encode(base), JSValue::encode(base), ident);
return JSValue::encode(function(exec, asObject(base), ident));
}
EncodedJSValue JIT_OPERATION operationCallGetter(ExecState* exec, JSCell* base, JSCell* getterSetter)
......
......@@ -210,17 +210,17 @@ JSValue JSActivation::toThis(JSCell*, ExecState* exec, ECMAMode ecmaMode)
return exec->globalThisValue();
}
EncodedJSValue JSActivation::argumentsGetter(ExecState*, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
JSValue JSActivation::argumentsGetter(ExecState*, JSValue slotBase, PropertyName)
{
JSActivation* activation = jsCast<JSActivation*>(JSValue::decode(slotBase));
JSActivation* activation = jsCast<JSActivation*>(slotBase);
CallFrame* callFrame = CallFrame::create(reinterpret_cast<Register*>(activation->m_registers));
ASSERT(!activation->isTornOff() && (callFrame->codeBlock()->usesArguments() || callFrame->codeBlock()->usesEval()));
if (activation->isTornOff() || !(callFrame->codeBlock()->usesArguments() || callFrame->codeBlock()->usesEval()))
return JSValue::encode(jsUndefined());
return jsUndefined();
VirtualRegister argumentsRegister = callFrame->codeBlock()->argumentsRegister();
if (JSValue arguments = callFrame->uncheckedR(argumentsRegister.offset()).jsValue())
return JSValue::encode(arguments);
return arguments;
int realArgumentsRegister = unmodifiedArgumentsRegister(argumentsRegister).offset();
JSValue arguments = JSValue(Arguments::create(callFrame->vm(), callFrame));
......@@ -228,7 +228,7 @@ EncodedJSValue JSActivation::argumentsGetter(ExecState*, EncodedJSValue slotBase
callFrame->uncheckedR(realArgumentsRegister) = arguments;
ASSERT(callFrame->uncheckedR(realArgumentsRegister).jsValue().inherits(Arguments::info()));
return JSValue::encode(callFrame->uncheckedR(realArgumentsRegister).jsValue());
return callFrame->uncheckedR(realArgumentsRegister).jsValue();
}
} // namespace JSC
......@@ -100,7 +100,7 @@ private:
bool symbolTablePut(ExecState*, PropertyName, JSValue, bool shouldThrow);
bool symbolTablePutWithAttributes(VM&, PropertyName, JSValue, unsigned attributes);
static EncodedJSValue argumentsGetter(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
static JSValue argumentsGetter(ExecState*, JSValue, PropertyName);
static size_t allocationSize(SymbolTable*);
static size_t storageOffset();
......
......@@ -212,12 +212,12 @@ static JSValue retrieveArguments(ExecState* exec, JSFunction* functionObj)
return functor.result();
}
EncodedJSValue JSFunction::argumentsGetter(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
JSValue JSFunction::argumentsGetter(ExecState* exec, JSValue slotBase, PropertyName)
{
JSFunction* thisObj = jsCast<JSFunction*>(JSValue::decode(slotBase));
JSFunction* thisObj = jsCast<JSFunction*>(slotBase);
ASSERT(!thisObj->isHostFunction());
return JSValue::encode(retrieveArguments(exec, thisObj));
return retrieveArguments(exec, thisObj);
}
class RetrieveCallerFunctionFunctor {
......@@ -267,33 +267,33 @@ static JSValue retrieveCallerFunction(ExecState* exec, JSFunction* functionObj)
return functor.result();
}
EncodedJSValue JSFunction::callerGetter(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
JSValue JSFunction::callerGetter(ExecState* exec, JSValue slotBase, PropertyName)
{
JSFunction* thisObj = jsCast<JSFunction*>(JSValue::decode(slotBase));
JSFunction* thisObj = jsCast<JSFunction*>(slotBase);
ASSERT(!thisObj->isHostFunction());
JSValue caller = retrieveCallerFunction(exec, thisObj);
// See ES5.1 15.3.5.4 - Function.caller may not be used to retrieve a strict caller.
if (!caller.isObject() || !asObject(caller)->inherits(JSFunction::info()))
return JSValue::encode(caller);
return caller;
JSFunction* function = jsCast<JSFunction*>(caller);
if (function->isHostFunction() || !function->jsExecutable()->isStrictMode())
return JSValue::encode(caller);
return JSValue::encode(throwTypeError(exec, ASCIILiteral("Function.caller used to retrieve strict caller")));
return caller;
return throwTypeError(exec, ASCIILiteral("Function.caller used to retrieve strict caller"));
}
EncodedJSValue JSFunction::lengthGetter(ExecState*, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
JSValue JSFunction::lengthGetter(ExecState*, JSValue slotBase, PropertyName)
{
JSFunction* thisObj = jsCast<JSFunction*>(JSValue::decode(slotBase));
JSFunction* thisObj = jsCast<JSFunction*>(slotBase);
ASSERT(!thisObj->isHostFunction());
return JSValue::encode(jsNumber(thisObj->jsExecutable()->parameterCount()));
return jsNumber(thisObj->jsExecutable()->parameterCount());
}
EncodedJSValue JSFunction::nameGetter(ExecState*, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
JSValue JSFunction::nameGetter(ExecState*, JSValue slotBase, PropertyName)
{
JSFunction* thisObj = jsCast<JSFunction*>(JSValue::decode(slotBase));
JSFunction* thisObj = jsCast<JSFunction*>(slotBase);
ASSERT(!thisObj->isHostFunction());
return JSValue::encode(thisObj->jsExecutable()->nameValue());
return thisObj->jsExecutable()->nameValue();
}
bool JSFunction::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot& slot)
......
......@@ -171,10 +171,10 @@ namespace JSC {
JS_EXPORT_PRIVATE bool isHostFunctionNonInline() const;
static EncodedJSValue argumentsGetter(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
static EncodedJSValue callerGetter(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
static EncodedJSValue lengthGetter(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
static EncodedJSValue nameGetter(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
static JSValue argumentsGetter(ExecState*, JSValue, PropertyName);
static JSValue callerGetter(ExecState*, JSValue, PropertyName);
static JSValue lengthGetter(ExecState*, JSValue, PropertyName);
static JSValue nameGetter(ExecState*, JSValue, PropertyName);
WriteBarrier<ExecutableBase> m_executable;
WriteBarrier<JSScope> m_scope;
......
......@@ -1535,10 +1535,10 @@ ALWAYS_INLINE JSValue PropertySlot::getValue(ExecState* exec, PropertyName prope
if (m_propertyType == TypeValue)
return JSValue::decode(m_data.value);
if (m_propertyType == TypeCustomIndex)
return JSValue::decode(m_data.customIndex.getIndexValue(exec, JSValue::encode(slotBase()), JSValue::encode(m_thisValue), m_data.customIndex.index));
return m_data.customIndex.getIndexValue(exec, slotBase(), m_data.customIndex.index);
if (m_propertyType == TypeGetter)
return functionGetter(exec);
return JSValue::decode(m_data.custom.getValue(exec, JSValue::encode(slotBase()), JSValue::encode(m_thisValue), propertyName));
return m_data.custom.getValue(exec, slotBase(), propertyName);
}
ALWAYS_INLINE JSValue PropertySlot::getValue(ExecState* exec, unsigned propertyName) const
......@@ -1546,10 +1546,10 @@ ALWAYS_INLINE JSValue PropertySlot::getValue(ExecState* exec, unsigned propertyN
if (m_propertyType == TypeValue)
return JSValue::decode(m_data.value);
if (m_propertyType == TypeCustomIndex)
return JSValue::decode(m_data.customIndex.getIndexValue(exec, JSValue::encode(slotBase()), JSValue::encode(m_thisValue), m_data.customIndex.index));
return m_data.customIndex.getIndexValue(exec, slotBase(), m_data.customIndex.index);
if (m_propertyType == TypeGetter)
return functionGetter(exec);
return JSValue::decode(m_data.custom.getValue(exec, JSValue::encode(slotBase()), JSValue::encode(m_thisValue), Identifier::from(exec, propertyName)));
return m_data.custom.getValue(exec, slotBase(), Identifier::from(exec, propertyName));
}
} // namespace JSC
......
......@@ -29,11 +29,11 @@
namespace JSC {
static EncodedJSValue numberConstructorNaNValue(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
static EncodedJSValue numberConstructorNegInfinity(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
static EncodedJSValue numberConstructorPosInfinity(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
static EncodedJSValue numberConstructorMaxValue(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
static EncodedJSValue numberConstructorMinValue(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
static JSValue numberConstructorNaNValue(ExecState*, JSValue, PropertyName);
static JSValue numberConstructorNegInfinity(ExecState*, JSValue, PropertyName);
static JSValue numberConstructorPosInfinity(ExecState*, JSValue, PropertyName);
static JSValue numberConstructorMaxValue(ExecState*, JSValue, PropertyName);
static JSValue numberConstructorMinValue(ExecState*, JSValue, PropertyName);
} // namespace JSC
......@@ -82,29 +82,29 @@ void NumberConstructor::put(JSCell* cell, ExecState* exec, PropertyName property
lookupPut<NumberConstructor, InternalFunction>(exec, propertyName, value, ExecState::numberConstructorTable(exec), jsCast<NumberConstructor*>(cell), slot);
}
static EncodedJSValue numberConstructorNaNValue(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName)
static JSValue numberConstructorNaNValue(ExecState*, JSValue, PropertyName)
{
return JSValue::encode(jsNaN());
return jsNaN();
}
static EncodedJSValue numberConstructorNegInfinity(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName)
static JSValue numberConstructorNegInfinity(ExecState*, JSValue, PropertyName)
{
return JSValue::encode(jsNumber(-std::numeric_limits<double>::infinity()));
return jsNumber(-std::numeric_limits<double>::infinity());
}
static EncodedJSValue numberConstructorPosInfinity(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName)
static JSValue numberConstructorPosInfinity(ExecState*, JSValue, PropertyName)
{
return JSValue::encode(jsNumber(std::numeric_limits<double>::infinity()));
return jsNumber(std::numeric_limits<double>::infinity());
}
static EncodedJSValue numberConstructorMaxValue(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName)
static JSValue numberConstructorMaxValue(ExecState*, JSValue, PropertyName)
{
return JSValue::encode(jsNumber(1.7976931348623157E+308));
return jsNumber(1.7976931348623157E+308);
}
static EncodedJSValue numberConstructorMinValue(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName)
static JSValue numberConstructorMinValue(ExecState*, JSValue, PropertyName)
{
return JSValue::encode(jsNumber(5E-324));
return jsNumber(5E-324);
}
// ECMA 15.7.1
......
......@@ -60,8 +60,8 @@ public:
{
}
typedef EncodedJSValue (*GetValueFunc)(ExecState*, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName);
typedef EncodedJSValue (*GetIndexValueFunc)(ExecState*, EncodedJSValue slotBase, EncodedJSValue thisValue, unsigned);
typedef JSValue (*GetValueFunc)(ExecState*, JSValue slotBase, PropertyName);
typedef JSValue (*GetIndexValueFunc)(ExecState*, JSValue slotBase, unsigned);
JSValue getValue(ExecState*, PropertyName) const;
JSValue getValue(ExecState*, unsigned propertyName) const;
......@@ -226,7 +226,7 @@ private:
PropertyType m_propertyType;
PropertyOffset m_offset;
const JSValue m_thisValue;
JSValue m_thisValue;
JSObject* m_slotBase;
};
......
......@@ -29,21 +29,21 @@
namespace JSC {
static EncodedJSValue regExpConstructorInput(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
static EncodedJSValue regExpConstructorMultiline(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
static EncodedJSValue regExpConstructorLastMatch(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
static EncodedJSValue regExpConstructorLastParen(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
static EncodedJSValue regExpConstructorLeftContext(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
static EncodedJSValue regExpConstructorRightContext(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
static EncodedJSValue regExpConstructorDollar1(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
static EncodedJSValue regExpConstructorDollar2(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
static EncodedJSValue regExpConstructorDollar3(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
static EncodedJSValue regExpConstructorDollar4(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
static EncodedJSValue regExpConstructorDollar5(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
static EncodedJSValue regExpConstructorDollar6(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
static EncodedJSValue regExpConstructorDollar7(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
static EncodedJSValue regExpConstructorDollar8(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
static EncodedJSValue regExpConstructorDollar9(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
static JSValue regExpConstructorInput(ExecState*, JSValue, PropertyName);
static JSValue regExpConstructorMultiline(ExecState*, JSValue, PropertyName);
static JSValue regExpConstructorLastMatch(ExecState*, JSValue, PropertyName);
static JSValue regExpConstructorLastParen(ExecState*, JSValue, PropertyName);
static JSValue regExpConstructorLeftContext(ExecState*, JSValue, PropertyName);
static JSValue regExpConstructorRightContext(ExecState*, JSValue, PropertyName);
static JSValue regExpConstructorDollar1(ExecState*, JSValue, PropertyName);
static JSValue regExpConstructorDollar2(ExecState*, JSValue, PropertyName);
static JSValue regExpConstructorDollar3(ExecState*, JSValue, PropertyName);
static JSValue regExpConstructorDollar4(ExecState*, JSValue, PropertyName);
static JSValue regExpConstructorDollar5(ExecState*, JSValue, PropertyName);
static JSValue regExpConstructorDollar6(ExecState*, JSValue, PropertyName);
static JSValue regExpConstructorDollar7(ExecState*, JSValue, PropertyName);
static JSValue regExpConstructorDollar8(ExecState*, JSValue, PropertyName);
static JSValue regExpConstructorDollar9(ExecState*, JSValue, PropertyName);
static void setRegExpConstructorInput(ExecState*, JSObject*, JSValue);
static void setRegExpConstructorMultiline(ExecState*, JSObject*, JSValue);
......@@ -158,84 +158,79 @@ bool RegExpConstructor::getOwnPropertySlot(JSObject* object, ExecState* exec, Pr
return getStaticValueSlot<RegExpConstructor, InternalFunction>(exec, ExecState::regExpConstructorTable(exec), jsCast<RegExpConstructor*>(object), propertyName, slot);
}
static inline RegExpConstructor* asRegExpConstructor(EncodedJSValue value)
JSValue regExpConstructorDollar1(ExecState* exec, JSValue slotBase, PropertyName)
{
return jsCast<RegExpConstructor*>(JSValue::decode(value));
}
EncodedJSValue regExpConstructorDollar1(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
{
return JSValue::encode(asRegExpConstructor(slotBase)->getBackref(exec, 1));
return asRegExpConstructor(slotBase)->getBackref(exec, 1);
}
EncodedJSValue regExpConstructorDollar2(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
JSValue regExpConstructorDollar2(ExecState* exec, JSValue slotBase, PropertyName)
{
return JSValue::encode(asRegExpConstructor(slotBase)->getBackref(exec, 2));
return asRegExpConstructor(slotBase)->getBackref(exec, 2);
}
EncodedJSValue regExpConstructorDollar3(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
JSValue regExpConstructorDollar3(ExecState* exec, JSValue slotBase, PropertyName)
{
return JSValue::encode(asRegExpConstructor(slotBase)->getBackref(exec, 3));
return asRegExpConstructor(slotBase)->getBackref(exec, 3);
}
EncodedJSValue regExpConstructorDollar4(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
JSValue regExpConstructorDollar4(ExecState* exec, JSValue slotBase, PropertyName)
{
return JSValue::encode(asRegExpConstructor(slotBase)->getBackref(exec, 4));
return asRegExpConstructor(slotBase)->getBackref(exec, 4);
}
EncodedJSValue regExpConstructorDollar5(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
JSValue regExpConstructorDollar5(ExecState* exec, JSValue slotBase, PropertyName)
{
return JSValue::encode(asRegExpConstructor(slotBase)->getBackref(exec, 5));
return asRegExpConstructor(slotBase)->getBackref(exec, 5);
}
EncodedJSValue regExpConstructorDollar6(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
JSValue regExpConstructorDollar6(ExecState* exec, JSValue slotBase, PropertyName)
{
return JSValue::encode(asRegExpConstructor(slotBase)->getBackref(exec, 6));
return asRegExpConstructor(slotBase)->getBackref(exec, 6);
}
EncodedJSValue regExpConstructorDollar7(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
JSValue regExpConstructorDollar7(ExecState* exec, JSValue slotBase, PropertyName)
{
return JSValue::encode(asRegExpConstructor(slotBase)->getBackref(exec, 7));
return asRegExpConstructor(slotBase)->getBackref(exec, 7);
}
EncodedJSValue regExpConstructorDollar8(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
JSValue regExpConstructorDollar8(ExecState* exec, JSValue slotBase, PropertyName)
{
return JSValue::encode(asRegExpConstructor(slotBase)->getBackref(exec, 8));
return asRegExpConstructor(slotBase)->getBackref(exec, 8);
}
EncodedJSValue regExpConstructorDollar9(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
JSValue regExpConstructorDollar9(ExecState* exec, JSValue slotBase, PropertyName)
{
return JSValue::encode(asRegExpConstructor(slotBase)->getBackref(exec, 9));
return asRegExpConstructor(slotBase)->getBackref(exec, 9);
}
EncodedJSValue regExpConstructorInput(ExecState*, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
JSValue regExpConstructorInput(ExecState*, JSValue slotBase, PropertyName)
{
return JSValue::encode(asRegExpConstructor(slotBase)->input());
return asRegExpConstructor(slotBase)->input();
}
EncodedJSValue regExpConstructorMultiline(ExecState*, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
JSValue regExpConstructorMultiline(ExecState*, JSValue slotBase, PropertyName)
{
return JSValue::encode(jsBoolean(asRegExpConstructor(slotBase)->multiline()));
return jsBoolean(asRegExpConstructor(slotBase)->multiline());
}
EncodedJSValue regExpConstructorLastMatch(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
JSValue regExpConstructorLastMatch(ExecState* exec, JSValue slotBase, PropertyName)
{
return JSValue::encode(asRegExpConstructor(slotBase)->getBackref(exec, 0));
return asRegExpConstructor(slotBase)->getBackref(exec, 0);
}
EncodedJSValue regExpConstructorLastParen(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
JSValue regExpConstructorLastParen(ExecState* exec, JSValue slotBase, PropertyName)
{
return JSValue::encode(asRegExpConstructor(slotBase)->getLastParen(exec));
return asRegExpConstructor(slotBase)->getLastParen(exec);
}
EncodedJSValue regExpConstructorLeftContext(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
JSValue regExpConstructorLeftContext(ExecState* exec, JSValue slotBase, PropertyName)
{
return JSValue::encode(asRegExpConstructor(slotBase)->getLeftContext(exec));
return asRegExpConstructor(slotBase)->getLeftContext(exec);
}
EncodedJSValue regExpConstructorRightContext(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
JSValue regExpConstructorRightContext(ExecState* exec, JSValue slotBase, PropertyName)
{
return JSValue::encode(asRegExpConstructor(slotBase)->getRightContext(exec));
return asRegExpConstructor(slotBase)->getRightContext(exec);
}
void RegExpConstructor::put(JSCell* cell, ExecState* exec, PropertyName propertyName, JSValue value, PutPropertySlot& slot)
......
......@@ -39,10 +39,10 @@
namespace JSC {
static EncodedJSValue regExpObjectGlobal(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
static EncodedJSValue regExpObjectIgnoreCase(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
static EncodedJSValue regExpObjectMultiline(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
static EncodedJSValue regExpObjectSource(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
static JSValue regExpObjectGlobal(ExecState*, JSValue, PropertyName);
static JSValue regExpObjectIgnoreCase(ExecState*, JSValue, PropertyName);
static JSValue regExpObjectMultiline(ExecState*, JSValue, PropertyName);
static JSValue regExpObjectSource(ExecState*, JSValue, PropertyName);
} // namespace JSC
......@@ -155,24 +155,19 @@ bool RegExpObject::defineOwnProperty(JSObject* object, ExecState* exec, Property
return Base::defineOwnProperty(object, exec, propertyName, descriptor, shouldThrow);
}
static inline RegExpObject* asRegExpObject(EncodedJSValue value)
JSValue regExpObjectGlobal(ExecState*, JSValue slotBase, PropertyName)
{
return jsCast<RegExpObject*>(JSValue::decode(value));
return jsBoolean(asRegExpObject(slotBase)->regExp()->global());
}
EncodedJSValue regExpObjectGlobal(ExecState*, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
JSValue regExpObjectIgnoreCase(ExecState*, JSValue slotBase, PropertyName)
{
return JSValue::encode(jsBoolean(asRegExpObject(slotBase)->regExp()->global()));
}
EncodedJSValue regExpObjectIgnoreCase(ExecState*, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
{
return JSValue::encode(jsBoolean(asRegExpObject(slotBase)->regExp()->ignoreCase()));
return jsBoolean(asRegExpObject(slotBase)->regExp()->ignoreCase());
}
EncodedJSValue regExpObjectMultiline(ExecState*, EncodedJSValue slotBase, EncodedJSValue, PropertyName)