diff mc.h @ 676:5e71527f9fd6

*** empty log message ***
author kono
date Sun, 06 May 2007 18:48:13 +0900
parents 442e90958386
children f536897fa3cb
line wrap: on
line diff
--- a/mc.h	Sat May 05 14:50:39 2007 +0900
+++ b/mc.h	Sun May 06 18:48:13 2007 +0900
@@ -192,29 +192,28 @@
 #define BUILTIN_INF	16
 #define BUILTIN_INFF	17
 #define BUILTIN_INFL	18
-#define BUILTIN_IS_FLOAT	19
-#define LABEL  	20
+#define LABEL  	19
 
 #define NULLARY_ARGS(i) (i==RETURN||i==ENVIRONMENT||i==LCALL||i==REGISTER||i==DREGISTER||i==FREGISTER||i==LREGISTER||(GVAR<=(i%SOP)&&(i%SOP)<=LABEL))
 
 /* unary  argments */
 
-#define ADDRESS	21
-#define MINUS  	22
-#define LNOT   	23
-#define BNOT   	24
-#define INC    	25
-#define PERIOD 	26
-#define ARROW  	27
-#define POSTINC	28
-#define UPOSTINC       	29
-#define PREINC 	30
-#define UPREINC	31
-#define POSTDEC	32
-#define UPOSTDEC       	33
-#define PREDEC 	34
-#define UPREDEC	35
-#define DEC    	36
+#define ADDRESS	20
+#define MINUS  	21
+#define LNOT   	22
+#define BNOT   	23
+#define INC    	24
+#define PERIOD 	25
+#define ARROW  	26
+#define POSTINC	27
+#define UPOSTINC       	28
+#define PREINC 	29
+#define UPREINC	30
+#define POSTDEC	31
+#define UPOSTDEC       	32
+#define PREDEC 	33
+#define UPREDEC	34
+#define DEC    	35
 #define CPOSTINC (COP+POSTINC)
 #define CUPOSTINC (COP+UPOSTINC)
 #define CPREINC (COP+PREINC)
@@ -239,9 +238,9 @@
 #define LPREINC (LOP+PREINC)
 #define LUPOSTINC       (LOP+UPOSTINC)
 #define LUPREINC        (LOP+UPREINC)
-#define INDIRECT       	37
-#define RINDIRECT      	38
-#define URINDIRECT     	39
+#define INDIRECT       	36
+#define RINDIRECT      	37
+#define URINDIRECT     	38
 #define CRINDIRECT      (COP+RINDIRECT)
 #define CURINDIRECT     (COP+URINDIRECT)
 #define SRINDIRECT      (SOP+RINDIRECT)
@@ -250,61 +249,61 @@
 #define DRINDIRECT      (DOP+RINDIRECT)
 #define LRINDIRECT      (LOP+RINDIRECT)
 #define LURINDIRECT     (LOP+URINDIRECT)
-#define RSTRUCT	40
-#define ALLOCA 	41
-#define BUILTINP 	42
-#define BUILTIN_EXPECT 	43
-#define BUILTIN_FABS	44
-#define BUILTIN_FABSF	45
-#define BUILTIN_FABSL	46
-#define ATTRIBUTE 	47
-#define BIT_FIELD 	48
-#define RBIT_FIELD 	49
-#define BPREINC 	50
-#define BPOSTINC 	51
-#define CONV   	52
+#define RSTRUCT	39
+#define ALLOCA 	40
+#define BUILTINP 	41
+#define BUILTIN_EXPECT 	42
+#define BUILTIN_FABS	43
+#define BUILTIN_FABSF	44
+#define BUILTIN_FABSL	45
+#define ATTRIBUTE 	46
+#define BIT_FIELD 	47
+#define RBIT_FIELD 	48
+#define BPREINC 	49
+#define BPOSTINC 	50
+#define CONV   	51
 
 #define UNARY_ARGS(i) (ADDRESS<=(i%SOP)&&(i%SOP)<=CONV)
 
 /* binary  argments */
 
-#define MUL    	53
-#define UMUL   	54
-#define DIV    	55
-#define UDIV   	56
-#define MOD    	57
-#define UMOD   	58
-#define ADD    	59
-#define SUB    	60
-#define CMP    	61      
-#define RSHIFT 	62
-#define URSHIFT	63
-#define LSHIFT 	64
-#define ULSHIFT	65
-#define GT     	66
-#define UGT    	67
-#define GE     	68
-#define UGE    	69
-#define LT     	70
-#define ULT    	71
-#define LE     	72
-#define ULE    	73
-#define EQ     	74
-#define NEQ    	75
-#define BAND   	76
-#define EOR    	77
-#define BOR    	78
-#define LAND   	79
-#define LOR    	80
-#define ASS    	81
-#define UCMP   	82
-#define UCMPGE 	83
-#define CMPGE  	84
-#define CMPEQ  	85
-#define CMPNEQ 	86
-#define ASSOP  	87
-#define UASSOP 	88
-#define COMMA  	89
+#define MUL    	52
+#define UMUL   	53
+#define DIV    	54
+#define UDIV   	55
+#define MOD    	56
+#define UMOD   	57
+#define ADD    	58
+#define SUB    	59
+#define CMP    	60      
+#define RSHIFT 	61
+#define URSHIFT	62
+#define LSHIFT 	63
+#define ULSHIFT	64
+#define GT     	65
+#define UGT    	66
+#define GE     	67
+#define UGE    	68
+#define LT     	69
+#define ULT    	70
+#define LE     	71
+#define ULE    	72
+#define EQ     	73
+#define NEQ    	74
+#define BAND   	75
+#define EOR    	76
+#define BOR    	77
+#define LAND   	78
+#define LOR    	79
+#define ASS    	80
+#define UCMP   	81
+#define UCMPGE 	82
+#define CMPGE  	83
+#define CMPEQ  	84
+#define CMPNEQ 	85
+#define ASSOP  	86
+#define UASSOP 	87
+#define COMMA  	88
 
 #define CASS   	(COP+ASS)
 #define CASSOP 	(COP+ASSOP)
