[M3devel] safety vs. capacity vs. reinvention?

Jay jayk123 at hotmail.com
Mon Jan 21 16:22:32 CET 2008


I'm constantly noticing fixed sized buffers in the Modula-3 code and reinvention of basic data types and algorithms, such as growable arrays. Something seems off, eh?
 
Here's the latest:
 
 -> linking cm3.exec:\\docume~1\\jay\\locals~1\\temp\\cm3\\make-dist\\tmpukymas\\cm3-core-WIN32-NT386GNU-d5.5.1\\pkg\\m3back\\NT386GNU\\m3back.lib c:\\docume~1\\jay\\locals~1\\temp\\cm3\\make-dist\\tmpukymas\\cm3-core-WIN32-NT386GNU-d5.5.1\\pkg\\m3objfile\\NT386GNU\\m3objfile.lib c:\\docume~1\\jay\\locals~1\\temp\\cm3\\make-dist\\tmpukymas\\cm3-core-WIN32-NT386GNU-d5.5.1\\pkg\\m3quake\\NT386GNU\\m3quake.lib c:\\docume~1\\jay\\locals~1\\temp\\cm3\\make-dist\\tmpukymas\\cm3-core-WIN32-NT386GNU-d5.5.1\\pkg\\m3front\\NT386GNU\\m3front.lib c:\\docume~1\\jay\\locals~1\\temp\\cm3\\make-dist\\tmpukymas\\cm3-core-WIN32-NT386GNU-d5.5.1\\pkg\\m3linker\\NT386GNU\\m3link.lib c:\\docume~1\\jay\\locals~1\\temp\\cm3\\make-dist\\tmpukymas\\cm3-core-WIN32-NT386GNU-d5.5.1\\pkg\\m3middle\\NT386GNU\\m3middle.lib c:\\docume~1\\jay\\locals~1\\temp\\cm3\\make-dist\\tmpukymas\\cm3-core-WIN32-NT386GNU-d5.5.1\\pkg\\libm3\\NT386GNU\\m3.lib.sa c:\\docume~1\\jay\\locals~1\\temp\\cm3\\make-dist\\tmpukymas\\cm3-core-WIN32-NT386GNU-d5.5.1\\pkg\\m3core\\NT386GNU\\m3core.lib.sa -lcomctl32 -lwsock32 -lnetapi32 -lgdi32 -luser32
****** runtime error:***    <*ASSERT*> failed.***    file "..\src\M3ID.m3", line 58***
Stack trace:   FP         PC      Procedure---------  ---------  ------------------------------- 0x22f198   0x59e9c3  Add + 0x53 in ..\src\M3ID.m3 0x22f1c8   0x4209cb  Txt2ID + 0x14 in ..\src\M3Build.m3 0x22f208   0x478f9f  PushText + 0x97 in ..\src\QMachine.m3 0x22f418   0x47c38f  DoEscape + 0x341 in ..\src\QMachine.m3 0x22f478   0x476a37  DoCall + 0x568 in ..\src\QMachine.m3 0x22f558   0x475a49  Eval + 0x1845(!) in ..\src\QMachine.m3 0x22f578   0x4764ca  CallProc + 0x2b in ..\src\QMachine.m3 0x22f6e8   0x413717  CallProc + 0x156 in ..\src\Builder.m3 0x22f758   0x40e96a  BuildProgram + 0x66a in ..\src\Builder.m3 0x22f788   0x402282  BuildPgm + 0x62 in ..\src\Builder.m3.........  .........  ... more frames ...
 
PROCEDURE Add (x: TEXT;  class: [0..255]): T =  VAR    t   : T;    len := Text.Length (x);    buf : ARRAY [0..1024] OF CHAR;  BEGIN    IF len > NUMBER(buf) THEN      IO.Put(x);    END;    <*ASSERT len <= NUMBER (buf) *>    Text.SetChars (buf, x);    t := FromStr (buf, len);    IF (class # 0) THEN classes [t] := class; END;    IF (ids[t].text = NIL) THEN ids[t].text := x; END;    RETURN t;  END Add;The code is escaping imported .libs in order to write them into a response file, since gcc needs the doubled slashes..
I'm using a response file BECAUSE I have a long string..
 
 - Jay
_________________________________________________________________
Helping your favorite cause is as easy as instant messaging. You IM, we give.
http://im.live.com/Messenger/IM/Home/?source=text_hotmail_join
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20080121/11007de0/attachment-0001.html>


More information about the M3devel mailing list