Ignore:
Timestamp:
Jun 12, 2006, 11:08:52 PM (19 years ago)
Author:
ggaren
Message:

JavaScriptCore:

Reviewed by TimO, Maciej.


  • Merged InterpreterImp code into Interpreter, which implements all interpreter functionality now. This is part of my continuing quest to create an external notion of JS "execution context" that is unified and simple -- something to replace the mix of Context, ContextImp, ExecState, Interpreter, InterpreterImp, and JSRun.


All tests pass. Leaks test has not regressed from its baseline ~207 leaks
with ~3460 leaked nodes.

  • JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • bindings/NP_jsobject.cpp:
  • bindings/objc/WebScriptObject.mm: (+[WebScriptObject throwException:]):
  • bindings/runtime_root.cpp:
  • bindings/runtime_root.h:
  • kjs/Context.cpp: (KJS::Context::Context):
  • kjs/ExecState.cpp: Added. (KJS::ExecState::lexicalInterpreter):
  • kjs/ExecState.h: Added. (KJS::ExecState::dynamicInterpreter):
  • kjs/SavedBuiltins.h: Added.
  • kjs/bool_object.cpp: (BooleanPrototype::BooleanPrototype):
  • kjs/collector.cpp: (KJS::Collector::collect): (KJS::Collector::numInterpreters):
  • kjs/context.h:
  • kjs/debugger.cpp: (Debugger::attach): (Debugger::detach):
  • kjs/function.cpp: (KJS::FunctionImp::callAsFunction): (KJS::GlobalFuncImp::callAsFunction):
  • kjs/function_object.cpp: (FunctionObjectImp::construct):
  • kjs/internal.cpp:
  • kjs/internal.h:
  • kjs/interpreter.cpp: (KJS::interpreterMap): (KJS::Interpreter::Interpreter): (KJS::Interpreter::init): (KJS::Interpreter::~Interpreter): (KJS::Interpreter::globalObject): (KJS::Interpreter::initGlobalObject): (KJS::Interpreter::globalExec): (KJS::Interpreter::checkSyntax): (KJS::Interpreter::evaluate): (KJS::Interpreter::builtinObject): (KJS::Interpreter::builtinFunction): (KJS::Interpreter::builtinArray): (KJS::Interpreter::builtinBoolean): (KJS::Interpreter::builtinString): (KJS::Interpreter::builtinNumber): (KJS::Interpreter::builtinDate): (KJS::Interpreter::builtinRegExp): (KJS::Interpreter::builtinError): (KJS::Interpreter::builtinObjectPrototype): (KJS::Interpreter::builtinFunctionPrototype): (KJS::Interpreter::builtinArrayPrototype): (KJS::Interpreter::builtinBooleanPrototype): (KJS::Interpreter::builtinStringPrototype): (KJS::Interpreter::builtinNumberPrototype): (KJS::Interpreter::builtinDatePrototype): (KJS::Interpreter::builtinRegExpPrototype): (KJS::Interpreter::builtinErrorPrototype): (KJS::Interpreter::builtinEvalError): (KJS::Interpreter::builtinRangeError): (KJS::Interpreter::builtinReferenceError): (KJS::Interpreter::builtinSyntaxError): (KJS::Interpreter::builtinTypeError): (KJS::Interpreter::builtinURIError): (KJS::Interpreter::builtinEvalErrorPrototype): (KJS::Interpreter::builtinRangeErrorPrototype): (KJS::Interpreter::builtinReferenceErrorPrototype): (KJS::Interpreter::builtinSyntaxErrorPrototype): (KJS::Interpreter::builtinTypeErrorPrototype): (KJS::Interpreter::builtinURIErrorPrototype): (KJS::Interpreter::mark): (KJS::Interpreter::interpreterWithGlobalObject): (KJS::Interpreter::saveBuiltins): (KJS::Interpreter::restoreBuiltins):
  • kjs/interpreter.h: (KJS::Interpreter::setCompatMode): (KJS::Interpreter::compatMode): (KJS::Interpreter::firstInterpreter): (KJS::Interpreter::nextInterpreter): (KJS::Interpreter::prevInterpreter): (KJS::Interpreter::debugger): (KJS::Interpreter::setDebugger): (KJS::Interpreter::setContext): (KJS::Interpreter::context):
  • kjs/nodes.cpp: (StatementNode::hitStatement): (RegExpNode::evaluate):
  • kjs/protect.h:

JavaScriptGlue:

Reviewed by TimO, Maciej.


  • JSGlue part of merging InterpreterImp into Interpreter.


