Skip to content

Commit 0422c1f

Browse files
committed
---
yaml --- r: 566 b: refs/heads/master c: ed92925 h: refs/heads/master v: v3
1 parent 4633792 commit 0422c1f

Some content is hidden

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

109 files changed

+4158
-1456
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: ed92925083ebe26e6e3a9cec6b1f3906f9ce2dd1

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 & 20 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)
@@ -362,7 +371,6 @@ self: $(CFG_COMPILER)
362371
# of inter-task shutdown races introduced with notification proxies.
363372

364373
TASK_XFAILS := test/run-pass/acyclic-unwind.rs \
365-
test/run-pass/alt-type-simple.rs \
366374
test/run-pass/basic.rs \
367375
test/run-pass/clone-with-exterior.rs \
368376
test/run-pass/comm.rs \
@@ -380,13 +388,14 @@ TASK_XFAILS := test/run-pass/acyclic-unwind.rs \
380388
test/run-pass/task-comm-7.rs \
381389
test/run-pass/task-comm-8.rs \
382390
test/run-pass/task-comm-9.rs \
391+
test/run-pass/task-comm-10.rs \
392+
test/run-pass/task-comm-11.rs \
393+
test/run-pass/task-life-0.rs \
383394
test/run-pass/task-comm.rs \
384395
test/run-pass/threads.rs \
385396
test/run-pass/yield.rs
386397

387398
TEST_XFAILS_X86 := $(TASK_XFAILS) \
388-
test/run-pass/arithmetic-interference.rs \
389-
test/run-pass/bind-obj-ctor.rs \
390399
test/run-pass/child-outlives-parent.rs \
391400
test/run-pass/clone-with-exterior.rs \
392401
test/run-pass/constrained-type.rs \
@@ -398,16 +407,13 @@ TEST_XFAILS_X86 := $(TASK_XFAILS) \
398407
test/run-pass/generic-recursive-tag.rs \
399408
test/run-pass/int-lib.rs \
400409
test/run-pass/iter-ret.rs \
401-
test/run-pass/lib-deque.rs \
410+
test/run-pass/lib-io.rs \
402411
test/run-pass/lib-map.rs \
403412
test/run-pass/mlist-cycle.rs \
404413
test/run-pass/obj-as.rs \
405414
test/run-pass/task-comm.rs \
406415
test/run-pass/vec-slice.rs \
407-
test/run-pass/task-comm-2.rs \
408416
test/run-pass/task-comm-3.rs \
409-
test/run-pass/task-comm-5.rs \
410-
test/run-pass/task-comm-6.rs \
411417
test/compile-fail/bad-recv.rs \
412418
test/compile-fail/bad-send.rs \
413419
test/compile-fail/infinite-tag-type-recursion.rs \
@@ -416,14 +422,17 @@ TEST_XFAILS_X86 := $(TASK_XFAILS) \
416422

