Skip to content

Commit

Permalink
Merge branch 'Cog' of github.com:OpenSmalltalk/opensmalltalk-vm into Cog
Browse files Browse the repository at this point in the history
# Conflicts:
#	platforms/win32/vm/sqWin32Directory.c
  • Loading branch information
estebanlm committed Nov 24, 2017
2 parents f017bb1 + 834da78 commit 5d0c2e5
Show file tree
Hide file tree
Showing 123 changed files with 33,185 additions and 20,459 deletions.
10 changes: 10 additions & 0 deletions .appveyor.yml
Expand Up @@ -13,6 +13,11 @@ environment:
CYG_ROOT: C:\cygwin
CYG_SETUP: setup-x86.exe
MINGW_ARCH: i686
- FLAVOR: squeak.cog.spur.lowcode
ARCH: win32x86
CYG_ROOT: C:\cygwin
CYG_SETUP: setup-x86.exe
MINGW_ARCH: i686
- FLAVOR: squeak.cog.v3
ARCH: win32x86
CYG_ROOT: C:\cygwin
Expand All @@ -33,6 +38,11 @@ environment:
CYG_ROOT: C:\cygwin
CYG_SETUP: setup-x86.exe
MINGW_ARCH: i686
- FLAVOR: pharo.cog.spur.lowcode
ARCH: win32x86
CYG_ROOT: C:\cygwin
CYG_SETUP: setup-x86.exe
MINGW_ARCH: i686
- FLAVOR: newspeak.cog.spur
ARCH: win32x86
CYG_ROOT: C:\cygwin
Expand Down
4 changes: 2 additions & 2 deletions build.win64x64/pharo.cog.spur/plugins.ext
@@ -1,5 +1,5 @@
# Copied, perhaps edited, from ../../src/examplePlugins.ext
EXTERNAL_PLUGINS = \
SurfacePlugin \
FT2Plugin
#SqueakSSL
FT2Plugin \
SqueakSSL
1 change: 1 addition & 0 deletions image/BuildSqueakSpurTrunkVMMakerImage.st
Expand Up @@ -15,6 +15,7 @@ manifest := #( ('http://source.squeak.org/FFI' 1 ('FFI-Pools' 'FFI-Kernel'))
('http://www.squeaksource.com/Balloon3D' 9 ('Balloon3D-Constants' 'Balloon3D-Plugins' ))
('http://www.squeaksource.com/Cryptography' 9 ('CryptographyPlugins' ))
('http://ss3.gemstone.com/ss/AndreasSystemProfiler' 9 ('AndreasProfiler'))
('http://www.squeaksource.com/Printf' 9 ('Printf'))
).

