Граф коммитов

217 Коммитов

Автор SHA1 Сообщение Дата
Andreas Gal 600324794d assorted fixes to make TestThread work 2014-07-25 17:54:34 -07:00
Andreas Gal a903846238 make interpreter fully preemptive 2014-07-25 15:24:14 -07:00
Andreas Gal c761251cbc make all tests pass again 2014-07-25 15:06:21 -07:00
Andreas Gal 2b48b809b0 pop this in Runtime native methods 2014-07-25 13:42:44 -07:00
Andreas Gal 8da1a82cd1 fix a few native methods 2014-07-25 13:28:26 -07:00
Andreas Gal a976bfe339 fix synthetic method code 2014-07-25 13:23:10 -07:00
Andreas Gal 72f91a6a1a big refactoring to eliminate nested interpreter loops 2014-07-25 13:06:48 -07:00
Andreas Gal 5f1e87b04a remove callback pattern 2014-07-24 00:21:59 -07:00
Andreas Gal 697d6f14d3 move initClass to frame 2014-07-21 02:04:14 -07:00
Andreas Gal 3ffc368260 move newException onto frame 2014-07-21 02:01:06 -07:00
Andreas Gal f4c46b933d move invokeConstructor and newString onto frame 2014-07-21 01:50:36 -07:00
Andreas Gal 2ce801b4a8 use bind instead of closures 2014-07-21 00:30:37 -07:00
Andreas Gal db8f263702 support for actual multithreading 2014-07-20 22:24:07 -07:00
Andreas Gal c73674f64c move native method lookup code up 2014-07-20 22:08:08 -07:00
Andreas Gal d371434057 cleanup native method dispatch 2014-07-20 21:32:47 -07:00
Andreas Gal f78a97eecc preload java/lang/Object 2014-07-20 17:10:12 -07:00
Andreas Gal 09859504f0 change the way natives indicate descheduling 2014-07-20 16:47:23 -07:00
Andreas Gal 6109859fc7 implement rescheduling requests from within natives 2014-07-20 16:41:30 -07:00
Andreas Gal 599739cea6 make sure threads can't be started multiple times 2014-07-20 16:28:26 -07:00
Andreas Gal 23557e71ee add support for starting new threads 2014-07-20 16:27:24 -07:00
Andreas Gal 2b24ecf72c create exceptions on the current thread, not the main thread 2014-07-20 15:46:22 -07:00
Andreas Gal c53c68007a note current thread in frame in invoke path 2014-07-20 15:42:23 -07:00
Andreas Gal 8008918b51 move newException to classes from vm 2014-07-20 15:35:48 -07:00
Andreas Gal 18724d85c0 initialize main thread during startup 2014-07-20 00:35:00 -07:00
Andreas Gal a585efe82e don't bind this to the caller frame in natives 2014-07-19 17:34:43 -07:00
Andreas Gal 8a2bdec2b2 inline getNativeMethod 2014-07-19 17:33:14 -07:00
Andreas Gal e1c685dba4 fix a bunch of corner cases around array type checking 2014-07-19 13:18:45 -07:00
Andreas Gal 76801f1c66 throw proper internal exception when class can't be loaded and use native character conversion instead of CLDC's 2014-07-19 11:53:27 -07:00
Andreas Gal 1dfef4cba4 more work on strings and charsets 2014-07-19 11:20:46 -07:00
Andreas Gal 2634b8499f add another test 2014-07-19 09:23:14 -07:00
Andreas Gal 8fb2523d6b switch default encoding to UTF-8 to fix a few test failures 2014-07-19 09:13:10 -07:00
Andreas Gal de7bc07375 fix lsub 2014-07-19 00:02:20 -07:00
Andreas Gal f90bca8af5 add a way to print backtraces and fix ifnull/ifnonnull 2014-07-18 23:24:26 -07:00
Andreas Gal 805adcfeef call the constructor from newInstance 2014-07-18 21:56:30 -07:00
Andreas Gal 5bcefb1f6c fix a test case 2014-07-18 18:33:12 -07:00
Andreas Gal f59bebf2b3 fix dconst_0/1 2014-07-18 18:23:49 -07:00
Andreas Gal 671a6bfce9 fix a bunch of cases for TestDataInputStream 2014-07-18 18:09:55 -07:00
Andreas Gal dbdf9bd66d add TestClass and fix related bugs 2014-07-18 17:55:09 -07:00
Andreas Gal 22bdd1bb5c fix arraylength 2014-07-18 14:44:50 -07:00
Andreas Gal a972b0b4ac fix native calls that return a long value 2014-07-18 11:00:19 -07:00
Andreas Gal 25cb7e98a6 a couple array fixes 2014-07-18 01:12:38 -07:00
Andreas Gal b6a04472c8 fixup exception handling 2014-07-17 23:02:28 -07:00
Andreas Gal bae132fb3d fixes to exception handling 2014-07-17 22:00:32 -07:00
Andreas Gal bafcea469d throw JavaException from native code instead of using raiseException 2014-07-17 18:43:16 -07:00
Andreas Gal af6e510174 catch Java exceptions in native code in the interpreter 2014-07-17 18:42:11 -07:00
Andreas Gal 6256dd31ff use separate stack to invoke static initializers 2014-07-17 14:34:22 -07:00
Andreas Gal 7ac0fb0653 send output to a div 2014-07-17 01:41:50 -07:00
Andreas Gal 391f2d314a make class initialization more precise 2014-07-17 01:37:35 -07:00
Andreas Gal 16c34bd445 don't export JavaException from Native 2014-07-15 19:21:40 -07:00
Andreas Gal 31eaa16642 fix console output, hello world works now 2014-07-15 00:01:11 -07:00
Andreas Gal 344d8ebbb5 comment out monitor code, it seems to be broken 2014-07-14 23:52:27 -07:00
Andreas Gal 27529726b9 more work on Class natives 2014-07-14 23:47:20 -07:00
Andreas Gal 5c70149d6e add partial Class.forName 2014-07-14 23:37:33 -07:00
Andreas Gal acf1233174 add unchecked_char_array 2014-07-14 23:19:26 -07:00
Andreas Gal 5b0b4aef27 implement a native method 2014-07-14 22:13:01 -07:00
Andreas Gal 35752868ef eliminate other use of meta() 2014-07-13 19:57:33 -07:00
Andreas Gal 0e899fbc7e rename getMethod to getNativeMethod in Native 2014-07-13 18:47:31 -07:00
Andreas Gal 1572da1730 be more lazy and cache more signature parsing 2014-07-13 10:51:34 -07:00
Andreas Gal 875ef93a73 more classinfo cleanup 2014-07-13 10:37:28 -07:00
Andreas Gal 7401fda65d cleanup classinfo, resolve it earlier, don't keep classImage in memory 2014-07-13 09:28:19 -07:00
Andreas Gal 02f2466e32 implement arraycopy 2014-07-13 09:03:11 -07:00
Andreas Gal 6a89b9142f at last, we can raise exceptions from within natives 2014-07-13 00:15:00 -07:00
Andreas Gal b6d521de28 pass caller to natives as this 2014-07-13 00:12:33 -07:00
Andreas Gal ead498de16 rewrite invocation path 2014-07-13 00:00:11 -07:00
Andreas Gal 7bfd169d76 factor ou code to call native methods 2014-07-12 23:13:53 -07:00
Andreas Gal 6c30aeb031 fix argument order for native methods 2014-07-12 16:07:47 -07:00
Andreas Gal 673c224628 rework VM core 2014-07-12 14:07:11 -07:00