# HG changeset patch # User Mike Pavone # Date 1304300477 25200 # Node ID d2b941f82d74b24c404dbf14252e1a3dcf37d62e # Parent 690ed78ead8a840f8dd9ac4b18ce479415d03aaa Fix type of list constants in inference pass and return type of some Array related workers diff -r 690ed78ead8a -r d2b941f82d74 array.rhope --- 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]] {} { diff -r 690ed78ead8a -r d2b941f82d74 nworker_c.rhope --- 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" } diff -r 690ed78ead8a -r d2b941f82d74 runtime/func.h --- 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)\