Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
e371524
Retrieving deleted nj_env.sml from RCS archive.
rptb1 Apr 27, 2013
f728cc9
Recovering and editing old New Jersey ML bootstrapping files and adju…
rptb1 Apr 27, 2013
6f48708
[rts] Be quiet if .d files don't exist yet.
waywardmonkeys Apr 28, 2013
b7031d2
[rts] Tell gcc to do 32 bit builds on Linux.
waywardmonkeys Apr 28, 2013
840ee3b
[rts] Fix casts / lvalues.
waywardmonkeys Apr 28, 2013
47fb600
[rts] Look for libelf.h, not libelf/libelf.h
waywardmonkeys Apr 28, 2013
bfc75e3
[rts] Note build requirements for rts on Linux.
waywardmonkeys Apr 28, 2013
b60a5ed
[rts] Cleanup INCLUDEDIRS for Linux.
waywardmonkeys Apr 28, 2013
53e2ed0
Rewinding src/rts to RCS tag MLWorks_20c1_1998_08_20 using command
rptb1 May 2, 2013
c0d7b14
Merge branch 'windows-boot' into rts-rewind
rptb1 May 2, 2013
287d53a
Fixing up merge so that runtime can load MLWorks 2.0 batch.img except…
rptb1 May 2, 2013
1b008df
Merging with master in order to incorporate fake licensing stubs that…
rptb1 May 2, 2013
302fa5f
Making assembler conditional on OS_NT instead of __WINNT__ which does…
rptb1 May 11, 2013
99f2212
Asserting that tagging and detagging a pointer to a runtime C functio…
rptb1 May 11, 2013
cbefb1f
Forcing mlw.dll to load at a low address so that it's possible to sto…
rptb1 May 11, 2013
ea6c5df
Projects expect the "harp" directory to be called "mir". This is prob…
rptb1 May 12, 2013
ce11ee6
Hacking the command line to the older -pass syntax so that the MLWork…
rptb1 May 12, 2013
f1b5fcf
Hacking Unix path to DOS path so that we can cross-compile from Windows.
rptb1 May 12, 2013
d91735b
Adding missing sockets module to the runtime, and faking all remainin…
rptb1 May 12, 2013
9409f04
Missing semicolong. Mysterious
rptb1 May 12, 2013
046b7fc
Separating the conflated compiler's idea of the object file version i…
rptb1 May 16, 2013
a852fde
Merge branch 'rts-compilation' of github.com:waywardmonkeys/mlworks-t…
rptb1 May 18, 2013
28063c2
Lots of fixups to get a clean(er) build on Linux.
rptb1 May 18, 2013
d380cfd
Modernising use of mmap to avoid opening /etc/passwd and /dev/zero.
rptb1 May 18, 2013
4799e00
Disabling build of static runtime since I can't seem to get a static …
rptb1 May 18, 2013
f09bdae
Merge remote-tracking branch 'origin/nj-bootstrap' into smlnj-110-boo…
ellerh Oct 3, 2014
282a5e4
Merge remote-tracking branch 'origin/linux-boot' into smlnj-110-boots…
ellerh Oct 3, 2014
32aa5eb
Don't link with libXp. Seems to work fine without it.
ellerh Oct 3, 2014
cb0b8ba
Update bootstrap code for a current SML/NJ
ellerh Oct 9, 2014
32b3ee0
Define MLWorks.Internal.Exit.status as word32 in the signature.
ellerh Oct 9, 2014
f0eaaf1
Add some type constraints to satisfy SML/NJ's typechecker
ellerh Oct 9, 2014
8981c7c
Remove sharing declaration due to work around SML/NJ bug
ellerh Oct 9, 2014
b07eb64
Less reckless casting.
ellerh Oct 9, 2014
b861e94
Use unix/__os_exit.sml instead of win_nt/__os_exit.sml for Linux.
ellerh Oct 9, 2014
42ae05e
Don't exit after the batch compiler is loaded
ellerh Oct 10, 2014
51873f7
Disable some exception handlers for better backtraces
ellerh Oct 10, 2014
68a8a5b
Disable the ARENA_LIMIT check for now
ellerh Oct 10, 2014
da2364f
Add script to load batch compiler
ellerh Oct 10, 2014
53a7b1f
Fix typo
ellerh Oct 10, 2014
7e78581
Separating the conflated compiler's idea of the object file version i…
rptb1 May 16, 2013
da273c8
Enforce word alignment of C functions
ellerh Oct 10, 2014
d1bf6d2
Remove ARENA_LIMIT in reserve_arena_space
ellerh Oct 10, 2014
b6d7397
Fix emulation of Time.time
ellerh Oct 10, 2014
5a5f3e1
Remove debugging code
ellerh Oct 10, 2014
b8e319c
Remove debugging code
ellerh Oct 10, 2014
ec72e77
Fix layout
ellerh Oct 10, 2014
b72d260
Remove debugging code
ellerh Oct 10, 2014
8b875cb
Rename endian.[hc] -> mlw_endian.[hc]
ellerh Dec 29, 2015
b6127c7
Include <fpu_control.h> instead of <i386-linux-gnu/fpu_control.h>
ellerh Dec 29, 2015
ee9a1e2
Rename endian to mlw_endian in GNUmakefile
ellerh Dec 29, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/basis.mlp
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,8 @@ basis.mlp 306 7
win_nt/windows.sml
I386/Linux 18 1
Library 0 0
win_nt/__os_exit.sml
win_nt/os_exit.sml
unix/__os_exit.sml
unix/os_exit.sml
unix/platform_specific_exports.sml
unix/__os.sml
unix/__os_file_sys.sml
Expand Down
9 changes: 5 additions & 4 deletions src/basis/__char_array.sml
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,10 @@ structure CharArray : MONO_ARRAY =
(ignore(check_size (length l));
A (MLWorks.Internal.ByteArray.arrayoflist (cast l)))

