[FIX] extprim double support

Pavel Holejsovsky pavel.holejsovsky at upek.com
Tue Sep 20 03:34:34 PDT 2005


Hi,

attached is a patch which fixes bug of handling Double params of
external methods.  Second patch extends number of parameters which can
be passed from 12 to 16 words.

This is my first attempt to use darcs and send patches, so if I spoiled
something, pls let me know.

Pavel

-------------- next part --------------

New patches:

[External methods extended to be able to have up to 16 word-sized parameters.
pavouk100 at volny.cz**20050919190113] {
hunk ./src/mobius/vm/platform/extprim.c 23
+typedef unsigned (* ext_fn13_t) (unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned);
+typedef unsigned (* ext_fn14_t) (unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned);
+typedef unsigned (* ext_fn15_t) (unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned);
+typedef unsigned (* ext_fn16_t) (unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned);
hunk ./src/mobius/vm/platform/extprim.c 41
+typedef unsigned (__stdcall * ext_std_fn13_t) (unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned);
+typedef unsigned (__stdcall * ext_std_fn14_t) (unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned);
+typedef unsigned (__stdcall * ext_std_fn15_t) (unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned);
+typedef unsigned (__stdcall * ext_std_fn16_t) (unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned);
hunk ./src/mobius/vm/platform/extprim.c 46
-#define MAX_ARG_COUNT 12
+#define MAX_ARG_COUNT 16
hunk ./src/mobius/vm/platform/extprim.c 204
+    case 13:
+        result = (* (ext_fn13_t) fn) (args [0], args [1], args [2], args [3], args [4], args [5], args [6], args [7], args [8], args [9], args [10], args [11], args [12]);
+        break;
+    case 14:
+        result = (* (ext_fn14_t) fn) (args [0], args [1], args [2], args [3], args [4], args [5], args [6], args [7], args [8], args [9], args [10], args [11], args [12], args [13]);
+        break;
+    case 15:
+        result = (* (ext_fn15_t) fn) (args [0], args [1], args [2], args [3], args [4], args [5], args [6], args [7], args [8], args [9], args [10], args [11], args [12], args [13], args [14]);
+        break;
+    case 16:
+        result = (* (ext_fn16_t) fn) (args [0], args [1], args [2], args [3], args [4], args [5], args [6], args [7], args [8], args [9], args [10], args [11], args [12], args [13], args [14], args [15]);
+        break;
hunk ./src/mobius/vm/platform/extprim.c 262
+        break;
+    case 13:
+        result = (* (ext_std_fn13_t) fn) (args [0], args [1], args [2], args [3], args [4], args [5], args [6], args [7], args [8], args [9], args [10], args [11], args [12]);
+    case 14:
+        result = (* (ext_std_fn14_t) fn) (args [0], args [1], args [2], args [3], args [4], args [5], args [6], args [7], args [8], args [9], args [10], args [11], args [12], args [13]);
+    case 15:
+        result = (* (ext_std_fn15_t) fn) (args [0], args [1], args [2], args [3], args [4], args [5], args [6], args [7], args [8], args [9], args [10], args [11], args [12], args [13], args [14]);
+    case 16:
+        result = (* (ext_std_fn16_t) fn) (args [0], args [1], args [2], args [3], args [4], args [5], args [6], args [7], args [8], args [9], args [10], args [11], args [12], args [13], args [14], args [15]);
}

[Fixed external method support for Double-type parameters.
pavouk100 at volny.cz**20050919190224] {
hunk ./src/mobius/vm/platform/extprim.c 111
+        outArgCount++;
}

Context:

