Ignore:
Timestamp:
Dec 5, 2007, 6:31:41 PM (17 years ago)
Author:
[email protected]
Message:

JavaScriptCore:

Reviewed by Darin Adler.

Third step in refactoring JSGlobalObject: Moved data members and
functions accessing data members from Interpreter to JSGlobalObject.
Changed Interpreter member functions to static functions.


This resolves a bug in global object bootstrapping, where the global
ExecState could be used when uninitialized.


This is a big change, but it's mostly code motion and renaming.


Layout and JS tests, and testjsglue and testapi, pass. SunSpider reports
a .7% regression, but Shark sees no difference related to this patch,
and SunSpider reported a .7% speedup from an earlier step in this
refactoring, so I think it's fair to call that a wash.

JavaScriptGlue:

Reviewed by Darin Adler.

Third step in refactoring JSGlobalObject: Moved data members and data
member access from Interpreter to JSGlobalObject. Replaced JSInterpreter
subclass with JSGlobalObject subclass.


  • JSRun.cpp: (JSRun::JSRun): (JSRun::Evaluate): (JSRun::CheckSyntax):
  • JSRun.h: (JSGlueGlobalObject::JSGlueGlobalObject):
  • JSUtils.cpp: (KJSValueToCFTypeInternal):
  • JSValueWrapper.cpp: (getThreadGlobalExecState):

WebCore:

Reviewed by Darin Adler.

Third step in refactoring JSGlobalObject: Moved data members and data
member access from Interpreter to JSGlobalObject. Changed Interpreter
member functions to static functions. Same for the subclass,
ScriptInterpreter.


This is a big change, but it's mostly code motion and renaming.

WebKit/mac:

Reviewed by Darin Adler.

Third step in refactoring JSGlobalObject: Moved data members and data
member access from Interpreter to JSGlobalObject.


  • WebView/WebFrame.mm: (-[WebFrame _attachScriptDebugger]):

WebKit/win:

Reviewed by Darin Adler.

Third step in refactoring JSGlobalObject: Moved data members and data
member access from Interpreter to JSGlobalObject.


  • WebFrame.cpp: (WebFrame::globalContext): (WebFrame::attachScriptDebugger): (WebFrame::windowObjectCleared):
  • WebScriptDebugger.cpp: (WebScriptDebugger::WebScriptDebugger):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/function_object.cpp

    r27842 r28468  
    104104    JSObject *applyThis;
    105105    if (thisArg->isUndefinedOrNull())
    106       applyThis = exec->dynamicInterpreter()->globalObject();
     106      applyThis = exec->dynamicGlobalObject();
    107107    else
    108108      applyThis = thisArg->toObject(exec);
     
    134134    JSObject *callThis;
    135135    if (thisArg->isUndefinedOrNull())
    136       callThis = exec->dynamicInterpreter()->globalObject();
     136      callThis = exec->dynamicGlobalObject();
    137137    else
    138138      callThis = thisArg->toObject(exec);
     
    192192
    193193  // notify debugger that source has been parsed
    194   Debugger *dbg = exec->dynamicInterpreter()->debugger();
     194  Debugger *dbg = exec->dynamicGlobalObject()->debugger();
    195195  if (dbg) {
    196196    // send empty sourceURL to indicate constructed code
     
    209209
    210210  ScopeChain scopeChain;
    211   scopeChain.push(exec->lexicalInterpreter()->globalObject());
     211  scopeChain.push(exec->lexicalGlobalObject());
    212212
    213213  FunctionImp* fimp = new FunctionImp(exec, functionName, functionBody.get(), scopeChain);
     
    246246  List consArgs;
    247247
    248   JSObject* objCons = exec->lexicalInterpreter()->builtinObject();
     248  JSObject* objCons = exec->lexicalGlobalObject()->objectConstructor();
    249249  JSObject* prototype = objCons->construct(exec,List::empty());
    250250  prototype->put(exec, exec->propertyNames().constructor, fimp, DontEnum|DontDelete|ReadOnly);
Note: See TracChangeset for help on using the changeset viewer.