compiler/bootstrap: Updated the bootstrap to reflect latest fixes
authorJerome St-Louis <jerome@ecere.com>
Tue, 20 Nov 2012 19:00:54 +0000 (14:00 -0500)
committerJerome St-Louis <jerome@ecere.com>
Tue, 20 Nov 2012 19:00:54 +0000 (14:00 -0500)
compiler/bootstrap/ecere/bootstrap/instance.c
compiler/bootstrap/libec/bootstrap/lexer.c

index 919cc48..12cae45 100644 (file)
@@ -1163,7 +1163,16 @@ int offsetClass, totalSizeClass;
 for(baseClass = base; baseClass->base; baseClass = baseClass->base)
 ;
 if(base && !base->internalDecl && (base->type == 5 || base->type == 1 || base->type == 0))
+{
+if(base->type == 1 && type == 0)
+type = 5;
+else
 type = base->type;
+}
+if(base && (_class->type == 0 || _class->type == 5 || _class->type == 1) && (base->type == 3 || base->type == 2 || base->type == 4))
+{
+type = base->type;
+}
 if(type == 4)
 {
 if(base->type != 4)
@@ -1225,6 +1234,7 @@ next = (struct __ecereNameSpace__ecere__com__Method *)__ecereProp___ecereNameSpa
 if(method->type == 1)
 method->vid += mod->base->vTblSize - baseClass->vTblSize;
 }
+}
 for(b = mod->base; b && b != (((void *)0)); b = b->base)
 {
 struct __ecereNameSpace__ecere__com__Method * vMethod;
@@ -1258,20 +1268,6 @@ _class->_vTbl[vMethod->vid] = _class->base->_vTbl[vMethod->vid];
 }
 }
 }
-for(b = mod->base; b && b != (((void *)0)); b = b->base)
-{
-struct __ecereNameSpace__ecere__com__Method * vMethod;
-
-for(vMethod = (struct __ecereNameSpace__ecere__com__Method *)__ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(&b->methods); vMethod; vMethod = (struct __ecereNameSpace__ecere__com__Method *)__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(((struct __ecereNameSpace__ecere__sys__BTNode *)vMethod)))
-{
-if(vMethod->type == 1)
-{
-if(_class->_vTbl[vMethod->vid] == baseClass->_vTbl[vMethod->vid] && _class->_vTbl[vMethod->vid] != _class->base->_vTbl[vMethod->vid])
-_class->_vTbl[vMethod->vid] = _class->base->_vTbl[vMethod->vid];
-}
-}
-}
-}
 if(type == 0 || type == 5 || type == 1)
 {
 struct __ecereNameSpace__ecere__com__Property * prop;
index ce396ff..59336af 100644 (file)
@@ -2117,14 +2117,12 @@ yy_flex_free((void *)(*b).yy_ch_buf);
 yy_flex_free((void *)b);
 }
 
-extern int isatty(int);
-
 void yy_init_buffer(YY_BUFFER_STATE b, FILE * file)
 {
 yy_flush_buffer(b);
 (*b).yy_input_file = file;
 (*b).yy_fill_buffer = 1;
-(*b).yy_is_interactive = file ? (isatty(fileno(file)) > 0) : 0;
+(*b).yy_is_interactive = 0;
 }
 
 void yy_flush_buffer(YY_BUFFER_STATE b)
@@ -2298,6 +2296,10 @@ extern char *  __ecereNameSpace__ecere__sys__TrimLSpaces(char *  string, char *
 
 extern int strncmp(const char * , const char * , int n);
 
+extern void *  memmove(void * , const void * , unsigned int size);
+
+extern int strlen(const char * );
+
 extern char *  strncpy(char * , const char * , int n);
 
 extern char *  __ecereNameSpace__ecere__GetTranslatedString(struct __ecereNameSpace__ecere__com__Instance * module, char *  string, char *  stringAndContext);
@@ -2392,7 +2394,7 @@ if(!strncmp(line, "include", c))
 {
 char includeFile[797] = "";
 
-strcpy(line, line + c);
+memmove(line, line + c, strlen(line + c) + 1);
 __ecereNameSpace__ecere__sys__TrimLSpaces(line, line);
 if(line[0] == '\"')
 {