Commit Graph

30 Commits

Author SHA1 Message Date
Bill Currie 36c99a8da1 Get function def creation working again. 2011-01-26 14:48:22 +09:00
Bill Currie afc5b2827d Simplify def handling, use far data.
Since there is now a proper symbol table, defs are now just references to
memory locations and the symbol table takes care of duplicates.

Also, start using far data for ObjQC structures.

The qfo functions have been stubbed out until I figure out what to do with
object files in the new scheme.
2011-01-24 15:41:43 +09:00
Bill Currie ff6e1b4d6c Get functions attempting to generate code.
However, the statements are only printed as expressions.
2011-01-19 08:38:09 +09:00
Bill Currie 87ce9f5333 Get basic function creation working.
Even more FIXMEs, but the pascal parser can now create functions. The
function records even get emitted.
2011-01-18 12:47:13 +09:00
Bill Currie ea3895805b Rewrite much to use symbols and symtabs. Gut emit.c. Massive breakage.
That which isn't rewritten is horribly broken. However, this does include a
nice mechanism for building QC structs for emitting data.

emit.c has been gutted in the spirit of "throw one away".

There is much work to be done to get even variables emitted, let alone
code. Things should be a little more fun from here on.
2011-01-17 22:34:41 +09:00
Bill Currie ac14db7b1b Create a function to ease param list building.
This is especially useful for QuakePascal, but it will mean I'll be able to
get rid of the parameter reversals in Ruamoko later on.
2011-01-13 14:45:53 +09:00
Bill Currie 7971b0868e Break out the begin_function code into its own function. 2011-01-10 12:25:31 +09:00
Bill Currie ae4ca52661 Make function.h more independent. 2011-01-10 12:25:31 +09:00
Bill Currie 5627e43465 Use the method's selector rather than its def name in error messages. 2011-01-03 16:25:29 +09:00
Bill Currie a1f36a9944 Make new_function take a def rather than a name.
Moves into new_function some code that should have been there in the first
place.
2011-01-03 16:25:29 +09:00
Bill Currie 9ac15436d9 More docs.
Enhance qfprogs qfo debugging.

Make sure functions marked as extern don't emit anything. Fixes the segfault
when building klik.
2008-08-01 13:54:24 +00:00
Bill Currie f6924f35e5 report the line of the previous declaration of the function 2007-04-06 12:02:34 +00:00
Bill Currie 66257e3a88 run in fear, function overloading is here
This is an imperfect revision of history.
2004-11-13 11:50:00 +00:00
Bill Currie f1c9a8d24b remove a mostly unused field 2004-02-21 05:58:01 +00:00
Bill Currie 14e8bfe94b auto-init for uninitialized locals in traditional mode as requested by
Grievre
2004-02-21 05:52:05 +00:00
Bill Currie 1fc517f7db C style functions can now (optionally) be used (void foo ();) 2004-02-11 00:36:34 +00:00
Bill Currie 567b905590 copyright block work 2002-10-22 14:53:18 +00:00
Bill Currie b99a72e876 pr_obj.c:
call obj_find_message with super instead of class when doing a super
	lookup
client_menu.[ch]:
	use the InputLine object instead of directly using the api
InputLine.r:
	builint functions are = #0, not = 0 :P
function.[ch]:
	provide copy_params
method.[ch]
	provide copy_keywordargs
expr.c:
	call inc_users for the parm temp if it's a bind expression
	revers a copy of the selector when building the selector name so the
	selector doesn't get mangled
qc-parse.y:
	catch erronous func = const inintializers (should be func = #const)
2002-08-20 02:09:34 +00:00
Bill Currie 001571e25a various memory saving tricks. seems to have not broken anything 2002-06-27 22:48:28 +00:00
Bill Currie 9fee1d07dd initial work on actually writing .qfo files. seems to work, but only test.qfo
is ever writtin :)
2002-06-21 20:46:56 +00:00
Bill Currie 37d3fecd5d remove an unneeded field 2002-06-17 05:28:43 +00:00
Bill Currie 331df31f6a get the function number early so things don't get mixed up when new functions
get created while parsing a function
2002-06-11 06:54:32 +00:00
Bill Currie 943c2eefb3 redo def allocation to come from configurable `spaces' (locals, globals, far
globals, etc).
2002-06-09 03:57:20 +00:00
Bill Currie e17604f9c2 remove all arbitrary limits except for globals. they'll need a little more
work. Once they're done, it should take quite a big mod to crash qfcc due
to too many strings/statements/etc :)
2002-06-05 17:12:55 +00:00
Bill Currie 06bddd3ee6 more cleanup 2002-06-04 18:44:03 +00:00
Bill Currie b1d1159ae2 allow methods to be builtins 2002-05-17 18:35:54 +00:00
Bill Currie f2b8dc7e7e more progress 2002-05-09 20:12:28 +00:00
Bill Currie 7f47447492 getting closer to emiting ObjQC code 2002-05-08 21:24:24 +00:00
Bill Currie de86019d4b reverse the param order before building the function type and type check
varargs functions with specified params.
2002-05-08 17:33:28 +00:00
Bill Currie b226d24b52 rework the param parsing to make selectors easier to handle 2002-05-08 05:15:19 +00:00