@@ -3955,7 +3955,7 @@ static void addToAttributeGroup(Compiler* compiler,
39553955 if (IS_OBJ (value )) wrenPushRoot (vm , AS_OBJ (value ));
39563956
39573957 Value groupMapValue = wrenMapGet (compiler -> attributes , group );
3958- if (groupMapValue == UNDEFINED_VAL )
3958+ if (IS_UNDEFINED ( groupMapValue ) )
39593959 {
39603960 groupMapValue = OBJ_VAL (wrenNewMap (vm ));
39613961 wrenMapSet (vm , compiler -> attributes , group , groupMapValue );
@@ -3968,7 +3968,7 @@ static void addToAttributeGroup(Compiler* compiler,
39683968 //var keyItems = group[key]
39693969 //if(!keyItems) keyItems = group[key] = []
39703970 Value keyItemsValue = wrenMapGet (groupMap , key );
3971- if (keyItemsValue == UNDEFINED_VAL )
3971+ if (IS_UNDEFINED ( keyItemsValue ) )
39723972 {
39733973 keyItemsValue = OBJ_VAL (wrenNewList (vm , 0 ));
39743974 wrenMapSet (vm , groupMap , key , keyItemsValue );
@@ -3996,7 +3996,7 @@ static void emitAttributes(Compiler* compiler, ObjMap* attributes)
39963996 for (uint32_t groupIdx = 0 ; groupIdx < attributes -> capacity ; groupIdx ++ )
39973997 {
39983998 const MapEntry * groupEntry = & attributes -> entries [groupIdx ];
3999- if (groupEntry -> key == UNDEFINED_VAL ) continue ;
3999+ if (IS_UNDEFINED ( groupEntry -> key ) ) continue ;
40004000 //group key
40014001 emitConstant (compiler , groupEntry -> key );
40024002
@@ -4008,7 +4008,7 @@ static void emitAttributes(Compiler* compiler, ObjMap* attributes)
40084008 for (uint32_t itemIdx = 0 ; itemIdx < groupItems -> capacity ; itemIdx ++ )
40094009 {
40104010 const MapEntry * itemEntry = & groupItems -> entries [itemIdx ];
4011- if (itemEntry -> key == UNDEFINED_VAL ) continue ;
4011+ if (IS_UNDEFINED ( itemEntry -> key ) ) continue ;
40124012
40134013 emitConstant (compiler , itemEntry -> key );
40144014 // Attribute key value, key = []
@@ -4042,7 +4042,7 @@ static void emitAttributeMethods(Compiler* compiler, ObjMap* attributes)
40424042 for (uint32_t methodIdx = 0 ; methodIdx < attributes -> capacity ; methodIdx ++ )
40434043 {
40444044 const MapEntry * methodEntry = & attributes -> entries [methodIdx ];
4045- if (methodEntry -> key == UNDEFINED_VAL ) continue ;
4045+ if (IS_UNDEFINED ( methodEntry -> key ) ) continue ;
40464046 emitConstant (compiler , methodEntry -> key );
40474047 ObjMap * attributeMap = AS_MAP (methodEntry -> value );
40484048 emitAttributes (compiler , attributeMap );
@@ -4083,7 +4083,7 @@ static void copyAttributes(Compiler* compiler, ObjMap* into)
40834083 for (uint32_t attrIdx = 0 ; attrIdx < compiler -> attributes -> capacity ; attrIdx ++ )
40844084 {
40854085 const MapEntry * attrEntry = & compiler -> attributes -> entries [attrIdx ];
4086- if (attrEntry -> key == UNDEFINED_VAL ) continue ;
4086+ if (IS_UNDEFINED ( attrEntry -> key ) ) continue ;
40874087 wrenMapSet (vm , into , attrEntry -> key , attrEntry -> value );
40884088 }
40894089
0 commit comments