417423
TEST_XFAILS_LLVM := $(TASK_XFAILS) \
418424
$(addprefix test/run-pass/, \
425+
arith-1.rs \
419426
acyclic-unwind.rs \
420427
alt-pattern-simple.rs \
421428
alt-tag.rs \
422-
arithmetic-interference.rs \
429+
append-units.rs \
423430
argv.rs \
424431
autoderef-full-lval.rs \
425432
autoderef-objfn.rs \
426433
basic.rs \
434+
basic-1.rs \
435+
basic-2.rs \
427436
bind-obj-ctor.rs \
428437
bind-thunk.rs \
429438
bind-trivial.rs \
@@ -464,7 +473,6 @@ TEST_XFAILS_LLVM := $(TASK_XFAILS) \
464473
i32-sub.rs \
465474
i8-incr.rs \
466475
import.rs \
467-
inner-module.rs \
468476
integral-indexing.rs \
469477
int-lib.rs \
470478
iter-range.rs \
@@ -474,8 +482,10 @@ TEST_XFAILS_LLVM := $(TASK_XFAILS) \
474482
lazy-init.rs \
475483
lazychan.rs \
476484
lib-deque.rs \
485+
lib-io.rs \
477486
lib-map.rs \
478487
lib-rand.rs \
488+
lib-vec-str-conversions.rs \
479489
linear-for-loop.rs \
480490
list.rs \
481491
many.rs \
@@ -500,6 +510,7 @@ TEST_XFAILS_LLVM := $(TASK_XFAILS) \
500510
rec-tup.rs \
501511
rec.rs \
502512
simple-obj.rs \
513+
size-and-align.rs \
503514
spawn-fn.rs \
504515
spawn-module-qualified.rs \
505516
spawn.rs \
@@ -508,6 +519,7 @@ TEST_XFAILS_LLVM := $(TASK_XFAILS) \
508519
str-concat.rs \
509520
str-idx.rs \
510521
str-lib.rs \
522+
task-lib.rs \
511523
tag.rs \
512524
tail-cps.rs \
513525
tail-direct.rs \
@@ -522,6 +534,9 @@ TEST_XFAILS_LLVM := $(TASK_XFAILS) \
522534
task-comm-7.rs \
523535
task-comm-8.rs \
524536
task-comm-9.rs \
537+
task-comm-10.rs \
538+
task-comm-11.rs \
539+
task-life-0.rs \
525540
threads.rs \
526541
type-sizes.rs \
527542
u8-incr.rs \
@@ -541,6 +556,7 @@ TEST_XFAILS_LLVM := $(TASK_XFAILS) \
541556
vec-lib.rs \
542557
vec-slice.rs \
543558
vec.rs \
559+
while-flow-graph.rs \
544560
writealias.rs \
545561
yield.rs \
546562
yield2.rs \
@@ -602,6 +618,10 @@ TEST_RPASS_OUTS_X86 := \
602618
$(TEST_RPASS_EXES_X86:.x86$(CFG_EXE_SUFFIX)=.x86.out)
603619
TEST_RPASS_OUTS_LLVM := \
604620
$(TEST_RPASS_EXES_LLVM:.llvm$(CFG_EXE_SUFFIX)=.llvm.out)
621+
TEST_RPASS_TMPS_X86 := \
622+
$(TEST_RPASS_EXES_X86:.x86$(CFG_EXE_SUFFIX)=.x86$(CFG_EXE_SUFFIX).tmp)
623+
TEST_RPASS_TMPS_LLVM := \
624+
$(TEST_RPASS_EXES_LLVM:.llvm$(CFG_EXE_SUFFIX)=.llvm$(CFG_EXE_SUFFIX).tmp)
605625

606626

607627
TEST_RFAIL_CRATES_X86 := $(filter-out $(TEST_XFAILS_X86), $(RFAIL_RC))
@@ -619,6 +639,10 @@ TEST_RFAIL_OUTS_X86 := \
619639
$(TEST_RFAIL_EXES_X86:.x86$(CFG_EXE_SUFFIX)=.x86.out)
620640
TEST_RFAIL_OUTS_LLVM := \
621641
$(TEST_RFAIL_EXES_LLVM:.llvm$(CFG_EXE_SUFFIX)=.llvm.out)
642+
TEST_RFAIL_TMPS_X86 := \
643+
$(TEST_RFAIL_EXES_X86:.x86$(CFG_EXE_SUFFIX)=.x86$(CFG_EXE_SUFFIX).tmp)
644+
TEST_RFAIL_TMPS_LLVM := \
645+
$(TEST_RFAIL_EXES_LLVM:.llvm$(CFG_EXE_SUFFIX)=.llvm$(CFG_EXE_SUFFIX).tmp)
622646

623647

624648
TEST_CFAIL_CRATES_X86 := $(filter-out $(TEST_XFAILS_X86), $(CFAIL_RC))
@@ -636,6 +660,11 @@ TEST_CFAIL_OUTS_X86 := \
636660
$(TEST_CFAIL_EXES_X86:.x86$(CFG_EXE_SUFFIX)=.x86.out)
637661
TEST_CFAIL_OUTS_LLVM := \
638662
$(TEST_CFAIL_EXES_LLVM:.llvm$(CFG_EXE_SUFFIX)=.llvm.out)
663+
TEST_CFAIL_TMPS_X86 := \
664+
$(TEST_CFAIL_EXES_X86:.x86$(CFG_EXE_SUFFIX)=.x86$(CFG_EXE_SUFFIX).tmp)
665+
TEST_CFAIL_TMPS_LLVM := \
666+
$(TEST_CFAIL_EXES_LLVM:.llvm$(CFG_EXE_SUFFIX)=.llvm$(CFG_EXE_SUFFIX).tmp)
667+
639668

640669
ALL_TEST_CRATES := $(TEST_CFAIL_CRATES_X86) \
641670
$(TEST_RFAIL_CRATES_X86) \
@@ -690,10 +719,12 @@ BOOT := $(CFG_QUIET)OCAMLRUNPARAM="b1" $(CFG_BOOT) $(CFG_BOOT_FLAGS)
690719
$(CFG_QUIET)mv $< $@
691720

692721
test/run-pass/%.out.tmp: test/run-pass/%$(CFG_EXE_SUFFIX) $(CFG_RUNTIME)
722+
$(CFG_QUIET)rm -f $<.tmp
693723
@$(call CFG_ECHO, run: $<)
694724
$(CFG_QUIET)$(call CFG_RUN_TARG, $<) > $@
695725

696726
test/run-fail/%.out.tmp: test/run-fail/%$(CFG_EXE_SUFFIX) $(CFG_RUNTIME)
727+
$(CFG_QUIET)rm -f $<.tmp
697728
@$(call CFG_ECHO, run: $<)
698729
$(CFG_QUIET)rm -f $@
699730
$(CFG_QUIET)$(call CFG_RUN_TARG, $<) >$@ 2>&1 ; X=$$? ; \
@@ -886,12 +917,18 @@ clean:
886917
$(CFG_QUIET)rm -f $(ML_DEPFILES) $(C_DEPFILES) $(CRATE_DEPFILES)
887918
$(CFG_QUIET)rm -f $(GENERATED)
888919
$(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)
920+
$(CFG_QUIET)rm -f $(TEST_RPASS_EXES_X86) $(TEST_RPASS_OUTS_X86) \
921+
$(TEST_RPASS_TMPS_X86)
922+
$(CFG_QUIET)rm -f $(TEST_RPASS_EXES_LLVM) $(TEST_RPASS_OUTS_LLVM) \
923+
$(TEST_RPASS_TMPS_LLVM)
924+
$(CFG_QUIET)rm -f $(TEST_RFAIL_EXES_X86) $(TEST_RFAIL_OUTS_X86) \
925+
$(TEST_RFAIL_TMPS_X86)
926+
$(CFG_QUIET)rm -f $(TEST_RFAIL_EXES_LLVM) $(TEST_RFAIL_OUTS_LLVM) \
927+
$(TEST_RFAIL_TMPS_LLVM)
928+
$(CFG_QUIET)rm -f $(TEST_CFAIL_EXES_X86) $(TEST_CFAIL_OUTS_X86) \
929+
$(TEST_CFAIL_TMPS_X86)
930+
$(CFG_QUIET)rm -f $(TEST_CFAIL_EXES_LLVM) $(TEST_CFAIL_OUTS_LLVM) \
931+
$(TEST_CFAIL_TMPS_LLVM)
895932
$(CFG_QUIET)rm -rf $(TEST_RPASS_EXES_LLVM:.llvm=.llvm.dSYM)
896933
$(CFG_QUIET)rm -rf $(TEST_RFAIL_EXES_LLVM:.llvm=.llvm.dSYM)
897934
$(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)