浏览代码

Correctly test class super. Fixes bmx-ng/bcc#129.

woollybah 10 年之前
父节点
当前提交
ad06c49c54
共有 2 个文件被更改,包括 6 次插入1 次删除
  1. 4 0
      appstub.mod/debugger.stdio.glue.c
  2. 2 1
      appstub.mod/debugger_mt.stdio.bmx

+ 4 - 0
appstub.mod/debugger.stdio.glue.c

@@ -69,6 +69,10 @@ int bmx_debugger_DebugDecl_isArrayClass(BBClass * clas) {
 	return clas == &bbArrayClass;
 	return clas == &bbArrayClass;
 }
 }
 
 
+int bmx_debugger_DebugDecl_isBaseObject(BBClass * clas) {
+	return clas->super == 0;
+}
+
 struct BBDebugDecl * bmx_debugger_DebugDecl_ArrayDecl(BBArray  * arr) {
 struct BBDebugDecl * bmx_debugger_DebugDecl_ArrayDecl(BBArray  * arr) {
 	struct BBDebugDecl * decl = malloc(sizeof(struct BBDebugDecl));
 	struct BBDebugDecl * decl = malloc(sizeof(struct BBDebugDecl));
 	
 	

+ 2 - 1
appstub.mod/debugger_mt.stdio.bmx

@@ -55,6 +55,7 @@ Function bbGCValidate:Int( mem:Byte Ptr ) = "bbGCValidate"
 	Function bmx_debugger_DebugDecl_clas:Byte Ptr( inst:Byte Ptr )
 	Function bmx_debugger_DebugDecl_clas:Byte Ptr( inst:Byte Ptr )
 	Function bmx_debugger_DebugDecl_isStringClass:Int( clas:Byte Ptr )
 	Function bmx_debugger_DebugDecl_isStringClass:Int( clas:Byte Ptr )
 	Function bmx_debugger_DebugDecl_isArrayClass:Int( clas:Byte Ptr )
 	Function bmx_debugger_DebugDecl_isArrayClass:Int( clas:Byte Ptr )
+	Function bmx_debugger_DebugDecl_isBaseObject:Int( clas:Byte Ptr )
 	
 	
 	Function bmx_debugger_DebugClassSuper:Byte Ptr(clas:Byte Ptr)
 	Function bmx_debugger_DebugClassSuper:Byte Ptr(clas:Byte Ptr)
 	Function bmx_debugger_DebugClassScope:Byte Ptr(clas:Byte Ptr)
 	Function bmx_debugger_DebugClassScope:Byte Ptr(clas:Byte Ptr)
@@ -531,7 +532,7 @@ Function DumpObject( inst:Byte Ptr,index:Int )
 		
 		
 	Else
 	Else
 			
 			
-		If Not clas[0]
+		If bmx_debugger_DebugDecl_isBaseObject(clas) Then
 			WriteDebug "Object~n"
 			WriteDebug "Object~n"
 			Return
 			Return
 		EndIf
 		EndIf