Commit Graph

4370 Commits

Author SHA1 Message Date
Michael Bayne a494383688 We now reference project.dir.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4428 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-10-13 23:52:10 +00:00
Michael Bayne bb650a11d2 Revamped the snapshot task to copy the dist/lib/ dependent jars into lib/ for
the snapshot so that it contains all appropriate dependencies regardless of
from where the local build got them.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4427 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-10-13 22:42:34 +00:00
Michael Bayne 0962f1035b Added proper 'snapshot' target.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4426 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-10-13 22:33:56 +00:00
Michael Bayne 96a7202d75 Out with obsolete file.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4425 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-10-13 22:29:46 +00:00
Michael Bayne d558ef79af Determine which libraries to copy from libs-incl.xml.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4424 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-10-13 22:22:48 +00:00
Michael Bayne 1dfd474317 Have Narya declare its library dependencies in an includable build file and do
some kind of annoying fiddling to allow its dependencies to come either from
the build directory of its dependee or from lib/.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4423 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-10-13 22:17:06 +00:00
Ray Greenwell 4a537cadeb Unstream lists as Arrays.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4422 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-10-11 21:30:56 +00:00
Michael Bayne 20d1e1d024 Allow chat displays to register themselves in a known order and to report to
one another whether they've already displayed a chat message.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4421 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-10-10 21:48:27 +00:00
Michael Bayne 3c385628a1 Freak not out if we're not fully connected to a known peer.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4420 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-10-10 21:47:39 +00:00
Michael Bayne 499f86715a The class in question here is not an instance of ActionScript.java but rather
an arbitrary Java class which we are converting to ActionScript (the language,
not the class). Hopefully this will appease the compiler.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4419 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-10-09 19:28:35 +00:00
Par Winzell 8a935f1203 This didn't compile for me without the Generics.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4418 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-10-09 15:36:52 +00:00
Michael Bayne 7c6cff471b InvocationService.InvocationListener is a special case and can't even go in the
raw imports. Whee!


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4417 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-10-06 01:48:54 +00:00
Michael Bayne 8673055be4 More proper field conversion.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4416 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-10-06 00:34:03 +00:00
Mark Johnson 47d1369180 A psudo random number generator that can be seeded. Use at your own
risk.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4415 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-10-05 22:27:06 +00:00
Michael Bayne e532378ce4 We need InvocationService inner-listeners in our raw imports because those
aren't magically in scope for ActionScript, we have to generate import
statements for them.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4414 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-10-05 20:38:11 +00:00
Michael Bayne 63c4e10d3c Improved Java to ActionScript field type conversion.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4413 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-10-05 20:30:30 +00:00
Michael Bayne c7dd56f845 More juicy auto-generating goodness.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4412 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-10-05 02:01:34 +00:00
Michael Bayne e292e04e65 More fiddling and improvements to code generation.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4411 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-10-05 01:33:25 +00:00
Michael Bayne 4c2e242261 More jiggery pokery to create blank TypedArray instances of the proper type
when we encounter the pattern "new SomeClass[0]". Le whee!


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4410 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-10-05 00:30:32 +00:00
Michael Bayne 19fa31cdba Don't implement subList() as in Java this is a view and we can't do that easily
in ActionScript without ubercomplexity. So we'll rewrite the code that was
using it.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4409 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-10-05 00:24:20 +00:00
Michael Bayne e4438e4070 We need to notice and observe the @ActionScript(name="foo") annotations when
slurping comments from Java source files.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4408 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-10-05 00:18:06 +00:00
Michael Bayne 626b4d257f Added some methods to StreamableArrayList that behave properly (use Equalable
to determine equality instead of using reference equality).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4407 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-10-05 00:16:11 +00:00
Michael Bayne 27ab1efe4e We no longer pass a classpath reference to the GenActionScriptTask, it uses the
classpath provided to the <taskdef>.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4406 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-10-04 23:37:18 +00:00
Michael Bayne 4a9fde7830 Now we have a cool @ActionScript annotation that allows us to specify different
field/method names for the ActionScript version of a class (or to omit
something entirely). This removes the need for special case hackery for
toStringBuilder().

In order for annotations to work, however, we have to require that the
GenActionScriptTask be loaded from the same classloader that loads the classes
to be reflected upon. Before we only reflected on the target classes, never
instantiated them. Annotations are actually instantiated, so we have to be able
to create an instance of the ActionScript.class that is compiled into our
target classes and assign it to a reference that is compiled into
GenActionScriptTask. Beware the complexities of dealing with multiple class
loaders.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4405 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-10-04 23:35:41 +00:00
Michael Bayne ed51df0807 Add Hashable for classes that override hashCode(); strip out *Codes interfaces
because we can't do that in ActionScript; properly handle static var and
non-static const.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4404 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-10-04 21:25:16 +00:00
Michael Bayne 874d8eaa8f When generating ActionScript streamable classes, use TypedArray for fields but
Array for static constants and method arguments.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4403 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-10-04 21:08:12 +00:00
Michael Bayne f4a25e9521 Use TypedArray for array fields when converting a Streamable into ActionScript.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4402 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-10-04 21:03:05 +00:00
Michael Bayne e99ac5762d Regenerated all of the ActionScript services using the new code generation tool.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4401 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-10-04 20:41:51 +00:00
Michael Bayne ad7ac5aa3e Let's wrapp everything in parens.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4400 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-10-04 19:00:23 +00:00
Michael Bayne 9da0e7a4f3 OMG, it like handles the annoying ActionScript not-so-inner classes.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4399 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-10-04 18:53:36 +00:00
Michael Bayne 20c0f0ff3d Regenerated with updated Marshaller and Dispatcher templates.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4398 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-10-04 18:13:34 +00:00
Michael Bayne d25d5e53f1 We're getting very close to having generated ActionScript Service and Listener
interfaces, and Marshallers for same. The remaining snag has to do with the
annoyance of ActionScript not supporting inner classes, which means that
ChatService.TellListener for example has to become ChatService_TellListener.

