nomen-lang 0.0.12 → 0.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.mjs +8 -2
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -4916,10 +4916,13 @@ function build_declaration_node$1(node, status) {
4916
4916
  build_swap_params(func_call, status);
4917
4917
  } else {
4918
4918
  const old_buffer = status.struct_return_buffer;
4919
+ const old_preset = status.call_x8_preset;
4919
4920
  emit_var_address(status, "x8", node.name);
4920
4921
  status.struct_return_buffer = "x8";
4922
+ status.call_x8_preset = true;
4921
4923
  build_node$1(node.value, status);
4922
4924
  status.struct_return_buffer = old_buffer;
4925
+ status.call_x8_preset = old_preset;
4923
4926
  }
4924
4927
  return;
4925
4928
  }
@@ -5428,10 +5431,13 @@ function build_declaration_node$1(node, status) {
5428
5431
  build_swap_params(func_call, status);
5429
5432
  } else if (status.structs.find((s) => s.name === (func_call.type?.name ?? func_call.name) && !s.is_simple_type && !s.is_class) && status.function_return_label) {
5430
5433
  const old_buffer = status.struct_return_buffer;
5434
+ const old_preset = status.call_x8_preset;
5431
5435
  emit_var_address(status, "x8", node.name);
5432
5436
  status.struct_return_buffer = "x8";
5437
+ status.call_x8_preset = true;
5433
5438
  build_node$1(node.value, status);
5434
5439
  status.struct_return_buffer = old_buffer;
5440
+ status.call_x8_preset = old_preset;
5435
5441
  emit_var_address(status, "x0", node.name);
5436
5442
  } else {
5437
5443
  build_node$1(node.value, status);
@@ -6560,7 +6566,7 @@ function build_function_call_node$1(node, status) {
6560
6566
  const temp_addr = `_temp_${temp_counter - 1}`;
6561
6567
  const temp_offset = status.stack_offsets.get(temp_addr);
6562
6568
  status.code += `add x0, x29, #${temp_offset}\n`;
6563
- } else if (!is_struct && node.type?.name && !status.struct_return_buffer) {
6569
+ } else if (!is_struct && node.type?.name && !status.call_x8_preset) {
6564
6570
  if (status.structs.find((s) => s.name === node.type.name && !s.is_simple_type && !s.is_class)) {
6565
6571
  const nullable_ret = is_nullable_struct_type$1(node.type, status);
6566
6572
  const struct_size = get_struct_size(node.type.name, status);
@@ -6604,7 +6610,7 @@ function build_function_call_node$1(node, status) {
6604
6610
  }
6605
6611
  status.code += `ldr x0, [sp], #16\n`;
6606
6612
  }
6607
- if (!is_struct && node.type?.name && !status.struct_return_buffer) {
6613
+ if (!is_struct && node.type?.name && !status.call_x8_preset) {
6608
6614
  if (status.structs.find((s) => s.name === node.type.name && !s.is_simple_type && !s.is_class)) {
6609
6615
  const temp_name = `_call_ret_${temp_counter - 1}`;
6610
6616
  const offset = status.stack_offsets.get(temp_name);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nomen-lang",
3
- "version": "0.0.12",
3
+ "version": "0.0.13",
4
4
  "description": "The CLI for the Nomen programming language.",
5
5
  "keywords": [],
6
6
  "license": "ISC",