Changeset 66150 in webkit for trunk/JavaScriptCore/assembler/LinkBuffer.h
- Timestamp:
- Aug 26, 2010, 4:21:24 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/assembler/LinkBuffer.h
r65042 r66150 63 63 #endif 64 64 65 enum LinkBufferState {66 StateInit,67 StateChecked,68 StateFinalized,69 };70 71 65 public: 72 66 // Note: Initialization sequence is significant, since executablePool is a PassRefPtr. … … 80 74 , m_assembler(masm) 81 75 #ifndef NDEBUG 82 , m_ state(StateInit)76 , m_completed(false) 83 77 #endif 84 78 { … … 88 82 ~LinkBuffer() 89 83 { 90 ASSERT(m_state == StateFinalized); 91 } 92 93 // After constructing a link buffer, a client must call allocationSuccessful() to check alloc did not return 0. 94 bool allocationSuccessful() 95 { 96 #ifndef NDEBUG 97 ASSERT(m_state == StateInit); 98 m_state = StateChecked; 99 #endif 100 101 return m_code; 84 ASSERT(m_completed); 102 85 } 103 86 … … 285 268 { 286 269 #ifndef NDEBUG 287 ASSERT( m_state == StateChecked);288 m_ state = StateFinalized;270 ASSERT(!m_completed); 271 m_completed = true; 289 272 #endif 290 273 … … 298 281 MacroAssembler* m_assembler; 299 282 #ifndef NDEBUG 300 LinkBufferState m_state;283 bool m_completed; 301 284 #endif 302 285 };
Note:
See TracChangeset
for help on using the changeset viewer.