Skip to content

Commit 13923d8

Browse files
committed
---
yaml --- r: 567 b: refs/heads/master c: 6e3a77c h: refs/heads/master i: 565: c563454 563: f6bddce 559: 9bdc014 v: v3
1 parent 0e59996 commit 13923d8

Some content is hidden

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

106 files changed

+4088
-1290
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 0830b5bf24a7117130e0089754cd96e51411284d
2+
refs/heads/master: 6e3a77c3a3b32aa6fabad895492c2b24739fedba

trunk/.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
*.x86
33
*.llvm
44
*.out
5+
*.x86.tmp
6+
*.llvm.tmp
57
*.cmx
68
*.dll
79
*.exe
@@ -30,6 +32,8 @@
3032
*.swp
3133
.hg/
3234
.hgignore
35+
.cproject
36+
.project
3337
lexer.ml
3438
rustboot
3539
rustc

trunk/doc/rust.texi

Lines changed: 46 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -599,6 +599,7 @@ Unicode characters.
599599
* Ref.Lex.Ignore:: Ignored characters.
600600
* Ref.Lex.Ident:: Identifier tokens.
601601
* Ref.Lex.Key:: Keyword tokens.
602+
* Ref.Lex.Res:: Reserved tokens.
602603
* Ref.Lex.Num:: Numeric tokens.
603604
* Ref.Lex.Text:: String and character tokens.
604605
* Ref.Lex.Syntax:: Syntactic extension tokens.
@@ -636,7 +637,7 @@ token or a syntactic extension token. Multi-line comments may be nested.
636637
Identifiers follow the pattern of C identifiers: they begin with a
637638
@emph{letter} or @emph{underscore}, and continue with any combination of
638639
@emph{letters}, @emph{decimal digits} and underscores, and must not be equal
639-
to any keyword. @xref{Ref.Lex.Key}.
640+
to any keyword or reserved token. @xref{Ref.Lex.Key}. @xref{Ref.Lex.Res}.
640641

641642
A @emph{letter} is a Unicode character in the ranges U+0061-U+007A and
642643
U+0041-U+005A (@code{'a'}-@code{'z'} and @code{'A'}-@code{'Z'}).
@@ -728,6 +729,35 @@ The keywords are:
728729
@tab @code{be}
729730
@end multitable
730731

732+
@node Ref.Lex.Res
733+
@subsection Ref.Lex.Res
734+
@c * Ref.Lex.Res:: Reserved tokens.
735+
736+
The reserved tokens are:
737+
@cindex Reserved
738+
739+
@sp 2
740+
741+
@multitable @columnfractions .15 .15 .15 .15 .15
742+
@item @code{f16}
743+
@tab @code{f80}
744+
@tab @code{f128}
745+
@item @code{m32}
746+
@tab @code{m64}
747+
@tab @code{m128}
748+
@tab @code{dec}
749+
@end multitable
750+
751+
@sp 2
752+
753+
At present these tokens have no defined meaning in the Rust language.
754+
755+
These tokens may correspond, in some current or future implementation,
756+
to additional built-in types for decimal floating-point, extended
757+
binary and interchange floating-point formats, as defined in the IEEE
758+
754-1985 and IEEE 754-2008 specifications.
759+
760+
731761
@node Ref.Lex.Num
732762
@subsection Ref.Lex.Num
733763
@c * Ref.Lex.Num:: Numeric tokens.
@@ -785,6 +815,10 @@ only two floating-point suffixes: @code{f32} and @code{f64}. Each of these
785815
gives the floating point literal the associated type, rather than
786816
@code{float}.
787817

