mirror of
https://github.com/roc-lang/roc.git
synced 2025-07-24 06:55:15 +00:00
switch dbg arg ordering to make it backwards compatible
This commit is contained in:
parent
6c60da2832
commit
787d7f85ac
50 changed files with 54 additions and 53 deletions
|
@ -919,9 +919,10 @@ impl<'a, 'ctx, 'env> Env<'a, 'ctx, 'env> {
|
|||
let src = self.string_to_arg(env, source);
|
||||
let msg = self.string_to_arg(env, message);
|
||||
|
||||
// TODO: at some point it will be a breaking change, but flip order to (loc, src, msg)
|
||||
let call =
|
||||
self.builder
|
||||
.new_build_call(function, &[loc.into(), src.into(), msg.into()], "roc_dbg");
|
||||
.new_build_call(function, &[loc.into(), msg.into(), src.into()], "roc_dbg");
|
||||
|
||||
call.set_call_convention(C_CALL_CONV);
|
||||
}
|
||||
|
|
|
@ -167,8 +167,8 @@ pub fn add_default_roc_externs(env: &Env<'_, '_, '_>) {
|
|||
let fn_val = module.get_function("roc_dbg").unwrap();
|
||||
let mut params = fn_val.get_param_iter();
|
||||
let loc_arg = params.next().unwrap();
|
||||
let src_arg = params.next().unwrap();
|
||||
let msg_arg = params.next().unwrap();
|
||||
let src_arg = params.next().unwrap();
|
||||
|
||||
debug_assert!(params.next().is_none());
|
||||
|
||||
|
@ -181,7 +181,7 @@ pub fn add_default_roc_externs(env: &Env<'_, '_, '_>) {
|
|||
let dbg_impl = module.get_function(bitcode::UTILS_DBG_IMPL).unwrap();
|
||||
let call = builder.new_build_call(
|
||||
dbg_impl,
|
||||
&[loc_arg.into(), src_arg.into(), msg_arg.into()],
|
||||
&[loc_arg.into(), msg_arg.into(), src_arg.into()],
|
||||
"call_utils_dbg_impl",
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue