Ignore:
Timestamp:
Sep 30, 2008, 4:46:29 PM (17 years ago)
Author:
Darin Adler
Message:

2008-09-30 Darin Adler <Darin Adler>

Reviewed by Geoff Garen.

Replaced the m_prev field of ExecState with a bit in the
call frame pointer to indicate "host" call frames.

  • VM/Machine.cpp: (JSC::makeHostCallFramePointer): Added. Sets low bit. (JSC::isHostCallFrame): Added. Checks low bit. (JSC::stripHostCallFrameBit): Added. Clears low bit. (JSC::Machine::unwindCallFrame): Replaced null check that was formerly used to detect host call frames with an isHostCallFrame check. (JSC::Machine::execute): Pass in a host call frame pointer rather than always passing 0 when starting execution from the host. This allows us to follow the entire call frame pointer chain when desired, or to stop at the host calls when that's desired. (JSC::Machine::privateExecute): Replaced null check that was formerly used to detect host call frames with an isHostCallFrame check. (JSC::Machine::retrieveCaller): Ditto. (JSC::Machine::retrieveLastCaller): Ditto. (JSC::Machine::callFrame): Removed the code to walk up m_prev pointers and replaced it with code that uses the caller pointer and uses the stripHostCallFrameBit function.
  • kjs/ExecState.cpp: Removed m_prev.
  • kjs/ExecState.h: Ditto.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/ExecState.h

    r37088 r37125  
    101101        JSGlobalData* m_globalData;
    102102
    103         // These values are controlled by the machine.
    104         ExecState* m_prev;
    105103        Register* m_callFrame; // The most recent call frame.
    106104    };
Note: See TracChangeset for help on using the changeset viewer.