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

46 Коммитов

Автор SHA1 Сообщение Дата
Marco Castelluccio 66aea4338f Convert numbers to integers in natives that should return integers 2014-11-15 17:51:51 +01:00
Myk Melez 73fd3cac3f measure async natives per promise 2014-11-14 09:03:12 -08:00
Eric Rahm c64a188b39 Improve perf of createAlternanteImpl
- Creates return-type specific return functions that are determined at
  creation time.
- Splits off promise handling to it's own function. Overrides that use promises
  must indicate so when creating the override with the usesPromise param.
- Updates overrides that use promises
2014-11-03 17:47:51 -08:00
Marco Castelluccio f3b184b3e4 Move newArray and its relatives from Context and Runtime to util 2014-10-27 13:13:54 +01:00
Marco Castelluccio 820f2ef5da Pass ctx as last optional parameter. Fixes #485. 2014-10-27 12:37:53 +01:00
Marco Castelluccio 606e1fda61 Add info about time spent waiting for a native. Fixes #420. 2014-10-24 11:18:11 +02:00
Marco Castelluccio 41bfebdec5 Update documentation for createAlternateImpl 2014-10-22 12:25:26 +02:00
Marco Castelluccio 4af2a450c4 Calculate number of parameters from the function signature 2014-10-22 12:16:59 +02:00
Marco Castelluccio b9250183d7 Handle VM pause and resume in Native.create 2014-10-16 15:03:16 -07:00
Marco Castelluccio 338f62bdaa Remove opts parameter from Override.create/Native.create and use the MethodInfo's isStatic property. Fixes #443. 2014-10-14 16:38:16 -07:00
Marco Castelluccio 824c3fa01c Merge branch 'native_simple_override_simple' into introduce_native_create 2014-10-14 15:12:18 -07:00
Marco Castelluccio 06147f0230 Always return booleans for functions that should return booleans 2014-10-14 14:55:10 -07:00
Marco Castelluccio 8dc9aae3f3 Support returning doubles from alternate impls 2014-10-14 11:26:29 -07:00
Marco Castelluccio f08c5ec14e Support alternate impls that throw VM.Pause or VM.Yield 2014-10-14 11:24:33 -07:00
Marco Castelluccio a8bc55af70 Replace Override.simple with Override.create, that supports returning long values and lets functions use the context. Fixes #379. 2014-10-14 10:29:34 -07:00
Marco Castelluccio a8cfd29a59 Introduce Native.simple; port some overrides to Override.simple 2014-10-14 09:42:01 -07:00
Marcus Cavanaugh 0a6b67fd1c Move alternateImpl detection into MethodInfo constructor. 2014-10-08 14:05:34 -07:00
Myk Melez 2be0a5b730 Revert "Move alternateImpl detection into MethodInfo constructor." 2014-10-08 12:20:48 -07:00
Marcus Cavanaugh 81e80969b6 Move alternateImpl detection into MethodInfo constructor. 2014-10-07 11:14:05 -07:00
Marco 362983df71 Merge pull request #367 from mcav/stringbuffer
Port StringBuffer to JS.
2014-10-01 11:43:26 -07:00
Marco Castelluccio 592b685ab4 Add comments to explain the Permissions overrides 2014-09-30 19:41:50 -07:00
Marco Castelluccio a16833e9dd Replace the Latin word "maximus" with the English "maximums" 2014-09-30 19:30:09 -07:00
Marco Castelluccio 9a5f629207 Add comment explaining the "+ 2" 2014-09-30 19:29:25 -07:00
Marco Castelluccio 8375d059ee Merge branch 'master' of https://github.com/andreasgal/j2me.js into optimize_DomainPolicy 2014-09-30 19:28:27 -07:00
Marcus Cavanaugh 9b5373a0ec Port StringBuffer to JS. 2014-09-30 11:15:29 -07:00
Marco Castelluccio d4bdec7ad7 Override Permissions methods to avoid expensive calls to DomainPolicy.loadValues. Fixes #351. 2014-09-30 11:13:40 -07:00
Marco Castelluccio 2b451436b3 Override ByteArrayOutputStream::write(int) 2014-09-30 09:49:36 -07:00
Marcus Cavanaugh 0c18df2554 Replace fromCharCode loop with TextEncoder; fix indentation; fix getField conventions. 2014-09-29 10:04:09 -07:00
Marcus Cavanaugh fe323649c6 Reimplement java.lang.String with JS Strings. 2014-09-29 09:43:31 -07:00
Marco Castelluccio 5d0dbff1f0 Actually update method to access fields 2014-09-26 21:33:23 -07:00
Marco Castelluccio 7016086f09 Update method to access fields 2014-09-26 21:29:27 -07:00
Marco Castelluccio dd8a34cd9f Simplify conditions 2014-09-26 21:14:36 -07:00
Marco Castelluccio f6c266d033 Merge branch 'master' of https://github.com/andreasgal/j2me.js into optimize_ByteArrayOutputStream
Conflicts:
	override.js
2014-09-26 21:14:07 -07:00
Marco Castelluccio c6fe5e0ef2 Fix review comments 2014-09-26 20:58:43 -07:00
Marco Castelluccio 893b6a11c7 Override ByteArrayOutputStream::write(byte[],int,int). Fixes #322. 2014-09-26 10:38:03 -07:00
Marco Castelluccio aa32876715 Override entire ByteArrayInputStream class in JS 2014-09-25 18:14:38 -07:00
Marco Castelluccio 24ba774c32 Implement ByteArrayInputStream::read() in JS 2014-09-25 17:06:43 -07:00
Myk Melez e1a5499ad5 override Math.min 2014-09-25 12:14:32 -07:00
Marco Castelluccio 5cf2e94d6f Use regexp instead of for loop 2014-09-24 17:44:06 -07:00
Marco Castelluccio 1a519b8840 Override Connection::encode 2014-09-24 12:55:34 -07:00
Marco Castelluccio 2269df8c12 Merge branch 'master' of https://github.com/andreasgal/j2me.js into optimize_Connection_decode 2014-09-24 09:58:17 -07:00
Myk Melez c79278452b check if 'override' already in methodInfo before attempting to look it up 2014-09-24 09:14:49 -07:00
Marco Castelluccio 9021d47867 Use the new override feature instead of making Connection::decode a native commenting out its body 2014-09-24 01:10:39 -07:00
Myk Melez 75f9fb6219 fix indentation 2014-09-24 00:32:43 -07:00
Myk Melez bfcfed58be add Override.hasMethod 2014-09-23 23:56:54 -07:00
Myk Melez 90e6217f4e add ability to override non-native Java methods 2014-09-23 23:50:23 -07:00