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

381 Коммитов

Автор SHA1 Сообщение Дата
Marco Castelluccio e1390b706c Merge branch 'master' of https://github.com/andreasgal/j2me.js into seal_Frame 2014-09-30 17:46:46 -07:00
Marco Castelluccio 1146835d77 Don't create a fake caller frame for synthetic methods 2014-09-30 17:23:24 -07:00
Marco Castelluccio 50aef85f82 Don't use syntheticKey in Instrument.getKey. Fixes #371. 2014-09-30 15:16:38 -07:00
Marcus Cavanaugh 9b5373a0ec Port StringBuffer to JS. 2014-09-30 11:15:29 -07:00
Marcus Cavanaugh fe323649c6 Reimplement java.lang.String with JS Strings. 2014-09-29 09:43:31 -07:00
Marco Castelluccio 25121d31e2 Update method to access fields 2014-09-26 21:43:13 -07:00
Marco Castelluccio e4c8335bf4 Place spaces around <= 2014-09-26 21:42:37 -07:00
Marco Castelluccio fc02394056 Merge branch 'master' of https://github.com/andreasgal/j2me.js into optimize_UTF_8_Writer 2014-09-26 21:41:04 -07:00
Marco Castelluccio a73e4ed546 Merge branch 'master' of https://github.com/andreasgal/j2me.js into pass_key_to_getfield
Conflicts:
	classes.js
