shithub: mc

Download patch

ref: 6734665cb2214ce148e46b719ed6ae36d266f037
parent: 099d9cb114e45459527515d955e85ef620024dbd
author: Ori Bernstein <[email protected]>
date: Wed Apr 30 22:32:24 EDT 2014

remove 'forwardcopy' predicate.

    It just checks if a <= b; just inline the check.

--- a/libstd/slcp.myr
+++ b/libstd/slcp.myr
@@ -13,7 +13,7 @@
 
 	addr_a = a castto(@a#) castto(intptr)
 	addr_b = b castto(@a#) castto(intptr)
-	if forwardcopy(addr_a, addr_b)
+	if addr_a <= addr_b
 		for i = 0; i < a.len; i++
 			a[i] = b[i]
 		;;
@@ -23,12 +23,4 @@
 		;;
 	;;
 		
-}
-
-const forwardcopy = {a, b
-	if a <= b
-		-> true
-	else
-		-> false
-	;;
 }
--- a/test/exporttrait.myr
+++ b/test/exporttrait.myr
@@ -1,3 +1,5 @@
+use std
+
 pkg =
 	trait t @a
 	impl t int