1
0
mirror of https://github.com/twiglet/cs2j.git synced 2025-01-18 13:15:17 +01:00

74 Commits

Author SHA1 Message Date
Kevin Glynn
b446f68eb6 If we wrap a parameter's type in RefSupport then *that* is the value for boxedType 2011-11-11 19:33:38 +01:00
Kevin Glynn
9012b7c07a Take account JavaMaker's renaming of built in types 2011-10-22 14:50:49 +02:00
Kevin Glynn
65d533f5a6 hmmm, use return when the expression does NOT have void type 2011-10-13 16:05:09 +02:00
Kevin Glynn
37b80a1fbd - ForceUnsharedType::share allows to force a copy of the type in case we want to update it latter (e.g. IsWrapped)
- use rewriteXXXX methods from base
2011-10-13 16:04:42 +02:00
Kevin Glynn
a6f8dac7c6 - have black listed methods that should not be renamed
- supported interfaces map points to Import list and blacklisted methods list
- create empty symtab in InitParser
- class_member_declaration has symtab scope
- add isJavaIsh route for type arguments
2011-10-12 10:38:18 +02:00
Kevin Glynn
a3b3e67d76 make has_boxed_rep explicit in translation templates for primitive types, "guessing" wasn't working out 2011-10-12 10:30:57 +02:00
Kevin Glynn
985368b2e5 Handle any 'params' parameter 2011-10-10 09:34:22 +02:00
Kevin Glynn
87f38f84e9 - Generalize the interfaces that we can support by adding in additional code
- If we are overriding, or implementing, a method with type vars as result or param then we need to make sure that primitive types get their unboxed version
2011-10-09 19:34:09 +02:00
Kevin Glynn
34fdb5266a parseString calls a Init method which can be overridden in sub classes. Use in NetMaker to initialize dynamic scopes 2011-10-09 19:29:32 +02:00
Kevin Glynn
3c5ec9fcb6 Move additional code fragments into new base classes for JavaMaker and NetMaker 2011-10-09 19:24:45 +02:00
Kevin Glynn
3ef1333259 pass delegate definition into method construction so that we can force arguments to be boxed if needed 2011-09-25 10:26:19 +02:00
Kevin Glynn
946bd4741a Include explicit BoxedJava field in translation templates for primitives 2011-09-21 14:34:50 +02:00
Kevin Glynn
c0c2fe6a1a argument_list argument to JAVAWRAPPERARGUMENTLIST is optional 2011-09-11 17:14:59 +02:00
Kevin Glynn
68b1c5d3de S stands for signed ..... 2011-09-07 12:24:19 +02:00
Kevin Glynn
47607a041e add option -experimental-unsigned-to-bigger-signed 2011-09-06 15:04:03 +02:00
Kevin Glynn
8fef1242e9 use built in void type 2011-09-06 10:05:02 +02:00
Kevin Glynn
c07516f1d3 Support for PensError.Error.GET_MESSAGE etc. 2011-09-02 10:41:30 +02:00
Kevin Glynn
78a6cfc4b5 Support 'params' arguments to methods, constructors, indexers (variable length arguments) 2011-08-25 18:01:17 +02:00
Kevin Glynn
6544471683 Java bytes are signed, so it is plain Byte that we don't have a good translation for 2011-08-16 15:19:01 +02:00
Kevin Glynn
0ed1e625d8 Change method names to follow Java naming conventions 2011-08-16 15:01:37 +02:00
Kevin Glynn
215f8fdd1a Only set hasTyArgs if we actually had tyArgs! 2011-08-09 12:35:23 +02:00
Kevin Glynn
d928e3c7bf before invoking delegates in a Multi instance make a copy of the invocation list and invoke from that in case they manipulate the original delegate 2011-07-18 20:34:45 +02:00
Kevin Glynn
1b2222254a Make sure we process type sin delegate arguments correctly 2011-07-15 17:18:54 +02:00
Kevin Glynn
d4c5b20e97 support for -experimental-enums-numericconsts and -experimental-unsigned-translatesigned 2011-06-14 09:38:13 +02:00
Kevin Glynn
d855f757ae Support for Partial Types.
Reworked earlier attempt that tried to collect them after JavaMaker phase. Realised it is better to go all the way through to generating strings because we need the original token stream to do that and partial types can be splity across different files.