2014-09-26 21:19:58 -07:00
Marco Castelluccio e148d53811 Implement UTF_8_Writer::sizeOf in JS 2014-09-26 13:29:15 -07:00
Marco Castelluccio 901448bb2a Implement UTF_8_Writer::write in JS and make it convert the whole array and send it all at once to the output stream. Fixes #314. 2014-09-26 13:24:59 -07:00
Marco Castelluccio 01d6985889 Use 'S' for static, 'I' for non-static 2014-09-26 11:48:06 -07:00
Marco Castelluccio b71ee629f6 Fix all getField callers 2014-09-25 21:04:20 -07:00
Marco Castelluccio de7ec4104d Add vmc and vfc fields to all classes 2014-09-25 19:20:41 -07:00
Marco Castelluccio 912216499e Override UTF_8_Reader completely, without implementing methods that are never used 2014-09-25 16:26:39 -07:00
Marco Castelluccio 9a7e55135c Override ResourceInputStream::read() and ResourceInputStream::available() instead of implementing the natives they call 2014-09-25 11:40:22 -07:00
Marco Castelluccio fa179469c3 Store 1 or 0 in the key according to whether the method is static or not 2014-09-24 22:51:46 -07:00
Marco Castelluccio 4021a2b927 Remove unused argument from getMethod 2014-09-24 22:38:41 -07:00
Marco Castelluccio faccf951d9 Store the key lazily in methodInfo and pass the key to getMethod 2014-09-24 22:35:02 -07:00
Marco Castelluccio 746ca451dc Use TypedArray::set in unchecked_*_arraycopy instead of for loop 2014-09-24 16:06:43 -07:00
Marco Castelluccio 842c53b7e3 No need to store the |start| value when using performance.now() 2014-09-23 17:55:59 -07:00
Marco Castelluccio f8a733c43c Use performance.now() in monotonicTimeInMillis 2014-09-23 17:51:00 -07:00
Myk Melez 7472648262 identify individual synthetics 2014-09-22 01:46:49 -07:00
Myk Melez 85178cace0 identify synthetics in profile 2014-09-22 01:35:12 -07:00
Marco Castelluccio f09a07e789 Add other properties 2014-09-19 17:26:56 -07:00
Marco Castelluccio b42704d2c0 Add comment 2014-09-19 17:18:25 -07:00
Marco Castelluccio 83667c5bee Add other fileconn properties 2014-09-19 17:17:47 -07:00
Marcus Cavanaugh 1c20f19c14 Return proper timezone for "com.sun.cldc.util.j2me.TimeZoneImpl.timezone". 2014-09-17 12:14:12 -07:00
Marco Castelluccio 83e747ad35 Implement String::intern native 2014-09-12 13:28:56 -07:00
Myk Melez 089d5fd542 implement String.intern 2014-09-10 16:23:27 -07:00
Myk Melez 144fbee172 Merge branch 'master' into improve-logging 2014-09-08 17:46:58 -07:00
Marco Castelluccio 017fd78b7a Add com.nokia.multisim.imsi.sim2 stub property 2014-09-08 17:06:40 -07:00
Myk Melez ed277b109c flush output buffer to preserve order in which messages appear 2014-09-08 09:13:08 -07:00
Myk Melez 060b30712c merge output and log consoles 2014-09-08 08:19:29 -07:00
Myk Melez 3cface3289 correct levels of various console.* calls 2014-09-08 01:22:18 -07:00
Myk Melez 5c95489e1a pad MCC/MNC values more lazily 2014-09-05 16:06:44 -07:00
Myk Melez f535d63a04 differentiate between network/ICC values for MCC/MNC; add msisdn 2014-09-05 14:57:32 -07:00
Marco 4d987e4a94 Merge pull request #201 from mykmelez/fix-mnc
prepend MCC value to com.nokia.mid.mnc
2014-09-05 11:41:00 -07:00
Myk Melez 9c30f2a3a1 make native.js actually 'use strict' 2014-09-05 11:36:46 -07:00
Myk Melez 86810eb3d8 prepend MCC value to com.nokia.mid.mnc 2014-09-05 10:56:43 -07:00
Marco Castelluccio f6352f4aaf Add com.nokia.mid.ui.customfontsize property 2014-09-04 15:27:51 -07:00
Andreas Gal a73a2d1554 Merge pull request #186 from marco-c/add_other_fileconn_properties
Add other two fileconn properties
2014-09-03 19:23:16 -07:00
Marco Castelluccio a27f1264af Warn when reading some unimplemented com.nokia.* properties 2014-09-03 19:10:11 -07:00
Marco Castelluccio a319c44e8f Add other two fileconn properties 2014-09-03 19:03:11 -07:00
Marco Castelluccio c3fbae4470 Introduce raiseExceptionAndYield function and use it when needed 2014-08-26 09:47:51 -07:00
Marco Castelluccio 7b2f1ed71d Use com.sun.cldc.io as fallback instead of com.sun.midp.io because most of our protocols are in com.sun.midp.io 2014-08-21 09:14:28 -07:00
Myk Melez fde5781446 Merge pull request #105 from marco-c/set_nokia_keyboard_to_none
Set com.nokia.keyboard.type to None
2014-08-18 17:27:00 -07:00
Marco Castelluccio d5c02a0e81 Set com.nokia.keyboard.type to None 2014-08-18 15:49:59 -07:00
Marco Castelluccio 5b47ea3dc4 ResourceInputStream::readBytes should start reading at handle.pos 2014-08-18 15:44:28 -07:00
Andreas Gal e0ec8b7710 Merge pull request #94 from marco-c/fix_getIsolates_bug
Fix bug in Isolate::getIsolates native
2014-08-11 18:25:44 -07:00
Marco Castelluccio cf23fc786e Add Isolate::setPriority native 2014-08-11 17:16:18 -07:00
Marco Castelluccio abb24c7460 Fix bug in Isolate::getIsolates native 2014-08-11 17:13:50 -07:00
Andreas Gal c5d11d05ea Merge pull request #76 from marco-c/support_links
Add some LinkPortal and Link natives
2014-08-08 18:36:57 -07:00
Marco Castelluccio a595c7de68 Merge branch 'master' of https://github.com/andreasgal/j2me.js into support_links
Conflicts:
	native.js
2014-08-08 18:34:31 -07:00
Andreas Gal 3b4db1d0e4 Merge pull request #81 from marco-c/add_mobileinfo_library
Add mobileInfo library to get informations about mobile connections usin...
2014-08-08 18:33:46 -07:00
Marco Castelluccio 7a4c96ac1b Merge branch 'master' of https://github.com/andreasgal/j2me.js into support_links 2014-08-08 16:41:11 -07:00
Marco Castelluccio 7a5da5f1f1 Add mobileInfo library to get informations about mobile connections using the mozMobileConnections API 2014-08-08 16:17:00 -07:00
Marco Castelluccio 583acd3a34 Add Isolate ID property, id0 native function, calculate the correct displayId 2014-08-08 15:24:24 -07:00
Marco Castelluccio c95700c594 Now we always have an isolate 2014-08-08 13:41:42 -07:00
Andreas Gal 3a0abad4ad Revert "Add Isolate ID property" 2014-08-08 13:33:19 -07:00
Marco Castelluccio 3c827b0ae8 Merge branch 'master' of https://github.com/andreasgal/j2me.js into support_links
Conflicts:
	native.js
