Changeset 39697 in webkit for trunk/JavaScriptCore/bytecode/CodeBlock.h
- Timestamp:
- Jan 7, 2009, 5:46:14 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/bytecode/CodeBlock.h
r39670 r39697 1 1 /* 2 * Copyright (C) 2008 Apple Inc. All rights reserved.2 * Copyright (C) 2008, 2009 Apple Inc. All rights reserved. 3 3 * Copyright (C) 2008 Cameron Zwarich <[email protected]> 4 4 * … … 264 264 265 265 HandlerInfo* handlerForBytecodeOffset(unsigned bytecodeOffset); 266 int lineNumberForBytecodeOffset( unsigned bytecodeOffset);267 int expressionRangeForBytecodeOffset( unsigned bytecodeOffset, int& divot, int& startOffset, int& endOffset);268 bool getByIdExceptionInfoForBytecodeOffset( unsigned bytecodeOffset, OpcodeID&);266 int lineNumberForBytecodeOffset(CallFrame*, unsigned bytecodeOffset); 267 int expressionRangeForBytecodeOffset(CallFrame*, unsigned bytecodeOffset, int& divot, int& startOffset, int& endOffset); 268 bool getByIdExceptionInfoForBytecodeOffset(CallFrame*, unsigned bytecodeOffset, OpcodeID&); 269 269 270 270 #if ENABLE(JIT) … … 341 341 unsigned jumpTarget(int index) const { return m_jumpTargets[index]; } 342 342 unsigned lastJumpTarget() const { return m_jumpTargets.last(); } 343 344 size_t numberOfExceptionHandlers() const { return m_rareData ? m_rareData->m_exceptionHandlers.size() : 0; }345 void addExceptionHandler(const HandlerInfo& hanler) { createRareDataIfNecessary(); return m_rareData->m_exceptionHandlers.append(hanler); }346 HandlerInfo& exceptionHandler(int index) { ASSERT(m_rareData); return m_rareData->m_exceptionHandlers[index]; }347 348 void addExpressionInfo(const ExpressionRangeInfo& expressionInfo) { return m_expressionInfo.append(expressionInfo); }349 void addGetByIdExceptionInfo(const GetByIdExceptionInfo& info) { m_getByIdExceptionInfo.append(info); }350 351 size_t numberOfLineInfos() const { return m_lineInfo.size(); }352 void addLineInfo(const LineInfo& lineInfo) { return m_lineInfo.append(lineInfo); }353 LineInfo& lastLineInfo() { return m_lineInfo.last(); }354 343 355 344 #if !ENABLE(JIT) … … 372 361 Vector<PC>& pcVector() { return m_pcVector; } 373 362 #endif 363 364 // Exception handling support 365 366 size_t numberOfExceptionHandlers() const { return m_rareData ? m_rareData->m_exceptionHandlers.size() : 0; } 367 void addExceptionHandler(const HandlerInfo& hanler) { createRareDataIfNecessary(); return m_rareData->m_exceptionHandlers.append(hanler); } 368 HandlerInfo& exceptionHandler(int index) { ASSERT(m_rareData); return m_rareData->m_exceptionHandlers[index]; } 369 370 void clearExceptionInfo() { m_exceptionInfo.clear(); } 371 372 void addExpressionInfo(const ExpressionRangeInfo& expressionInfo) { ASSERT(m_exceptionInfo); m_exceptionInfo->m_expressionInfo.append(expressionInfo); } 373 void addGetByIdExceptionInfo(const GetByIdExceptionInfo& info) { ASSERT(m_exceptionInfo); m_exceptionInfo->m_getByIdExceptionInfo.append(info); } 374 375 size_t numberOfLineInfos() const { ASSERT(m_exceptionInfo); return m_exceptionInfo->m_lineInfo.size(); } 376 void addLineInfo(const LineInfo& lineInfo) { ASSERT(m_exceptionInfo); m_exceptionInfo->m_lineInfo.append(lineInfo); } 377 LineInfo& lastLineInfo() { ASSERT(m_exceptionInfo); return m_exceptionInfo->m_lineInfo.last(); } 374 378 375 379 // Constant Pool … … 433 437 #endif 434 438 439 void reparseForExceptionInfoIfNecessary(CallFrame*); 440 435 441 void createRareDataIfNecessary() 436 442 { … … 438 444 m_rareData.set(new RareData); 439 445 } 440 441 446 442 447 ScopeNode* m_ownerNode; … … 470 475 Vector<CallLinkInfo> m_callLinkInfos; 471 476 Vector<CallLinkInfo*> m_linkedCallerList; 477 478 Vector<PC> m_pcVector; 472 479 #endif 473 480 474 481 Vector<unsigned> m_jumpTargets; 475 476 Vector<ExpressionRangeInfo> m_expressionInfo;477 Vector<LineInfo> m_lineInfo;478 Vector<GetByIdExceptionInfo> m_getByIdExceptionInfo;479 480 #if ENABLE(JIT)481 Vector<PC> m_pcVector;482 #endif483 482 484 483 // Constant Pool … … 489 488 SymbolTable m_symbolTable; 490 489 490 struct ExceptionInfo { 491 Vector<ExpressionRangeInfo> m_expressionInfo; 492 Vector<LineInfo> m_lineInfo; 493 Vector<GetByIdExceptionInfo> m_getByIdExceptionInfo; 494 }; 495 OwnPtr<ExceptionInfo> m_exceptionInfo; 496 491 497 struct RareData { 492 498 Vector<HandlerInfo> m_exceptionHandlers; … … 508 514 #endif 509 515 }; 510 511 516 OwnPtr<RareData> m_rareData; 512 517 };
Note:
See TracChangeset
for help on using the changeset viewer.