From: DeaDDooMER Date: Thu, 27 Jul 2017 22:07:45 +0000 (+0300) Subject: JVM: Добавлена заглушка на копирование массивов или записей X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=ee2ed2913463eecbb379e8c018006cc911d4b683;p=dsw-obn.git JVM: Добавлена заглушка на копирование массивов или записей --- diff --git a/src/backends/jvm/generator-jvm.c b/src/backends/jvm/generator-jvm.c index 84ebe51..1d4f970 100644 --- a/src/backends/jvm/generator-jvm.c +++ b/src/backends/jvm/generator-jvm.c @@ -997,6 +997,17 @@ store_expr(gen_proc_t * p, oberon_expr_t * dst, oberon_expr_t * src) assert(dst -> is_item); oberon_item_t * item = (oberon_item_t *) dst; + if(dst -> result -> class == OBERON_TYPE_ARRAY + || src -> result -> class == OBERON_TYPE_ARRAY) + { + gen_error("array copy not implemented"); + } + else if(dst -> result -> class == OBERON_TYPE_RECORD + || src -> result -> class == OBERON_TYPE_RECORD) + { + gen_error("record copy not implemented"); + } + switch(item -> mode) { case MODE_VAR: diff --git a/src/test.c b/src/test.c index 69cfc99..7d3ce62 100644 --- a/src/test.c +++ b/src/test.c @@ -11,7 +11,7 @@ static char source_test[] = " l : POINTER TO ARRAY 16 OF BOOLEAN;" "BEGIN" " NEW(l);" - " l[0] := l[5];" + " l^ := l^;" "END Test." ;