Stefan Plantikow
a16acc0c10
added preliminary support for per-architecture generation of math constants (for porting)
2012-01-05 05:25:20 +01:00
Stefan Plantikow
6284190ef9
Merge branch 'master' into kmath
...
Conflicts:
src/libcore/cmath.rs
2012-01-05 02:07:12 +01:00
Marijn Haverbeke
3971b520bc
Use the right types for methods in trans_impl
...
This prevents misalignment between function and argument
types in corner cases.
2012-01-04 22:12:48 +01:00
Marijn Haverbeke
71c1c15805
xfail-pretty iface-generic.rs until i have time to debug
2012-01-04 19:58:02 +01:00
Tim Chevalier
1e54684093
Reformat typestate error messages so as not to confuse emacs compilation mode
2012-01-04 10:53:56 -08:00
Marijn Haverbeke
b02a77d6b4
Add test for generic iface methods
...
Issue #1227
2012-01-04 17:30:36 +01:00
Marijn Haverbeke
94d40be746
Prevent typenames in param bounds from resolving to their own param
...
I.e. fn foo<T: seq<T>>(...). This leads to weird circularities that seem to
never make any sense, so it seems prudent to forbid it.
Issue #1227
2012-01-04 17:30:36 +01:00
Marijn Haverbeke
42f6608ffd
Add visit_ty_params to visit.rs
...
And use it to make typechecking of bounds less error-prone.
2012-01-04 17:30:36 +01:00
Marijn Haverbeke
e11d207113
Add either::is_left and either::is_right
2012-01-04 17:30:36 +01:00
Marijn Haverbeke
a7e1a35f88
Properly typecheck and compile invocations of generic methods.
...
Aligning the type parameters of the ifaces, impls, and methods
correctly in typeck is almost brain surgery. Seems to work now for
everything I threw at it, but might still break in other corner cases.
Issue #1227
2012-01-04 17:28:51 +01:00
Lenny222
d1ffe5034b
"str": rename "str_from_cstr" to "from_cstr" (analogous to the other "from_*")
2012-01-04 09:33:07 +01:00
Lenny222
dd284eb396
"char": use shorter names "to_lower"/"to_upper", analogous to the same names in "str"
2012-01-04 09:33:04 +01:00
Lenny222
e12b169247
implement str::is_whitespace using char::is_whitespace
2012-01-04 09:32:59 +01:00
Tim Chevalier
439e28b751
Add missing ty_constr cases to trans::type_of_inner and ty::fold_ty.
...
Closes #970
2012-01-03 15:50:05 -08:00
Niko Matsakis
72a3667eb3
Allow tail expressions even in no_value blocks. Type checker
...
will guarantee they have unit type.
2012-01-03 13:13:52 -08:00
Niko Matsakis
43a9d50a74
new tests
2012-01-03 13:13:52 -08:00
Niko Matsakis
de383bcfed
extend parser so that expressions that do not require semi-colons
...
to be statements are not considered expressions in the tail position
2012-01-03 13:13:51 -08:00
Niko Matsakis
9e1dc703d2
rewrite to put blk as 2nd arg
2012-01-03 13:13:51 -08:00
Niko Matsakis
e34abbacf6
minimal changes to permit fn blocks in expr
2012-01-03 13:13:51 -08:00
Brian Anderson
513a263e81
Merge pull request #1392 from Lenny222/list
...
list: add "is_not_empty" requirement to "head" and "tail" (analogous to "vec")
2012-01-03 12:18:53 -08:00
Marijn Haverbeke
4e88d5ae92
Make resolution of dictionaries on bounded params work
...
Issue #1227
2012-01-03 16:37:41 +01:00
Marijn Haverbeke
5ea3c96938
Wire in resolution of param bounds for method calls
...
Issue #1227
2012-01-03 16:18:40 +01:00
Marijn Haverbeke
506a6ec38b
Make syntax for impls less magical
...
The trick of interpreting parameters to the iface type as parameters
to the impl was just too magical.
Issue #1227
2012-01-03 15:37:41 +01:00
Marijn Haverbeke
e1dc40b271
More work on translating dictionary-passing
...
Reached a point where simple uses of interfaces without bounds work.
Issue #1227
2012-01-03 15:36:57 +01:00
Brian Anderson
45b153adfe
llvm: Revert unneeded debugging change
2012-01-02 12:18:23 -08:00
Marijn Haverbeke
b162f33396
Fix expected error messages for better printing of ty_ptr
2012-01-02 15:59:04 +01:00
Marijn Haverbeke
cdd806d324
Add a clause ty_ptr to ppaux::ty_to_str
...
Closes #1383
2012-01-02 15:42:13 +01:00
Marijn Haverbeke
15be2fc73a
Add 'copy' bounds to functions that were faultily accepted without
...
Issue #1390
2012-01-02 15:31:58 +01:00
Marijn Haverbeke
8c14943dea
Properly handle expression blocks in kind.rs
...
It was only noticing them in expr_block form, not as function
bodies.
Closes #1390
2012-01-02 15:23:11 +01:00
Lenny222
86279e8693
typo
2012-01-02 15:16:15 +01:00
Marijn Haverbeke
1741ef75ac
Write out vtables for interface implementations
...
Issue #1227
2012-01-02 15:15:28 +01:00
Marijn Haverbeke
371b61a23d
Drop two useless sub-passes from trans
...
Neither collect_tag_ctors nor the second pass in collect_items needed
to be separate passes.
Also remove obsolete obj_methods table kludge.
2012-01-02 15:15:28 +01:00
Marijn Haverbeke
a4694ce146
Create a trans_impl module
2012-01-02 15:15:27 +01:00
Marijn Haverbeke
3a1710d21e
Key tcx.ty_param_bounds on node_ids, not def_ids
...
This makes it clearer that it's only valid for local nodes.
2012-01-02 15:15:27 +01:00
Marijn Haverbeke
9f2369dc9f
Box arrays of parameter bounds
2012-01-02 15:15:27 +01:00
Marijn Haverbeke
270b4273e7
Pass bounds to trans::type_of_fn
2012-01-02 15:15:27 +01:00
Marijn Haverbeke
664a0443ad
More resolving and typechecking of bounded type parameters.
...
Extern interfaces still don't get recognized.
Issue #1227
2012-01-02 15:15:27 +01:00
Marijn Haverbeke
40d5f288c3
Check that type parameter bounds are interface types
...
Issue #1227
2012-01-02 15:15:27 +01:00
Marijn Haverbeke
7ea175f23f
Fix confusing information in tutorial chapter about argument modes
2012-01-02 10:23:04 +01:00
Marijn Haverbeke
bd6646e698
Make last-use pass properly handle closed-over variables
...
Closes #1399
2012-01-02 10:20:58 +01:00
Brian Anderson
1c125d8829
llvm: Upgrade LLVM with FreeBSD segmented stack support
2012-01-01 20:26:34 -08:00
Brian Anderson
6d2dd70adc
Add Jyun-Yan You to AUTHORS.txt
2012-01-01 20:20:32 -08:00
Jyun-Yan You
4566578fbd
link with gcc44+
2012-01-01 20:18:55 -08:00
Jyun-Yan You
274fc1b59c
fix link error
2012-01-01 20:18:55 -08:00
Jyun-Yan You
21eadbe6f1
add missing library, enable segmented stacks for freebsd
2012-01-01 20:18:55 -08:00
Jyun-Yan You
d4884b6c6e
forgot to add parentheses
2012-01-01 20:18:55 -08:00
User Jyyou
a59c4b1b47
freebsd support
2012-01-01 20:18:55 -08:00
Brian Anderson
f0e98691db
Merge pull request #1407 from erickt/master
...
The tutorial should mention the ++ arg passing style
2012-01-01 13:17:34 -08:00
Lenny222
f8d7a1c258
"str": extract to_upper/lower_case() into "char"
2012-01-01 13:15:30 -08:00
Erick Tryzelaar
eba891e989
tutorial: Mention by-value argument passing style.
2011-12-31 12:20:03 -08:00