Changeset 35245 in webkit for trunk/JavaScriptCore/VM/CodeBlock.h
- Timestamp:
- Jul 18, 2008, 6:44:24 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/VM/CodeBlock.h
r35231 r35245 34 34 #include "JSGlobalObject.h" 35 35 #include "nodes.h" 36 #include "SourceRange.h" 36 37 #include "ustring.h" 37 38 #include <wtf/RefPtr.h> … … 45 46 46 47 struct HandlerInfo { 47 unsigned start; 48 unsigned end; 49 unsigned target; 50 unsigned scopeDepth; 48 uint32_t start; 49 uint32_t end; 50 uint32_t target; 51 uint32_t scopeDepth; 52 }; 53 54 struct ExpressionRangeInfo { 55 enum { MaxOffset = (1 << 7) - 1, 56 MaxDivot = (1 << 25) - 1 57 }; 58 uint32_t instructionOffset : 25; 59 uint32_t divotPoint : 25; 60 uint32_t startOffset : 7; 61 uint32_t endOffset : 7; 51 62 }; 52 63 53 64 struct LineInfo { 54 u nsignedinstructionOffset;55 int lineNumber;65 uint32_t instructionOffset; 66 int32_t lineNumber; 56 67 }; 57 68 58 69 struct CodeBlock { 59 CodeBlock(ScopeNode* ownerNode_, CodeType codeType_ )70 CodeBlock(ScopeNode* ownerNode_, CodeType codeType_, PassRefPtr<SourceProvider> source_, unsigned sourceOffset_) 60 71 : ownerNode(ownerNode_) 61 72 , numTemporaries(0) … … 66 77 , usesEval(ownerNode_->usesEval()) 67 78 , codeType(codeType_) 79 , source(source_) 80 , sourceOffset(sourceOffset_) 68 81 { 69 82 } 70 83 71 84 void dump(ExecState*) const; 72 int lineNumberForVPC(const Instruction*); 85 int expressionRangeForVPC(const Instruction*, int& divot, int& startOffset, int& endOffset); 86 int lineNumberForVPC(const Instruction* vPC); 73 87 bool getHandlerForVPC(const Instruction* vPC, Instruction*& target, int& scopeDepth); 74 88 void mark(); … … 84 98 bool usesEval; 85 99 CodeType codeType; 100 RefPtr<SourceProvider> source; 101 unsigned sourceOffset; 86 102 87 103 Vector<Instruction> instructions; … … 94 110 Vector<RefPtr<RegExp> > regexps; 95 111 Vector<HandlerInfo> exceptionHandlers; 112 Vector<ExpressionRangeInfo> expressionInfo; 96 113 Vector<LineInfo> lineInfo; 97 114 … … 104 121 105 122 struct ProgramCodeBlock : public CodeBlock { 106 ProgramCodeBlock(ScopeNode* ownerNode_, CodeType codeType_, JSGlobalObject* globalObject_ )107 : CodeBlock(ownerNode_, codeType_ )123 ProgramCodeBlock(ScopeNode* ownerNode_, CodeType codeType_, JSGlobalObject* globalObject_, PassRefPtr<SourceProvider> source_) 124 : CodeBlock(ownerNode_, codeType_, source_, 0) 108 125 , globalObject(globalObject_) 109 126 { … … 121 138 122 139 struct EvalCodeBlock : public ProgramCodeBlock { 123 EvalCodeBlock(ScopeNode* ownerNode_, JSGlobalObject* globalObject_ )124 : ProgramCodeBlock(ownerNode_, EvalCode, globalObject_ )140 EvalCodeBlock(ScopeNode* ownerNode_, JSGlobalObject* globalObject_, PassRefPtr<SourceProvider> source_) 141 : ProgramCodeBlock(ownerNode_, EvalCode, globalObject_, source_) 125 142 { 126 143 }
Note:
See TracChangeset
for help on using the changeset viewer.