load := (manifest collect:
Expand Down
2 changes: 1 addition & 1 deletion image/Slang Test Workspace.text
@@ -1 +1 @@
"Here are some doits to get Slang to generate a single method to the transcript" [Transcript show: [| sel vmm s cg | sel := #primitiveVoidVMStateForMethod. vmm := (VMMaker forPlatform: 'Cross') interpreterClass: CoInterpreter"MT"; cogitClass: Cogit chooseCogitClass. cg := [vmm buildCodeGeneratorForInterpreter] on: Notification do: [:ex| ex tag == #getVMMaker ifTrue: [ex resume: vmm] ifFalse: [ex pass]]. cg removeUnneededBuiltins. cg vmClass preGenerationHook: cg. cg inferTypesForImplicitlyTypedVariablesAndMethods. cg retainMethods: { sel }. cg prepareMethods. ((sel beginsWith: 'bytecode') or: [sel endsWith: 'Bytecode']) ifTrue: [cg doBasicInlining: true] ifFalse: [cg doInlining: true]. s := ReadWriteStream on: String new. (cg methodNamed: sel) halt; emitCCodeOn: s generator: cg. s contents] value].[Transcript show: [| sel s vmm cg | sel := #compileEntry. vmm := VMMaker forPlatform: 'Cross'. cg := [vmm interpreterClass: CoInterpreter; cogitClass: Cogit chooseCogitClass; buildCodeGeneratorForCogit] on: Notification do: [:ex| ex tag == #getVMMaker ifTrue: [ex resume: vmm] ifFalse: [ex pass]]. cg removeUnneededBuiltins. cg vmClass preGenerationHook: cg. cg inferTypesForImplicitlyTypedVariablesAndMethods. cg retainMethods: { #compactCogCompiledCode. sel }. cg prepareMethods. cg doInlining: cg vmClass doInlining. s := ReadWriteStream on: String new. (cg methodNamed: sel) halt; emitCCodeOn: s generator: cg. s contents] value].[Transcript show: [| tm s vmm cg | vmm := VMMaker forPlatform: 'Cross'. cg := [vmm interpreterClass: StackInterpreter; buildCodeGeneratorForInterpreter] on: Notification do: [:ex| ex tag == #getVMMaker ifTrue: [ex resume: vmm] ifFalse: [ex pass]]. cg removeUnneededBuiltins. cg vmClass preGenerationHook: cg. tm := (StackInterpreter compile: 'foo self cppIf: ''ARBITRARY'' ifTrue: [self cCode: ''arbi''] ifFalse: [self cCode: ''trary'']. self cppIf: (self cCode: ''ARBITRARY'') ifTrue: [self cCode: ''arbi''] ifFalse: [self cCode: ''trary'']' classified: nil notifying: nil trailer: CompiledMethodTrailer empty ifFail: []) node asTranslationMethodOfClass: cg translationMethodClass. cg addMethod: tm. cg inferTypesForImplicitlyTypedVariablesAndMethods. cg retainMethods: { #foo }. cg prepareMethods. cg doInlining: true. s := ReadWriteStream on: String new. (cg methodNamed: #foo) halt; emitCCodeOn: s generator: cg. s contents] value].
"Here are some doits to get Slang to generate a single method to the transcript"[Transcript show: [| sel vmm s cg | sel := #scavenge:. vmm := (VMMaker forPlatform: 'Cross') interpreterClass: StackInterpreter; options: #(ObjectMemory Spur64BitCoMemoryManager). cg := [vmm buildCodeGeneratorForInterpreter] on: Notification do: [:ex| ex tag == #getVMMaker ifTrue: [ex resume: vmm] ifFalse: [ex pass]]. "to break at inlining decisions or type inferrende uncomment the following. "If src & dest are different selectors, breaks on inlining. If src & dest are the same selector, breaks on type inference in sel." "cg breakSrcInlineSelector: sel; breakDestInlineSelector: sel; breakOnInline: false". cg vmClass preGenerationHook: cg. cg inferTypesForImplicitlyTypedVariablesAndMethods. cg retainMethods: { sel }. cg prepareMethods. ((sel beginsWith: 'bytecode') or: [sel endsWith: 'Bytecode']) ifTrue: [cg doBasicInlining: true] ifFalse: [cg doInlining: true]. s := ReadWriteStream on: String new. (cg methodNamed: sel) halt; emitCCodeOn: s generator: cg. s contents] value].[Transcript show: [| sel vmm s cg | sel := #primitiveVoidVMStateForMethod. vmm := (VMMaker forPlatform: 'Cross') interpreterClass: CoInterpreter"MT"; cogitClass: Cogit chooseCogitClass. cg := [vmm buildCodeGeneratorForInterpreter] on: Notification do: [:ex| ex tag == #getVMMaker ifTrue: [ex resume: vmm] ifFalse: [ex pass]]. cg vmClass preGenerationHook: cg. cg inferTypesForImplicitlyTypedVariablesAndMethods. cg retainMethods: { sel }. cg prepareMethods. ((sel beginsWith: 'bytecode') or: [sel endsWith: 'Bytecode']) ifTrue: [cg doBasicInlining: true] ifFalse: [cg doInlining: true]. s := ReadWriteStream on: String new. (cg methodNamed: sel) halt; emitCCodeOn: s generator: cg. s contents] value].[Transcript show: [| sel s vmm cg | sel := #compileEntry. vmm := VMMaker forPlatform: 'Cross'. cg := [vmm interpreterClass: CoInterpreter; cogitClass: Cogit chooseCogitClass; buildCodeGeneratorForCogit] on: Notification do: [:ex| ex tag == #getVMMaker ifTrue: [ex resume: vmm] ifFalse: [ex pass]]. cg vmClass preGenerationHook: cg. cg inferTypesForImplicitlyTypedVariablesAndMethods. cg retainMethods: { #compactCogCompiledCode. sel }. cg prepareMethods. cg doInlining: cg vmClass doInlining. s := ReadWriteStream on: String new. (cg methodNamed: sel) halt; emitCCodeOn: s generator: cg. s contents] value].[Transcript show: [| tm s vmm cg | vmm := VMMaker forPlatform: 'Cross'. cg := [vmm interpreterClass: StackInterpreter; buildCodeGeneratorForInterpreter] on: Notification do: [:ex| ex tag == #getVMMaker ifTrue: [ex resume: vmm] ifFalse: [ex pass]]. cg vmClass preGenerationHook: cg. tm := (StackInterpreter compile: 'foo self cppIf: ''ARBITRARY'' ifTrue: [self cCode: ''arbi''] ifFalse: [self cCode: ''trary'']. self cppIf: (self cCode: ''ARBITRARY'') ifTrue: [self cCode: ''arbi''] ifFalse: [self cCode: ''trary'']' classified: nil notifying: nil trailer: CompiledMethodTrailer empty ifFail: []) node asTranslationMethodOfClass: cg translationMethodClass. cg addMethod: tm. cg inferTypesForImplicitlyTypedVariablesAndMethods. cg retainMethods: { #foo }. cg prepareMethods. cg doInlining: true. s := ReadWriteStream on: String new. (cg methodNamed: #foo) halt; emitCCodeOn: s generator: cg. s contents] value].
Expand Down
2 changes: 1 addition & 1 deletion nsspur64src/vm/cogit.h
@@ -1,5 +1,5 @@
/* Automatically generated by
CCodeGenerator VMMaker.oscog-eem.2266 uuid: 0501d71a-3185-4bdb-a99c-76a5fbbeee22
CCodeGenerator VMMaker.oscog-eem.2278 uuid: 4fd41cee-a3bd-48f4-b02e-cf367a331eec
*/


Expand Down

0 comments on commit 5d0c2e5

Please sign in to comment.