changeset 168:d2b941f82d74

Fix type of list constants in inference pass and return type of some Array related workers
author Mike Pavone <pavone@retrodev.com>
date Sun, 01 May 2011 18:41:17 -0700
parents 690ed78ead8a
children fd06fb07762a
files array.rhope nworker_c.rhope runtime/func.h
diffstat 3 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/array.rhope	Mon Apr 04 01:41:19 2011 -0400
+++ b/array.rhope	Sun May 01 18:41:17 2011 -0700
@@ -25,7 +25,7 @@
 	_internal_array_setboxed[array(Boxed Array,Boxed,Mutable), index(Int32,Naked), val:array]
 	_internal_array_allocboxed[size(Int32,Naked):out(Boxed Array)]
 	_internal_array_allocboxedcopy[source(Boxed Array),size(Int32,Naked):out(Boxed Array)]
-	_internal_array_allocnaked[size(Int32,Naked),type(Blueprint):out(Array)]
+	_internal_array_allocnaked[size(Int32,Naked),type(Blueprint):out]
 	_internal_array_allocnakedcopy[source(Array),size(Int32,Naked):out(Array)]
 }
 
@@ -91,7 +91,7 @@
 	{ out <-  [[array]Length >>] - [1] }
 }
 
-Append@Empty Array[array,newval:out(Array)]
+Append@Empty Array[array,newval:out]
 {
 	out <- [array]Set[0, newval]
 }
@@ -214,7 +214,7 @@
 	}
 }
 
-Set@Empty Array[array,index(Int32),val:out(Array),invalid]
+Set@Empty Array[array,index(Int32),val:out,invalid]
 {
 	invalid <- If[[index]<[0]] {}
 	{
--- a/nworker_c.rhope	Mon Apr 04 01:41:19 2011 -0400
+++ b/nworker_c.rhope	Sun May 01 18:41:17 2011 -0700
@@ -403,7 +403,7 @@
 			Type Instance(),Worker Literal(),List(),List Leaf(),String(),String Slice(),String Cat())]Find[=[const type, ?]]
 		{
 			outtype <- [("Int8","UInt8","Int16","UInt16","Int32","UInt32","Int64","UInt64",
-			"Blueprint","Worker","List","List","String","String","String")]Index[~]
+			"Blueprint","Worker","List","List Leaf","String","String","String")]Index[~]
 		}{
 			outtype <- "Any Type"
 		}
--- a/runtime/func.h	Mon Apr 04 01:41:19 2011 -0400
+++ b/runtime/func.h	Sun May 01 18:41:17 2011 -0700
@@ -137,8 +137,8 @@
 		}\
 		if(get_blueprint(cdata->params[0])->type_id != mytype_id)\
 		{\
-			puts("uh oh, need conversion and that's not implemented yet!");\
-			exit(1);\
+			printf("uh oh, need conversion from type %d to %s(%d) for %s and that's not implemented yet!\n", get_blueprint(cdata->params[0])->type_id, #type_name, mytype_id, #name);\
+			goto _exception;\
 		}\
 m_ ## name ## AT_ ## type_name:\
 		for(idx = numparams; idx < cdata->num_params; ++idx)\