JavaScriptCore:
authorggaren <ggaren@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Jun 2006 06:08:52 +0000 (06:08 +0000)
committerggaren <ggaren@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Jun 2006 06:08:52 +0000 (06:08 +0000)
commitc2af877866072ddead7d29e7862bc6a5529ec09f
tree59b2fa555bb1f16d8512968b9e3d65b40c1e4ecb
parentebd0eb92fa2288fefb2f30ac4ea1e34d3a817563
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:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@14834 268f45cc-cd09-0410-ab3c-d52691b4dbfc
46 files changed:
JavaScriptCore/ChangeLog
JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj
JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
JavaScriptCore/bindings/NP_jsobject.cpp
JavaScriptCore/bindings/objc/WebScriptObject.mm
JavaScriptCore/bindings/runtime_root.cpp
JavaScriptCore/bindings/runtime_root.h
JavaScriptCore/kjs/Context.cpp
JavaScriptCore/kjs/ExecState.cpp [new file with mode: 0644]
JavaScriptCore/kjs/ExecState.h [new file with mode: 0644]
JavaScriptCore/kjs/SavedBuiltins.h [new file with mode: 0644]
JavaScriptCore/kjs/bool_object.cpp
JavaScriptCore/kjs/collector.cpp
JavaScriptCore/kjs/context.h
JavaScriptCore/kjs/debugger.cpp
JavaScriptCore/kjs/function.cpp
JavaScriptCore/kjs/function_object.cpp
JavaScriptCore/kjs/internal.cpp
JavaScriptCore/kjs/internal.h
JavaScriptCore/kjs/interpreter.cpp
JavaScriptCore/kjs/interpreter.h
JavaScriptCore/kjs/nodes.cpp
JavaScriptCore/kjs/protect.h
JavaScriptGlue/ChangeLog
JavaScriptGlue/ForwardingHeaders/kjs/ExecState.h [new file with mode: 0644]
JavaScriptGlue/ForwardingHeaders/wtf/AlwaysInline.h [moved from JavaScriptGlue/wtf/AlwaysInline.h with 100% similarity]
JavaScriptGlue/ForwardingHeaders/wtf/Assertions.h [moved from JavaScriptGlue/wtf/Assertions.h with 100% similarity]
JavaScriptGlue/ForwardingHeaders/wtf/FastMalloc.h [moved from JavaScriptGlue/wtf/FastMalloc.h with 100% similarity]
JavaScriptGlue/ForwardingHeaders/wtf/Forward.h [moved from JavaScriptGlue/wtf/Forward.h with 100% similarity]
JavaScriptGlue/ForwardingHeaders/wtf/HashCountedSet.h [moved from JavaScriptGlue/wtf/HashCountedSet.h with 100% similarity]
JavaScriptGlue/ForwardingHeaders/wtf/HashSet.h [moved from JavaScriptGlue/wtf/HashSet.h with 100% similarity]
JavaScriptGlue/ForwardingHeaders/wtf/Noncopyable.h [moved from JavaScriptGlue/wtf/Noncopyable.h with 100% similarity]
JavaScriptGlue/ForwardingHeaders/wtf/OwnArrayPtr.h [moved from JavaScriptGlue/wtf/OwnArrayPtr.h with 100% similarity]
JavaScriptGlue/ForwardingHeaders/wtf/OwnPtr.h [moved from JavaScriptGlue/wtf/OwnPtr.h with 100% similarity]
JavaScriptGlue/ForwardingHeaders/wtf/PassRefPtr.h [moved from JavaScriptGlue/wtf/PassRefPtr.h with 100% similarity]
JavaScriptGlue/ForwardingHeaders/wtf/Platform.h [moved from JavaScriptGlue/wtf/Platform.h with 100% similarity]
JavaScriptGlue/ForwardingHeaders/wtf/RefPtr.h [moved from JavaScriptGlue/wtf/RefPtr.h with 100% similarity]
JavaScriptGlue/ForwardingHeaders/wtf/Vector.h [moved from JavaScriptGlue/wtf/Vector.h with 100% similarity]
JavaScriptGlue/JavaScriptGlue.xcodeproj/project.pbxproj
JavaScriptGlue/config.h
WebCore/ChangeLog
WebCore/bindings/js/kjs_binding.cpp
WebCore/bindings/js/kjs_window.cpp
WebCore/bridge/mac/WebCoreFrameBridge.mm
WebCore/bridge/mac/WebCoreScriptDebugger.mm
WebCore/kwq/KWQPageState.mm