Jens Ayton
|
f27f1c23b2
|
Streamlined JSFunctionPredicate.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4133 127b21dd-08f5-0310-b4b7-95ae10353056
|
2011-01-23 21:11:27 +00:00 |
|
Jens Ayton
|
b636e923ce
|
Work on using jsids instead of strings to identify methods and properties, starting with the simple cases.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4131 127b21dd-08f5-0310-b4b7-95ae10353056
|
2011-01-23 20:43:56 +00:00 |
|
Jens Ayton
|
4ef5f4a8b0
|
New JS method global.defaultFont.measureString().
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4129 127b21dd-08f5-0310-b4b7-95ae10353056
|
2011-01-23 18:24:52 +00:00 |
|
Jens Ayton
|
95b9116437
|
Infrastructure for specifying overlay/underlay height. Also fixed default value of runMissionScreen() spinModel setting.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4125 127b21dd-08f5-0310-b4b7-95ae10353056
|
2011-01-23 15:37:01 +00:00 |
|
Jens Ayton
|
76630d9f2b
|
Cleaned up some JavaScript object coersion stuff, and fixed a crasher in callObjC(). Oddly enough, this is work on bug #17201.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4123 127b21dd-08f5-0310-b4b7-95ae10353056
|
2011-01-23 14:39:27 +00:00 |
|
Jens Ayton
|
bb8ee9280d
|
Work on scriptable number formatting for localization. (If this seems like overkill, you probably haven’t considered the problem in enough detail.) Currently supports integers and credits quantities, and is used for displaying credits quantites in UI.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4112 127b21dd-08f5-0310-b4b7-95ae10353056
|
2011-01-21 01:00:25 +00:00 |
|
Jens Ayton
|
36ac28a680
|
Oldjs compatibility fix.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4111 127b21dd-08f5-0310-b4b7-95ae10353056
|
2011-01-20 22:12:23 +00:00 |
|
Jens Ayton
|
214d87e63c
|
Escort formations can now be defined in JavaScript by implementing coordinatesForEscortPosition().
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4105 127b21dd-08f5-0310-b4b7-95ae10353056
|
2011-01-20 19:52:01 +00:00 |
|
Jens Ayton
|
3159c50308
|
Disabled JSOPTION_STRICT by default because it causes spurious warnings in various weird cases. ES5 strict provides many of the same benefits in a less arbitrary fashion.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4097 127b21dd-08f5-0310-b4b7-95ae10353056
|
2011-01-19 15:04:58 +00:00 |
|
Jens Ayton
|
3f1e7ae3b5
|
More futzing around with enums and string constants. Also, setting player.ship properties to invalid values now throws an exception rather than halting script; this should be extended to other classes.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4095 127b21dd-08f5-0310-b4b7-95ae10353056
|
2011-01-18 19:20:50 +00:00 |
|
Jens Ayton
|
25b5161d0f
|
Skip bookkeeping frames in stack dump; add "new" in front of non-native constructors in trace.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4094 127b21dd-08f5-0310-b4b7-95ae10353056
|
2011-01-18 17:01:53 +00:00 |
|
Jens Ayton
|
bd9000ee12
|
Console input is now reported as <console input> instead of oolite-debug-console.js:779 in stack dumps, profiles and traces.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4093 127b21dd-08f5-0310-b4b7-95ae10353056
|
2011-01-18 16:30:54 +00:00 |
|
Jens Ayton
|
7f2ed7eec1
|
Rearranging headers to reduce interdependence. OOJavaScriptEngine.h doesn't include all profile management stuff (and has some big blocks of preprocessor hacks moved into new files, OOJSEngineNativeWrappers.h and OOJSEngineTransitionHelpers.h). Started breaking up ill-concieved OOTypes.h (entirely my fault) and putting relevant declarations in more sensible places. To support this, some OOConstToString functions are now declared in Entity.h and ShipEntity.h, and have been renamed while I'm at it.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4088 127b21dd-08f5-0310-b4b7-95ae10353056
|
2011-01-18 13:39:12 +00:00 |
|
Jens Ayton
|
08519fb6be
|
JS special.jsWarning() now skips one stack frame as intended.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4077 127b21dd-08f5-0310-b4b7-95ae10353056
|
2011-01-16 14:04:17 +00:00 |
|
Jens Ayton
|
404cea6b3e
|
Added assertion for possible but unlikely cause of Scree't crash in http://aegidian.org/bb/viewtopic.php?f=3&t=8978
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4076 127b21dd-08f5-0310-b4b7-95ae10353056
|
2011-01-16 13:19:55 +00:00 |
|
Jens Ayton
|
96c9b7dbe6
|
More macro madness! JS scanClass and status strings are now interned singletons, for efficiency and also simpler callbacks.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4073 127b21dd-08f5-0310-b4b7-95ae10353056
|
2011-01-15 17:49:14 +00:00 |
|
Jens Ayton
|
676ed097e9
|
Cleaned up JS debug helpers, made them easier to use and added some basic documentation.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4071 127b21dd-08f5-0310-b4b7-95ae10353056
|
2011-01-15 14:25:49 +00:00 |
|
Jens Ayton
|
9e25713f53
|
oldjs unbreakage.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4069 127b21dd-08f5-0310-b4b7-95ae10353056
|
2011-01-14 22:17:59 +00:00 |
|
Jens Ayton
|
9dad469a36
|
API compatibility with FireFox 4.0 beta 9 version of SpiderMonkey (string functions have changed). Update to 4b9 for OS X not pushed yet; SoundSources don't work.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4068 127b21dd-08f5-0310-b4b7-95ae10353056
|
2011-01-14 22:08:38 +00:00 |
|
Jens Ayton
|
99fc874443
|
Garbage collect when docking.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4065 127b21dd-08f5-0310-b4b7-95ae10353056
|
2011-01-14 20:36:34 +00:00 |
|
Jens Ayton
|
35de1488c1
|
Added OOJSValueIsFunction() and OOJSValueIsArray() helper functions, and used them to avoid several JS crashers.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4064 127b21dd-08f5-0310-b4b7-95ae10353056
|
2011-01-14 20:17:07 +00:00 |
|
Jens Ayton
|
65ae9f162a
|
Added debug-only JS functions debugConsole.dumpHeap() (newjs only) and debugConsole.dumpNamedRoots(). They write to text files in the log folder.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4063 127b21dd-08f5-0310-b4b7-95ae10353056
|
2011-01-14 20:04:21 +00:00 |
|
Jens Ayton
|
19c65c4e4c
|
Build fixage.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4062 127b21dd-08f5-0310-b4b7-95ae10353056
|
2011-01-14 19:32:12 +00:00 |
|
Jens Ayton
|
7f0424efb6
|
Fixed deployment build. Mathematical mucking about.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4060 127b21dd-08f5-0310-b4b7-95ae10353056
|
2011-01-14 18:32:25 +00:00 |
|
Jens Ayton
|
1795bd6f9e
|
Changed stack trace log message class.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4058 127b21dd-08f5-0310-b4b7-95ae10353056
|
2011-01-14 17:02:50 +00:00 |
|
Jens Ayton
|
3509adfab7
|
Added another debug helper, JSValueToStrSafeDbg, suitable for Xcode data formatter or gdb display expression.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4057 127b21dd-08f5-0310-b4b7-95ae10353056
|
2011-01-14 16:45:52 +00:00 |
|
Jens Ayton
|
5f16e93f3f
|
oldjs unbreakage.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4056 127b21dd-08f5-0310-b4b7-95ae10353056
|
2011-01-14 16:03:24 +00:00 |
|
Jens Ayton
|
22e30e422f
|
JavaScript stack traces now include local variables. Stack trace configuration behaviour changed: instead of logcontrol.plist settings, traces for errors and warnings can be separately enabled/disabled through the debug console, or through preferences if debug OXP is not installed. Default is on with debug OXP, off otherwise. Settings in the debug console are persistent, as are showErrorLocations and showErrorLocationsDuringConsoleEval now.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4055 127b21dd-08f5-0310-b4b7-95ae10353056
|
2011-01-14 15:48:05 +00:00 |
|
Jens Ayton
|
4c23525ddd
|
Mucked about a bit with data formatter functions for GDB (those would be JSValueToStrDbg, JSObjectToStrDbg, JSStringToStrDbg, JSValueTypeDbg and now JSDumpStack, BTW). Implemented basic support for JS debugger statement - currently just logs a stack trace, if the debug console is active.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4054 127b21dd-08f5-0310-b4b7-95ae10353056
|
2011-01-14 14:05:51 +00:00 |
|
Jens Ayton
|
56f5e760ce
|
Implemented frame callbacks.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4035 127b21dd-08f5-0310-b4b7-95ae10353056
|
2011-01-08 17:03:04 +00:00 |
|
Jens Ayton
|
549d873f0b
|
Added constructor callback to all JS pseudoclasses, so that the instanceof operator and constructor property behave sanely.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4018 127b21dd-08f5-0310-b4b7-95ae10353056
|
2011-01-06 18:07:48 +00:00 |
|
Jens Ayton
|
8589c5a13e
|
Optimized JS-to-native string converters to avoid up to three unnecessary class method calls. Informally deprecated stringWithJavaScriptString:, stringWithJavaScriptValue:inContext: and stringOrNilWithJavaScriptValue:inContext: in favour of OOStringFromJSString(), OOStringFromJSValueEvenIfNull() and OOStringFromJSValue() (formerly OOJSValToNSString()).
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4011 127b21dd-08f5-0310-b4b7-95ae10353056
|
2011-01-05 22:13:17 +00:00 |
|
Jens Ayton
|
7fd1f70f04
|
Implemented watchdog timer for newjs.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4008 127b21dd-08f5-0310-b4b7-95ae10353056
|
2011-01-05 21:47:45 +00:00 |
|
Jens Ayton
|
124ba843b5
|
New OOJS_BEGIN_FULL_NATIVE()/OOJS_END_FULL_NATIVE macros bracket potentially-slow blocks of ObjC code called from JS callbacks, mostly replacing OOJSPauseTimeLimiter()/OOJSResumeTimeLimiter(). In addition to frobbing the time limiter, they handle JS request management.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4005 127b21dd-08f5-0310-b4b7-95ae10353056
|
2011-01-05 14:29:30 +00:00 |
|
Jens Ayton
|
6e515e60ed
|
Big renaming of JavaScript helpers for internal consistency and clarity.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4004 127b21dd-08f5-0310-b4b7-95ae10353056
|
2011-01-05 12:58:27 +00:00 |
|
Jens Ayton
|
ec371a8511
|
JS expandDescription() and expandMissionText() override parameters are now stringified the JavaScript way rather than by coercing them to ObjC objects and calling -description.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3999 127b21dd-08f5-0310-b4b7-95ae10353056
|
2011-01-04 17:40:47 +00:00 |
|
Jens Ayton
|
cb8597bc7d
|
JavaScript warnings (but not errors) which are squelched in logcontrol.plist are now hidden from the JS console too.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3993 127b21dd-08f5-0310-b4b7-95ae10353056
|
2011-01-04 15:24:45 +00:00 |
|
Jens Ayton
|
4fac70192f
|
Cleaned up oolite-default-ship-script.js for strict mode.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3963 127b21dd-08f5-0310-b4b7-95ae10353056
|
2011-01-03 00:27:00 +00:00 |
|
Jens Ayton
|
c7e0b2d17e
|
Fixed non-debug builds.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3948 127b21dd-08f5-0310-b4b7-95ae10353056
|
2011-01-01 15:48:38 +00:00 |
|
Jens Ayton
|
ecfef79f97
|
File and line information is now suppressed for code called through the console.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3946 127b21dd-08f5-0310-b4b7-95ae10353056
|
2011-01-01 13:41:50 +00:00 |
|
Jens Ayton
|
96df45381e
|
Further tightened new JS underlying object accessors, and fixed test case regressions for the implicit-conversion-from-entity case.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3943 127b21dd-08f5-0310-b4b7-95ae10353056
|
2011-01-01 12:26:36 +00:00 |
|
Nikos Barkas
|
b57f41acaf
|
Fixed build breakage when JS_THREADSAFE was not defined.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3942 127b21dd-08f5-0310-b4b7-95ae10353056
|
2011-01-01 09:44:17 +00:00 |
|
Jens Ayton
|
9aa698b483
|
All JS Ship methods now get their "this" value consistently, including treating the player ship as non-existent during the escape pod sequence, and in a way that isn't trivially crashed - for example, Ship.setAI.call(new Vector3D, "") now works as expected, i.e. raises a JS exception.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3938 127b21dd-08f5-0310-b4b7-95ae10353056
|
2010-12-31 16:08:04 +00:00 |
|
Jens Ayton
|
ded11b65a3
|
Made JSEntityGetEntity() and similar accessors more efficient. Started work of making native callbacks explicitly return VOID when necessary, as this is no longer handled implicitly when not setting a return value.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3937 127b21dd-08f5-0310-b4b7-95ae10353056
|
2010-12-31 15:30:07 +00:00 |
|
Jens Ayton
|
b057dcfeb3
|
Enabled method JIT (JaegerMonkey) in Mac newjs builds. Activated JIT in non-debug builds on all platforms.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3924 127b21dd-08f5-0310-b4b7-95ae10353056
|
2010-12-30 14:30:11 +00:00 |
|
Jens Ayton
|
fc134f42c9
|
Fixed oldjs NSDictionary -> JS Object coersion handler. Fixed return value of console.getProfile().
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3911 127b21dd-08f5-0310-b4b7-95ae10353056
|
2010-12-26 15:39:38 +00:00 |
|
Jens Ayton
|
6d86b802e8
|
JS String and Number objects can now be coerced to NSString and NSNumber using JSObjectToObject(). In practical terms, this means callObjC() now works on them. Also cleaned up some error messages pertaining to callObjC().
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3910 127b21dd-08f5-0310-b4b7-95ae10353056
|
2010-12-26 14:04:32 +00:00 |
|
Jens Ayton
|
049ac7a1bf
|
Fixed JS timers in newjs.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3892 127b21dd-08f5-0310-b4b7-95ae10353056
|
2010-12-19 20:08:43 +00:00 |
|
Jens Ayton
|
2aa48deafc
|
Fixed newjs method calls. Game now runs and console works, but crashes in unit tests because constructors are written wrong.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3886 127b21dd-08f5-0310-b4b7-95ae10353056
|
2010-12-19 13:52:00 +00:00 |
|
Jens Ayton
|
abdf19a77a
|
More requestificiation.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3884 127b21dd-08f5-0310-b4b7-95ae10353056
|
2010-12-18 23:01:06 +00:00 |
|