Changeset 38463 in webkit for trunk/JavaScriptCore/runtime


Ignore:
Timestamp:
Nov 16, 2008, 6:08:54 PM (17 years ago)
Author:
[email protected]
Message:

2008-11-16 Geoffrey Garen <[email protected]>

Roll out r38461 (my last patch) because it broke the world.

Location:
trunk/JavaScriptCore/runtime
Files:
11 edited

Legend:

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

    r38461 r38463  
    8383        const CommonIdentifiers& propertyNames() const { return *globalData().propertyNames; }
    8484        const ArgList& emptyList() const { return *globalData().emptyList; }
    85         Interpreter* interpreter() { return globalData().interpreter; }
     85        BytecodeInterpreter* interpreter() { return globalData().interpreter; }
    8686        Heap* heap() { return &globalData().heap; }
    8787
     
    9898        friend class JSActivation;
    9999        friend class JSGlobalObject;
    100         friend class Interpreter;
     100        friend class BytecodeInterpreter;
    101101
    102102        static CallFrame* create(Register* callFrameBase) { return static_cast<CallFrame*>(callFrameBase); }
  • trunk/JavaScriptCore/runtime/JSCell.h

    r38461 r38463  
    3939        friend class JSString;
    4040        friend class JSValue;
    41         friend class Interpreter;
     41        friend class BytecodeInterpreter;
    4242
    4343    private:
  • trunk/JavaScriptCore/runtime/JSFunction.h

    r38461 r38463  
    4040    class JSFunction : public InternalFunction {
    4141        friend class CTI;
    42         friend class Interpreter;
     42        friend class BytecodeInterpreter;
    4343
    4444        typedef InternalFunction Base;
  • trunk/JavaScriptCore/runtime/JSGlobalData.cpp

    r38461 r38463  
    6565
    6666JSGlobalData::JSGlobalData(bool isShared)
    67     : interpreter(new Interpreter)
     67    : interpreter(new BytecodeInterpreter)
    6868    , exception(noValue())
    6969    , arrayTable(new HashTable(JSC::arrayTable))
  • trunk/JavaScriptCore/runtime/JSGlobalData.h

    r38461 r38463  
    4848    class JSObject;
    4949    class Lexer;
    50     class Interpreter;
     50    class BytecodeInterpreter;
    5151    class Parser;
    5252    class ParserRefCounted;
     
    6464        ~JSGlobalData();
    6565
    66         Interpreter* interpreter;
     66        BytecodeInterpreter* interpreter;
    6767
    6868        JSValue* exception;
  • trunk/JavaScriptCore/runtime/JSImmediate.h

    r38461 r38463  
    8787    class JSImmediate {
    8888    private:
    89         friend class CTI;
     89        friend class CTI; // Whooo!
    9090   
    9191        static const uintptr_t TagMask           = 0x3u; // primary tag is 2 bits long
  • trunk/JavaScriptCore/runtime/JSString.h

    r38461 r38463  
    6161    class JSString : public JSCell {
    6262        friend class CTI;
    63         friend class Interpreter;
     63        friend class BytecodeInterpreter;
    6464
    6565    public:
  • trunk/JavaScriptCore/runtime/JSValue.h

    r38461 r38463  
    2929#include "UString.h"
    3030#include <stddef.h> // for size_t
     31
     32// The magic number 0x4000 is not important here, it is being subtracted back out (avoiding using zero since this
     33// can have unexpected effects in this type of macro, particularly where multiple-inheritance is involved).
     34#define OBJECT_OFFSET(class, member) (reinterpret_cast<ptrdiff_t>(&(reinterpret_cast<class*>(0x4000)->member)) - 0x4000)
    3135
    3236namespace JSC {
  • trunk/JavaScriptCore/runtime/JSVariableObject.h

    r38461 r38463  
    4242
    4343    class JSVariableObject : public JSObject {
    44         friend class CTI;
    45 
    4644    public:
    4745        SymbolTable& symbolTable() const { return *d->symbolTable; }
     
    7573            OwnArrayPtr<Register> registerArray; // Independent copy of registers, used when a variable object copies its registers out of the register file.
    7674
     75            static inline ptrdiff_t offsetOf_registers()
     76            {
     77                return OBJECT_OFFSET(JSVariableObjectData, registers);
     78            }
     79
    7780        private:
    7881            JSVariableObjectData(const JSVariableObjectData&);
     
    9598
    9699        JSVariableObjectData* d;
     100
     101    public:
     102        static inline ptrdiff_t offsetOf_d()
     103        {
     104            return OBJECT_OFFSET(JSVariableObject, d);
     105        }
     106
     107        static inline ptrdiff_t offsetOf_Data_registers()
     108        {
     109            return JSVariableObjectData::offsetOf_registers();
     110        }
    97111    };
    98112
  • trunk/JavaScriptCore/runtime/RegExp.cpp

    r38461 r38463  
    2222#include "RegExp.h"
    2323
     24#include "CTI.h"
    2425#include "Lexer.h"
    2526#include <pcre/pcre.h>
     
    2728#include <stdlib.h>
    2829#include <string.h>
     30#include <wrec/WREC.h>
    2931#include <wtf/Assertions.h>
    3032#include <wtf/OwnArrayPtr.h>
     
    4446{
    4547#if ENABLE(WREC)
    46     m_wrecFunction = compileRegExp(globalData->interpreter, pattern, &m_numSubpatterns, &m_constructionError);
     48    m_wrecFunction = WREC::compileRegExp(globalData->interpreter, pattern, &m_numSubpatterns, &m_constructionError);
    4749    if (m_wrecFunction)
    4850        return;
     
    8789
    8890#if ENABLE(WREC)
    89     m_wrecFunction = compileRegExp(globalData->interpreter, pattern, &m_numSubpatterns, &m_constructionError, (m_flagBits & IgnoreCase), (m_flagBits & Multiline));
     91    m_wrecFunction = WREC::compileRegExp(globalData->interpreter, pattern, &m_numSubpatterns, &m_constructionError, (m_flagBits & IgnoreCase), (m_flagBits & Multiline));
    9092    if (m_wrecFunction)
    9193        return;
     
    108110#if ENABLE(WREC)
    109111    if (m_wrecFunction)
    110         WTF::fastFreeExecutable(reinterpret_cast<void*>(m_wrecFunction));
     112        WTF::fastFreeExecutable(m_wrecFunction);
    111113#endif
    112114}
     
    135137            ovector->set(offsetVector);
    136138
    137         int result = m_wrecFunction(s.data(), i, s.size(), offsetVector);
     139        int result = reinterpret_cast<WRECFunction>(m_wrecFunction)(s.data(), i, s.size(), offsetVector);
    138140
    139141        if (result < 0) {
  • trunk/JavaScriptCore/runtime/RegExp.h

    r38461 r38463  
    2323
    2424#include "UString.h"
    25 #include "WREC.h"
    2625#include <wtf/Forward.h>
    2726#include <wtf/RefCounted.h>
     
    6867
    6968#if ENABLE(WREC)
    70         WREC::RegExpFunction m_wrecFunction;
     69        // Called as a WRECFunction
     70        void* m_wrecFunction;
    7171#endif
    7272    };
Note: See TracChangeset for help on using the changeset viewer.