[Fixed the Makefile rules to use $(VM).c and not just vm.c.
Brian T. Rice <water at tunes.org>**20050919065651] 
[Added accessorMethods and mutatorMethods.
Brian T. Rice <water at tunes.org>**20050919061419] 
[Moved slotCount and delegateCount to pre-bootstrap code, since they are shadowed now by vm/interp/map.slate.
Brian T. Rice <water at tunes.org>**20050919051934] 
[Noted and handled Nil keys in a Dictionary.
Brian T. Rice <water at tunes.org>**20050919044037] 
[Overrode #new and #copy on Symbol to not create un-interned Symbols.
Brian T. Rice <water at tunes.org>*-20050915214235] 
[Exposed the garbageCollect VM routine as collectGarbage primitive.
Brian T. Rice <water at tunes.org>**20050916143155] 
[Fixed File Locator printing to escape its contents, and fixed String escaped for space characters.
Brian T. Rice <water at tunes.org>**20050915232747] 
[Created byteShift: for bootstrap code.
Brian T. Rice <water at tunes.org>**20050915230947] 
[Moved intoByte to numeric.slate.
Brian T. Rice <water at tunes.org>*-20050915222829] 
[Use of define: in numeric.slate.
Brian T. Rice <water at tunes.org>**20050915223152] 
[Moved intoByte to numeric.slate.
Brian T. Rice <water at tunes.org>**20050915222829] 
[Added a #sign method to Comparable, based on < and <=>.
Brian T. Rice <water at tunes.org>**20050915223217] 
[Bug-fix for intoByte.
Brian T. Rice <water at tunes.org>**20050915220347] 
[Cleanups to bootstrapping code.
Brian T. Rice <water at tunes.org>**20050915214358] 
[Overrode #new and #copy on Symbol to not create un-interned Symbols.
Brian T. Rice <water at tunes.org>**20050915214235] 
[Added comments and cleaned up formatting of prims.slate.
Brian T. Rice <water at tunes.org>**20050915205928] 
[Added automation to fix html table output, but wound up breaking diagram support in the progman makefile.
Brian T. Rice <water at tunes.org>**20050915040641] 
[Improved the Makefile to generate .tex from lyx.
Brian T. Rice <water at tunes.org>**20050915022952] 
[Added a Makefile for the reference manual under doc/.
Brian T. Rice <water at tunes.org>**20050915022505] 
[Added more Syntax equality/hash methods.
Brian T. Rice <water at tunes.org>**20050915002811] 
[Manual updates for standardizing message-send tracing on "send" vs. "call" in method names.
Brian T. Rice <water at tunes.org>**20050914214806] 
[Replaced the use of "Call" in message-send tracing routines with "Send" for uniformity with sendWith:/sendTo:/allSelectorsSent, etc. So the new methods are #senders, #macroSenders, #methodsSending:.
Brian T. Rice <water at tunes.org>**20050914213636] 
[Fixes to method-call query methods.
Brian T. Rice <water at tunes.org>**20050914055310] 
[Fixes to role/method introspection due to a bug in RoleReadStream, and an implementation of #roles and #methods to access all roles and methods on a given object.
Brian T. Rice <water at tunes.org>**20050914050718] 
[Added beginningWith:, endingWith:, containing: to the global Symbols table for convenient searching.
Brian T. Rice <water at tunes.org>**20050914035012] 
[Update Makefile byteorder test to work better under Windows.
nickf at system-7.freeserve.co.uk**20050912122535] 
[Some more plug-in Makefile enhancements (take 2).
nickf at system-7.freeserve.co.uk**20050911115512] 
[Renamed tracer.slate to segment.slate.
Brian T. Rice <water at tunes.org>**20050910230422] 
[Updated the Tracer with a new model calling it a Segment.
Brian T. Rice <water at tunes.org>**20050910230303] 
[Plugin c compiler warnings cleanup.
nickf at system-7.freeserve.co.uk**20050908202214] 
[Refactored rolesDo: and callers into a roleReader stream-based protocol.
Brian T. Rice <water at tunes.org>**20050908090921] 
[Iterator code cleanups.
Brian T Rice <water at tunes.org>**20050908020835] 
[ByteCompiler definition cleanups.
Brian T Rice <water at tunes.org>**20050830161856] 
[Condition definition code cleanup.
Brian T Rice <water at tunes.org>**20050830161555] 
[Refactoring of plugins Makefiles and rename of Makefile.inc to common.mk
nickf at system-7.freeserve.co.uk**20050906212201] 
[Consolidated the reference manual's introspection notes into one section, and added more entries.
Brian T. Rice <water at tunes.org>**20050907023040] 
[Added macroCallers&in: to Symbol, and supporting methods allMacroSelectorsSent and methodsCallingMacro:.
Brian T. Rice <water at tunes.org>**20050907014652] 
[Added CompiledMethod recompile for updating methods based on their annotated sources.
Brian T. Rice <water at tunes.org>**20050907011715] 
[Added BOOTFILES as a rule pre-requisite for building the VM.
The Slate Team <slate at tunes.org>**20050906175940] 
[Made use of the VERSION file in Makefile.inc.
The Slate Team <slate at tunes.org>**20050906175231] 
[Added a VERSION file for automation/build update purposes.
The Slate Team <slate at tunes.org>**20050906175007] 
[Grouping definition cleanups.
Brian T Rice <water at tunes.org>**20050830161824] 
[Added an Image save &startupREPL: option to allow live saving that does not continue the stack from the immediate context.
Brian T Rice <water at tunes.org>**20050830161647] 
[Added wget argument to switch off server-side caching
nickf at system-7.freeserve.co.uk**20050905194409] 
[Added an openResource method to ExternalResource Locator for polymorphic construction of resources from locators.
Brian T. Rice <water at tunes.org>**20050904191547] 
[Removed the dependency on PATH including ./ and cleaned up the byte-order testing for the Makefile.
Brian T. Rice <water at tunes.org>**20050904090036] 
[Updated Path testing code.
Brian T. Rice <water at tunes.org>**20050903170045] 
[New Makefile / Makefile.inc architecture from Nick Forde.
Brian T. Rice <water at tunes.org>**20050903162950] 
[Refactored load: into a locator vs. File variant.
Brian T. Rice <water at tunes.org>**20050902194314] 
[Added a globals SlateDir, Directory / pathSpec definition, and fixed a File Locator as: bug.
Brian T. Rice <water at tunes.org>**20050902184133] 
[TAG StablePoint-0.3.5.2
Brian T. Rice <water at tunes.org>**20050902164432] 
Patch bundle hash:
2c403053fb9d18416f0c5338a85bb57a46246aac



More information about the Slate mailing list