2014-08-08 13:19:01 -07:00
Marco Castelluccio 925601527c Add some LinkPortal and Link natives 2014-08-08 13:07:52 -07:00
Andreas Gal b0a470c924 implement getIsolates0 2014-08-08 13:04:40 -07:00
Marco Castelluccio 8c1772d497 Add Link natives 2014-08-08 12:56:13 -07:00
Marco Castelluccio f1fca56ab7 Add Isolate ID property 2014-08-08 11:29:52 -07:00
Marco Castelluccio 269487a389 Set classpathext to null 2014-08-08 09:41:58 -07:00
Andreas Gal 7380c16ee2 always start the main class via an isolate 2014-08-08 00:47:11 -07:00
Andreas Gal e5d4e9d391 factor out startIsolate 2014-08-07 23:00:53 -07:00
Andreas Gal a9046c52e5 implement currentIsolate0 2014-08-07 22:29:16 -07:00
Andreas Gal 3b484e7d40 Resolve merge conflicts. 2014-08-07 21:01:06 -07:00
Donovan Preston d077c6fa6b Add more system properties. 2014-08-07 23:35:02 -04:00
Marco Castelluccio 6c570a2171 Add some natives for a stub implementation of alarms 2014-08-07 18:32:14 -07:00
Andreas Gal f141e496a0 Merge pull request #56 from marco-c/native_security_handler
Use the native version of the SecurityHandler class
2014-08-07 16:00:04 -07:00
Andreas Gal 2d0268af5d Merge pull request #60 from mykmelez/started-status
set status to STARTED after invoking isolate's main class
2014-08-07 15:47:34 -07:00
Myk Melez 6f6f96acd6 undo Java change by making waitStatus work like reference impl 2014-08-07 15:44:38 -07:00
Myk Melez cc45978066 move the exception handler 2014-08-07 14:29:25 -07:00
Myk Melez ca5ddcc09d set status to STARTED 2014-08-07 14:18:40 -07:00
Marco Castelluccio 11e86bd705 Don't use the tmp directory 2014-08-07 13:35:59 -07:00
Marco Castelluccio 36ac1899ae Add protocolpath properties (some protocols are in one package, some in another package) 2014-08-07 13:29:46 -07:00
Andreas Gal 5b7aef3861 calculate monotonicTimeMillis since startup, not since 1/1/1970 2014-08-07 13:07:16 -07:00
Andreas Gal 0f6f379440 fix unit tests 2014-08-07 12:32:43 -07:00
Andreas Gal 563f34d56b make isolate startup and shutdown/waitStatus work 2014-08-07 12:31:48 -07:00
Myk Melez 13b2ae8043 remove unwaitStatus 2014-08-07 12:12:57 -07:00
Myk Melez 66cabcffcb unwait status 2014-08-07 11:57:34 -07:00
Marco Castelluccio 3e3811bea7 Use native version of the SecurityHandler class 2014-08-07 11:54:41 -07:00
Myk Melez 8069981192 fix getStatus 2014-08-07 11:53:52 -07:00
Myk Melez b8a3502970 waitStatus impl 2014-08-07 11:46:11 -07:00
Andreas Gal 936de85d1c add basic support for isolates, not complete yet 2014-08-07 10:10:54 -07:00
Andreas Gal bb4ee7d4cd add nativeStart 2014-08-06 23:57:44 -07:00
Andreas Gal 5ac6ac4db5 implement Isolate.getStatus 2014-08-06 22:43:05 -07:00
Andreas Gal 57356e19db abstract static field access 2014-08-06 22:06:14 -07:00
Andreas Gal 5f34724b43 remove dead code 2014-08-06 20:50:09 -07:00
Andreas Gal c5761cdf0d Merge pull request #49 from marco-c/report_exception_on_missing_native
Raise RuntimeException on missing native method
2014-08-06 20:49:48 -07:00
Andreas Gal c6f918d9e0 move pending/initialized to runtime 2014-08-06 17:11:27 -07:00
Andreas Gal 10924b6a07 keep the mainThread on the runtime 2014-08-06 17:05:42 -07:00
Andreas Gal 08614d1704 add a runtime abstraction 2014-08-06 17:04:44 -07:00
Andreas Gal 6f5866f663 move newPrimitiveArray to context as well 2014-08-06 16:53:35 -07:00
Andreas Gal 695d1619f8 move isolate-specific state out of CLASSES 2014-08-06 16:48:17 -07:00
Marco Castelluccio 1259e044a9 Raise RuntimeException on missing native method 2014-08-06 15:38:47 -07:00
Andreas Gal 67c5746f6d move newArray to context 2014-08-06 13:52:18 -07:00
Marco Castelluccio f59f18eb60 Fixed review comments 2014-08-05 17:40:13 -07:00
Marco Castelluccio 7410fdf138 Merge branch 'master' of https://github.com/andreasgal/j2me.js into other_fileconnection_natives
Conflicts:
	native.js
