rev 459 - in trunk: . include/prothon pr src
SVN User <[email protected]> Tue, 04 May 2004 23:23:29 -0400
| Newsgroups | gmane.comp.lang.prothon.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: mark
Date: 2004-05-04 23:23:26 -0400 (Tue, 04 May 2004)
New Revision: 459
Modified:
trunk/STATUS.txt
trunk/include/prothon/prothon.h
trunk/pr/test.pr
trunk/src/parser_routines.c
Log:
fixed problem with nested for loops
Modified: trunk/STATUS.txt
===================================================================
--- trunk/STATUS.txt 2004-05-04 22:37:01 UTC (rev 458)
+++ trunk/STATUS.txt 2004-05-05 03:23:26 UTC (rev 459)
@@ -1,6 +1,14 @@
----------------------- TO-DO (highest priority first) ------------------------
+--- Fix function extension bug.
+
+--- Add properties methods support (__get__, __set__, __delete__)
+
+--- Add Globals built-in attribute (actually a synonym for current Main module which can be named Main1, Main2, ...)
+
+--- Add __attrs__ & __protos__ functionality.
+
--- Auto-documenter app
--- networking code -- web access demonstration of security
@@ -9,8 +17,6 @@
--- add support for APR_BINARY in File.c ('b' flag)
--- support any object that supports file methods in stdxxx (duck std)
---- How do we add "properties", "descriptors"?
-
--- help() in interactive console()
--- -d -m -l cmd-line options missing
Modified: trunk/include/prothon/prothon.h
===================================================================
--- trunk/include/prothon/prothon.h 2004-05-04 22:37:01 UTC (rev 458)
+++ trunk/include/prothon/prothon.h 2004-05-05 03:23:26 UTC (rev 459)
@@ -60,8 +60,8 @@
//#define DEBUG_THREADS
//#define DEBUG_MEM_MGR
//#define TRACE_PARSER
-//#define DUMP_MODULE_CODE
-//#define TRACE_INTERPRETER
+#define DUMP_MODULE_CODE
+#define TRACE_INTERPRETER
//#define DUMP_OBJECTS_AT_END
//#define PROSIST_DEBUG
Modified: trunk/pr/test.pr
===================================================================
--- trunk/pr/test.pr 2004-05-04 22:37:01 UTC (rev 458)
+++ trunk/pr/test.pr 2004-05-05 03:23:26 UTC (rev 459)
@@ -1,15 +1,19 @@
d={}
-max = 51
+max = 50
def Key(n):
return "B%02i" % n
print "Loading dictionary ..."
+
for n in max:
d[Key(n)] = True
- print Len(d), n+1
+ for i in n:
+ if Key(i) not in d:
+ lost = True
+ print "%d missing of %d" % (i,n)
-print "Checking dictionary ..."
+print "\nChecking dictionary ..."
lost = False
for n in max:
if Key(n) not in d:
Modified: trunk/src/parser_routines.c
===================================================================
--- trunk/src/parser_routines.c 2004-05-04 22:37:01 UTC (rev 458)
+++ trunk/src/parser_routines.c 2004-05-05 03:23:26 UTC (rev 459)
@@ -1003,7 +1003,7 @@
if (els->len)
calc_code(els, &len, &stack_depth, &max_stack_depth);
end_els_loc = len;
- len++;
+ len += 2;
end_loc = len;
res = new_code(param, len, stack_depth, max_stack_depth+2, 0);
add_code(expr, res, &k);
@@ -1050,6 +1050,8 @@
if (els->len)
add_code(els, res, &k);
assert(end_els_loc == k);
+ res->code_data[k ].bytecode.opcode = OP_POP;
+ res->code_data[k++].bytecode.param = 1;
res->code_data[k++].bytecode.opcode = OP_RERAISE;
assert(end_loc == k);
return debug_retrn(__LINE__, res);