Commit 1914ee95 authored by ggaren@apple.com's avatar ggaren@apple.com

JavaScriptCore:

2008-07-18  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Cameron Zwarich.
        
        Three renames:
        
        "CallTypeNative" => "CallTypeHost"
        "code" => "byteCode"
        "generatedCode" => "generatedByteCode"

JavaScriptGlue:

2008-07-18  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Cameron Zwarich.
        
        Three renames:
        
        "CallTypeNative" => "CallTypeHost"
        "code" => "byteCode"
        "generatedCode" => "generatedByteCode"

        * ChangeLog:
        * JSObject.cpp:
        (JSUserObject::getCallData):

WebCore:

2008-07-18  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Cameron Zwarich.
        
        Three renames:
        
        "CallTypeNative" => "CallTypeHost"
        "code" => "byteCode"
        "generatedCode" => "generatedByteCode"



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@35242 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 6f99f63c
......@@ -70,7 +70,7 @@ JSValue* JSCallbackFunction::call(ExecState* exec, JSObject* functionObject, JSV
CallType JSCallbackFunction::getCallData(CallData& callData)
{
callData.native.function = call;
return CallTypeNative;
return CallTypeHost;
}
} // namespace KJS
......@@ -303,7 +303,7 @@ CallType JSCallbackObject<Base>::getCallData(CallData& callData)
for (JSClassRef jsClass = m_class; jsClass; jsClass = jsClass->parentClass) {
if (jsClass->callAsFunction) {
callData.native.function = call;
return CallTypeNative;
return CallTypeHost;
}
}
return CallTypeNone;
......
2008-07-18 Geoffrey Garen <ggaren@apple.com>
Reviewed by Cameron Zwarich.
Three renames:
"CallTypeNative" => "CallTypeHost"
"code" => "byteCode"
"generatedCode" => "generatedByteCode"
2008-07-18 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
......@@ -672,7 +672,7 @@ JSValue* Machine::execute(ProgramNode* programNode, ExecState* exec, ScopeChainN
return 0;
}
CodeBlock* codeBlock = &programNode->code(scopeChain);
CodeBlock* codeBlock = &programNode->byteCode(scopeChain);
size_t oldSize = m_registerFile.size();
size_t newSize = oldSize + RegisterFile::CallFrameHeaderSize + codeBlock->numVars + codeBlock->numTemporaries;
......@@ -748,7 +748,7 @@ JSValue* Machine::execute(FunctionBodyNode* functionBodyNode, ExecState* exec, J
// a 0 codeBlock indicates a built-in caller
initializeCallFrame(callFrame, 0, 0, 0, callFrame, 0, argv, argc, 0, function);
CodeBlock* newCodeBlock = &functionBodyNode->code(scopeChain);
CodeBlock* newCodeBlock = &functionBodyNode->byteCode(scopeChain);
Register* r = slideRegisterWindowForCall(exec, newCodeBlock, &m_registerFile, m_registerFile.base(), callFrame, argv, argc, *exception);
if (*exception) {
m_registerFile.shrink(oldSize);
......@@ -781,7 +781,7 @@ JSValue* Machine::execute(EvalNode* evalNode, ExecState* exec, JSObject* thisObj
return 0;
}
EvalCodeBlock* codeBlock = &evalNode->code(scopeChain);
EvalCodeBlock* codeBlock = &evalNode->byteCode(scopeChain);
JSVariableObject* variableObject;
for (ScopeChainNode* node = scopeChain; ; node = node->next) {
......@@ -2236,7 +2236,7 @@ JSValue* Machine::privateExecute(ExecutionFlag flag, ExecState* exec, RegisterFi
ScopeChainNode* callDataScopeChain = callData.js.scopeChain;
FunctionBodyNode* functionBodyNode = callData.js.functionBody;
CodeBlock* newCodeBlock = &functionBodyNode->code(callDataScopeChain);
CodeBlock* newCodeBlock = &functionBodyNode->byteCode(callDataScopeChain);
r[firstArg] = thisVal == missingThisObjectMarker() ? exec->globalThisValue() : r[thisVal].jsValue();
......@@ -2260,7 +2260,7 @@ JSValue* Machine::privateExecute(ExecutionFlag flag, ExecState* exec, RegisterFi
NEXT_OPCODE;
}
if (callType == CallTypeNative) {
if (callType == CallTypeHost) {
if (*enabledProfilerReference)
(*enabledProfilerReference)->willExecute(exec, static_cast<JSObject*>(v));
......@@ -2367,7 +2367,7 @@ JSValue* Machine::privateExecute(ExecutionFlag flag, ExecState* exec, RegisterFi
ScopeChainNode* callDataScopeChain = constructData.js.scopeChain;
FunctionBodyNode* functionBodyNode = constructData.js.functionBody;
CodeBlock* newCodeBlock = &functionBodyNode->code(callDataScopeChain);
CodeBlock* newCodeBlock = &functionBodyNode->byteCode(callDataScopeChain);
r[firstArg] = newObject; // "this" value
......@@ -2684,7 +2684,7 @@ JSValue* Machine::retrieveArguments(ExecState* exec, JSFunction* function) const
JSActivation* activation = static_cast<JSActivation*>(callFrame[RegisterFile::OptionalCalleeActivation].jsValue());
if (!activation) {
CodeBlock* codeBlock = &function->m_body->generatedCode();
CodeBlock* codeBlock = &function->m_body->generatedByteCode();
activation = new (exec) JSActivation(function->m_body, callFrame + RegisterFile::CallFrameHeaderSize + codeBlock->numLocals);
callFrame[RegisterFile::OptionalCalleeActivation] = activation;
}
......
......@@ -77,7 +77,7 @@ CallType ArrayConstructor::getCallData(CallData& callData)
{
// equivalent to 'new Array(....)'
callData.native.function = callArrayConstructor;
return CallTypeNative;
return CallTypeHost;
}
} // namespace KJS
......@@ -63,7 +63,7 @@ static JSValue* callBooleanConstructor(ExecState* exec, JSObject*, JSValue*, con
CallType BooleanConstructor::getCallData(CallData& callData)
{
callData.native.function = callBooleanConstructor;
return CallTypeNative;
return CallTypeHost;
}
JSObject* constructBooleanFromImmediateBoolean(ExecState* exec, JSValue* immediateBooleanValue)
......
......@@ -32,7 +32,7 @@ namespace KJS {
JSValue* call(ExecState* exec, JSValue* functionObject, CallType callType, const CallData& callData, JSValue* thisValue, const ArgList& args)
{
if (callType == CallTypeNative)
if (callType == CallTypeHost)
return callData.native.function(exec, static_cast<JSObject*>(functionObject), thisValue, args);
ASSERT(callType == CallTypeJS);
// FIXME: Can this be done more efficiently using the callData?
......
......@@ -40,7 +40,7 @@ namespace KJS {
enum CallType {
CallTypeNone,
CallTypeNative,
CallTypeHost,
CallTypeJS
};
......
......@@ -128,7 +128,7 @@ static JSValue* callDate(ExecState* exec, JSObject*, JSValue*, const ArgList&)
CallType DateConstructor::getCallData(CallData& callData)
{
callData.native.function = callDate;
return CallTypeNative;
return CallTypeHost;
}
static JSValue* dateParse(ExecState* exec, JSObject*, JSValue*, const ArgList& args)
......
......@@ -67,7 +67,7 @@ static JSValue* callErrorConstructor(ExecState* exec, JSObject*, JSValue*, const
CallType ErrorConstructor::getCallData(CallData& callData)
{
callData.native.function = callErrorConstructor;
return CallTypeNative;
return CallTypeHost;
}
} // namespace KJS
......@@ -61,7 +61,7 @@ static JSValue* callFunctionConstructor(ExecState* exec, JSObject*, JSValue*, co
CallType FunctionConstructor::getCallData(CallData& callData)
{
callData.native.function = callFunctionConstructor;
return CallTypeNative;
return CallTypeHost;
}
// ECMA 15.3.2 The Function Constructor
......
......@@ -51,7 +51,7 @@ static JSValue* callFunctionPrototype(ExecState*, JSObject*, JSValue*, const Arg
CallType FunctionPrototype::getCallData(CallData& callData)
{
callData.native.function = callFunctionPrototype;
return CallTypeNative;
return CallTypeHost;
}
// Functions
......
......@@ -51,7 +51,7 @@ JSActivation::~JSActivation()
void JSActivation::copyRegisters()
{
int numLocals = d()->functionBody->generatedCode().numLocals;
int numLocals = d()->functionBody->generatedByteCode().numLocals;
if (!numLocals)
return;
......@@ -156,7 +156,7 @@ PropertySlot::GetValueFunc JSActivation::getArgumentsGetter()
JSObject* JSActivation::createArgumentsObject(ExecState* exec)
{
Register* callFrame = d()->registers - d()->functionBody->generatedCode().numLocals - RegisterFile::CallFrameHeaderSize;
Register* callFrame = d()->registers - d()->functionBody->generatedByteCode().numLocals - RegisterFile::CallFrameHeaderSize;
JSFunction* function;
Register* argv;
......
......@@ -65,7 +65,7 @@ static JSValue* callNativeErrorConstructor(ExecState* exec, JSObject* constructo
CallType NativeErrorConstructor::getCallData(CallData& callData)
{
callData.native.function = callNativeErrorConstructor;
return CallTypeNative;
return CallTypeHost;
}
void NativeErrorConstructor::mark()
......
......@@ -97,7 +97,7 @@ static JSValue* callNumberConstructor(ExecState* exec, JSObject*, JSValue*, cons
CallType NumberConstructor::getCallData(CallData& callData)
{
callData.native.function = callNumberConstructor;
return CallTypeNative;
return CallTypeHost;
}
} // namespace KJS
......@@ -65,7 +65,7 @@ static JSValue* callObjectConstructor(ExecState* exec, JSObject*, JSValue*, cons
CallType ObjectConstructor::getCallData(CallData& callData)
{
callData.native.function = callObjectConstructor;
return CallTypeNative;
return CallTypeHost;
}
} // namespace KJS
......@@ -40,7 +40,7 @@ JSValue* PropertySlot::functionGetter(ExecState* exec, const Identifier&, const
CallData callData;
CallType callType = slot.m_data.getterFunc->getCallData(callData);
if (callType == CallTypeNative)
if (callType == CallTypeHost)
return callData.native.function(exec, slot.m_data.getterFunc, slot.slotBase(), exec->emptyList());
ASSERT(callType == CallTypeJS);
// FIXME: Can this be done more efficiently using the callData?
......
......@@ -50,7 +50,7 @@ PrototypeFunction::PrototypeFunction(ExecState* exec, FunctionPrototype* functio
CallType PrototypeFunction::getCallData(CallData& callData)
{
callData.native.function = m_function;
return CallTypeNative;
return CallTypeHost;
}
} // namespace KJS
......@@ -308,7 +308,7 @@ static JSValue* callRegExpConstructor(ExecState* exec, JSObject*, JSValue*, cons
CallType RegExpConstructor::getCallData(CallData& callData)
{
callData.native.function = callRegExpConstructor;
return CallTypeNative;
return CallTypeHost;
}
const UString& RegExpConstructor::input() const
......
......@@ -146,7 +146,7 @@ static JSValue* callRegExpObject(ExecState* exec, JSObject* function, JSValue*,
CallType RegExpObject::getCallData(CallData& callData)
{
callData.native.function = callRegExpObject;
return CallTypeNative;
return CallTypeHost;
}
} // namespace KJS
......@@ -83,7 +83,7 @@ static JSValue* callStringConstructor(ExecState* exec, JSObject*, JSValue*, cons
CallType StringConstructor::getCallData(CallData& callData)
{
callData.native.function = callStringConstructor;
return CallTypeNative;
return CallTypeHost;
}
} // namespace KJS
......@@ -2038,7 +2038,7 @@ namespace KJS {
public:
static ProgramNode* create(JSGlobalData*, SourceElements*, VarStack*, FunctionStack*, bool usesEval, bool needsClosure) KJS_FAST_CALL;
ProgramCodeBlock& code(ScopeChainNode* scopeChain) KJS_FAST_CALL
ProgramCodeBlock& byteCode(ScopeChainNode* scopeChain) KJS_FAST_CALL
{
if (!m_code)
generateCode(scopeChain);
......@@ -2061,7 +2061,7 @@ namespace KJS {
public:
static EvalNode* create(JSGlobalData*, SourceElements*, VarStack*, FunctionStack*, bool usesEval, bool needsClosure) KJS_FAST_CALL;
EvalCodeBlock& code(ScopeChainNode* scopeChain) KJS_FAST_CALL
EvalCodeBlock& byteCode(ScopeChainNode* scopeChain) KJS_FAST_CALL
{
if (!m_code)
generateCode(scopeChain);
......@@ -2088,7 +2088,7 @@ namespace KJS {
SymbolTable& symbolTable() { return m_symbolTable; } // FIXME: Remove this
CodeBlock& code(ScopeChainNode* scopeChain) KJS_FAST_CALL
CodeBlock& byteCode(ScopeChainNode* scopeChain) KJS_FAST_CALL
{
ASSERT(scopeChain);
if (!m_code)
......@@ -2096,7 +2096,7 @@ namespace KJS {
return *m_code;
}
CodeBlock& generatedCode() KJS_FAST_CALL
CodeBlock& generatedByteCode() KJS_FAST_CALL
{
ASSERT(m_code);
return *m_code;
......
2008-07-18 Geoffrey Garen <ggaren@apple.com>
Reviewed by Cameron Zwarich.
Three renames:
"CallTypeNative" => "CallTypeHost"
"code" => "byteCode"
"generatedCode" => "generatedByteCode"
* ChangeLog:
* JSObject.cpp:
(JSUserObject::getCallData):
2008-07-14 Alexey Proskuryakov <ap@webkit.org>
Reviewed by Geoff Garen.
......
......@@ -84,7 +84,7 @@ CallType JSUserObject::getCallData(CallData& callData)
return CallTypeNone;
callData.native.function = nativeCallFunction;
return CallTypeNative;
return CallTypeHost;
}
JSUserObject* JSUserObject::CallFunction(JSUserObject* thisObj, CFArrayRef args)
......
2008-07-18 Geoffrey Garen <ggaren@apple.com>
Reviewed by Cameron Zwarich.
Three renames:
"CallTypeNative" => "CallTypeHost"
"code" => "byteCode"
"generatedCode" => "generatedByteCode"
2008-07-18 Adele Peterson <adele@apple.com>
Reviewed by Dan Bernstein.
......@@ -94,7 +94,7 @@ static JSValue* callHTMLCollection(ExecState* exec, JSObject* function, JSValue*
CallType JSHTMLCollection::getCallData(CallData& callData)
{
callData.native.function = callHTMLCollection;
return CallTypeNative;
return CallTypeHost;
}
bool JSHTMLCollection::canGetItemsForName(ExecState* exec, HTMLCollection* thisObj, const Identifier& propertyName)
......
......@@ -48,7 +48,7 @@ static JSValue* callNodeList(ExecState* exec, JSObject* function, JSValue*, cons
CallType JSNodeList::getCallData(CallData& callData)
{
callData.native.function = callNodeList;
return CallTypeNative;
return CallTypeHost;
}
bool JSNodeList::canGetItemsForName(ExecState*, NodeList* impl, const Identifier& propertyName)
......
......@@ -148,7 +148,7 @@ CallType runtimeObjectGetCallData(HTMLElement* element, CallData& callData)
if (!instance || !instance->supportsInvokeDefaultMethod())
return CallTypeNone;
callData.native.function = callPlugin;
return CallTypeNative;
return CallTypeHost;
}
#endif
......
......@@ -268,7 +268,7 @@ CallType JSQuarantinedObjectWrapper::getCallData(CallData& callData)
if (m_unwrappedObject->getCallData(unwrappedCallData) == CallTypeNone)
return CallTypeNone;
callData.native.function = call;
return CallTypeNative;
return CallTypeHost;
}
void JSQuarantinedObjectWrapper::getPropertyNames(ExecState* exec, PropertyNameArray& array)
......
......@@ -268,7 +268,7 @@ CallType ObjcFallbackObjectImp::getCallData(CallData& callData)
if (![targetObject respondsToSelector:@selector(invokeUndefinedMethodFromWebScript:withArguments:)])
return CallTypeNone;
callData.native.function = callObjCFallbackObject;
return CallTypeNative;
return CallTypeHost;
}
bool ObjcFallbackObjectImp::deleteProperty(ExecState*, const Identifier&)
......
......@@ -98,7 +98,7 @@ ConstructType QtRuntimeObjectImp::getConstructData(ConstructData& constructData)
switch (getCallData(callData)) {
case CallTypeNone:
break;
case CallTypeNative:
case CallTypeHost:
type = ConstructTypeNative;
break;
case CallTypeJS:
......@@ -271,7 +271,7 @@ CallType QtInstance::getCallData(CallData&)
}
// typeof object that implements call == function
return (m_defaultMethodIndex >= 0 ? CallTypeNative : CallTypeNone);
return (m_defaultMethodIndex >= 0 ? CallTypeHost : CallTypeNone);
}
JSValue* QtInstance::invokeDefaultMethod(ExecState* exec, const ArgList& args)
......
......@@ -1325,7 +1325,7 @@ JSValue* QtRuntimeMetaMethod::call(ExecState* exec, JSObject* functionObject, JS
CallType QtRuntimeMetaMethod::getCallData(CallData& callData)
{
callData.native.function = call;
return CallTypeNative;
return CallTypeHost;
}
bool QtRuntimeMetaMethod::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
......@@ -1517,7 +1517,7 @@ JSValue* QtRuntimeConnectionMethod::call(ExecState* exec, JSObject* functionObje
CallType QtRuntimeConnectionMethod::getCallData(CallData& callData)
{
callData.native.function = call;
return CallTypeNative;
return CallTypeHost;
}
bool QtRuntimeConnectionMethod::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
......
......@@ -97,7 +97,7 @@ static JSValue* callRuntimeMethod(ExecState* exec, JSObject* function, JSValue*
CallType RuntimeMethod::getCallData(CallData& callData)
{
callData.native.function = callRuntimeMethod;
return CallTypeNative;
return CallTypeHost;
}
}
......@@ -205,7 +205,7 @@ CallType RuntimeObjectImp::getCallData(CallData& callData)
if (!instance || !instance->supportsInvokeDefaultMethod())
return CallTypeNone;
callData.native.function = callRuntimeObject;
return CallTypeNative;
return CallTypeHost;
}
void RuntimeObjectImp::getPropertyNames(ExecState* exec, PropertyNameArray& propertyNames)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment