From fbe89ca13ed5796360163614dfe3cd1c1e02d386 Mon Sep 17 00:00:00 2001 From: "erik.corry@gmail.com" Date: Thu, 16 Jun 2011 15:18:48 +0000 Subject: [PATCH] Add missing assert to Label destructor. Review URL: http://codereview.chromium.org/7172026 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8316 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/assembler.h | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/assembler.h b/src/assembler.h index 29f1ea9..bced11f 100644 --- a/src/assembler.h +++ b/src/assembler.h @@ -90,14 +90,18 @@ class Label BASE_EMBEDDED { Unuse(); UnuseNear(); } - INLINE(~Label()) { ASSERT(!is_linked()); } - INLINE(void Unuse()) { pos_ = 0; } - INLINE(void UnuseNear()) { near_link_pos_ = 0; } + INLINE(~Label()) { + ASSERT(!is_linked()); + ASSERT(!is_near_linked()); + } + + INLINE(void Unuse()) { pos_ = 0; } + INLINE(void UnuseNear()) { near_link_pos_ = 0; } - INLINE(bool is_bound() const) { return pos_ < 0; } - INLINE(bool is_unused() const) { return pos_ == 0 && near_link_pos_ == 0; } - INLINE(bool is_linked() const) { return pos_ > 0; } + INLINE(bool is_bound() const) { return pos_ < 0; } + INLINE(bool is_unused() const) { return pos_ == 0 && near_link_pos_ == 0; } + INLINE(bool is_linked() const) { return pos_ > 0; } INLINE(bool is_near_linked() const) { return near_link_pos_ > 0; } // Returns the position of bound or linked labels. Cannot be used -- 2.7.4