Changeset 34412 in webkit for trunk/JavaScriptCore/kjs/ExecState.h
- Timestamp:
- Jun 6, 2008, 11:03:24 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/ExecState.h
r34355 r34412 25 25 #define ExecState_h 26 26 27 #include "JSGlobalData.h" 27 28 #include "LabelStack.h" 28 29 #include "LocalStorageEntry.h" … … 33 34 namespace KJS { 34 35 35 class CommonIdentifiers;36 36 class EvalNode; 37 37 class FunctionBodyNode; 38 38 class FunctionImp; 39 39 class GlobalFuncImp; 40 struct HashTable;41 40 class Interpreter; 42 41 class JSGlobalObject; … … 49 48 struct Instruction; 50 49 51 struct PerThreadData {52 const HashTable* arrayTable;53 const HashTable* dateTable;54 const HashTable* mathTable;55 const HashTable* numberTable;56 const HashTable* RegExpImpTable;57 const HashTable* RegExpObjectImpTable;58 const HashTable* stringTable;59 60 CommonIdentifiers* propertyNames;61 List emptyList;62 };63 64 50 // Represents the current state of script execution. 65 51 // Passed as the first argument to most functions. … … 92 78 bool hadException() const { return !!m_exception; } 93 79 94 // These pointers are used to avoid accessing global variables for these, 95 // to avoid taking PIC branches in Mach-O binaries. 96 const CommonIdentifiers& propertyNames() const { return *m_perThreadData->propertyNames; } 97 const List& emptyList() const { return m_perThreadData->emptyList; } 98 static const HashTable* arrayTable(ExecState* exec) { return exec->m_perThreadData->arrayTable; } 99 static const HashTable* dateTable(ExecState* exec) { return exec->m_perThreadData->dateTable; } 100 static const HashTable* mathTable(ExecState* exec) { return exec->m_perThreadData->mathTable; } 101 static const HashTable* numberTable(ExecState* exec) { return exec->m_perThreadData->numberTable; } 102 static const HashTable* RegExpImpTable(ExecState* exec) { return exec->m_perThreadData->RegExpImpTable; } 103 static const HashTable* RegExpObjectImpTable(ExecState* exec) { return exec->m_perThreadData->RegExpObjectImpTable; } 104 static const HashTable* stringTable(ExecState* exec) { return exec->m_perThreadData->stringTable; } 80 JSGlobalData& globalData() { return *m_globalData; } 81 82 IdentifierTable* identifierTable() { return m_globalData->identifierTable; } 83 const CommonIdentifiers& propertyNames() const { return *m_globalData->propertyNames; } 84 const List& emptyList() const { return m_globalData->emptyList; } 85 Lexer* lexer() { return m_globalData->lexer; } 86 Parser* parser() { return m_globalData->parser; } 87 static const HashTable* arrayTable(ExecState* exec) { return exec->m_globalData->arrayTable; } 88 static const HashTable* dateTable(ExecState* exec) { return exec->m_globalData->dateTable; } 89 static const HashTable* mathTable(ExecState* exec) { return exec->m_globalData->mathTable; } 90 static const HashTable* numberTable(ExecState* exec) { return exec->m_globalData->numberTable; } 91 static const HashTable* RegExpImpTable(ExecState* exec) { return exec->m_globalData->RegExpImpTable; } 92 static const HashTable* RegExpObjectImpTable(ExecState* exec) { return exec->m_globalData->RegExpObjectImpTable; } 93 static const HashTable* stringTable(ExecState* exec) { return exec->m_globalData->stringTable; } 105 94 106 95 private: … … 117 106 JSValue* m_exception; 118 107 119 const PerThreadData* m_perThreadData;108 JSGlobalData* m_globalData; 120 109 121 110 // These values are controlled by the machine.
Note:
See TracChangeset
for help on using the changeset viewer.