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
Kevin Glynn
158e22b44f
add mkNonGeneric scope so that we can remove generic arguments from a type if we want to (these aren't carried at runtime, so instanceof has to just check against the base type)
2011-04-06 10:56:18 +02:00
Kevin Glynn
6689f78028
If we notice that we are calling a method on an expression with primitive type, then cast it to the equivalent boxed type first
2011-03-27 09:37:01 +02:00
Kevin Glynn
2cf5701edb
track if we are in a statement list context. If so, don't generate ugly braces around using and switch translations
2011-03-22 08:28:45 +01:00
Kevin Glynn
f96c756dca
Allow method calls on "new [] {...}" expressions
2011-03-17 13:57:27 +01:00
Kevin Glynn
82a57ca0a0
don't crash if enum is empty
2011-03-16 12:44:44 +01:00
Kevin Glynn
9c627e98ab
Put braces around switch -> if-then-else transformation
2011-03-14 17:00:54 +01:00
Kevin Glynn
f92d26412d
NEW -> NEW, NEW_ARRAY, NEW_DELEGATE, NEW_ANON_OBJECT
...
replace var and dynamic by imaginary nodes TYPE_VAR and TYPE_DYNAMIC
2011-03-14 17:00:08 +01:00
Kevin Glynn
d4e7da95ca
fix >>= token
2011-03-13 13:46:00 +01:00
Kevin Glynn
9a1febb5a9
(Closes GH-8): In switch statements the default can appear anywhere (doesn't have to be last, who knew?). This was breaking the conversion to if..then..else. Added code to save away the default section separately.
2011-03-13 10:42:34 +01:00