Changeset 210119 in webkit
- Timestamp:
- Dec 22, 2016, 3:23:51 PM (8 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/Source/JavaScriptCore/ChangeLog ¶
r210116 r210119 1 2016-12-22 Mark Lam <mark.lam@apple.com> 2 3 BytecodeGenerator::m_finallyDepth should be unsigned. 4 https://bugs.webkit.org/show_bug.cgi?id=166438 5 6 Reviewed by Saam Barati. 7 8 Also removed FinallyContext::m_finallyDepth because it is not used. 9 10 * bytecompiler/BytecodeGenerator.cpp: 11 (JSC::BytecodeGenerator::pushFinallyControlFlowScope): 12 (JSC::BytecodeGenerator::labelScopeDepth): 13 * bytecompiler/BytecodeGenerator.h: 14 (JSC::FinallyContext::FinallyContext): 15 (JSC::FinallyContext::finallyLabel): 16 (JSC::FinallyContext::depth): Deleted. 17 1 18 2016-12-22 Mark Lam <mark.lam@apple.com> 2 19 -
TabularUnified trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp ¶
r210116 r210119 3688 3688 m_labelScopes.removeLast(); 3689 3689 3690 ControlFlowScope scope(ControlFlowScope::Finally, currentLexicalScopeIndex(), FinallyContext(m_currentFinallyContext, finallyLabel , m_finallyDepth));3690 ControlFlowScope scope(ControlFlowScope::Finally, currentLexicalScopeIndex(), FinallyContext(m_currentFinallyContext, finallyLabel)); 3691 3691 m_controlFlowScopeStack.append(WTFMove(scope)); 3692 3692 … … 3887 3887 int BytecodeGenerator::labelScopeDepth() const 3888 3888 { 3889 intdepth = localScopeDepth() + m_finallyDepth;3890 ASSERT(depth == static_cast<int>(m_controlFlowScopeStack.size()));3889 unsigned depth = localScopeDepth() + m_finallyDepth; 3890 ASSERT(depth == m_controlFlowScopeStack.size()); 3891 3891 return depth; 3892 3892 } -
TabularUnified trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h ¶
r210116 r210119 122 122 struct FinallyContext { 123 123 FinallyContext() { } 124 FinallyContext(FinallyContext* outerContext, Label* finallyLabel , int finallyDepth)124 FinallyContext(FinallyContext* outerContext, Label* finallyLabel) 125 125 : m_outerContext(outerContext) 126 126 , m_finallyLabel(finallyLabel) 127 , m_finallyDepth(finallyDepth) 128 { 129 ASSERT(m_finallyDepth >= 0); 127 { 130 128 ASSERT(m_jumps.isEmpty()); 131 129 } … … 133 131 FinallyContext* outerContext() const { return m_outerContext; } 134 132 Label* finallyLabel() const { return m_finallyLabel; } 135 int depth() const { return m_finallyDepth; }136 133 137 134 uint32_t numberOfBreaksOrContinues() const { return m_numberOfBreaksOrContinues.unsafeGet(); } … … 152 149 FinallyContext* m_outerContext { nullptr }; 153 150 Label* m_finallyLabel { nullptr }; 154 int m_finallyDepth { 0 };155 151 Checked<uint32_t, WTF::CrashOnOverflow> m_numberOfBreaksOrContinues; 156 152 bool m_handlesReturns { false }; … … 1092 1088 SegmentedVector<Label, 32> m_labels; 1093 1089 LabelScopeStore m_labelScopes; 1094 intm_finallyDepth { 0 };1090 unsigned m_finallyDepth { 0 }; 1095 1091 int m_localScopeDepth { 0 }; 1096 1092 const CodeType m_codeType;
Note:
See TracChangeset
for help on using the changeset viewer.