ruby-changes:46156
From: ko1 <ko1@a...>
Date: Fri, 7 Apr 2017 16:50:36 +0900 (JST)
Subject: [ruby-changes:46156] ko1:r58269 (trunk): insert assertions for THROW_DATA_* macros.
ko1 2017-04-07 16:50:30 +0900 (Fri, 07 Apr 2017) New Revision: 58269 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=58269 Log: insert assertions for THROW_DATA_* macros. Modified files: trunk/vm_insnhelper.h Index: vm_insnhelper.h =================================================================== --- vm_insnhelper.h (revision 58268) +++ vm_insnhelper.h (revision 58269) @@ -199,18 +199,21 @@ THROW_DATA_NEW(VALUE val, const rb_contr https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.h#L199 static inline VALUE THROW_DATA_VAL(const struct vm_throw_data *obj) { + VM_ASSERT(THROW_DATA_P(obj)); return obj->throw_obj; } static inline const rb_control_frame_t * THROW_DATA_CATCH_FRAME(const struct vm_throw_data *obj) { + VM_ASSERT(THROW_DATA_P(obj)); return obj->catch_frame; } static inline int THROW_DATA_STATE(const struct vm_throw_data *obj) { + VM_ASSERT(THROW_DATA_P(obj)); return (int)obj->throw_state; } @@ -224,12 +227,14 @@ THROW_DATA_CONSUMED_P(const struct vm_th https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.h#L227 static inline void THROW_DATA_CATCH_FRAME_SET(struct vm_throw_data *obj, const rb_control_frame_t *cfp) { + VM_ASSERT(THROW_DATA_P(obj)); obj->catch_frame = cfp; } static inline void THROW_DATA_STATE_SET(struct vm_throw_data *obj, int st) { + VM_ASSERT(THROW_DATA_P(obj)); obj->throw_state = (VALUE)st; } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/