@@ -364,21 +363,21 @@
 #define LEOR    (LOP+EOR)
 #define LBOR    (LOP+BOR)
 
-#define BASS   	90
-#define BASSOP 	91
-#define BFD_REPL 	92
+#define BASS   	89
+#define BASSOP 	90
+#define BFD_REPL 	91
 
-#define JUMP 	93
+#define JUMP 	92
 
-#define STASS  	94
+#define STASS  	93
 
 
 #define BINARY_ARGS(i) ((MUL<=(i%SOP)&&(i%SOP)<=STASS)||i==ARRAY)
 
 /* ternary  argments */
 
-#define COND   	95
-#define UCOND  	96
+#define COND   	94
+#define UCOND  	95
 #define SCOND   (SOP+COND)
 #define SUCOND   (SOP+UCOND)
 #define DCOND   (DOP+COND)
@@ -390,33 +389,33 @@
 
 /* not appeared as tags */
 
-#define LPAR   	97
-#define RPAR   	98
-#define LBRA   	99
-#define RBRA   	100
-#define LC     	101
-#define RC     	102
-#define COLON  	103
-#define SM     	104
-#define CNAME  	105
+#define LPAR   	96
+#define RPAR   	97
+#define LBRA   	98
+#define RBRA   	99
+#define LC     	100
+#define RC     	101
+#define COLON  	102
+#define SM     	103
+#define CNAME  	104
 
-#define I2C  	106
-#define I2S  	107
-#define I2I    	108
-#define I2U    	109
-#define I2D    	110
-#define I2F    	111
-#define I2LL   	112
-#define I2ULL  	113
+#define I2C  	105
+#define I2S  	106
+#define I2I    	107
+#define I2U    	108
+#define I2D    	109
+#define I2F    	110
+#define I2LL   	111
+#define I2ULL  	112
 
-#define U2UC  	114
-#define U2US  	115
-#define U2I    	116
-#define U2U    	117
-#define U2D    	118
-#define U2F    	119
-#define U2LL   	120
-#define U2ULL  	121
+#define U2UC  	113
+#define U2US  	114
+#define U2I    	115
+#define U2U    	116
+#define U2D    	117
+#define U2F    	118
+#define U2LL   	119
+#define U2ULL  	120
 
 
 #define D2I     (DOP+I2I)
@@ -451,27 +450,27 @@
 
 /* statement start */
 
-#define ST_DECL		122
-#define ST_IF		123
-#define ST_DO		124
-#define ST_WHILE	125
-#define ST_FOR		126
-#define ST_SWITCH	127
-#define ST_COMP		128
-#define ST_BREAK	129
-#define ST_CONTINUE	130
-#define ST_CASE		131
-#define ST_DEFAULT	132
-#define ST_RETURN	133
-#define ST_GOTO		134
-#define ST_ASM		135
-#define ST_LABEL	136
-#define ST_OP		137
-#define ST_COMMENT	138
+#define ST_DECL		121
+#define ST_IF		122
+#define ST_DO		123
+#define ST_WHILE	124
+#define ST_FOR		125
+#define ST_SWITCH	126
+#define ST_COMP		127
+#define ST_BREAK	128
+#define ST_CONTINUE	129
+#define ST_CASE		130
+#define ST_DEFAULT	131
+#define ST_RETURN	132
+#define ST_GOTO		133
+#define ST_ASM		134
+#define ST_LABEL	135
+#define ST_OP		136
+#define ST_COMMENT	137
 
 #define IS_STATEMENT(i) (i==INLINE||(ST_DECL<=i&&i<=ST_COMMENT))
 
-#define HAS_ADDRESS	139
+#define HAS_ADDRESS	138
 
 /* statement end */
 
@@ -571,9 +570,15 @@
 
 extern void print_expr(int e, FILE *vout);
 
+
 #if 1
 extern int heapsize;
+#if 0
+int gdb(int a,int b,const char *c);
+#define CHECK_HEAP(b) ({int _k=(int)(b);gdb(_k,__LINE__,__FUNCTION__);if(_k>heapsize||_k<=0)error(-1);_k;})
+#else
 #define CHECK_HEAP(b) ({int _k=(int)(b);if(_k>heapsize||_k<=0)error(-1);_k;})
+#endif
 #else
 #define CHECK_HEAP(b)  (b)
 #endif