Skip to content

Commit 69d35fd

Browse files
committed
---
yaml --- r: 6188 b: refs/heads/master c: fcd39b1 h: refs/heads/master v: v3
1 parent 8c9c5c4 commit 69d35fd

File tree

9 files changed

+17
-45
lines changed

9 files changed

+17
-45
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: 1103fe8ca05f9048599b56ab2d9b99ba6de8a1f2
2+
refs/heads/master: fcd39b1191f92d1f1851fa71098471ad60ab22c2

trunk/src/comp/metadata/tydecode.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,6 @@ fn parse_ty(st: @pstate, sd: str_def) -> ty::t {
261261
alt next(st) as char {
262262
'i' { abi = ast::native_abi_rust_intrinsic; }
263263
'c' { abi = ast::native_abi_cdecl; }
264-
'l' { abi = ast::native_abi_llvm; }
265264
's' { abi = ast::native_abi_x86stdcall; }
266265
'C' { abi = ast::native_abi_c_stack_cdecl; }
267266
'S' { abi = ast::native_abi_c_stack_stdcall; }

trunk/src/comp/metadata/tyencode.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ fn enc_sty(w: io::writer, cx: @ctxt, st: ty::sty) {
144144
alt abi {
145145
native_abi_rust_intrinsic. { w.write_char('i'); }
146146
native_abi_cdecl. { w.write_char('c'); }
147-
native_abi_llvm. { w.write_char('l'); }
148147
native_abi_x86stdcall. { w.write_char('s'); }
149148
native_abi_c_stack_cdecl. { w.write_char('C'); }
150149
native_abi_c_stack_stdcall. { w.write_char('S'); }

trunk/src/comp/middle/trans.rs

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5532,7 +5532,7 @@ fn native_fn_ty_param_count(cx: @crate_ctxt, id: ast::node_id) -> uint {
55325532
pure fn native_abi_requires_pair(abi: ast::native_abi) -> bool {
55335533
alt abi {
55345534
ast::native_abi_cdecl. |
5535-
ast::native_abi_llvm. | ast::native_abi_rust_intrinsic. |
5535+
ast::native_abi_rust_intrinsic. |
55365536
ast::native_abi_x86stdcall. { ret true; }
55375537
ast::native_abi_c_stack_cdecl. |
55385538
ast::native_abi_c_stack_stdcall. { ret false; }
@@ -5581,11 +5581,6 @@ fn register_native_fn(ccx: @crate_ctxt, sp: span, path: [str], name: str,
55815581
uses_retptr = false;
55825582
cast_to_i32 = true;
55835583
}
5584-
ast::native_abi_llvm. {
5585-
pass_task = false;
5586-
uses_retptr = false;
5587-
cast_to_i32 = false;
5588-
}
55895584
ast::native_abi_x86stdcall. {
55905585
pass_task = false;
55915586
uses_retptr = false;
@@ -5713,13 +5708,6 @@ fn register_native_fn(ccx: @crate_ctxt, sp: span, path: [str], name: str,
57135708
let r;
57145709
let rptr;
57155710
alt abi {
5716-
ast::native_abi_llvm. {
5717-
let result =
5718-
trans_simple_native_abi(bcx, name, call_args, fn_type,
5719-
uses_retptr, lib::llvm::LLVMCCallConv);
5720-
r = result.val;
5721-
rptr = result.rptr;
5722-
}
57235711
ast::native_abi_rust_intrinsic. {
57245712
let external_name = "rust_intrinsic_" + name;
57255713
let result =

trunk/src/comp/syntax/ast.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,6 @@ type _mod = {view_items: [@view_item], items: [@item]};
427427

428428
tag native_abi {
429429
native_abi_cdecl;
430-
native_abi_llvm;
431430
native_abi_rust_intrinsic;
432431
native_abi_x86stdcall;
433432
native_abi_c_stack_cdecl;

trunk/src/comp/syntax/parse/parser.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2007,8 +2007,6 @@ fn parse_item_native_mod(p: parser, attrs: [ast::attribute]) -> @ast::item {
20072007
if !is_word(p, "mod") {
20082008
let t = parse_str(p);
20092009
if str::eq(t, "cdecl") {
2010-
} else if str::eq(t, "llvm") {
2011-
abi = ast::native_abi_llvm;
20122010
} else if str::eq(t, "rust-intrinsic") {
20132011
abi = ast::native_abi_rust_intrinsic;
20142012
} else if str::eq(t, "x86stdcall") {

trunk/src/comp/syntax/print/pprust.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,6 @@ fn print_item(s: ps, &&item: @ast::item) {
401401
ast::item_native_mod(nmod) {
402402
head(s, "native");
403403
alt nmod.abi {
404-
ast::native_abi_llvm. { word_nbsp(s, "\"llvm\""); }
405404
ast::native_abi_cdecl. { word_nbsp(s, "\"cdecl\""); }
406405
ast::native_abi_rust_intrinsic. {
407406
word_nbsp(s, "\"rust-intrinsic\"");

trunk/src/lib/math.rs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,63 @@
11
/* Module: math */
22

3-
native "llvm" mod llvm {
4-
fn sqrt(n: float) -> float = "sqrt.f64";
5-
fn sin(n: float) -> float = "sin.f64";
6-
fn asin(n: float) -> float = "asin.f64";
7-
fn cos(n: float) -> float = "cos.f64";
8-
fn acos(n: float) -> float = "acos.f64";
9-
fn tan(n: float) -> float = "tan.f64";
10-
fn atan(n: float) -> float = "atan.f64";
3+
native "c-stack-cdecl" mod libc = "" {
4+
fn sqrt(n: float) -> float;
5+
fn sin(n: float) -> float;
6+
fn asin(n: float) -> float;
7+
fn cos(n: float) -> float;
8+
fn acos(n: float) -> float;
9+
fn tan(n: float) -> float;
10+
fn atan(n: float) -> float;
1111
}
1212

1313
/*
1414
Function: sqrt
1515
1616
Returns the square root
1717
*/
18-
fn sqrt(x: float) -> float { llvm::sqrt(x) }
18+
fn sqrt(x: float) -> float { libc::sqrt(x) }
1919

2020
/*
2121
Function: sin
2222
2323
Returns the sine of an angle
2424
*/
25-
fn sin(x: float) -> float { llvm::sin(x) }
25+
fn sin(x: float) -> float { libc::sin(x) }
2626

2727
/*
2828
Function: cos
2929
3030
Returns the cosine of an angle
3131
*/
32-
fn cos(x: float) -> float { llvm::cos(x) }
32+
fn cos(x: float) -> float { libc::cos(x) }
3333

3434
/*
3535
Function: tan
3636
3737
Returns the tangent of an angle
3838
*/
39-
fn tan(x: float) -> float { llvm::tan(x) }
39+
fn tan(x: float) -> float { libc::tan(x) }
4040

4141
/*
4242
Function: asin
4343
4444
Returns the arcsine of an angle
4545
*/
46-
fn asin(x: float) -> float { llvm::asin(x) }
46+
fn asin(x: float) -> float { libc::asin(x) }
4747

4848
/*
4949
Function: acos
5050
5151
Returns the arccosine of an angle
5252
*/
53-
fn acos(x: float) -> float { llvm::acos(x) }
53+
fn acos(x: float) -> float { libc::acos(x) }
5454

5555
/*
5656
Function: atan
5757
5858
Returns the arctangent of an angle
5959
*/
60-
fn atan(x: float) -> float { llvm::atan(x) }
60+
fn atan(x: float) -> float { libc::atan(x) }
6161

6262
/*
6363
Const: pi

trunk/src/test/run-pass/native-llvm.rs

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)