JavaScriptCore:
authorggaren@apple.com <ggaren@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 16 Jul 2008 22:47:32 +0000 (22:47 +0000)
committerggaren@apple.com <ggaren@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 16 Jul 2008 22:47:32 +0000 (22:47 +0000)
commit1e7ad80f61343f0d247a64f6851e28a52a8abc31
treed9ed5fda1598f0af51e1a2422419d7a642ea73ea
parent3c8c1323da22164ad11fe32a6ab496ea92cb4797
JavaScriptCore:

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

        Reviewed by Oliver Hunt.

        First step toward putting doubles in registers: Turned Register into a
        proper abstraction layer. It is no longer possible to cast a Register
        to a JSValue*, or a Register& to a JSValue*&, or to access the union
        inside a Register directly.

        SunSpider reports no change.

        In support of this change, I had to make the following mechanical changes
        in a lot of places:

        1. Clients now use explicit accessors to read data out of Registers, and
        implicit copy constructors to write data into registers.

        So, assignment that used to look like

            x.u.jsValue = y;

        now looks like

            x = y;

        And access that used to look like

            x = y.u.jsValue;

        now looks like

            x = y.jsValue();

        2. I made generic flow control specific in opcodes that made their flow
        control generic by treating a Register& as a JSValue*&. This had the
        added benefit of removing some exception checking branches from immediate
        number code.

        3. I beefed up PropertySlot to support storing a Register* in a property
        slot. For now, only JSVariableObject's symbolTableGet and symbolTablePut
        use this functionality, but I expect more clients to use it in the future.

        4. I changed ArgList to be a buffer of Registers, not JSValue*'s, and I
        changed ArgList iterator clients to iterate Registers, not JSValue*'s.

WebCore:

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

        Reviewed by Oliver Hunt.

        Support for JavaScriptCore's first step toward putting doubles in
        registers: Treat ArgList iterators as Register*'s, not JSValue*'s.

        * bindings/js/ScheduledAction.cpp:
        (WebCore::ScheduledAction::ScheduledAction):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35203 268f45cc-cd09-0410-ab3c-d52691b4dbfc
22 files changed:
JavaScriptCore/ChangeLog
JavaScriptCore/VM/Machine.cpp
JavaScriptCore/VM/Machine.h
JavaScriptCore/VM/Register.h
JavaScriptCore/kjs/ArgList.cpp
JavaScriptCore/kjs/ArgList.h
JavaScriptCore/kjs/Arguments.cpp
JavaScriptCore/kjs/ArrayPrototype.cpp
JavaScriptCore/kjs/DebuggerCallFrame.cpp
JavaScriptCore/kjs/IndexToNameMap.cpp
JavaScriptCore/kjs/JSActivation.cpp
JavaScriptCore/kjs/JSArray.cpp
JavaScriptCore/kjs/JSGlobalObject.h
JavaScriptCore/kjs/JSString.h
JavaScriptCore/kjs/JSValue.h
JavaScriptCore/kjs/JSVariableObject.cpp
JavaScriptCore/kjs/JSVariableObject.h
JavaScriptCore/kjs/PropertySlot.h
JavaScriptCore/kjs/StringConstructor.cpp
JavaScriptCore/kjs/StringPrototype.cpp
WebCore/ChangeLog
WebCore/bindings/js/ScheduledAction.cpp