Its actually simpler this way.
2011-06-10 13:27:40 +02:00
Kevin Glynn
0b8e05d0a6 implement top level partial types 2011-06-07 17:11:29 +02:00
Kevin Glynn
9d45e3adef TemplateExtractor should merge partial definitions 2011-05-31 09:17:50 +02:00
Kevin Glynn
07e883ca67 vars in foreach statements 2011-05-24 12:18:16 +02:00
Kevin Glynn
10261f6406 in var x = exp; If we know the type of exp then use it for x 2011-05-23 12:23:59 +02:00
Kevin Glynn
ec95442ac2 support ref params in lambda expressions, and support short cut assignment operators for ref params 2011-05-22 18:40:10 +02:00
Kevin Glynn
f9e6716aaa more fixes to get monodevelop to pass without seg fault 2011-05-22 13:35:32 +02:00
Kevin Glynn
ac2417a6c6 various so that we can chomp through monodevelop. mostly it seems to be workarounds for antlr :( 2011-05-20 19:54:47 +02:00
Kevin Glynn
c457c5c6f8 fixes after stress test against libomv 2011-05-20 15:34:16 +02:00
Kevin Glynn
05c15f501a support for += and -= for delegates 2011-05-20 13:08:11 +02:00
Kevin Glynn
53e2c3b8c7 support for adding / subtracting delegates 2011-05-20 09:20:54 +02:00
Kevin Glynn
9e9bba2f40 pass type contexts a bit more widely 2011-05-19 22:31:08 +02:00
Kevin Glynn
84a767f445 big delegates commit. Autogenerated code for delegate support is pretty much done now 2011-05-19 16:37:45 +02:00
Kevin Glynn
76bb9265ca delegates are rewritten to interfaces 2011-05-09 15:59:06 +02:00
Kevin Glynn
752f86e065 Ordinarily cast expressions have only unary_expressions as target, but 'as' expansion can provide full expressions 2011-05-06 12:35:07 +02:00
Kevin Glynn
6b3c19f823 fix up jump statements that call methods with ref / out params so that these param's values don't get lost. 2011-05-06 10:44:48 +02:00
Kevin Glynn
ab6882062d -> in this branch 2011-05-05 16:53:06 +02:00
Kevin Glynn
980e721888 - i++ should return new value (this is broken for properties :( )
- if ref / out params are updated from another ref or out param then need to use setValue()
- pre and post statements need to be added around statements (e.g. local_variable_declaration doesn't use embedded_statement)
- jump statements need special treatment (still a bit broken)
2011-05-05 16:15:22 +02:00
Kevin Glynn
fdc89af56b correct translation for Property++ 2011-05-03 15:46:47 +02:00
Kevin Glynn
0a7af29e58 support for ref/out params in calls in if-then-else conditional expression 2011-05-02 12:54:18 +02:00
Kevin Glynn
9d6b510a59 support ref and out parameters 2011-04-30 09:29:06 +02:00
Kevin Glynn
82e2dcf770 move imports into CommonWalker so that we can add to imports from JavaMaker too (currently not needed) 2011-04-30 09:28:15 +02:00
Kevin Glynn
65bd4c53b7 Translations can have a warning that is emitted at translation time 2011-04-27 13:05:49 +02:00
Kevin Glynn
0529896ca2 type argument to instanceof cannot be primitive. Arrays are not primitive 2011-04-19 10:23:11 +02:00
Kevin Glynn
dafcee91d6 Use parseString to generate (java) Collection methods when translating a type that implements ICollection 2011-04-13 11:45:38 +02:00
Kevin Glynn
83fcfd0882 Add --experimental-transforms for undercooked implementations and add boxing of primitive types (see noise added to ScormEngine for aesthetic problems) 2011-04-06 16:27:15 +02:00