val length : array -> int = cast(MLWorks.Internal.ByteArray.length)
val sub : (array * int) -> elem = cast(MLWorks.Internal.ByteArray.sub)
val update : (array * int * elem) -> unit = cast(MLWorks.Internal.ByteArray.update)
fun length (A ba) : int = MLWorks.Internal.ByteArray.length ba
fun sub (A ba, i:int) : elem = cast(MLWorks.Internal.ByteArray.sub (ba, i))
fun update (A ba, i:int, x:elem) : unit =
MLWorks.Internal.ByteArray.update (ba, i, cast x)

val extract : (array * int * int option ) -> vector =
fn (A a,i,len) =>
Expand All @@ -130,7 +131,7 @@ structure CharArray : MONO_ARRAY =
| NONE => MLWorks.Internal.ByteArray.length a - i
in
if i >= 0 andalso len >= 0 andalso i + len <= MLWorks.Internal.ByteArray.length a
then cast(MLWorks.Internal.ByteArray.substring (a,i,len))
then MLWorks.Internal.ByteArray.substring (a,i,len)
else raise Subscript
end

Expand Down
2 changes: 1 addition & 1 deletion src/basis/__timer.sml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ structure Timer : TIMER =

fun totalRealTimer() = TOTAL

val startTime = env "Time.start"
val startTime : unit -> Time.time = env "Time.start"

fun checkRealTimer arg =
let
Expand Down
18 changes: 11 additions & 7 deletions src/basis/__word8_array.sml
Original file line number Diff line number Diff line change
Expand Up @@ -101,20 +101,24 @@ structure Word8Array : MONO_ARRAY =
fun check_size n =
if n < 0 orelse n > maxLen then raise Size else n

val cast = MLWorks.Internal.Value.cast

fun array (i: int, e: elem) : array =
A (MLWorks.Internal.ByteArray.array (check_size i, MLWorks.Internal.Value.cast e))
A (MLWorks.Internal.ByteArray.array (check_size i, cast e))

fun tabulate (i : int, f : int -> elem) : array =
A (MLWorks.Internal.ByteArray.tabulate (check_size i,MLWorks.Internal.Value.cast f))
A (MLWorks.Internal.ByteArray.tabulate (check_size i,cast f))

(* uses toplevel List.length which is overridden afterwords *)
fun fromList (l : elem list) : array =
(ignore(check_size (length l));
A (MLWorks.Internal.ByteArray.arrayoflist (MLWorks.Internal.Value.cast l)))
A (MLWorks.Internal.ByteArray.arrayoflist (cast l)))


val length : array -> int = MLWorks.Internal.Value.cast(MLWorks.Internal.ByteArray.length)
val sub : (array * int) -> elem = MLWorks.Internal.Value.cast(MLWorks.Internal.ByteArray.sub)
val update : (array * int * elem) -> unit = MLWorks.Internal.Value.cast(MLWorks.Internal.ByteArray.update)
fun length (A ba) : int = MLWorks.Internal.ByteArray.length ba
fun sub (A ba, i:int) : elem = cast(MLWorks.Internal.ByteArray.sub (ba, i))
fun update (A ba, i:int, x:elem) : unit =
MLWorks.Internal.ByteArray.update (ba, i, cast x)

val extract : (array * int * int option ) -> vector =
fn (A a,i,len) =>
Expand All @@ -125,7 +129,7 @@ structure Word8Array : MONO_ARRAY =
| NONE => MLWorks.Internal.ByteArray.length a - i
in
if i >= 0 andalso len >= 0 andalso i + len <= MLWorks.Internal.ByteArray.length a
then MLWorks.Internal.Value.cast(MLWorks.Internal.ByteArray.substring (a,i,len))
then cast (MLWorks.Internal.ByteArray.substring (a,i,len))
else raise Subscript
end

Expand Down
9 changes: 6 additions & 3 deletions src/basis/_stream_io.sml
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ functor StreamIO(structure PrimIO : PRIM_IO
}


val openStreams = ref []
val openStreams = ref ([]:outstream list)

