Jens Ayton
|
2e788a219d
|
Converted all unguarded oo_jsValueInContext:s to OOJSValueFromNativeObject().
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4356 127b21dd-08f5-0310-b4b7-95ae10353056
|
2011-02-14 21:57:58 +00:00 |
|
Jens Ayton
|
3c8bc3c3ef
|
OOJSValue objects now relinquish their JS values when JS environment resets.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4301 127b21dd-08f5-0310-b4b7-95ae10353056
|
2011-02-11 16:42:46 +00:00 |
|
Jens Ayton
|
8101d17c8c
|
JavaScript environment is now reset when auto-reloading player.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4300 127b21dd-08f5-0310-b4b7-95ae10353056
|
2011-02-11 13:29:46 +00:00 |
|
Jens Ayton
|
e20c9cc512
|
Removed support for old-style exceptions.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4298 127b21dd-08f5-0310-b4b7-95ae10353056
|
2011-02-11 11:46:01 +00:00 |
|
Nikos Barkas
|
722ae918fd
|
Fixed missing terminating ' character warning.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4294 127b21dd-08f5-0310-b4b7-95ae10353056
|
2011-02-11 07:45:26 +00:00 |
|
Jens Ayton
|
435c218d6e
|
JS audit: OOJSEntity. Also cleaned up some redundant [entity isPlanet] && ![entity isSun] checks - -[OOSunEntity isPlanet] is false.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4289 127b21dd-08f5-0310-b4b7-95ae10353056
|
2011-02-10 23:47:42 +00:00 |
|
Jens Ayton
|
150dd2b9a5
|
JavaScript console and global object are now rebuilt when resetting the game, to make it impossible to smuggle information across sections. There seem to be minor JS-related leaks as a result. Be on the lookout for exciting new crashers! As an arguably unfortunate side-effect, the console currently doesn't work when resetting into strict mode.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4210 127b21dd-08f5-0310-b4b7-95ae10353056
|
2011-02-01 21:12:38 +00:00 |
|
Jens Ayton
|
5e4d3e5695
|
Purged OO_NEW_JS. Now would be a good time for comprehensive test builds.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4197 127b21dd-08f5-0310-b4b7-95ae10353056
|
2011-01-30 17:27:40 +00:00 |
|
Jens Ayton
|
c997498109
|
Found the random combination of documentation and source code comments that makes it clear that DOUBLE_TO_JSVAL is invalid when value may be an integer, and switched everything to JS_NewNumberValue() (which is like JS_NewDoubleValue() only different, since JS_NewDoubleValue() was also invalid for potentially-integer values).
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4196 127b21dd-08f5-0310-b4b7-95ae10353056
|
2011-01-30 16:30:06 +00:00 |
|
Jens Ayton
|
177ffb9baf
|
Took a detour to improve printing of values in error messages and debug things.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4195 127b21dd-08f5-0310-b4b7-95ae10353056
|
2011-01-30 15:33:06 +00:00 |
|
Jens Ayton
|
69444e6943
|
Oldjs removal: various thin wrappers and stuff.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4194 127b21dd-08f5-0310-b4b7-95ae10353056
|
2011-01-30 14:49:46 +00:00 |
|
Jens Ayton
|
45de8ac142
|
Oldjs removal: started on replacing JS_NewDoubleValue() with DOUBLE_TO_JSVAL(), ended up reforming accessor error handling. Lots more to come.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4193 127b21dd-08f5-0310-b4b7-95ae10353056
|
2011-01-30 14:33:39 +00:00 |
|
Jens Ayton
|
019f71973e
|
Further JavaScript streamlining.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4156 127b21dd-08f5-0310-b4b7-95ae10353056
|
2011-01-25 20:19:35 +00:00 |
|
Jens Ayton
|
a9fda60269
|
Belatedly remembered that the whole multiple-JavaScript-context thing was a completely bogus hack to work around bad exception handling, and ripped it out for the slight simplicity win.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4142 127b21dd-08f5-0310-b4b7-95ae10353056
|
2011-01-24 17:17:43 +00:00 |
|
Jens Ayton
|
ade28ce185
|
Work on reducing the number of object translations involved in script dispatch. Also, hid every single JS_BeginRequest()/JS_EndRequest() pair inside OOJavaScriptEngine by baking them into acquireContext and releaseContext:.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4140 127b21dd-08f5-0310-b4b7-95ae10353056
|
2011-01-24 16:28:46 +00:00 |
|
Jens Ayton
|
b368c831af
|
Aforementioned oldjs shenanigans, now with usefulness.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4139 127b21dd-08f5-0310-b4b7-95ae10353056
|
2011-01-23 22:35:05 +00:00 |
|
Jens Ayton
|
babf28f15b
|
Workaround for defective ObjC type checking in gnu-gcc.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4138 127b21dd-08f5-0310-b4b7-95ae10353056
|
2011-01-23 22:33:45 +00:00 |
|
Jens Ayton
|
19c2ad245a
|
More oldjs shenanigans.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4137 127b21dd-08f5-0310-b4b7-95ae10353056
|
2011-01-23 22:29:49 +00:00 |
|
Jens Ayton
|
d1c880e315
|
Converters defined with DEFINE_JS_OBJECT_GETTER() now show up with their real name in profiles.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4134 127b21dd-08f5-0310-b4b7-95ae10353056
|
2011-01-23 21:20:00 +00:00 |
|
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 |
|