Since there's now a kjs forwarding header, I moved all forwarding
headers into a "ForwardingHeaders" directory, like in WebCore.

  • ForwardingHeaders: Added.
  • ForwardingHeaders/kjs: Added.
  • ForwardingHeaders/kjs/ExecState.h: Added.
  • ForwardingHeaders/wtf: Added.
  • JavaScriptGlue.xcodeproj/project.pbxproj:
  • config.h:
  • wtf: Removed.
  • wtf/AlwaysInline.h: Removed.
  • wtf/Assertions.h: Removed.
  • wtf/FastMalloc.h: Removed.
  • wtf/Forward.h: Removed.
  • wtf/HashCountedSet.h: Removed.
  • wtf/HashSet.h: Removed.
  • wtf/Noncopyable.h: Removed.
  • wtf/OwnArrayPtr.h: Removed.
  • wtf/OwnPtr.h: Removed.
  • wtf/PassRefPtr.h: Removed.
  • wtf/Platform.h: Removed.
  • wtf/RefPtr.h: Removed.
  • wtf/Vector.h: Removed.

WebCore:

Reviewed by TimO, Maciej.

  • WebCore part of merging InterpreterImp into Interpreter. No test because there's no behavior change.


A substantive change here is that ScriptInterpreter::mark must now chain to
Interpreter::mark, since Interpreter needs to mark the things that
InterpreterImp used to mark.


  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/kjs_binding.cpp:
  • bindings/js/kjs_window.cpp: (KJS::Window::put):
  • bridge/mac/WebCoreFrameBridge.mm:
  • bridge/mac/WebCoreScriptDebugger.mm: (-[WebCoreScriptCallFrame evaluateWebScript:]):
  • kwq/KWQPageState.mm:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj

    r14801 r14834  
    3737                14ABB36F099C076400E2A24F /* value.h in Headers */ = {isa = PBXBuildFile; fileRef = 14ABB36E099C076400E2A24F /* value.h */; settings = {ATTRIBUTES = (Private, ); }; };
    3838                14ABB455099C2A0F00E2A24F /* JSType.h in Headers */ = {isa = PBXBuildFile; fileRef = 14ABB454099C2A0F00E2A24F /* JSType.h */; settings = {ATTRIBUTES = (Private, ); }; };
     39                14BD534C0A3E0AEA00BAF59C /* SavedBuiltins.h in Headers */ = {isa = PBXBuildFile; fileRef = 14BD534A0A3E0AEA00BAF59C /* SavedBuiltins.h */; settings = {ATTRIBUTES = (Private, ); }; };
     40                14BD53F50A3E12D800BAF59C /* ExecState.h in Headers */ = {isa = PBXBuildFile; fileRef = 14BD53F30A3E12D800BAF59C /* ExecState.h */; settings = {ATTRIBUTES = (Private, ); }; };
     41                14BD53F60A3E12D800BAF59C /* ExecState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14BD53F40A3E12D800BAF59C /* ExecState.cpp */; };
    3942                14F137590A3A727E00F26F90 /* Context.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14F137580A3A727E00F26F90 /* Context.cpp */; };
    4043                14F137830A3A765B00F26F90 /* context.h in Headers */ = {isa = PBXBuildFile; fileRef = 14F137820A3A765B00F26F90 /* context.h */; settings = {ATTRIBUTES = (Private, ); }; };
     
    268271                14ABB36E099C076400E2A24F /* value.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = value.h; sourceTree = "<group>"; };
    269272                14ABB454099C2A0F00E2A24F /* JSType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSType.h; sourceTree = "<group>"; };
     273                14BD534A0A3E0AEA00BAF59C /* SavedBuiltins.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SavedBuiltins.h; sourceTree = "<group>"; };
     274                14BD53F30A3E12D800BAF59C /* ExecState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExecState.h; sourceTree = "<group>"; };
     275                14BD53F40A3E12D800BAF59C /* ExecState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ExecState.cpp; sourceTree = "<group>"; };
    270276                14F137580A3A727E00F26F90 /* Context.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Context.cpp; sourceTree = "<group>"; };
    271277                14F137820A3A765B00F26F90 /* context.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = context.h; sourceTree = "<group>"; };
     
    737743                                F692A8870255597D01FF60F7 /* value.cpp */,
    738744                                14ABB36E099C076400E2A24F /* value.h */,
     745                                14BD534A0A3E0AEA00BAF59C /* SavedBuiltins.h */,
     746                                14BD53F30A3E12D800BAF59C /* ExecState.h */,
     747                                14BD53F40A3E12D800BAF59C /* ExecState.cpp */,
    739748                        );
    740749                        path = kjs;
     
    920929                                BCF655590A2049710038A194 /* MathExtras.h in Headers */,
    921930                                14F137830A3A765B00F26F90 /* context.h in Headers */,
     931                                14BD534C0A3E0AEA00BAF59C /* SavedBuiltins.h in Headers */,
     932                                14BD53F50A3E12D800BAF59C /* ExecState.h in Headers */,
    922933                        );
    923934                        runOnlyForDeploymentPostprocessing = 0;
     
    11121123                                65FB3F5009D11B2400F49DEB /* grammar.cpp in Sources */,
    11131124                                14F137590A3A727E00F26F90 /* Context.cpp in Sources */,
     1125                                14BD53F60A3E12D800BAF59C /* ExecState.cpp in Sources */,
    11141126                        );
    11151127                        runOnlyForDeploymentPostprocessing = 0;
Note: See TracChangeset for help on using the changeset viewer.