2014-08-05 15:57:17 -07:00
Marco Castelluccio 8e6f8e7d8d Switch read and write from using blobs to typedarrays 2014-08-05 15:53:54 -07:00
Andreas Gal d8c7ca9555 move MIDP-related natives into midp.js 2014-08-05 15:43:37 -07:00
Marco Castelluccio 3d753af444 Merge branch 'master' of https://github.com/andreasgal/j2me.js into other_fileconnection_natives 2014-08-05 14:45:23 -07:00
Marco Castelluccio 8d08f25e05 Add other natives 2014-08-05 14:44:45 -07:00
Donovan Preston e7bb2c28ac Add keyboard.type property 2014-08-05 15:54:26 -04:00
Myk Melez c4cd8b6b92 stub implementation of GestureRegistrationManager.register 2014-08-05 12:26:25 -07:00
Myk Melez 9831f21cbd use new operator to instantiate Uint8Array for Chrome 2014-08-05 11:54:38 -07:00
Donovan Preston c11b75911d Stub out TimeZone property 2014-08-05 14:44:46 -04:00
Marco Castelluccio efa1e39bab Merge branch 'master' of https://github.com/andreasgal/j2me.js into fileconnection_natives 2014-08-05 10:34:41 -07:00
Myk Melez 3c4dccabb5 return 0 from native for boolean false 2014-08-05 10:32:55 -07:00
Marco Castelluccio a20330612a Use Long.fromNumber for the file size 2014-08-05 10:31:20 -07:00
Marco Castelluccio ad232b717a Use push2 in fileSizeImpl 2014-08-05 10:17:56 -07:00
Marco Castelluccio 437ef05b45 Merge branch 'master' of https://github.com/andreasgal/j2me.js into fileconnection_natives
Conflicts:
	native.js
2014-08-05 10:15:53 -07:00
Myk Melez 7874d9e0cf stub GestureRegistrationManager.setListener and GestureInteractiveZone.isSupported natives 2014-08-05 10:08:46 -07:00
Marco Castelluccio 021b692887 Remove WIP natives and logging statements 2014-08-05 10:05:59 -07:00
Marco Castelluccio ae1a68db9f Add native 2014-08-05 10:03:38 -07:00
Marco Castelluccio 6dbef60044 Merge branch 'master' of https://github.com/andreasgal/j2me.js into fileconnection_natives
Conflicts:
	native.js