The code for generating the Java marshaller knows to add an import for
ChatService if some random invocation service interface happens to reference
ChatService.TellListener, but now it needs to be made to know to add an import
for ChatService_TellListener in ActionScript land and it has to do it in a way
that doesn't fuck up the Java code generation. Whee!


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4397 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-10-04 18:12:56 +00:00
Michael Bayne 3305c1b922 Our inherited constructor documentation didn't make much sense.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4396 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-10-04 02:17:35 +00:00
Michael Bayne 398767da5f Ran the auto-generator on all our Streamable stuff in Narya. Tidied up the
results.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4395 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-10-04 02:07:04 +00:00
Michael Bayne 8015764c61 Don't look now kids, but it's automatic generation of ActionScript code from
Java. Of course this is a very limited translation facility that is mainly
focused on auto-generating Streamable ActionScript classes from their Java
originals, and it doesn't actually convert method bodies, just field and method
declarations, initial values, and such.

Most of our Streamable classes don't have much in the way of real methods, and
the autogenerator will stick new methods in when they show up on the Java side
so at least we'll *know* that they need to be implemented. And the main thing:
readObject and writeObject are in fact implemented by the code generator so at
least we won't be plagued by annoying streaming errors when we change something
on the Java side and forget to change the ActionScript side.

Next up, auto-generating InvocationService interfaces and InvocationMarshaller
implementations in ActionScript and ActionScript versions of DObjects.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4394 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-10-04 02:05:15 +00:00
Michael Bayne d7bf98354e Match abstract classes as well.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4393 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-10-04 02:01:00 +00:00
Michael Bayne 5e55b0b343 Fixed typo.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4392 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-10-04 01:59:57 +00:00
Ray Greenwell 572d5a6555 Oop, we'll want to immediately Stringify any args passed to our constructor,
as well.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4391 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-10-04 01:20:13 +00:00
Ray Greenwell 5e769376f2 Stringify an added element at the time it is added, not at the time
that toString() is called on the buffer.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4390 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-10-04 01:15:15 +00:00
Ray Greenwell 23f6486bf7 Added clarifying comments.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4389 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-09-29 18:40:41 +00:00
Michael Bayne 48faea2ace All VirtualMachineErrors seem worthy of fork sticking. Also re: my previous
checkin, tihs will be a non-issue when we start devoting an entire separate JVM
to each game (which we will have to do for all games that run server code)
because then all a game can do is stick a fork in its own JVM and render itself
unplayable.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4388 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-09-29 00:45:58 +00:00
Michael Bayne 57edcd84b6 We have to specifically enumerate the scary errors that we'll let actually
stick a fork in the server otherwise malicious or broken code can generate an
AbstractMethodError or some other error and cause the server to decide to quit.

It may still be possible for malicious code to throw an OutOfMemory error, and
if that's the case then I don't know what we can do to both gracefully get the
fuck out of dodge when things are pear shaped and avoid the wrath of the
kiddies.

Incidentally, it was stupidity, not malice that brought this to my awareness.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4387 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-09-29 00:41:33 +00:00
Ray Greenwell bd8ee0fd4d Bugfix: return undefined, not null, to indicate absence in the map.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4386 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-09-28 19:11:17 +00:00
Ray Greenwell f544a76b62 Added the ManagerCaller that was added a while back on the Java side.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4385 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-09-27 23:54:40 +00:00
Ray Greenwell 0650d58006 Improved the debug-mode logging a bit.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4384 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-09-27 23:54:09 +00:00
Michael Bayne eda71de8d3 Added another method that's booching GG games.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4383 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-09-27 16:59:38 +00:00
Michael Bayne 8676bb1adc Avoid div0 in rare situation.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4382 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-09-27 16:54:13 +00:00
Ray Greenwell 2a71f0c9bc Added getTinyClassName().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4381 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-09-27 00:31:03 +00:00
Jonathan Le Plastrier 11e08c165e I think this is better. Only define the weave taskdef in the two targets we need it. This adds some duplicate code, but we turn the onerror fail back on, so if the library is not found then ant will throw an error and exit. But it will only do this if you try to run the targets which need this taskdef.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4380 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-09-26 22:52:58 +00:00
Jonathan Le Plastrier cade4b6435 Narya now builds using from dist/lib. Also, the weave taskdef reports a warning if it cannot find the retroweaver jars, instead of preventing ant from running. These changes will need to happen on the other rings as well.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4379 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-09-26 20:23:05 +00:00