Branch: refs/heads/Cog
Home: https://github.com/OpenSmalltalk/opensmalltalk-vm
Commit: 966a9280e10d0335b6c9cd7f2f837d86c2026e2d
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/966a9280e10d0335b6…
Author: Eliot Miranda <eliot.miranda(a)gmail.com>
Date: 2022-08-02 (Tue, 02 Aug 2022)
Changed paths:
M src/plugins/SqueakFFIPrims/ARM64AppleFFIPlugin.c
M src/plugins/SqueakFFIPrims/ARM64FFIPlugin.c
M src/plugins/SqueakFFIPrims/RiscV64FFIPlugin.c
Log Message:
-----------
CogVM source as per VMMaker.oscog-eem.3244
ThreadedARM64FFIPlugin & ThreadedRiscV64FFIPlugin:
Ugh; cuz of inlining ffiCalloutTo:SpecOnStack:in: twice into
primitiveCallout[WithArgs] due to COGMTVM, the anonymous union used to
process float and double vector returns causes the C compiler to barf.
So introduce a proper type for this (ThreadedFFI64Bit32ByteReturnDF).
Branch: refs/heads/Cog
Home: https://github.com/OpenSmalltalk/opensmalltalk-vm
Commit: 449d09bb3b1a8b978f2adfb3240ad558b190a33f
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/449d09bb3b1a8b978f…
Author: Eliot Miranda <eliot.miranda(a)gmail.com>
Date: 2022-08-02 (Tue, 02 Aug 2022)
Changed paths:
M src/plugins/IA32ABI/IA32ABI.c
M src/plugins/SqueakFFIPrims/ARM32FFIPlugin.c
M src/plugins/SqueakFFIPrims/ARM64AppleFFIPlugin.c
M src/plugins/SqueakFFIPrims/ARM64FFIPlugin.c
M src/plugins/SqueakFFIPrims/IA32FFIPlugin.c
M src/plugins/SqueakFFIPrims/RiscV64FFIPlugin.c
M src/plugins/SqueakFFIPrims/X64SysVFFIPlugin.c
M src/plugins/SqueakFFIPrims/X64Win64FFIPlugin.c
M src/spur32.cog.lowcode/cointerp.c
M src/spur32.cog.lowcode/cointerp.h
M src/spur32.cog.lowcode/gcc3x-cointerp.c
M src/spur32.cog/cointerp.c
M src/spur32.cog/cointerp.h
M src/spur32.cog/cointerpmt.c
M src/spur32.cog/cointerpmt.h
M src/spur32.cog/gcc3x-cointerp.c
M src/spur32.cog/gcc3x-cointerpmt.c
M src/spur32.sista/cointerp.c
M src/spur32.sista/cointerp.h
M src/spur32.sista/gcc3x-cointerp.c
M src/spur32.stack.lowcode/gcc3x-interp.c
M src/spur32.stack.lowcode/interp.c
M src/spur32.stack/gcc3x-interp.c
M src/spur32.stack/interp.c
M src/spur32.stack/validImage.c
M src/spur64.cog.lowcode/cointerp.c
M src/spur64.cog.lowcode/cointerp.h
M src/spur64.cog.lowcode/gcc3x-cointerp.c
M src/spur64.cog/cointerp.c
M src/spur64.cog/cointerp.h
M src/spur64.cog/cointerpmt.c
M src/spur64.cog/cointerpmt.h
M src/spur64.cog/gcc3x-cointerp.c
M src/spur64.cog/gcc3x-cointerpmt.c
M src/spur64.sista/cointerp.c
M src/spur64.sista/cointerp.h
M src/spur64.sista/gcc3x-cointerp.c
M src/spur64.stack.lowcode/gcc3x-interp.c
M src/spur64.stack.lowcode/interp.c
M src/spur64.stack/gcc3x-interp.c
M src/spur64.stack/interp.c
M src/spur64.stack/validImage.c
M src/v3.cog/cointerp.c
M src/v3.cog/cointerp.h
M src/v3.cog/gcc3x-cointerp.c
M src/v3.stack/gcc3x-interp.c
M src/v3.stack/interp.c
Log Message:
-----------
CogVM source as per VMMaker.oscog-eem.3242
General:
Tiny tweak to eliminate duplicate strlens in methodHasPrimitiveInPrimTracePlugin:
Slang:
Abstract checking for names defineAtCompileTime: so that the VMPluginCodeGenerator
can ask the pluginClass and ence that BytesPerWord is considered defined at
compile time, except within the ThreadedFFIPlugins.
ThreadedFFIPlugin:
Always do inline ffiCall:ArgArrayOrNil:NumArgs:. We should err on the side of
speed. The code size shouldn't affect icache performance because the
primitiveCalloutWithArgs path is used very rarely in practice.
Now that ffiCall:ArgArrayOrNil:NumArgs: is always inlined, also inline
ffiReturnType:, avoiding unnecessary duplication.
Have all ThreadedFFIPlugins assign BytesPerWord in their initialize methods,
to inline positiveMachineIntegerFor: et al. Override
InterpreterPlugin class>>#shouldGenerateDeadCode since these are very
platform-specific and the dead code decision well under control.
Fix nonRegisterStructReturnIsViaImplicitFirstArgument for RiscV64FFIPlugin.
Make it inline always on all of them, along with a few others.
Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.3241.mcz
==================== Summary ====================
Name: VMMaker.oscog-eem.3241
Author: eem
Time: 2 August 2022, 12:07:24.643254 pm
UUID: 5c816837-269e-45e8-bc95-008f9dc43ae7
Ancestors: VMMaker.oscog-eem.3240
Simplify maintaining the list of processor and os specific names defined at compile time by considering any name beginning with an underscore ad defined at compile time.
=============== Diff against VMMaker.oscog-eem.3240 ===============
Item was changed:
----- Method: VMBasicConstants class>>defineAtCompileTime: (in category 'C translation') -----
defineAtCompileTime: anObject
^anObject isSymbol
+ and: ["("anObject first == $_ "a host of processor, compiler, and OS-specific names"
+ or: [self nonUnderscoreNamesDefinedAtCompileTime includes: anObject]")
- and: ["("self namesDefinedAtCompileTime includes: anObject")
ifTrue: [compileTimeQueries add: anObject. true]
ifFalse: [translationTimeQueries add: anObject. false]"]
"compileTimeQueries := Set new.
translationTimeQueries := Set new"
"self class
removeInstVarName: 'compileTimeQueries';
removeInstVarName: 'translationTimeQueries'"!
Item was removed:
- ----- Method: VMBasicConstants class>>namesDefinedAtCompileTime (in category 'C translation') -----
- namesDefinedAtCompileTime
- "Answer the set of names for variables that should be defined at compile time.
- Some of these get default values during simulation, and hence get defaulted in
- the various initializeMiscConstants methods. But that they have values should
- /not/ cause the code generator to do dead code elimination based on their
- default values. In particular, methods marked with <option: ANameDefinedAtCompileTime>
- will be emitted within #if defined(ANameDefinedAtCompileTime)...#endif.
-
- And of course this is backwards. We'd like to define names that are defined at translation time.
- But doing so would entail defining (or referencing) hundreds of class and pool variables. This way
- is marginally more manageable."
- ^#(VMBIGENDIAN
- IMMUTABILITY
- STACKVM COGVM COGMTVM SPURVM
- PharoVM "Pharo vs Squeak"
- TerfVM VM_TICKER "Terf vs Squeak & Qwaq/Teleplace/Terf high-priority thread support"
- EnforceAccessControl "Newspeak"
- CheckRememberedInTrampoline "IMMUTABILITY"
- BIT_IDENTICAL_FLOATING_POINT PLATFORM_SPECIFIC_FLOATING_POINT "Alternatives for using fdlibm for floating-point"
- ITIMER_HEARTBEAT "older linux's woultn't allow a higher priority thread, hence no threaded heartbeat."
- TestingPrimitives
- OBSOLETE_ALIEN_PRIMITIVES "Ancient crap in the IA32ABI plugin"
- LLDB "As of lldb-370.0.42 Swift-3.1, passing function parameters to printOopsSuchThat fails with Internal error [IRForTarget]: Couldn't rewrite one of the arguments of a function call. Turning off link time optimization with -fno-lto has no effect. hence we define some debugging functions as being <option: LLDB>"
- LRPCheck "Optional checking for long running primitives"
-
- "ThreadedFFIPlugin related"
- ALLOCA_LIES_SO_SETSP_BEFORE_CALL PLATFORM_API_USES_CALLEE_POPS_CONVENTION SQUEAK_BUILTIN_PLUGIN STACK_ALIGN_BYTES
-
- "processor related"
- __ARM_ARCH__ __arm__ __arm32__ ARM32
- __arm64__ __arm64 __aarch64__ ARM64
- __mips__ __mips
- __powerpc __powerpc__ __powerpc64__ __POWERPC__
- __ppc__ __ppc64__ __PPC__ __PPC64__
- __riscv__ __riscv64__ __riscv __riscv64
- __sparc__ __sparc __sparc_v8__ __sparc_v9__ __sparcv8 __sparcv9
- _M_I386 _X86_ i386 i486 i586 i686 __i386__ __386__ X86 I386
- x86_64 __amd64 __x86_64 __amd64__ __x86_64__ _M_AMD64 _M_X64
-
- "Compiler brand related"
- __ACK__
- __CC_ARM
- __clang__
- __GNUC__
- _MSC_VER
- __ICC
- __SUNPRO_C
-
- "os related"
- ACORN
- _AIX
- __ANDROID__
- __APPLE__
- __BEOS__
- EPLAN9
- __FreeBSD__ __NetBSD__ __OpenBSD__
- __linux__
- __MACH__
- __MINGW32__
- __osf__
- __unix__ __unix UNIX
- WIN32 _WIN32 _WIN32_WCE
- WIN64 _WIN64 _WIN64_WCE)!
Item was added:
+ ----- Method: VMBasicConstants class>>nonUnderscoreNamesDefinedAtCompileTime (in category 'C translation') -----
+ nonUnderscoreNamesDefinedAtCompileTime
+ "Answer the set of names for variables that should be defined at compile time
+ (excepting those that begin with underscore, which we assume are defined at compile time).
+ Some of these get default values during simulation, and hence get defaulted in
+ the various initializeMiscConstants methods. But that they have values should
+ /not/ cause the code generator to do dead code elimination based on their
+ default values. In particular, methods marked with <option: ANameDefinedAtCompileTime>
+ will be emitted within #if defined(ANameDefinedAtCompileTime)...#endif.
+
+ And of course this is backwards. We'd like to define names that are defined at translation time.
+ But doing so would entail defining (or referencing) hundreds of class and pool variables. This way
+ is marginally more manageable."
+ ^#(VMBIGENDIAN
+ IMMUTABILITY
+ STACKVM COGVM COGMTVM SPURVM
+ PharoVM "Pharo vs Squeak"
+ TerfVM VM_TICKER "Terf vs Squeak & Qwaq/Teleplace/Terf high-priority thread support"
+ EnforceAccessControl "Newspeak"
+ CheckRememberedInTrampoline "IMMUTABILITY"
+ BIT_IDENTICAL_FLOATING_POINT PLATFORM_SPECIFIC_FLOATING_POINT "Alternatives for using fdlibm for floating-point"
+ ITIMER_HEARTBEAT "older linux's woultn't allow a higher priority thread, hence no threaded heartbeat."
+ TestingPrimitives
+ OBSOLETE_ALIEN_PRIMITIVES "Ancient crap in the IA32ABI plugin"
+ LLDB "As of lldb-370.0.42 Swift-3.1, passing function parameters to printOopsSuchThat fails with Internal error [IRForTarget]: Couldn't rewrite one of the arguments of a function call. Turning off link time optimization with -fno-lto has no effect. hence we define some debugging functions as being <option: LLDB>"
+ LRPCheck "Optional checking for long running primitives"
+
+ "Plugin related"
+ SQUEAK_BUILTIN_PLUGIN
+ "ThreadedFFIPlugin related"
+ ALLOCA_LIES_SO_SETSP_BEFORE_CALL PLATFORM_API_USES_CALLEE_POPS_CONVENTION STACK_ALIGN_BYTES
+
+ "processor related"
+ ARM32 ARM64
+ i386 i486 i586 i686 X86 I386
+ x86_64
+
+ "os related"
+ ACORN
+ EPLAN9
+ UNIX
+ WIN32
+ WIN64)!
Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.3240.mcz
==================== Summary ====================
Name: VMMaker.oscog-eem.3240
Author: eem
Time: 2 August 2022, 11:54:15.274325 am
UUID: e1abe876-1ad1-474b-aaec-769bafbdb80a
Ancestors: VMMaker.oscog-eem.3239
Just a little more Slang work is required to fix defining ObjectMemory>>#isForwarded: as a <cmacro>.
=============== Diff against VMMaker.oscog-eem.3239 ===============
Item was changed:
----- Method: MethodNode>>quickMethodReturnLiteral (in category '*VMMaker-C translation') -----
quickMethodReturnLiteral
+ | expr |
+ expr := self block statements last expr.
+ ^expr isVariableNode
+ ifTrue: [#(nil false true) at: (#('nil' 'false' 'true') indexOf: expr key)]
+ ifFalse: [expr key]!
- ^self block statements last expr key!