2014-08-05 09:49:50 -07:00
Marco Castelluccio bb77501fe8 Implement other natives 2014-08-05 09:40:32 -07:00
Andreas Gal c4f6099041 add support for (fake) weak references 2014-08-05 09:34:00 -07:00
Marco Castelluccio dcbb37ffc1 Merge branch 'master' of https://github.com/andreasgal/j2me.js into fileconnection_natives 2014-08-05 08:49:21 -07:00
Marco Castelluccio 7d453a1cd6 Comment out draft natives 2014-08-05 08:48:57 -07:00
Andreas Gal 3555b404e5 fix formating 2014-08-04 21:51:46 -07:00
Marco Castelluccio 3af6ea31a8 Add other natives 2014-08-04 15:44:04 -07:00
Marco Castelluccio 7f548d0968 Add other natives 2014-08-04 14:09:27 -07:00
Marco Castelluccio 6fb18e080d Add some FileConnection natives 2014-08-04 13:35:02 -07:00
Marco Castelluccio 5923815f32 Add file.separator property and IBM's reference implementation of the FileConnecion API 2014-08-03 19:58:29 -07:00
Marco Castelluccio 9048aa1042 Merge branch 'master' of https://github.com/marco-c/j2me.js into add_fileconn_properties 2014-08-03 19:29:53 -07:00
Andreas Gal 47a98049bb fix monotonicTimeMillis and move to native.js 2014-08-02 13:19:32 -07:00
Andreas Gal 246b045b81 make things work in chrome 2014-08-02 11:27:25 -07:00
Andreas Gal 3c109d3e8a fix a few things for the simple game demo 2014-08-02 01:08:28 -07:00
Andreas Gal 236e4e9a36 use numeric ids as field names 2014-08-01 22:47:26 -07:00
Marco Castelluccio 429acf589a Add fileconn properties 2014-08-01 20:25:58 -07:00
Andreas Gal cc7a8e0e87 Merge pull request #12 from fzzzy/master
Fix some incorrect _this stack.pop()ping in native.js
2014-08-01 19:52:52 -07:00
Andreas Gal 27ddf9f663 Merge pull request #13 from marco-c/add_microedition_platform_property
Add microedition.platform property
2014-08-01 19:52:13 -07:00
Marco Castelluccio 1cf72206c0 Add microedition.platform property 2014-08-01 19:41:07 -07:00
Donovan Preston ee21138b4f Fix some incorrect _this stack.pop()ping in native.js 2014-08-01 22:18:28 -04:00
Marco Castelluccio 82fef8e403 Add poll0 native 2014-08-01 13:36:00 -07:00
Andreas Gal 272035b45c fixes to native event handling 2014-07-31 22:59:34 -07:00
Andreas Gal 853ba9a620 return locale in midp.Configuration 2014-07-31 16:02:20 -07:00
Andreas Gal 87566dc634 properly report forName(null) 2014-07-31 15:01:10 -07:00
Andreas Gal f18ae0a550 add another midp native and support microedition.locale 2014-07-31 08:59:30 -07:00
Andreas Gal f10491aa71 more midp native code 2014-07-30 17:40:39 -07:00
Andreas Gal 8c0cc49bd5 don't die on synthethic frames in the backtrace 2014-07-30 15:56:57 -07:00
Andreas Gal 3991c8a173 implement proper back traces 2014-07-30 15:49:58 -07:00
Andreas Gal 48714d05c0 move newString to classes 2014-07-29 17:40:19 -07:00
Andreas Gal aa05e9f177 resolve all constant pool entries 2014-07-29 04:26:03 -07:00
Andreas Gal 77687793db rename running -> alive 2014-07-29 02:19:10 -07:00
Andreas Gal a7d87bcfb3 fix notifyAll 2014-07-29 02:08:04 -07:00
Andreas Gal ffd8626cd3 common out code to unblock a thread 2014-07-29 01:07:15 -07:00
Andreas Gal d7a1f4302d make code run better in chrome 2014-07-28 19:13:32 -07:00
Andreas Gal 1f14601f29 add yield() 2014-07-28 15:19:07 -07:00
Andreas Gal 661777f211 add notify and notifyAll 2014-07-28 12:44:40 -07:00
Andreas Gal eb7b9eec14 improve locking of class initialization 2014-07-28 12:42:42 -07:00
Andreas Gal ae2426c4c0 a couple assorted fixes for threading 2014-07-28 00:53:37 -07:00
Andreas Gal 2f4d32f420 implement threading better 2014-07-27 23:39:41 -07:00
Andreas Gal 29c84a4c15 fix order of static class initialization 2014-07-27 20:30:10 -07:00
Andreas Gal 21359dfc2d add a few missing unchecked arraycopy natives 2014-07-27 20:22:33 -07:00
Andreas Gal 2a08d3b8ea add ClassTest.java and hashCode() 2014-07-26 18:47:38 -07:00
Andreas Gal bde88bd000 add and fix vm for ClassTest.java 2014-07-26 18:20:54 -07:00
Andreas Gal c79379d73b fix array copy with object element type 2014-07-26 17:39:49 -07:00
Andreas Gal ad400b894b add a bunch of math tests 2014-07-26 15:00:19 -07:00
Andreas Gal d394243a8a better locking for class intialization 2014-07-26 11:42:02 -07:00
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