本文整理汇总了C++中JSActivation::d方法的典型用法代码示例。如果您正苦于以下问题:C++ JSActivation::d方法的具体用法?C++ JSActivation::d怎么用?C++ JSActivation::d使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JSActivation
的用法示例。
在下文中一共展示了JSActivation::d方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: argumentsGetter
JSValue* JSActivation::argumentsGetter(ExecState* exec, const Identifier&, const PropertySlot& slot)
{
JSActivation* thisObj = static_cast<JSActivation*>(slot.slotBase());
if (!thisObj->d()->argumentsObject)
thisObj->d()->argumentsObject = thisObj->createArgumentsObject(exec);
return thisObj->d()->argumentsObject;
}
示例2: argumentsGetter
JSValue JSActivation::argumentsGetter(ExecState*, JSValue slotBase, const Identifier&)
{
JSActivation* activation = asActivation(slotBase);
CallFrame* callFrame = CallFrame::create(activation->d()->registers);
int argumentsRegister = activation->d()->functionExecutable->generatedBytecode().argumentsRegister();
if (!callFrame->uncheckedR(argumentsRegister).jsValue()) {
JSValue arguments = JSValue(new (callFrame) Arguments(callFrame));
callFrame->uncheckedR(argumentsRegister) = arguments;
callFrame->uncheckedR(unmodifiedArgumentsRegister(argumentsRegister)) = arguments;
}
ASSERT(callFrame->uncheckedR(argumentsRegister).jsValue().inherits(&Arguments::info));
return callFrame->uncheckedR(argumentsRegister).jsValue();
}
示例3: argumentsGetter
JSValue JSActivation::argumentsGetter(ExecState* exec, const Identifier&, const PropertySlot& slot)
{
JSActivation* activation = asActivation(slot.slotBase());
if (activation->d()->functionExecutable->usesArguments()) {
PropertySlot slot;
activation->symbolTableGet(exec->propertyNames().arguments, slot);
return slot.getValue(exec, exec->propertyNames().arguments);
}
CallFrame* callFrame = CallFrame::create(activation->d()->registers);
Arguments* arguments = callFrame->optionalCalleeArguments();
if (!arguments) {
arguments = new (callFrame) Arguments(callFrame);
arguments->copyRegisters();
callFrame->setCalleeArguments(arguments);
}
ASSERT(arguments->inherits(&Arguments::info));
return arguments;
}