Skip to content

Commit

Permalink
merge pharo-10
Browse files Browse the repository at this point in the history
  • Loading branch information
RenaudFondeur committed Jul 15, 2024
2 parents 8515555 + 752630e commit 2d51a9c
Show file tree
Hide file tree
Showing 34 changed files with 441 additions and 173 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Change log

## v10.3.0

* New harmonize rule by @RenaudFondeur in https://github.com/pharo-project/pharo-vm/pull/817
* Ignoring EAGAIN in epoll_wait by @tesonep in https://github.com/pharo-project/pharo-vm/pull/818
* Extend macOS implementation of SqueakSSL plugin to support setting a certificate on the SSL session context by @Rinzwind in https://github.com/pharo-project/pharo-vm/pull/816
* Adding macro for win32. by @tesonep in https://github.com/pharo-project/pharo-vm/pull/814

## v10.2.1

* Adding the missing tty.c file in the packaging. by @tesonep in https://github.com/pharo-project/pharo-vm/pull/771
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ include(cmake/versionExtraction.cmake)
extractVCSInformation(GIT_COMMIT_HASH GIT_DESCRIBE GIT_COMMIT_DATE)

set(VERSION_MAJOR 10)
set(VERSION_MINOR 2)
set(VERSION_PATCH_NUMBER 1)
set(VERSION_MINOR 3)
set(VERSION_PATCH_NUMBER 0)

