|
@@ -170,7 +170,7 @@ let gen_constant ctx pe c =
|
|
if (h land 128 = 0) <> (h land 64 = 0) then raise Exit;
|
|
if (h land 128 = 0) <> (h land 64 = 0) then raise Exit;
|
|
int p (Int32.to_int i)
|
|
int p (Int32.to_int i)
|
|
with _ ->
|
|
with _ ->
|
|
- if ctx.version < 2 then abort "This integer is too big to be compiled to a Neko 31-bit integer. Please use a Float instead" pe;
|
|
|
|
|
|
+ if ctx.version < 2 then Error.abort "This integer is too big to be compiled to a Neko 31-bit integer. Please use a Float instead" pe;
|
|
(EConst (Int32 i),p))
|
|
(EConst (Int32 i),p))
|
|
| TFloat f -> (EConst (Float (Texpr.replace_separators f "")),p)
|
|
| TFloat f -> (EConst (Float (Texpr.replace_separators f "")),p)
|
|
| TString s -> call p (field p (ident p "String") "new") [gen_big_string ctx p s]
|
|
| TString s -> call p (field p (ident p "String") "new") [gen_big_string ctx p s]
|
|
@@ -237,7 +237,7 @@ and gen_expr ctx e =
|
|
(match follow e.etype with
|
|
(match follow e.etype with
|
|
| TFun (args,_) ->
|
|
| TFun (args,_) ->
|
|
let n = List.length args in
|
|
let n = List.length args in
|
|
- if n > 5 then abort "Cannot create closure with more than 5 arguments" e.epos;
|
|
|
|
|
|
+ if n > 5 then Error.abort "Cannot create closure with more than 5 arguments" e.epos;
|
|
let tmp = ident p "@tmp" in
|
|
let tmp = ident p "@tmp" in
|
|
EBlock [
|
|
EBlock [
|
|
(EVars ["@tmp", Some (gen_expr ctx e2); "@fun", Some (field p tmp f.cf_name)] , p);
|
|
(EVars ["@tmp", Some (gen_expr ctx e2); "@fun", Some (field p tmp f.cf_name)] , p);
|
|
@@ -798,7 +798,7 @@ let generate com =
|
|
else
|
|
else
|
|
loop (p + 1)
|
|
loop (p + 1)
|
|
in
|
|
in
|
|
- abort msg (loop 0)
|
|
|
|
|
|
+ Error.abort msg (loop 0)
|
|
end;
|
|
end;
|
|
let command cmd args = try com.run_command_args cmd args with _ -> -1 in
|
|
let command cmd args = try com.run_command_args cmd args with _ -> -1 in
|
|
let neko_file = (try Filename.chop_extension com.file with _ -> com.file) ^ ".neko" in
|
|
let neko_file = (try Filename.chop_extension com.file with _ -> com.file) ^ ".neko" in
|