Skip to content

Commit 639abc3

Browse files
committed
Merge remote-tracking branch 'rebolsource/master' into master-oldes
2 parents 592f66f + 98cdfcd commit 639abc3

18 files changed

+270
-129
lines changed

.travis.yml

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
#
2+
# .travis.yaml contains YAML-formatted (http://www.yaml.org/) build
3+
# instructions for continuous integration via Travis CI
4+
# (http://docs.travis-ci.com/).
5+
#
6+
7+
notifications:
8+
email: false
9+
10+
language: c
11+
12+
compiler:
13+
- gcc
14+
15+
env:
16+
matrix:
17+
# Linux x86
18+
- OS_ID=0.4.4
19+
# Linux x64
20+
- OS_ID=0.4.40
21+
22+
before_install:
23+
- sudo apt-get update
24+
25+
install:
26+
# gcc-multilib:
27+
# For building 32b binaries on a 64b host (not necessary when we build
28+
# for 64b).
29+
# valgrind:
30+
# For basic sanity checking of our freshly built binaries.
31+
# libc6:i386:
32+
# For running the 32b bootstrap rebol ("r3-make") on a 64b host.
33+
# libc6-dbg:i386:
34+
# For running valgrind on a 32b subject-under-test on a 64b host.
35+
- sudo apt-get install -y gcc-multilib valgrind libc6:i386 libc6-dbg:i386
36+
# Fetch a Rebol bootstrap binary, which is needed for building Rebol.
37+
- wget http://www.rebol.com/r3/downloads/r3-a111-4-2.tar.gz
38+
- tar xvzf r3-a111-4-2.tar.gz
39+
- cp r3 make/r3-make
40+
41+
script:
42+
- cd make/
43+
- make make OS_ID=${OS_ID}
44+
- make clean prep r3
45+
- valgrind --error-exitcode=42 --leak-check=full ./r3 --do 'print {Hello!}'

src/boot/platforms.r

+83-15
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,86 @@ REBOL [
1414
}
1515
]
1616

17-
Amiga [1 m68k20+ 2 m68k 3 ppc]
18-
Macintosh [1 mac-ppc 2 mac-m68k 3 mac-misc 4 osx-ppc 5 osx-x86]
19-
Windows [1 win32-x86 2 dec-alpha 3 win32-x64]
20-
Linux [1 libc5-x86 2 libc6-2-3-x86 3 libc6-2-5-x86 4 libc6-2-11-x86 10 libc6-ppc 20 libc6-arm 21 bionic-arm 30 libc6-mips 40 libc-x64]
21-
Haiku [75 x86-32]
22-
BSDi [1 x86]
23-
FreeBSD [1 x86 2 elf-x86]
24-
NetBSD [1 x86 2 ppc 3 m68k 4 dec-alpha 5 sparc]
25-
OpenBSD [1 x86 2 ppc 3 m68k 4 elf-x86 5 sparc]
26-
Sun [1 sparc]
27-
SGI []
28-
HP []
29-
Android [1 arm]
30-
free-slot []
31-
WindowsCE [1 sh3 2 mips 5 arm 6 sh4]
17+
1 Amiga [
18+
1 m68k20+
19+
2 m68k
20+
3 ppc
21+
]
22+
23+
2 Macintosh [
24+
1 mac-ppc
25+
2 mac-m68k
26+
3 mac-misc
27+
4 osx-ppc
28+
5 osx-x86
29+
40 osx-x64
30+
]
31+
32+
3 Windows [
33+
1 win32-x86
34+
2 dec-alpha
35+
40 win32-x64
36+
]
37+
38+
4 Linux [
39+
1 libc5-x86
40+
2 libc6-2-3-x86
41+
3 libc6-2-5-x86
42+
4 libc6-2-11-x86
43+
10 libc6-ppc
44+
20 libc6-arm
45+
21 bionic-arm
46+
30 libc6-mips
47+
40 libc-x64
48+
]
49+
50+
5 Haiku [
51+
75 x86-32
52+
]
53+
54+
6 BSDi [
55+
1 x86
56+
]
57+
58+
7 FreeBSD [
59+
1 x86
60+
2 elf-x86
61+
40 elf-x64
62+
]
63+
64+
8 NetBSD [
65+
1 x86
66+
2 ppc
67+
3 m68k
68+
4 dec-alpha
69+
5 sparc
70+
]
71+
72+
9 OpenBSD [
73+
1 x86
74+
2 ppc
75+
3 m68k
76+
4 elf-x86
77+
5 sparc
78+
]
79+
80+
10 Sun [
81+
1 sparc
82+
]
83+
84+
11 SGI []
85+
86+
12 HP []
87+
88+
13 Android [
89+
1 arm
90+
]
91+
92+
14 free-slot []
93+
94+
15 WindowsCE [
95+
1 sh3
96+
2 mips
97+
5 arm
98+
6 sh4
99+
]

src/core/b-init.c

+1
Original file line numberDiff line numberDiff line change
@@ -904,6 +904,7 @@ static REBCNT Set_Option_Word(REBCHR *str, REBCNT field)
904904
PG_Mem_Usage = 0;
905905
PG_Mem_Limit = 0;
906906
PG_Reb_Stats = Make_Mem(sizeof(*PG_Reb_Stats));
907+
Halt_State = 0;
907908
Reb_Opts = Make_Mem(sizeof(*Reb_Opts));
908909

909910
// Thread locals:

src/core/c-do.c

+2-3
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ enum Eval_Types {
5050
ET_END // end of block
5151
};
5252

