Skip to content

Commit a7b95f3

Browse files
authored
Merge pull request #8 from Oldes/master
Update to version 3.5.6
2 parents 7af81d1 + 7d936df commit a7b95f3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

114 files changed

+3467
-413
lines changed

.github/FUNDING.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# These are supported funding model platforms
2+
3+
github: [oldes]
4+
patreon: oldes
5+
open_collective: # Replace with a single Open Collective username
6+
ko_fi: # Replace with a single Ko-fi username
7+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9+
liberapay: oldes
10+
issuehunt: # Replace with a single IssueHunt username
11+
otechie: # Replace with a single Otechie username
12+
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

.github/diagram.svg

+1
Loading

.github/workflows/build-all.yml

+33-1
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,38 @@ jobs:
161161
# - name: Build 64bit Rebol/Core as a host application
162162
# run: ./siskin make/rebol3.nest %host-core-x64-osx
163163

164+
- name: Install the Apple certificate
165+
# https://docs.github.com/en/actions/guides/installing-an-apple-certificate-on-macos-runners-for-xcode-development
166+
env:
167+
BUILD_CERTIFICATE_BASE64: ${{ secrets.MACOS_CERTIFICATE }}
168+
P12_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PWD }}
169+
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
170+
run: |
171+
# create variables
172+
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
173+
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
174+
175+
# import certificate from secrets
176+
echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode --output $CERTIFICATE_PATH
177+
178+
# create temporary keychain
179+
security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
180+
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
181+
security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
182+
183+
# import certificate to keychain
184+
security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
185+
security list-keychain -d user -s $KEYCHAIN_PATH
186+
187+
- name: Codesign executables
188+
env:
189+
MACOS_IDENTITY_ID: ${{ secrets.MACOS_IDENTITY_ID }}
190+
run: |
191+
/usr/bin/codesign --force -s $MACOS_IDENTITY_ID ./build/rebol3-base-x64-osx -v
192+
/usr/bin/codesign --force -s $MACOS_IDENTITY_ID ./build/rebol3-core-x64-osx -v
193+
/usr/bin/codesign --force -s $MACOS_IDENTITY_ID ./build/rebol3-bulk-x64-osx -v
194+
195+
164196
- name: Prepare 64bit Rebol/Base for upload
165197
run: |
166198
mv ./build/rebol3-base-x64-osx ./rebol3-base-x64-osx
@@ -186,4 +218,4 @@ jobs:
186218
- uses: actions/upload-artifact@v2
187219
with:
188220
name: Rebol-64bit-osx-${{github.run_id}}
189-
path: ./*.gz
221+
path: ./*.gz

.github/workflows/build-arm64.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
uses: actions/checkout@v2
1818

1919
- name: Install Siskin Builder
20-
uses: oldes/install-siskin@v0.3.5
20+
uses: oldes/install-siskin@v0.3.7
2121

2222
- name: List some directories
2323
run: |

.github/workflows/diagram.yml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Create diagram
2+
on:
3+
workflow_dispatch: {}
4+
jobs:
5+
get_data:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- name: Checkout code
9+
uses: actions/checkout@master
10+
- name: Update diagram
11+
uses: githubocto/repo-visualizer@main
12+
with:
13+
excluded_paths: ".github"
14+
output_file: .github/diagram.svg
15+
excluded_globs: '.gitattributes,.editorconfig,.gitignore'

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ make/host.exe
77
make/libr3.so
88
make/libr3.dll
99
make/Rebol3.xcworkspace/
10+
make/*.xcodeproj
1011
src/boot/boot-code.reb
1112
src/boot/host-init.reb
1213
src/boot/gen-natives.reb

make/pre-make.r3

+1
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ target: any [spec/target spec/os-target spec/configuration]
112112
os-base: 'win32
113113
product: any [spec/product 'Core]
114114
configs: unique any [spec/config copy []]
115+
stack-size: any [spec/stack-size 1048576] ;default 1MiB
115116

116117

117118
unless target [

make/r3-view.rc

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
101 ICON "icon/r3.ico"
22

33
1 VERSIONINFO
4-
FILEVERSION 3,5,5,0
5-
PRODUCTVERSION 3,5,5,0
4+
FILEVERSION 3,5,6,0
5+
PRODUCTVERSION 3,5,6,0
66
BEGIN
77
BLOCK "StringFileInfo"
88
BEGIN

make/r3.rc

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
101 ICON "icon/r3.ico"
22

33
1 VERSIONINFO
4-
FILEVERSION 3,5,5,0
5-
PRODUCTVERSION 3,5,5,0
4+
FILEVERSION 3,5,6,0
5+
PRODUCTVERSION 3,5,6,0
66
BEGIN
77
BLOCK "StringFileInfo"
88
BEGIN

make/rebol3.nest

+28-6
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ include: %src/include/
1616
temp: %make/tmp/
1717
;output: %build/
1818

19-
stack-size: 4194304
19+
stack-size: 4194304 ;= 4MB (4 * 1024 * 1024)
2020
optimize: 2
2121

22-
version: 3.5.5
22+
version: 3.5.6
2323

2424
core-files: [
2525
%core/a-constants.c
@@ -109,7 +109,7 @@ core-files: [
109109
%core/t-pair.c
110110
%core/t-port.c
111111
%core/t-string.c
112-
; %core/t-struct.c ;not implemented
112+
%core/t-struct.c
113113
%core/t-time.c
114114
%core/t-tuple.c
115115
%core/t-typeset.c
@@ -296,6 +296,7 @@ config: [ ;- this is list of configuration (optional) defines
296296

297297
;SERIES_LABELS ; used for special debug purposes
298298
;SHOW_SIZEOFS ; for debugging ports to some new systems
299+
;SHOW_EXPAND_STACK ; will print info when stack expands
299300
;NDEBUG ; removes some asserts
300301
;TEST_SCAN
301302
;_DEBUG
@@ -331,20 +332,33 @@ include-image-os-codec: [
331332
#if Windows? [
332333
config: INCLUDE_IMAGE_OS_CODEC
333334
host-files: %os/win32/host-image.c
334-
mezz-lib-files: %mezz/codec-image.reb
335+
mezz-lib-files: %mezz/codec-image-win.reb
336+
]
337+
#if MacOS? [
338+
config: INCLUDE_IMAGE_OS_CODEC
339+
host-files: [
340+
%os/osx/host-image.c
341+
%os/osx/sys-codecs.m
342+
%os/osx/sys-utils.m
343+
]
344+
frameworks: [CoreGraphics CoreImage ImageIO Foundation]
345+
mezz-lib-files: %mezz/codec-image-osx.reb
335346
]
336347
]
337348

338349
include-image-codecs: [
339350
#if Windows? [
340351
:include-image-os-codec
341352
]
342-
#if Posix? [
353+
#if Linux? [
343354
:include-native-bmp-codec
344355
:include-native-png-codec
345356
:include-native-jpg-codec
346357
:include-native-gif-codec
347358
]
359+
#if MacOS? [
360+
:include-image-os-codec
361+
]
348362
]
349363

350364
;- native devices:
@@ -354,6 +368,14 @@ include-clipboard: [
354368
core-files: %core/p-clipboard.c
355369
host-files: %os/win32/dev-clipboard.c
356370
]
371+
#if macOS? [
372+
config: INCLUDE_CLIPBOARD
373+
core-files: %core/p-clipboard.c
374+
host-files: %os/osx/dev-clipboard.c
375+
host-files: %os/osx/sys-clipboard.m
376+
host-files: %os/osx/sys-utils.m
377+
framework: AppKit
378+
]
357379
]
358380
include-midi: [
359381
#if Windows? [
@@ -364,7 +386,7 @@ include-midi: [
364386
]
365387
#if macOS? [
366388
core-files: %core/p-midi.c
367-
host-files: %os/posix/dev-midi-osx.c
389+
host-files: %os/osx/dev-midi.c
368390
config: INCLUDE_MIDI_DEVICE
369391
frameworks: [CoreServices CoreMIDI]
370392

make/tools/make-boot.reb

+3
Original file line numberDiff line numberDiff line change
@@ -1178,6 +1178,9 @@ emit-head "Build configuration" %config.h
11781178

11791179
emit {^/#ifndef REBOL_OPTIONS_H^/}
11801180

1181+
if stack-size [
1182+
emit ajoin ["#define STACK_SIZE " stack-size lf lf]
1183+
]
11811184
foreach def configs [
11821185
emit ajoin ["#define " def lf]
11831186
]

src/boot/actions.reb

+2-2
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ find: action [
208208
/last {Backwards from end of series}
209209
/reverse {Backwards from the current position}
210210
/tail {Returns the end of the series}
211-
/match {Performs comparison and returns the tail of the match}
211+
/match {Performs comparison and returns the head of the match (not imply /tail)}
212212
]
213213

214214
select: action [
@@ -311,7 +311,7 @@ remove: action [
311311

312312
change: action [
313313
{Replaces element(s); returns just past the change.}
314-
series [series! gob! port!]{At position (modified)}
314+
series [series! gob! port! struct!]{At position (modified)}
315315
value [any-type!] {The new value}
316316
/part {Limits the amount to change to a given length or position}
317317
length [number! series! pair!]

src/boot/sysobj.reb

+5-4
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ catalog: object [
3434
errors: none
3535
; Reflectors are used on boot to create *-of functions
3636
reflectors: [
37-
spec [any-function! any-object! vector! datatype!]
37+
spec [any-function! any-object! vector! datatype! struct!]
3838
body [any-function! any-object! map!]
3939
words [any-function! any-object! map! date!]
40-
values [any-object! map!]
40+
values [any-object! map! struct!]
4141
types [any-function!]
42-
title [any-function! datatype!]
42+
title [any-function! datatype! module!]
4343
]
4444
; Official list of system/options/flags that can appear.
4545
; Must match host reb-args.h enum!
@@ -86,7 +86,8 @@ state: object [
8686
0.0.0
8787
extension: 2.2.2 ; execute only
8888
]
89-
last-error: none ; used by WHY?
89+
last-error: none ; used by WHY?
90+
last-result: none ; used to store last console result
9091
]
9192

9293
modules: []

src/boot/types.reb

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ REBOL [
9999
gob self gob * * * * -
100100
event self event * * * * -
101101
handle self 0 - - - - -
102-
struct invalid 0 - - - - -
102+
struct self struct * * * * -
103103
library invalid 0 - - - - -
104104
utype self utype - - - - -
105105

src/boot/words.reb

+26-12
Original file line numberDiff line numberDiff line change
@@ -27,25 +27,38 @@ any-object!
2727
any-block!
2828

2929
;- numeric types (used for "short" vector! construction)
30-
;- like: #[ui8! 4] which is same like: make vector! [unsigned integer! 8 4]
30+
;- like: #[u8! 4] which is same like: make vector! [unsigned integer! 8 4]
3131
; these numeric files are used in l-types.c and t-vector.c sources
3232
; and can be used for future struct! and routine! implementations
33-
si8!
34-
si16!
35-
si32!
36-
si64!
33+
i8!
34+
i16!
35+
i32!
36+
i64!
3737

38-
ui8!
39-
ui16!
40-
ui32!
41-
ui64!
38+
u8!
39+
u16!
40+
u32!
41+
u64!
4242

4343
f32!
4444
f64!
45-
;@@ O: Should be supported also longer variants like uint8! etc?
46-
; end of numeric types
4745

48-
datatypes
46+
int8!
47+
int16!
48+
int32!
49+
int64!
50+
51+
uint8!
52+
uint16!
53+
uint32!
54+
uint64!
55+
56+
float!
57+
double!
58+
byte!
59+
; end of numeric types (code in l-types.c expects, that next word is `datatypes`)
60+
61+
datatypes
4962

5063
native
5164
self
@@ -130,6 +143,7 @@ any
130143
opt
131144
not
132145
and
146+
ahead
133147
then
134148
remove
135149
insert

src/core/a-lib.c

+4-1
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,7 @@ extern int Do_Callback(REBSER *obj, u32 name, RXIARG *args, RXIARG *result);
449449
REBVAL *top = DS_VALUE(dsp+1);
450450
REBOL_STATE state;
451451
REBVAL *types;
452+
REBVAL *last;
452453

453454
if (dsp != 0) Debug_Fmt(Str_Stack_Misaligned, dsp);
454455

@@ -487,7 +488,9 @@ extern int Do_Callback(REBSER *obj, u32 name, RXIARG *args, RXIARG *result);
487488
}
488489
}
489490
}
490-
491+
// store last result in system/state/last-result
492+
last = Get_System(SYS_STATE, STATE_LAST_RESULT);
493+
*last = *top;
491494
POP_STATE(state, Saved_State);
492495
DSP = 0;
493496
}

src/core/b-init.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -755,7 +755,7 @@ extern const REBYTE Str_Banner[];
755755
#ifdef INCLUDE_PNG_CODEC
756756
Init_PNG_Codec();
757757
#endif
758-
#ifdef USE_JPG_CODEC
758+
#ifdef INCLUDE_JPG_CODEC
759759
Init_JPEG_Codec();
760760
#endif
761761
#ifdef INCLUDE_WAV_CODEC

src/core/c-do.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,9 @@ static REBVAL *Func_Word(REBINT dsf)
105105
}
106106
Extend_Series(DS_Series, amount);
107107
DS_Base = BLK_HEAD(DS_Series);
108+
#ifdef SHOW_EXPAND_STACK
108109
Debug_Fmt(BOOT_STR(RS_STACK, 0), DSP, SERIES_REST(DS_Series));
110+
#endif
109111
}
110112

111113

@@ -861,7 +863,7 @@ x*/ static REBINT Do_Args_Light(REBVAL *func, REBVAL *path, REBSER *block, REBCN
861863

862864
//CHECK_MEMORY(1);
863865
CHECK_STACK(&value);
864-
if ((DSP + 20) > (REBINT)SERIES_REST(DS_Series)) Expand_Stack(STACK_MIN); //Trap0(RE_STACK_OVERFLOW);
866+
if ((DSP + 200) > (REBINT)SERIES_REST(DS_Series)) Expand_Stack(STACK_MIN); //Trap0(RE_STACK_OVERFLOW);
865867
if (--Eval_Count <= 0 || Eval_Signals) Do_Signals();
866868

867869
value = BLK_SKIP(block, index);

src/core/c-handle.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@
119119

120120
/***********************************************************************
121121
**
122-
*/ void Init_Handles()
122+
*/ void Init_Handles(void)
123123
/*
124124
** Creates handles table
125125
**
@@ -139,4 +139,4 @@
139139
#ifdef INCLUDE_CRYPTOGRAPHY
140140
Init_Crypt(); // old crypt code handles
141141
#endif
142-
}
142+
}

0 commit comments

Comments
 (0)