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/regexp_object.cpp

    r27702 r28468  
    2626#include "error_object.h"
    2727#include "internal.h"
    28 #include "interpreter.h"
    2928#include "object.h"
    3029#include "operations.h"
     
    187186bool RegExpImp::match(ExecState* exec, const List& args)
    188187{
    189     RegExpObjectImp* regExpObj = exec->lexicalInterpreter()->builtinRegExp();
     188    RegExpObjectImp* regExpObj = exec->lexicalGlobalObject()->regExpConstructor();
    190189
    191190    UString input;
     
    231230{
    232231    return match(exec, args)
    233         ? exec->lexicalInterpreter()->builtinRegExp()->arrayOfMatches(exec)
     232        ? exec->lexicalGlobalObject()->regExpConstructor()->arrayOfMatches(exec)
    234233        :  jsNull();
    235234}
     
    322321{
    323322  unsigned lastNumSubpatterns = d->lastNumSubPatterns;
    324   ArrayInstance* arr = new ArrayInstance(exec->lexicalInterpreter()->builtinArrayPrototype(), lastNumSubpatterns + 1);
     323  ArrayInstance* arr = new ArrayInstance(exec->lexicalGlobalObject()->arrayPrototype(), lastNumSubpatterns + 1);
    325324  for (unsigned i = 0; i <= lastNumSubpatterns; ++i) {
    326325    int start = d->lastOvector[2 * i];
     
    456455{
    457456    return regExp->isValid()
    458         ? new RegExpImp(static_cast<RegExpPrototype*>(exec->lexicalInterpreter()->builtinRegExpPrototype()), regExp)
     457        ? new RegExpImp(static_cast<RegExpPrototype*>(exec->lexicalGlobalObject()->regExpPrototype()), regExp)
    459458        : throwError(exec, SyntaxError, UString("Invalid regular expression: ").append(regExp->errorMessage()));
    460459}
Note: See TracChangeset for help on using the changeset viewer.