818+
A set of suffixes are also reserved to accommodate literal support for
819+
types corresponding to reserved tokens. The reserved suffixes are @code{f16},
820+
@code{f80}, @code{f128}, @code{m}, @code{m32}, @code{m64} and @code{m128}.
821+
788822
@sp 1
789823
A @dfn{hex digit} is either a @emph{decimal digit} or else a character in the
790824
ranges U+0061-U+0066 and U+0041-U+0046 (@code{'a'}-@code{'f'},
@@ -2024,7 +2058,7 @@ The signed two's complement word types @code{i8}, @code{i16}, @code{i32} and
20242058
@end ifhtml
20252059
respectively.
20262060
@item
2027-
The IEEE 754 single-precision and double-precision floating-point types:
2061+
The IEEE 754-2008 @code{binary32} and @code{binary64} floating-point types:
20282062
@code{f32} and @code{f64}, respectively.
20292063
@end itemize
20302064

@@ -2822,12 +2856,15 @@ x.y = z + 2;
28222856
@c * Ref.Stmt.Spawn:: Statements creating new tasks.
28232857
@cindex Spawn statement
28242858

2825-
A @code{spawn} statement consists of keyword @code{spawn}, followed by a
2826-
normal @emph{call} statement (@pxref{Ref.Stmt.Call}). A @code{spawn}
2827-
statement causes the runtime to construct a new task executing the called
2828-
function. The called function is referred to as the @dfn{entry function} for
2829-
the spawned task, and its arguments are copied from the spawning task to the
2830-
spawned task before the spawned task begins execution.
2859+
A @code{spawn} statement consists of keyword @code{spawn}, followed by
2860+
an optional literal string naming the new task and then a normal
2861+
@emph{call} statement (@pxref{Ref.Stmt.Call}). A @code{spawn}
2862+
statement causes the runtime to construct a new task executing the
2863+
called function with the given name. The called function is referred
2864+
to as the @dfn{entry function} for the spawned task, and its arguments
2865+
are copied from the spawning task to the spawned task before the
2866+
spawned task begins execution. If no explicit name is present, the
2867+
task is implicitly named with the string of the call statement.
28312868

28322869
Functions taking alias-slot arguments, or returning non-nil values, cannot be
28332870
spawned. Iterators cannot be spawned.
@@ -2843,6 +2880,7 @@ fn helper(chan[u8] out) @{
28432880
28442881
let port[u8] out;
28452882
let task p = spawn helper(chan(out));
2883+
let task p2 = spawn "my_helper" helper(chan(out));
28462884
// let task run, do other things.
28472885
auto result <- out;
28482886

trunk/src/Makefile

Lines changed: 57 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ ifeq ($(CFG_OSTYPE), Linux)
3535
CFG_RUNTIME := librustrt.so
3636
CFG_STDLIB := libstd.so
3737
CFG_GCC_CFLAGS += -fPIC
38-
CFG_GCC_LINK_FLAGS += -shared -fPIC -ldl -lpthread
38+
CFG_GCC_LINK_FLAGS += -shared -fPIC -ldl -lpthread -lrt
3939
ifeq ($(CFG_CPUTYPE), x86_64)
4040
CFG_GCC_CFLAGS += -m32
4141
CFG_GCC_LINK_FLAGS += -m32
@@ -245,7 +245,9 @@ BOOT_CMXS := $(BOOT_MLS:.ml=.cmx)
245245
BOOT_OBJS := $(BOOT_MLS:.ml=.o)
246246
BOOT_CMIS := $(BOOT_MLS:.ml=.cmi)
247247

248-
RUNTIME_CS := rt/sync/spin_lock.cpp \
248+
RUNTIME_CS := rt/sync/timer.cpp \
249+
rt/sync/sync.cpp \
250+
rt/sync/spin_lock.cpp \
249251
rt/sync/lock_free_queue.cpp \
250252
rt/sync/condition_variable.cpp \
251253
rt/rust.cpp \
@@ -263,7 +265,9 @@ RUNTIME_CS := rt/sync/spin_lock.cpp \
263265
rt/rust_message.cpp \
264266
rt/rust_timer.cpp \
265267
rt/circular_buffer.cpp \
266-
rt/isaac/randport.cpp
268+
rt/isaac/randport.cpp \
269+
rt/rust_srv.cpp \
270+
rt/memory_region.cpp
267271

268272
RUNTIME_HDR := rt/globals.h \
269273
rt/rust.h \
@@ -279,7 +283,12 @@ RUNTIME_HDR := rt/globals.h \
279283
rt/rust_message.h \
280284
rt/circular_buffer.h \
281285
rt/util/array_list.h \
282-
rt/util/hash_map.h
286+
rt/util/hash_map.h \
287+
rt/sync/sync.h \
288+
rt/sync/timer.h \
289+
rt/rust_srv.h \
290+
rt/memory_region.h \
291+
rt/memory.h
283292

284293
RUNTIME_INCS := -Irt/isaac -Irt/uthash
285294
RUNTIME_OBJS := $(RUNTIME_CS:.cpp=$(CFG_OBJ_SUFFIX))
@@ -296,7 +305,7 @@ all: $(CFG_COMPILER) $(MKFILES) $(GENERATED)
296305

297306
boot/util/version.ml: Makefile
298307
$(CFG_QUIET)git log -1 \
299-
--format='let version = "prerelease (%h %ci)";;' >$@
308+
--format='let version = "prerelease (%h %ci)";;' >$@ || exit 1
300309

301310
loc:
302311
$(CFG_QUIET)wc -l $(BOOT_MLS) $(RUNTIME_CS) $(RUNTIME_HDR)
@@ -380,13 +389,14 @@ TASK_XFAILS := test/run-pass/acyclic-unwind.rs \
380389
test/run-pass/task-comm-7.rs \
381390
test/run-pass/task-comm-8.rs \
382391
test/run-pass/task-comm-9.rs \
392+
test/run-pass/task-comm-10.rs \
393+
test/run-pass/task-comm-11.rs \
394+
test/run-pass/task-life-0.rs \
383395
test/run-pass/task-comm.rs \
384396
test/run-pass/threads.rs \
385397
test/run-pass/yield.rs
386398

387399
TEST_XFAILS_X86 := $(TASK_XFAILS) \
388-
test/run-pass/arithmetic-interference.rs \
389-
test/run-pass/bind-obj-ctor.rs \
390400
test/run-pass/child-outlives-parent.rs \
391401
test/run-pass/clone-with-exterior.rs \
392402
test/run-pass/constrained-type.rs \
@@ -398,16 +408,13 @@ TEST_XFAILS_X86 := $(TASK_XFAILS) \
398408
test/run-pass/generic-recursive-tag.rs \
399409
test/run-pass/int-lib.rs \
400410
test/run-pass/iter-ret.rs \
401-
test/run-pass/lib-deque.rs \
411+
test/run-pass/lib-io.rs \
402412
test/run-pass/lib-map.rs \
403413
test/run-pass/mlist-cycle.rs \
404414
test/run-pass/obj-as.rs \
405415
test/run-pass/task-comm.rs \
406416
test/run-pass/vec-slice.rs \
407-
test/run-pass/task-comm-2.rs \
408417
test/run-pass/task-comm-3.rs \
409-
test/run-pass/task-comm-5.rs \
410-
test/run-pass/task-comm-6.rs \
411418
test/compile-fail/bad-recv.rs \
412419
test/compile-fail/bad-send.rs \
413420
test/compile-fail/infinite-tag-type-recursion.rs \
@@ -416,14 +423,17 @@ TEST_XFAILS_X86 := $(TASK_XFAILS) \
416423

417424
TEST_XFAILS_LLVM := $(TASK_XFAILS) \
418425
$(addprefix test/run-pass/, \
426+
arith-1.rs \
419427
acyclic-unwind.rs \
420428
alt-pattern-simple.rs \
421429
alt-tag.rs \
422-
arithmetic-interference.rs \
430+
append-units.rs \
423431
argv.rs \
424432
autoderef-full-lval.rs \
425433
autoderef-objfn.rs \
426434
basic.rs \
435+
basic-1.rs \
436+
basic-2.rs \
427437
bind-obj-ctor.rs \
428438
bind-thunk.rs \
429439
bind-trivial.rs \
@@ -464,7 +474,6 @@ TEST_XFAILS_LLVM := $(TASK_XFAILS) \
464474
i32-sub.rs \
465475
i8-incr.rs \
466476
import.rs \
467-
inner-module.rs \
468477
integral-indexing.rs \
469478
int-lib.rs \
470479
iter-range.rs \
@@ -474,8 +483,10 @@ TEST_XFAILS_LLVM := $(TASK_XFAILS) \
474483
lazy-init.rs \
475484
lazychan.rs \
476485
lib-deque.rs \
486+
lib-io.rs \
477487
lib-map.rs \
478488
lib-rand.rs \
489+
lib-vec-str-conversions.rs \
479490
linear-for-loop.rs \
480491
list.rs \
481492
many.rs \
@@ -500,6 +511,7 @@ TEST_XFAILS_LLVM := $(TASK_XFAILS) \
500511
rec-tup.rs \
501512
rec.rs \
502513
simple-obj.rs \
514+
size-and-align.rs \
503515
spawn-fn.rs \
504516
spawn-module-qualified.rs \
505517
spawn.rs \
@@ -508,6 +520,7 @@ TEST_XFAILS_LLVM := $(TASK_XFAILS) \
508520
str-concat.rs \
509521
str-idx.rs \
510522
str-lib.rs \
523+
task-lib.rs \
511524
tag.rs \
512525
tail-cps.rs \
513526
tail-direct.rs \
@@ -522,6 +535,9 @@ TEST_XFAILS_LLVM := $(TASK_XFAILS) \
522535
task-comm-7.rs \
523536
task-comm-8.rs \
524537
task-comm-9.rs \
538+
task-comm-10.rs \
539+
task-comm-11.rs \
540+
task-life-0.rs \
525541
threads.rs \
526542
type-sizes.rs \
527543
u8-incr.rs \
@@ -541,6 +557,7 @@ TEST_XFAILS_LLVM := $(TASK_XFAILS) \
541557
vec-lib.rs \
542558
vec-slice.rs \
543559
vec.rs \
560+
while-flow-graph.rs \
544561
writealias.rs \
545562
yield.rs \
546563
yield2.rs \
@@ -602,6 +619,10 @@ TEST_RPASS_OUTS_X86 := \
602619
$(TEST_RPASS_EXES_X86:.x86$(CFG_EXE_SUFFIX)=.x86.out)
603620
TEST_RPASS_OUTS_LLVM := \
604621
$(TEST_RPASS_EXES_LLVM:.llvm$(CFG_EXE_SUFFIX)=.llvm.out)
622+
TEST_RPASS_TMPS_X86 := \
623+
$(TEST_RPASS_EXES_X86:.x86$(CFG_EXE_SUFFIX)=.x86$(CFG_EXE_SUFFIX).tmp)
624+
TEST_RPASS_TMPS_LLVM := \
625+
$(TEST_RPASS_EXES_LLVM:.llvm$(CFG_EXE_SUFFIX)=.llvm$(CFG_EXE_SUFFIX).tmp)
605626

606627

607628
TEST_RFAIL_CRATES_X86 := $(filter-out $(TEST_XFAILS_X86), $(RFAIL_RC))
@@ -619,6 +640,10 @@ TEST_RFAIL_OUTS_X86 := \
619640
$(TEST_RFAIL_EXES_X86:.x86$(CFG_EXE_SUFFIX)=.x86.out)
620641
TEST_RFAIL_OUTS_LLVM := \
621642
$(TEST_RFAIL_EXES_LLVM:.llvm$(CFG_EXE_SUFFIX)=.llvm.out)
643+
TEST_RFAIL_TMPS_X86 := \
644+
$(TEST_RFAIL_EXES_X86:.x86$(CFG_EXE_SUFFIX)=.x86$(CFG_EXE_SUFFIX).tmp)
645+
TEST_RFAIL_TMPS_LLVM := \
646+
$(TEST_RFAIL_EXES_LLVM:.llvm$(CFG_EXE_SUFFIX)=.llvm$(CFG_EXE_SUFFIX).tmp)
622647

623648

624649
TEST_CFAIL_CRATES_X86 := $(filter-out $(TEST_XFAILS_X86), $(CFAIL_RC))
@@ -636,6 +661,11 @@ TEST_CFAIL_OUTS_X86 := \
636661
$(TEST_CFAIL_EXES_X86:.x86$(CFG_EXE_SUFFIX)=.x86.out)
637662
TEST_CFAIL_OUTS_LLVM := \
638663
$(TEST_CFAIL_EXES_LLVM:.llvm$(CFG_EXE_SUFFIX)=.llvm.out)
664+
TEST_CFAIL_TMPS_X86 := \
665+
$(TEST_CFAIL_EXES_X86:.x86$(CFG_EXE_SUFFIX)=.x86$(CFG_EXE_SUFFIX).tmp)
666+
TEST_CFAIL_TMPS_LLVM := \
667+
$(TEST_CFAIL_EXES_LLVM:.llvm$(CFG_EXE_SUFFIX)=.llvm$(CFG_EXE_SUFFIX).tmp)
668+
639669

640670
ALL_TEST_CRATES := $(TEST_CFAIL_CRATES_X86) \
641671
$(TEST_RFAIL_CRATES_X86) \
@@ -690,10 +720,12 @@ BOOT := $(CFG_QUIET)OCAMLRUNPARAM="b1" $(CFG_BOOT) $(CFG_BOOT_FLAGS)
690720
$(CFG_QUIET)mv $< $@
691721

692722
test/run-pass/%.out.tmp: test/run-pass/%$(CFG_EXE_SUFFIX) $(CFG_RUNTIME)
723+
$(CFG_QUIET)rm -f $<.tmp
693724
@$(call CFG_ECHO, run: $<)
694725
$(CFG_QUIET)$(call CFG_RUN_TARG, $<) > $@
695726

696727
test/run-fail/%.out.tmp: test/run-fail/%$(CFG_EXE_SUFFIX) $(CFG_RUNTIME)
728+
$(CFG_QUIET)rm -f $<.tmp
697729
@$(call CFG_ECHO, run: $<)
698730
$(CFG_QUIET)rm -f $@
699731
$(CFG_QUIET)$(call CFG_RUN_TARG, $<) >$@ 2>&1 ; X=$$? ; \
@@ -886,12 +918,18 @@ clean:
886918
$(CFG_QUIET)rm -f $(ML_DEPFILES) $(C_DEPFILES) $(CRATE_DEPFILES)
887919
$(CFG_QUIET)rm -f $(GENERATED)
888920
$(CFG_QUIET)rm -f $(CFG_BOOT) $(CFG_RUNTIME) $(CFG_STDLIB)
889-
$(CFG_QUIET)rm -f $(TEST_RPASS_EXES_X86) $(TEST_RPASS_OUTS_X86)
890-
$(CFG_QUIET)rm -f $(TEST_RPASS_EXES_LLVM) $(TEST_RPASS_OUTS_LLVM)
891-
$(CFG_QUIET)rm -f $(TEST_RFAIL_EXES_X86) $(TEST_RFAIL_OUTS_X86)
892-
$(CFG_QUIET)rm -f $(TEST_RFAIL_EXES_LLVM) $(TEST_RFAIL_OUTS_LLVM)
893-
$(CFG_QUIET)rm -f $(TEST_CFAIL_EXES_X86) $(TEST_CFAIL_OUTS_X86)
894-
$(CFG_QUIET)rm -f $(TEST_CFAIL_EXES_LLVM) $(TEST_CFAIL_OUTS_LLVM)
921+
$(CFG_QUIET)rm -f $(TEST_RPASS_EXES_X86) $(TEST_RPASS_OUTS_X86) \
922+
$(TEST_RPASS_TMPS_X86)
923+
$(CFG_QUIET)rm -f $(TEST_RPASS_EXES_LLVM) $(TEST_RPASS_OUTS_LLVM) \
924+
$(TEST_RPASS_TMPS_LLVM)
925+
$(CFG_QUIET)rm -f $(TEST_RFAIL_EXES_X86) $(TEST_RFAIL_OUTS_X86) \
926+
$(TEST_RFAIL_TMPS_X86)
927+
$(CFG_QUIET)rm -f $(TEST_RFAIL_EXES_LLVM) $(TEST_RFAIL_OUTS_LLVM) \
928+
$(TEST_RFAIL_TMPS_LLVM)
929+
$(CFG_QUIET)rm -f $(TEST_CFAIL_EXES_X86) $(TEST_CFAIL_OUTS_X86) \
930+
$(TEST_CFAIL_TMPS_X86)
931+
$(CFG_QUIET)rm -f $(TEST_CFAIL_EXES_LLVM) $(TEST_CFAIL_OUTS_LLVM) \
932+
$(TEST_CFAIL_TMPS_LLVM)
895933
$(CFG_QUIET)rm -rf $(TEST_RPASS_EXES_LLVM:.llvm=.llvm.dSYM)
896934
$(CFG_QUIET)rm -rf $(TEST_RFAIL_EXES_LLVM:.llvm=.llvm.dSYM)
897935
$(CFG_QUIET)rm -Rf $(PKG_NAME)-*.tar.gz dist

trunk/src/boot/be/abi.ml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ let box_gc_header_size = 4;;
4141

4242
let box_gc_malloc_return_adjustment = 3;;
4343

44-
let stk_field_valgrind_id = 0 + 1;;
44+
let stk_field_valgrind_id = 0;;
4545
let stk_field_limit = stk_field_valgrind_id + 1;;
4646
let stk_field_data = stk_field_limit + 1;;
4747

@@ -121,7 +121,8 @@ type abi =
121121
-> Common.size (* callsz *)
122122
-> Common.nabi
123123
-> Common.fixup (* grow_task *)
124-
-> unit);
124+
-> bool (* is_obj_fn *)
125+
-> unit);
125126

126127
abi_emit_fn_epilogue: (Il.emitter -> unit);
127128

0 commit comments

Comments
 (0)