if(BUILD_IS_RELEASE)
set(VERSION_PATCH "${VERSION_PATCH_NUMBER}")
Expand Down
4 changes: 2 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,8 @@ def runTests(platform, configuration, packages, withWorker, additionalParameters
shell "mkdir runTests"
dir("runTests"){
try{
shell "wget -O - get.pharo.org/64/110 | bash "
shell "echo 110 > pharo.version"
shell "wget -O - get.pharo.org/64/120 | bash "
shell "echo 120 > pharo.version"

if(isWindows()){
runInCygwin "cd runTests && unzip ../build/build/packages/PharoVM-*-${platform}-bin.zip -d ."
Expand Down
26 changes: 13 additions & 13 deletions cmake/vmmaker.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -67,33 +67,33 @@ if(GENERATE_SOURCES)
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
message("Defining Windows VM to download for code generation")
set(VMMAKER_VM ${VMMAKER_DIR}/vm/PharoConsole.exe)
set(VM_URL https://files.pharo.org/vm/pharo-spur64-headless/Windows-x86_64/PharoVM-10.0.5-2757766f-Windows-x86_64-bin.zip)
set(VM_URL_HASH SHA256=917dbbef15b870ecf5ecf449bd6be39437985c6e3f056620e9acda60ea58e09e)
set(VM_URL https://files.pharo.org/vm/pharo-spur64-headless/Windows-x86_64/PharoVM-10.2.1-d417aebd-Windows-x86_64-bin.zip)
set(VM_URL_HASH SHA256=450c3934f34d02258fc85ccf28a64bfea6bccfe859067ded87d7721a067b96b1)
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND (${CMAKE_SYSTEM_PROCESSOR} MATCHES "aarch64"))
message("Defining Linux AARCH64 VM to download for code generation")
set(VMMAKER_VM ${VMMAKER_DIR}/vm/pharo)
set(VM_URL https://files.pharo.org/vm/pharo-spur64-headless/Linux-aarch64/PharoVM-10.0.5-2757766-Linux-aarch64-bin.zip)
set(VM_URL https://files.pharo.org/vm/pharo-spur64-headless/Linux-aarch64/PharoVM-10.2.1-d417aebd-Linux-aarch64-bin.zip)
set(VM_URL_HASH SHA256=2fe44aab3715f26378796bef835fc1bd51da0baa02aad3fee03610926e80a59f)
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND (${CMAKE_SYSTEM_PROCESSOR} MATCHES "armv7l"))
message("Defining Linux ARM 32 VM to download for code generation")
set(VMMAKER_VM ${VMMAKER_DIR}/vm/pharo)
set(VM_URL https://files.pharo.org/vm/pharo-spur32-headless/Linux-armv7l/PharoVM-10.0.5-2757766-Linux-armv7l-bin.zip)
set(VM_URL https://files.pharo.org/vm/pharo-spur32-headless/Linux-armv7l/PharoVM-10.2.1-d417aebd-Linux-armv7l-bin.zip)
set(VM_URL_HASH SHA256=b08fdf80c21fa81d61cf8ee71abd741fc192e4a7210f20185a48ed108dfa402f)
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
message("Defining Linux VM x86_64 to download for code generation")
set(VMMAKER_VM ${VMMAKER_DIR}/vm/pharo)
set(VM_URL https://files.pharo.org/vm/pharo-spur64-headless/Linux-x86_64/PharoVM-10.0.5-2757766-Linux-x86_64-bin.zip)
set(VM_URL_HASH SHA256=dde65589966e4f547eb0b1b08053504f9663bdb94d520109d053dfcce7921eab)
set(VM_URL https://files.pharo.org/vm/pharo-spur64-headless/Linux-x86_64/PharoVM-10.2.1-d417aeb-Linux-x86_64-bin.zip)
set(VM_URL_HASH SHA256=51704c05fe23e01142e97d8f2145ecdab7be9a51aa324b49cd82ed7a05d88bbe)
elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND (${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm64"))
message("Defining arm64 OSX VM to download for code generation")
set(VMMAKER_VM ${VMMAKER_DIR}/vm/Contents/MacOS/Pharo)
set(VM_URL https://files.pharo.org/vm/pharo-spur64-headless/Darwin-arm64/PharoVM-10.1.1-32b2be55-Darwin-arm64-bin.zip)
set(VM_URL_HASH SHA256=485d98f740396fd0bc7ca74a3a71bc2a332414b4e41301d7c79ba7ae3685dbe5)
set(VM_URL https://files.pharo.org/vm/pharo-spur64-headless/Darwin-arm64/PharoVM-10.2.1-d417aebd-Darwin-arm64-bin.zip)
set(VM_URL_HASH SHA256=59fb55f61abe69fabf666e875cff1a5f40b91f5edd3912e37483b251eb81e2b5)
elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
message("Defining OSX VM to download for code generation")
set(VMMAKER_VM ${VMMAKER_DIR}/vm/Contents/MacOS/Pharo)
set(VM_URL https://files.pharo.org/vm/pharo-spur64-headless/Darwin-x86_64/PharoVM-10.0.5-2757766f-Darwin-x86_64-bin.zip)
set(VM_URL_HASH SHA256=f0f34c9411e899005749095dbdffdbeaa405ae8864aea81e4bff56331c3959e0)
set(VM_URL https://files.pharo.org/vm/pharo-spur64-headless/Darwin-x86_64/PharoVM-10.2.1-d417aebd-Darwin-x86_64-bin.zip)
set(VM_URL_HASH SHA256=7221355e6dd440d5b943eb4d0ef430e90fc6b5797f56d7702d13891f0d9db3fb)
else()
message(FATAL_ERROR "VM DOWNLOAD NOT HANDLED FOR CMAKE SYSTEM: ${CMAKE_SYSTEM_NAME}")
endif()
Expand All @@ -120,9 +120,9 @@ if(GENERATE_SOURCES)
ExternalProject_Add(
vmmaker

URL https://files.pharo.org/image/110/Pharo11-SNAPSHOT.build.688.sha.cf3d3fd.arch.64bit.zip
URL_HASH SHA256=c050ddcedce70ec92c22a3244aa5ebbc655dcaffcb42ac80fbf1f6e795c7010d
BUILD_COMMAND ${VMMAKER_VM} --headless ${VMMAKER_DIR}/image/Pharo11-SNAPSHOT-64bit-cf3d3fd.image --no-default-preferences save VMMaker
URL https://files.pharo.org/image/120/Pharo12.0-SNAPSHOT.build.1519.sha.aa50f9c.arch.64bit.zip
URL_HASH SHA256=b12270631ffc0c6adcb0b6449565b9abfd8e88a863a894a7320f660c05a0af1e
BUILD_COMMAND ${VMMAKER_VM} --headless ${VMMAKER_DIR}/image/Pharo12.0-SNAPSHOT-64bit-aa50f9c.image --no-default-preferences save VMMaker
COMMAND ${VMMAKER_VM} --headless ${VMMAKER_IMAGE} --no-default-preferences --save --quit "${CMAKE_CURRENT_SOURCE_DIR_TO_OUT}/scripts/installVMMaker.st" "${CMAKE_CURRENT_SOURCE_DIR_TO_OUT}" "${ICEBERG_DEFAULT_REMOTE}"
UPDATE_COMMAND ""
CONFIGURE_COMMAND ""
Expand Down
36 changes: 35 additions & 1 deletion extracted/plugins/SqueakSSL/src/osx/sqMacSSL.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,40 @@ OSStatus sqSetupSSL(sqSSL* ssl, int isServer)
}
}

if (ssl->certName) {
CFStringRef certName = CFStringCreateWithCString(kCFAllocatorDefault, ssl->certName, kCFStringEncodingASCII);
if (certName == NULL)
return SQSSL_GENERIC_ERROR;
CFMutableDictionaryRef query = CFDictionaryCreateMutable(kCFAllocatorDefault, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
if (query == NULL) {
CFRelease(certName);
return SQSSL_GENERIC_ERROR;
}
CFDictionarySetValue(query, kSecMatchLimit, kSecMatchLimitOne);
CFDictionarySetValue(query, kSecReturnRef, kCFBooleanTrue);
CFDictionarySetValue(query, kSecClass, kSecClassIdentity);
CFDictionarySetValue(query, kSecMatchSubjectWholeString, certName);
CFDictionarySetValue(query, kSecMatchValidOnDate, kCFNull);
CFRelease(certName);
SecIdentityRef identity;
status = SecItemCopyMatching(query, (CFTypeRef*) &identity);
CFRelease(query);
if (status != noErr) {
logStatus(status, status == errSecItemNotFound ? "SecItemCopyMatching had no results" : "SecItemCopyMatching failed");
return status;
}
CFArrayRef certs = CFArrayCreate(kCFAllocatorDefault, (const void **)&identity, 1, &kCFTypeArrayCallBacks);
CFRelease(identity);
if (certs == NULL)
return SQSSL_GENERIC_ERROR;
status = SSLSetCertificate(ssl->ctx, certs);
CFRelease(certs);
if (status != noErr) {
logStatus(status, "SSLSetCertificate failed");
return status;
}
}

return status;
}

Expand Down Expand Up @@ -626,7 +660,7 @@ sqInt sqAcceptSSL(sqInt handle, char* srcBuf, sqInt srcLen, char* dstBuf,
}
/* We are connected. Verify the cert. */
ssl->state = SQSSL_CONNECTED;
return SQSSL_OK;
return ssl->outLen;
}

/* sqEncryptSSL: Encrypt data for SSL transmission.
Expand Down
2 changes: 1 addition & 1 deletion extracted/vm/src/unix/aio.c
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ aio_handle_events(long microSecondsTimeout){
aio_flush_pipe(signal_pipe_fd[0]);

if(epollReturn == -1){
if(errno != EINTR){
if(errno != EINTR && errno != EAGAIN){
logErrorFromErrno("epoll_wait");
}
return 0;
Expand Down
2 changes: 1 addition & 1 deletion ffi/src/worker/worker.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ void worker_release(Worker *worker) {
worker_add_call((Worker*)worker, task);
}

inline void worker_dispatch_callout(Worker *worker, WorkerTask *task) {
void worker_dispatch_callout(Worker *worker, WorkerTask *task) {
worker_add_call(worker, task);
}

Expand Down
5 changes: 3 additions & 2 deletions scripts/installVMMaker.st
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Author useAuthor: 'installVMMaker' during: [
path := CommandLineArguments default commandLineArguments nextToLast.
defaultRemoteType := CommandLineArguments default commandLineArguments last asSymbol.
| path defaultRemoteType |
path := CommandLineArguments new commandLineArguments nextToLast.
defaultRemoteType := CommandLineArguments new commandLineArguments last asSymbol.

Iceberg remoteTypeSelector: defaultRemoteType.

Expand Down
4 changes: 2 additions & 2 deletions smalltalksrc/BaselineOfVMMaker/BaselineOfVMMaker.class.st
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Class {
#name : #BaselineOfVMMaker,
#superclass : #BaselineOf,
#category : #BaselineOfVMMaker
#category : 'BaselineOfVMMaker'
}

{ #category : #baselines }
Expand Down Expand Up @@ -39,7 +39,7 @@ BaselineOfVMMaker >> baseline: spec [
spec baseline: 'LLVMDisassembler' with: [
spec repository: 'github://pharo-project/pharo-llvmDisassembler' ].
spec baseline: 'OpalSimdBytecode' with: [
spec repository: 'github://nrainhart/pharo-opal-simd-bytecode:main' ].
spec repository: 'github://evref-inria/pharo-opal-simd-bytecode:main' ].

"Tests"
spec
Expand Down
74 changes: 37 additions & 37 deletions smalltalksrc/Melchor/CCodeGeneratorGlobalStructure.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Class {
'localStructDef',
'structDefDefine'
],
#category : #Melchor
#category : 'Melchor'
}

{ #category : #'CAST translation' }
Expand Down Expand Up @@ -187,46 +187,44 @@ CCodeGeneratorGlobalStructure >> emitGlobalStructFlagOn: aStream [
]

{ #category : #'CAST translation' }
CCodeGeneratorGlobalStructure >> generateCASTSetFieldTo: aTSendNode [
CCodeGeneratorGlobalStructure >> generateCASTSetFieldTo: aTSendNode [

| structType fieldName fieldVale setFieldStatements |

self assert: aTSendNode arguments size = 2.

fieldName := aTSendNode arguments first.
fieldVale := aTSendNode arguments second.

structType := self structTypeFor: aTSendNode receiver.


setFieldStatements := structType asClass allSlots collect: [ :slot |
| comparison |

comparison := TSendNode
receiver: (TSendNode
receiver: (TConstantNode value: slot name asString)
selector: 'strcmp:'
arguments: { fieldName })
selector: '='
arguments: { TConstantNode value: 0 }.

TSendNode
receiver: comparison
selector: 'ifTrue:'
arguments: {
TStatementListNode
statements: {
TSendNode
receiver: aTSendNode receiver
selector: (slot name, ':')
arguments: { fieldVale }
}
}

].

^ CCompoundStatementNode statements: (setFieldStatements collect: [ :e | e asCASTIn: self]).


setFieldStatements := (structType asClassInEnvironment:
self class environment) allSlots collect: [
:slot |
| comparison |
comparison := TSendNode
receiver: (TSendNode
receiver:
(TConstantNode value:
slot name asString)
selector: 'strcmp:'
arguments: { fieldName })
selector: '='
arguments:
{ (TConstantNode value: 0) }.

TSendNode
receiver: comparison
selector: 'ifTrue:'
arguments:
{ (TStatementListNode statements:
{ (TSendNode
receiver: aTSendNode receiver
selector: slot name , ':'
arguments: { fieldVale }) }) } ].

^ CCompoundStatementNode statements:
(setFieldStatements collect: [ :e | e asCASTIn: self ])
]

{ #category : #'CAST translation' }
Expand All @@ -242,8 +240,10 @@ CCodeGeneratorGlobalStructure >> generateCASTWithFieldsDoSeparatedBy: aTSendNode

structType := self structTypeFor: aTSendNode receiver.

allFieldArguments := structType asClass allSlots collect: [ :slot |
{
allFieldArguments := (structType asClassInEnvironment:
self class environment) allSlots collect: [
:slot |
{
(TConstantNode value: slot name asString).
(TSendNode
receiver: aTSendNode receiver
Expand All @@ -253,10 +253,10 @@ CCodeGeneratorGlobalStructure >> generateCASTWithFieldsDoSeparatedBy: aTSendNode
allRewrittenStatements := OrderedCollection new.

allFieldArguments
do: [ :fieldArgs |
do: [ :fieldArgs |
allRewrittenStatements addAll:
(self bindBlock: fieldBlock withArgs: fieldArgs) ]
separatedBy: [
separatedBy: [
allRewrittenStatements addAll: blockSeparatorStatements ].

^ CCompoundStatementNode statements:
Expand Down
2 changes: 1 addition & 1 deletion smalltalksrc/Melchor/MLVMCCodeGenerator.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Class {
'vmClass',
'vmMaker'
],
#category : #Melchor
#category : 'Melchor'
}

{ #category : #'C code generator' }
Expand Down
10 changes: 9 additions & 1 deletion smalltalksrc/Slang-Tests/MockConstantClass.class.st
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
Class {
#name : #MockConstantClass,
#superclass : #Object,
#category : #'Slang-Tests'
#category : 'Slang-Tests'
}

{ #category : #accessing }
MockConstantClass >> bindingOf: aString [

"For compatibility, used by the code generator to lookup for constants"

^ nil
]

{ #category : #testing }
MockConstantClass >> defineAtCompileTime: aString [

Expand Down
10 changes: 9 additions & 1 deletion smalltalksrc/Slang-Tests/MockSlangClass.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,17 @@ Class {
'objectMemoryClass',
'initializationOptions'
],
#category : #'Slang-Tests'
#category : 'Slang-Tests'
}

{ #category : #testing }
MockSlangClass >> bindingOf: aString [

"For compatibility, used by the code generator to lookup for constants"

^ nil
]

{ #category : #accessing }
MockSlangClass >> cogitClass [

Expand Down
2 changes: 1 addition & 1 deletion smalltalksrc/Slang-Tests/SLTypeHarmonizationTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Class {
#instVars : [
'types'
],
#category : #'Slang-Tests'
#category : 'Slang-Tests'
}

{ #category : #running }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Class {
#name : #SlangBasicTypeInferenceTestClass,
#superclass : #SlangClass,
#category : #'Slang-Tests'
#category : 'Slang-Tests'
}

{ #category : #constant }
Expand Down
Loading

0 comments on commit 2d51a9c

Please sign in to comment.