fun addOpenStream (s as Out{name,...}) =
(openStreams := s :: !openStreams; s)
Expand All @@ -511,7 +511,8 @@ functor StreamIO(structure PrimIO : PRIM_IO
fun handler(Out{name,...},function, cause) =
raise IO.Io{name=name,function=function,cause=cause}

val exit_function_key = ref NONE (* Handle to exit function if installed *)
(* Handle to exit function if installed *)
val exit_function_key = ref (NONE:MLWorks.Internal.Exit.key option)

fun mkOutstream(w, mode) =
let val s =
Expand Down Expand Up @@ -657,7 +658,9 @@ functor StreamIO(structure PrimIO : PRIM_IO
val blen = Array.length data
val p = !pos
fun copy offset =
(Array.copyVec {src=s, si=0, len=SOME slen, dst=data, di=offset};
((if slen = 0 then ()
else Array.copyVec {src=s, si=0, len=SOME slen,
dst=data, di=offset});
pos := offset + slen)
in if p+slen < blen
then copy p
Expand Down
2 changes: 1 addition & 1 deletion src/batch.mlp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ batch.mlp 661 7
main/link_support.sml
main/object_output.sml
rts/gen/__implicit.sml
rts/gen/__objectfile.sml
main/__objectfile.sml
rts/gen/__tags.sml
rts/gen/implicit.sml
rts/gen/objectfile.sml
Expand Down
12 changes: 6 additions & 6 deletions src/lambda/_lambda.sml
Original file line number Diff line number Diff line change
Expand Up @@ -888,13 +888,13 @@ struct
val dummy_var = new_LVar()
val dummy_varexp = LambdaTypes.VAR dummy_var

val env_reduce =
Lists.reducel
(fn (env, (env', _, _)) => Environ.augment_env(env, env'))
fun env_reduce (init, list) =
Lists.reducel (fn (env, (env', _, _)) => Environ.augment_env(env, env'))
(init, list)

val denv_reduce =
Lists.reducel
(fn (env, (_, env',_)) => Environ.augment_denv(env, env'))
fun denv_reduce (init, list) =
Lists.reducel (fn (env, (_, env',_)) => Environ.augment_denv(env, env'))
(init, list)

fun env_from_list env_le_list =
env_reduce(Environ.empty_env, env_le_list)
Expand Down
5 changes: 5 additions & 0 deletions src/lambda/_lambdaflow.sml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,12 @@ functor LambdaFlow (structure SimpleUtils : SIMPLEUTILS
structure RuntimeEnv : RUNTIMEENV
structure MachSpec : MACHSPEC

(* D: FIXME: apparently a SMLNJ bug that prevents
this Compilation continues without it, tho.
Not sure if it causes problems later.
sharing LambdaPrint.LambdaTypes = SimpleUtils.LambdaTypes
*)

sharing type SimpleUtils.LambdaTypes.FunInfo =
RuntimeEnv.FunInfo
) : LAMBDAFLOW =
Expand Down
2 changes: 1 addition & 1 deletion src/main/__encapsulate.sml
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ require "../lambda/__environtypes";
require "../main/__pervasives";
require "../main/__info";
require "../main/__code_module";
require "../rts/gen/__objectfile";
require "../debugger/__debugger_types";
require "__objectfile";
require "__enc_sub";
require "_encapsulate";

Expand Down
20 changes: 20 additions & 0 deletions src/main/__objectfile.sml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
(* __objectfile.sml the structure *)
(*
* Object file opcodes
* Originally generated from rts/src/objectfile.h, but copied
* here to represent the output of the current compiler source,
* which is *not* necessarily what the runtime system can load.
*
* Copyright 2013 Ravenbrook Limited
*)

structure ObjectFile_ =
struct
val GOOD_MAGIC = 450783256
val HEADER_SIZE = 36
val OBJECT_FILE_VERSION = 20
val OPCODE_CODESET = 0
val OPCODE_REAL = 1
val OPCODE_STRING = 2
val OPCODE_EXTERNAL = 3
end;
2 changes: 1 addition & 1 deletion src/main/_project.sml
Original file line number Diff line number Diff line change
Expand Up @@ -1073,7 +1073,7 @@ struct
fun mark_visited (v, m) = NewMap.define (v, m, false)
fun mark_compiled (v, m) = NewMap.define (v, m, true)

val empty_map = NewMap.empty (ModuleId.lt, ModuleId.eq)
val empty_map : StatusMap = NewMap.empty (ModuleId.lt, ModuleId.eq)
val visited_pervasives = mark_compiled (empty_map, Io.pervasive_library_id)

fun no_targets (error_info, location) projectName =
Expand Down
3 changes: 2 additions & 1 deletion src/main/_toplevel.sml
Original file line number Diff line number Diff line change
Expand Up @@ -1167,7 +1167,8 @@ struct
val empty_env =
CB(Parser.empty_pB, Basis.empty_basis, Environ.empty_top_env)

val empty_string_map = NewMap.empty (op < : string * string -> bool, op =)
val empty_string_map : (string, (string * int * int)) NewMap.map =
NewMap.empty (op < : string * string -> bool, op =)

val empty_debug_info = Debugger_Types.empty_information

Expand Down
Loading