53-
static jmp_buf *Halt_State = 0; //!!!!!!!!!! global?
54-
5553
/*
5654
void T_Error(REBCNT n) {;}
5755
@@ -451,7 +449,8 @@ void Trace_Arg(REBINT num, REBVAL *arg, REBVAL *path)
451449
pvs.store = DS_TOP; // Temp space for constructed results
452450

453451
// Get first block value:
454-
pvs.path = VAL_BLK_DATA(pvs.orig = *path_val);
452+
pvs.orig = *path_val;
453+
pvs.path = VAL_BLK_DATA(*path_val);
455454

456455
// Lookup the value of the variable:
457456
if (IS_WORD(pvs.path)) {

src/core/c-error.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ static REBOL_STATE Top_State; // Boot var: holds error state during boot
604604
/*
605605
***********************************************************************/
606606
{
607-
Trap_Arg(arg);
607+
Trap2(RE_CANNOT_USE, arg, Get_Type(type));
608608
}
609609

610610

src/core/c-word.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@
114114
pnum = Get_Hash_Prime(ser->tail+1);
115115
if (!pnum) Trap_Num(RE_SIZE_LIMIT, ser->tail+1);
116116

117-
nser = Make_Series(pnum+1, sizeof(REBCNT), TRUE);
117+
nser = Make_Series(pnum+1, SERIES_WIDE(ser), TRUE);
118118
LABEL_SERIES(nser, "hash series");
119119

120120
oser = *ser;
@@ -398,7 +398,7 @@
398398
if (!only) {
399399
// Create the hash for locating words quickly:
400400
// Note that the TAIL is never changed for this series.
401-
PG_Word_Table.hashes = Make_Series(n+1, sizeof(REBCNT *), FALSE);
401+
PG_Word_Table.hashes = Make_Series(n+1, sizeof(REBCNT), FALSE);
402402
KEEP_SERIES(PG_Word_Table.hashes, "word hashes"); // pointer array
403403
Clear_Series(PG_Word_Table.hashes);
404404
PG_Word_Table.hashes->tail = n;

src/core/t-object.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,8 @@ static REBSER *Trim_Object(REBSER *obj)
449449
if (IS_DATATYPE(arg)) types |= TYPESET(VAL_DATATYPE(arg));
450450
else types |= VAL_TYPESET(arg);
451451
}
452-
VAL_OBJ_FRAME(value) = obj = Copy_Block(VAL_OBJ_FRAME(value), 0);
452+
obj = Copy_Block(VAL_OBJ_FRAME(value), 0);
453+
VAL_OBJ_FRAME(value) = obj;
453454
if (types != 0) Copy_Deep_Values(obj, 1, SERIES_TAIL(obj), types);
454455
break; // returns value
455456
}

src/core/t-vector.c

+12-12
Original file line numberDiff line numberDiff line change
@@ -71,25 +71,25 @@ REBU64 get_vect(REBCNT bits, REBYTE *data, REBCNT n)
7171
{
7272
switch (bits) {
7373
case VTSI08:
74-
return (REBI64) ((char*)data)[n];
74+
return (REBI64) ((i8*)data)[n];
7575

7676
case VTSI16:
77-
return (REBI64) ((short*)data)[n];
77+
return (REBI64) ((i16*)data)[n];
7878

7979
case VTSI32:
80-
return (REBI64) ((long*)data)[n];
80+
return (REBI64) ((i32*)data)[n];
8181

8282
case VTSI64:
8383
return (REBI64) ((i64*)data)[n];
8484

8585
case VTUI08:
86-
return (REBU64) ((unsigned char*)data)[n];
86+
return (REBU64) ((u8*)data)[n];
8787

8888
case VTUI16:
89-
return (REBU64) ((unsigned short*)data)[n];
89+
return (REBU64) ((u16*)data)[n];
9090

9191
case VTUI32:
92-
return (REBU64) ((unsigned long*)data)[n];
92+
return (REBU64) ((u32*)data)[n];
9393

9494
case VTUI64:
9595
return (REBU64) ((i64*)data)[n];
@@ -110,31 +110,31 @@ void set_vect(REBCNT bits, REBYTE *data, REBCNT n, REBI64 i, REBDEC f) {
110110
switch (bits) {
111111

112112
case VTSI08:
113-
((char*)data)[n] = (char)i;
113+
((i8*)data)[n] = (i8)i;
114114
break;
115115

116116
case VTSI16:
117-
((short*)data)[n] = (short)i;
117+
((i16*)data)[n] = (i16)i;
118118
break;
119119

120120
case VTSI32:
121-
((long*)data)[n] = (long)i;
121+
((i32*)data)[n] = (i32)i;
122122
break;
123123

124124
case VTSI64:
125125
((i64*)data)[n] = (i64)i;
126126
break;
127127

128128
case VTUI08:
129-
((unsigned char*)data)[n] = (unsigned char)i;
129+
((u8*)data)[n] = (u8)i;
130130
break;
131131

132132
case VTUI16:
133-
((unsigned short*)data)[n] = (unsigned short)i;
133+
((u16*)data)[n] = (u16)i;
134134
break;
135135

136136
case VTUI32:
137-
((unsigned long*)data)[n] = (unsigned long)i;
137+
((u32*)data)[n] = (u32)i;
138138
break;
139139

140140
case VTUI64:

src/core/u-jpg.c

+1-5
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,7 @@
2626
//#include "jpeglib.h"
2727
//#include "jerror.h"
2828

29-
#ifdef LONG_SIZE_64
30-
typedef unsigned int uinteger32;
31-
#else
32-
typedef unsigned long uinteger32;
33-
#endif
29+
typedef u32 uinteger32;
3430

3531
/* Expanded data source object for stdio input */
3632

0 commit comments

Comments
 (0)