@specy/risc-v 0.1.0 → 0.1.2

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 (3) hide show
  1. package/dist/index.js +650 -644
  2. package/dist/index.mjs +650 -644
  3. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -2905,11 +2905,10 @@ var asr_JsRiscV_terminated$exported$11 = (var$1) => {
2905
2905
  return !!(var$1.$main.$stopReason !== asrs_Simulator$Reason_CLIFF_TERMINATION ? 0 : 1);
2906
2906
  };
2907
2907
  var asr_JsRiscV_initialize$exported$12 = (var$1, var$2) => {
2908
- let var$3, $$je;
2908
+ let $$je;
2909
2909
  asr_JsRiscV_$callClinit();
2910
2910
  var$2 ? 1 : 0;
2911
2911
  var$1;
2912
- var$3 = asrrh_RegisterFile_getProgramCounter();
2913
2912
  asrrh_RegisterFile_resetRegisters();
2914
2913
  asrrh_RegisterBlock_resetRegisters(asrrh_FloatingPointRegisterFile_instance);
2915
2914
  asrrh_RegisterBlock_resetRegisters(asrrh_ControlAndStatusRegisterFile_instance);
@@ -2929,7 +2928,7 @@ var asr_JsRiscV_initialize$exported$12 = (var$1, var$2) => {
2929
2928
  jl_Object_monitorExitSync(var$1);
2930
2929
  $rt_throw(var$2);
2931
2930
  }
2932
- asrrh_RegisterFile_initializeProgramCounter(var$3);
2931
+ asrrh_RegisterFile_initializeProgramCounter0(1);
2933
2932
  asr_Globals_$callClinit();
2934
2933
  asr_Globals_exitCode = 0;
2935
2934
  ju_ArrayList_clear(asrrh_Stack_callStack);
@@ -3311,8 +3310,8 @@ var asr_JsRiscV__clinit_ = () => {
3311
3310
  jnc_CoderResult__clinit_();
3312
3311
  jn_ByteOrder__clinit_();
3313
3312
  asrjt_Float32__clinit_();
3314
- asrjt_Float64__clinit_();
3315
3313
  jm_BigInteger__clinit_();
3314
+ asrjt_Float64__clinit_();
3316
3315
  asrjo_Arithmetic__clinit_();
3317
3316
  asrj_RoundingMode__clinit_();
3318
3317
  asrj_Flags__clinit_();
@@ -7027,83 +7026,6 @@ var jl_System_currentTimeMillis = () => {
7027
7026
  return Long_fromNumber((/* @__PURE__ */ new Date()).getTime());
7028
7027
  };
7029
7028
  var jl_CloneNotSupportedException = $rt_classWithoutFields(jl_Exception);
7030
- function asr_JsProgramStatement() {
7031
- let a = this;
7032
- jl_Object.call(a);
7033
- a.$sourceLine1 = 0;
7034
- a.$address2 = 0;
7035
- a.$binaryStatement0 = 0;
7036
- a.$source3 = null;
7037
- a.$assemblyStatement = null;
7038
- a.$machineStatement0 = null;
7039
- }
7040
- var asr_JsProgramStatement__init_0 = ($this, var$1) => {
7041
- let var$2, var$3, var$4, var$5, var$6;
7042
- $this.$sourceLine1 = var$1.$sourceLine0;
7043
- $this.$address2 = var$1.$textAddress0;
7044
- $this.$binaryStatement0 = var$1.$binaryStatement;
7045
- $this.$source3 = var$1.$source;
7046
- var$2 = var$1.$basicStatementList;
7047
- var$3 = !asr_Settings_getBooleanSetting(asr_Globals_getSettings(), asr_Settings$Bool_DISPLAY_ADDRESSES_IN_HEX) ? 10 : 16;
7048
- var$4 = !asr_Settings_getBooleanSetting(asr_Globals_getSettings(), asr_Settings$Bool_DISPLAY_ADDRESSES_IN_HEX) ? 10 : 16;
7049
- var$5 = new jl_StringBuffer();
7050
- jl_AbstractStringBuilder__init_(var$5);
7051
- var$6 = ju_AbstractList_iterator(var$2.$list);
7052
- while (ju_AbstractList$1_hasNext(var$6)) {
7053
- a: {
7054
- var$2 = ju_AbstractList$1_next(var$6);
7055
- switch (var$2.$type3) {
7056
- case 0:
7057
- break;
7058
- case 1:
7059
- if (var$3 == 10) {
7060
- jl_AbstractStringBuilder_append(var$5, var$2.$iValue);
7061
- break a;
7062
- }
7063
- jl_AbstractStringBuilder_append1(var$5, asru_Binary_intToHexString(var$2.$iValue));
7064
- break a;
7065
- case 2:
7066
- if (var$4 == 10) {
7067
- jl_AbstractStringBuilder_append(var$5, var$2.$iValue);
7068
- break a;
7069
- }
7070
- jl_AbstractStringBuilder_append1(var$5, asru_Binary_intToHexString(var$2.$iValue));
7071
- break a;
7072
- case 3:
7073
- jl_AbstractStringBuilder_append(var$5, var$2.$iValue);
7074
- break a;
7075
- default:
7076
- break a;
7077
- }
7078
- jl_AbstractStringBuilder_append1(var$5, var$2.$sValue);
7079
- }
7080
- }
7081
- $this.$assemblyStatement = jl_AbstractStringBuilder_toString(var$5);
7082
- $this.$machineStatement0 = var$1.$machineStatement;
7083
- };
7084
- var asr_JsProgramStatement__init_ = (var_0) => {
7085
- let var_1 = new asr_JsProgramStatement();
7086
- asr_JsProgramStatement__init_0(var_1, var_0);
7087
- return var_1;
7088
- };
7089
- var asr_JsProgramStatement_getSourceLine$exported$0 = (var$1) => {
7090
- return var$1.$sourceLine1;
7091
- };
7092
- var asr_JsProgramStatement_getAssemblyStatement$exported$1 = (var$1) => {
7093
- return $rt_ustr(var$1.$assemblyStatement);
7094
- };
7095
- var asr_JsProgramStatement_getSource$exported$2 = (var$1) => {
7096
- return $rt_ustr(var$1.$source3);
7097
- };
7098
- var asr_JsProgramStatement_getAddress$exported$3 = (var$1) => {
7099
- return var$1.$address2;
7100
- };
7101
- var asr_JsProgramStatement_getBinaryStatement$exported$4 = (var$1) => {
7102
- return var$1.$binaryStatement0;
7103
- };
7104
- var asr_JsProgramStatement_getMachineStatement$exported$5 = (var$1) => {
7105
- return $rt_ustr(var$1.$machineStatement0);
7106
- };
7107
7029
  var asrrh_RegisterFile = $rt_classWithoutFields();
7108
7030
  var asrrh_RegisterFile_instance = null;
7109
7031
  var asrrh_RegisterFile_programCounter = null;
@@ -7111,16 +7033,16 @@ var asrrh_RegisterFile_$callClinit = () => {
7111
7033
  asrrh_RegisterFile_$callClinit = $rt_eraseClinit(asrrh_RegisterFile);
7112
7034
  asrrh_RegisterFile__clinit_();
7113
7035
  };
7114
- var asrrh_RegisterFile_updateRegister = ($num, $val) => {
7036
+ var asrrh_RegisterFile_updateRegister = (var$1, var$2) => {
7115
7037
  let var$3;
7116
7038
  asrrh_RegisterFile_$callClinit();
7117
- if ($num) {
7039
+ if (var$1) {
7118
7040
  if (!asr_Settings_getBackSteppingEnabled(asr_Globals_getSettings()))
7119
- asrrh_RegisterBlock_updateRegister(asrrh_RegisterFile_instance, $num, $val);
7041
+ asrrh_RegisterBlock_updateRegister(asrrh_RegisterFile_instance, var$1, var$2);
7120
7042
  else {
7121
7043
  var$3 = asr_Globals_program.$backStepper;
7122
- $val = asrrh_RegisterBlock_updateRegister(asrrh_RegisterFile_instance, $num, $val);
7123
- asrs_BackStepper$BackstepStack_push(var$3.$backSteps, asrs_BackStepper$Action_REGISTER_RESTORE, asrs_BackStepper_pc(var$3), $num, $val);
7044
+ var$2 = asrrh_RegisterBlock_updateRegister(asrrh_RegisterFile_instance, var$1, var$2);
7045
+ asrs_BackStepper$BackstepStack_push(var$3.$backSteps, asrs_BackStepper$Action_REGISTER_RESTORE, asrs_BackStepper_pc(var$3), var$1, var$2);
7124
7046
  }
7125
7047
  }
7126
7048
  };
@@ -7150,6 +7072,16 @@ var asrrh_RegisterFile_initializeProgramCounter = ($value) => {
7150
7072
  asrrh_RegisterFile_$callClinit();
7151
7073
  asrrh_Register_setValue(asrrh_RegisterFile_programCounter, Long_fromInt($value));
7152
7074
  };
7075
+ var asrrh_RegisterFile_initializeProgramCounter0 = ($startAtMain) => {
7076
+ let $mainAddr;
7077
+ asrrh_RegisterFile_$callClinit();
7078
+ asr_Globals_$callClinit();
7079
+ $mainAddr = asra_SymbolTable_getAddress(asr_Globals_symbolTable, asra_SymbolTable_startLabel);
7080
+ if ($startAtMain && $mainAddr != -1 && asrrh_Memory_inTextSegment($mainAddr))
7081
+ asrrh_RegisterFile_initializeProgramCounter($mainAddr);
7082
+ else
7083
+ asrrh_RegisterFile_initializeProgramCounter(Long_lo(asrrh_RegisterFile_programCounter.$resetValue0));
7084
+ };
7153
7085
  var asrrh_RegisterFile_setProgramCounter = ($value) => {
7154
7086
  let $old, var$3;
7155
7087
  asrrh_RegisterFile_$callClinit();
@@ -7167,15 +7099,9 @@ var asrrh_RegisterFile_getProgramCounter = () => {
7167
7099
  return Long_lo(asrrh_Register_getValue(asrrh_RegisterFile_programCounter));
7168
7100
  };
7169
7101
  var asrrh_RegisterFile_resetRegisters = () => {
7170
- let var$1, var$2;
7171
7102
  asrrh_RegisterFile_$callClinit();
7172
7103
  asrrh_RegisterBlock_resetRegisters(asrrh_RegisterFile_instance);
7173
- var$1 = asr_Settings_getBooleanSetting(asr_Globals_getSettings(), asr_Settings$Bool_START_AT_MAIN);
7174
- var$2 = asra_SymbolTable_getAddress(asr_Globals_symbolTable, asra_SymbolTable_startLabel);
7175
- if (var$1 && var$2 != -1 && asrrh_Memory_inTextSegment(var$2))
7176
- asrrh_RegisterFile_initializeProgramCounter(var$2);
7177
- else
7178
- asrrh_RegisterFile_initializeProgramCounter(Long_lo(asrrh_RegisterFile_programCounter.$resetValue0));
7104
+ asrrh_RegisterFile_initializeProgramCounter0(asr_Settings_getBooleanSetting(asr_Globals_getSettings(), asr_Settings$Bool_START_AT_MAIN));
7179
7105
  };
7180
7106
  var asrrh_RegisterFile_incrementPC = () => {
7181
7107
  let var$1;
@@ -7227,29 +7153,82 @@ var asrrh_RegisterFile__clinit_ = () => {
7227
7153
  asrrh_RegisterFile_instance = var$1;
7228
7154
  asrrh_RegisterFile_programCounter = asrrh_Register__init_($rt_s(242), -1, Long_fromInt(asrrh_Memory_textBaseAddress));
7229
7155
  };
7230
- function asr_JsStackFrame() {
7156
+ function asr_JsProgramStatement() {
7231
7157
  let a = this;
7232
7158
  jl_Object.call(a);
7233
- a.$pc3 = 0;
7234
- a.$toAddress = 0;
7235
- a.$sp = 0;
7236
- a.$fp = 0;
7237
- a.$registers = null;
7159
+ a.$sourceLine1 = 0;
7160
+ a.$address2 = 0;
7161
+ a.$binaryStatement0 = 0;
7162
+ a.$source3 = null;
7163
+ a.$assemblyStatement = null;
7164
+ a.$machineStatement0 = null;
7238
7165
  }
7239
- var asr_JsStackFrame_getPc$exported$0 = (var$1) => {
7240
- return var$1.$pc3;
7166
+ var asr_JsProgramStatement__init_0 = ($this, $programStatement) => {
7167
+ let var$2, var$3, var$4, var$5, var$6;
7168
+ $this.$sourceLine1 = $programStatement.$sourceLine0;
7169
+ $this.$address2 = $programStatement.$textAddress0;
7170
+ $this.$binaryStatement0 = $programStatement.$binaryStatement;
7171
+ $this.$source3 = $programStatement.$source;
7172
+ var$2 = $programStatement.$basicStatementList;
7173
+ var$3 = !asr_Settings_getBooleanSetting(asr_Globals_getSettings(), asr_Settings$Bool_DISPLAY_ADDRESSES_IN_HEX) ? 10 : 16;
7174
+ var$4 = !asr_Settings_getBooleanSetting(asr_Globals_getSettings(), asr_Settings$Bool_DISPLAY_ADDRESSES_IN_HEX) ? 10 : 16;
7175
+ var$5 = new jl_StringBuffer();
7176
+ jl_AbstractStringBuilder__init_(var$5);
7177
+ var$6 = ju_AbstractList_iterator(var$2.$list);
7178
+ while (ju_AbstractList$1_hasNext(var$6)) {
7179
+ a: {
7180
+ var$2 = ju_AbstractList$1_next(var$6);
7181
+ switch (var$2.$type3) {
7182
+ case 0:
7183
+ break;
7184
+ case 1:
7185
+ if (var$3 == 10) {
7186
+ jl_AbstractStringBuilder_append(var$5, var$2.$iValue);
7187
+ break a;
7188
+ }
7189
+ jl_AbstractStringBuilder_append1(var$5, asru_Binary_intToHexString(var$2.$iValue));
7190
+ break a;
7191
+ case 2:
7192
+ if (var$4 == 10) {
7193
+ jl_AbstractStringBuilder_append(var$5, var$2.$iValue);
7194
+ break a;
7195
+ }
7196
+ jl_AbstractStringBuilder_append1(var$5, asru_Binary_intToHexString(var$2.$iValue));
7197
+ break a;
7198
+ case 3:
7199
+ jl_AbstractStringBuilder_append(var$5, var$2.$iValue);
7200
+ break a;
7201
+ default:
7202
+ break a;
7203
+ }
7204
+ jl_AbstractStringBuilder_append1(var$5, var$2.$sValue);
7205
+ }
7206
+ }
7207
+ $this.$assemblyStatement = jl_AbstractStringBuilder_toString(var$5);
7208
+ $this.$machineStatement0 = $programStatement.$machineStatement;
7241
7209
  };
7242
- var asr_JsStackFrame_getToAddress$exported$1 = (var$1) => {
7243
- return var$1.$toAddress;
7210
+ var asr_JsProgramStatement__init_ = (var_0) => {
7211
+ let var_1 = new asr_JsProgramStatement();
7212
+ asr_JsProgramStatement__init_0(var_1, var_0);
7213
+ return var_1;
7244
7214
  };
7245
- var asr_JsStackFrame_getRegisters$exported$2 = (var$1) => {
7246
- return otji_JS_wrap0(var$1.$registers);
7215
+ var asr_JsProgramStatement_getSourceLine$exported$0 = (var$1) => {
7216
+ return var$1.$sourceLine1;
7247
7217
  };
7248
- var asr_JsStackFrame_getSp$exported$3 = (var$1) => {
7249
- return var$1.$sp;
7218
+ var asr_JsProgramStatement_getAssemblyStatement$exported$1 = (var$1) => {
7219
+ return $rt_ustr(var$1.$assemblyStatement);
7250
7220
  };
7251
- var asr_JsStackFrame_getFp$exported$4 = (var$1) => {
7252
- return var$1.$fp;
7221
+ var asr_JsProgramStatement_getSource$exported$2 = (var$1) => {
7222
+ return $rt_ustr(var$1.$source3);
7223
+ };
7224
+ var asr_JsProgramStatement_getAddress$exported$3 = (var$1) => {
7225
+ return var$1.$address2;
7226
+ };
7227
+ var asr_JsProgramStatement_getBinaryStatement$exported$4 = (var$1) => {
7228
+ return var$1.$binaryStatement0;
7229
+ };
7230
+ var asr_JsProgramStatement_getMachineStatement$exported$5 = (var$1) => {
7231
+ return $rt_ustr(var$1.$machineStatement0);
7253
7232
  };
7254
7233
  var asr_JsRiscV$getTokenizedLines$lambda$_5_0 = $rt_classWithoutFields();
7255
7234
  var asr_JsRiscV$getTokenizedLines$lambda$_5_0_apply = (var$0, var$1) => {
@@ -7478,6 +7457,43 @@ var ju_Arrays_stream = ($array) => {
7478
7457
  };
7479
7458
  var juf_ToIntFunction = $rt_classWithoutFields(0);
7480
7459
  var asr_JsRiscV$getRegistersValues$lambda$_20_0 = $rt_classWithoutFields();
7460
+ var asr_JsRiscV$getUndoStack$lambda$_21_0 = $rt_classWithoutFields();
7461
+ var asr_JsRiscV$getUndoStack$lambda$_21_0_apply = (var$0, var$1) => {
7462
+ let var$2, var$3;
7463
+ var$1 = var$1;
7464
+ var$2 = new asr_JsBackStep();
7465
+ var$3 = var$1.$action;
7466
+ var$2.$action0 = var$3 === null ? -1 : var$3.$ordinal0;
7467
+ var$2.$pc2 = var$1.$pc1;
7468
+ var$2.$param10 = var$1.$param1;
7469
+ var$2.$param20 = Long_lo(var$1.$param2);
7470
+ return var$2;
7471
+ };
7472
+ var asr_JsRiscV$getUndoStack$lambda$_21_1 = $rt_classWithoutFields();
7473
+ var asr_JsRiscV$getUndoStack$lambda$_21_1_apply = (var$0, var$1) => {
7474
+ asr_JsRiscV_$callClinit();
7475
+ return $rt_createArray(asr_JsBackStep, var$1);
7476
+ };
7477
+ function asr_JsBackStep() {
7478
+ let a = this;
7479
+ jl_Object.call(a);
7480
+ a.$action0 = 0;
7481
+ a.$pc2 = 0;
7482
+ a.$param10 = 0;
7483
+ a.$param20 = 0;
7484
+ }
7485
+ var asr_JsBackStep_getPc$exported$0 = (var$1) => {
7486
+ return var$1.$pc2;
7487
+ };
7488
+ var asr_JsBackStep_getParam2$exported$1 = (var$1) => {
7489
+ return var$1.$param20;
7490
+ };
7491
+ var asr_JsBackStep_getAction$exported$2 = (var$1) => {
7492
+ return var$1.$action0;
7493
+ };
7494
+ var asr_JsBackStep_getParam1$exported$3 = (var$1) => {
7495
+ return var$1.$param10;
7496
+ };
7481
7497
  function asr_JsCompilationResult() {
7482
7498
  let a = this;
7483
7499
  jl_Object.call(a);
@@ -7540,42 +7556,29 @@ var asr_AssemblyException__init_ = (var_0) => {
7540
7556
  asr_AssemblyException__init_0(var_1, var_0);
7541
7557
  return var_1;
7542
7558
  };
7543
- var asr_JsRiscV$getUndoStack$lambda$_21_0 = $rt_classWithoutFields();
7544
- var asr_JsRiscV$getUndoStack$lambda$_21_0_apply = (var$0, var$1) => {
7545
- let var$2, var$3;
7546
- var$1 = var$1;
7547
- var$2 = new asr_JsBackStep();
7548
- var$3 = var$1.$action;
7549
- var$2.$action0 = var$3 === null ? -1 : var$3.$ordinal0;
7550
- var$2.$pc2 = var$1.$pc1;
7551
- var$2.$param10 = var$1.$param1;
7552
- var$2.$param20 = Long_lo(var$1.$param2);
7553
- return var$2;
7554
- };
7555
- var asr_JsRiscV$getUndoStack$lambda$_21_1 = $rt_classWithoutFields();
7556
- var asr_JsRiscV$getUndoStack$lambda$_21_1_apply = (var$0, var$1) => {
7557
- asr_JsRiscV_$callClinit();
7558
- return $rt_createArray(asr_JsBackStep, var$1);
7559
- };
7560
- function asr_JsBackStep() {
7559
+ function asr_JsStackFrame() {
7561
7560
  let a = this;
7562
7561
  jl_Object.call(a);
7563
- a.$action0 = 0;
7564
- a.$pc2 = 0;
7565
- a.$param10 = 0;
7566
- a.$param20 = 0;
7562
+ a.$pc3 = 0;
7563
+ a.$toAddress = 0;
7564
+ a.$sp = 0;
7565
+ a.$fp = 0;
7566
+ a.$registers = null;
7567
7567
  }
7568
- var asr_JsBackStep_getPc$exported$0 = (var$1) => {
7569
- return var$1.$pc2;
7568
+ var asr_JsStackFrame_getPc$exported$0 = (var$1) => {
7569
+ return var$1.$pc3;
7570
7570
  };
7571
- var asr_JsBackStep_getParam2$exported$1 = (var$1) => {
7572
- return var$1.$param20;
7571
+ var asr_JsStackFrame_getToAddress$exported$1 = (var$1) => {
7572
+ return var$1.$toAddress;
7573
7573
  };
7574
- var asr_JsBackStep_getAction$exported$2 = (var$1) => {
7575
- return var$1.$action0;
7574
+ var asr_JsStackFrame_getRegisters$exported$2 = (var$1) => {
7575
+ return otji_JS_wrap0(var$1.$registers);
7576
7576
  };
7577
- var asr_JsBackStep_getParam1$exported$3 = (var$1) => {
7578
- return var$1.$param10;
7577
+ var asr_JsStackFrame_getSp$exported$3 = (var$1) => {
7578
+ return var$1.$sp;
7579
+ };
7580
+ var asr_JsStackFrame_getFp$exported$4 = (var$1) => {
7581
+ return var$1.$fp;
7579
7582
  };
7580
7583
  var ju_Map$Entry = $rt_classWithoutFields(0);
7581
7584
  function ju_MapEntry() {
@@ -8121,23 +8124,6 @@ var asr_RISCVFile_getName = ($this) => {
8121
8124
  return $this.$name2;
8122
8125
  };
8123
8126
  var jl_StringIndexOutOfBoundsException = $rt_classWithoutFields(jl_IndexOutOfBoundsException);
8124
- function asrs_BackStepper() {
8125
- let a = this;
8126
- jl_Object.call(a);
8127
- a.$engaged = 0;
8128
- a.$backSteps = null;
8129
- }
8130
- var asrs_BackStepper_pc = ($this) => {
8131
- return asrrh_RegisterFile_getProgramCounter() - 4 | 0;
8132
- };
8133
- var asrs_BackStepper_addFloatingPointRestore = ($this, $register, $value) => {
8134
- asrs_BackStepper$BackstepStack_push($this.$backSteps, asrs_BackStepper$Action_FLOATING_POINT_REGISTER_RESTORE, asrs_BackStepper_pc($this), $register, $value);
8135
- return $value;
8136
- };
8137
- var asrs_BackStepper_addDoNothing = ($this, $pc) => {
8138
- if (!(!asrs_BackStepper$BackstepStack_empty($this.$backSteps) && asrs_BackStepper$BackstepStack_peek($this.$backSteps).$pc1 == $pc))
8139
- asrs_BackStepper$BackstepStack_push1($this.$backSteps, asrs_BackStepper$Action_DO_NOTHING, $pc);
8140
- };
8141
8127
  function asrrh_Register() {
8142
8128
  let a = this;
8143
8129
  ju_Observable.call(a);
@@ -8232,6 +8218,23 @@ var asrrh_Register_notifyAnyObservers = ($this, $type) => {
8232
8218
  ju_Observable_notifyObservers(var$2, var$3);
8233
8219
  }
8234
8220
  };
8221
+ function asrs_BackStepper() {
8222
+ let a = this;
8223
+ jl_Object.call(a);
8224
+ a.$engaged = 0;
8225
+ a.$backSteps = null;
8226
+ }
8227
+ var asrs_BackStepper_pc = ($this) => {
8228
+ return asrrh_RegisterFile_getProgramCounter() - 4 | 0;
8229
+ };
8230
+ var asrs_BackStepper_addFloatingPointRestore = ($this, $register, $value) => {
8231
+ asrs_BackStepper$BackstepStack_push($this.$backSteps, asrs_BackStepper$Action_FLOATING_POINT_REGISTER_RESTORE, asrs_BackStepper_pc($this), $register, $value);
8232
+ return $value;
8233
+ };
8234
+ var asrs_BackStepper_addDoNothing = ($this, $pc) => {
8235
+ if (!(!asrs_BackStepper$BackstepStack_empty($this.$backSteps) && asrs_BackStepper$BackstepStack_peek($this.$backSteps).$pc1 == $pc))
8236
+ asrs_BackStepper$BackstepStack_push1($this.$backSteps, asrs_BackStepper$Action_DO_NOTHING, $pc);
8237
+ };
8235
8238
  var jl_AutoCloseable = $rt_classWithoutFields(0);
8236
8239
  var jus_BaseStream = $rt_classWithoutFields(0);
8237
8240
  var jus_Stream = $rt_classWithoutFields(0);
@@ -8330,29 +8333,6 @@ var jusi_ArrayStreamImpl_next = ($this, $consumer) => {
8330
8333
  var jusi_ArrayStreamImpl_estimateSize = ($this) => {
8331
8334
  return $this.$size2;
8332
8335
  };
8333
- function asr_JsCompilationResult$_init_$lambda$_0_0() {
8334
- jl_Object.call(this);
8335
- this.$_06 = null;
8336
- }
8337
- var asr_JsCompilationResult$_init_$lambda$_0_0_apply = (var$0, var$1) => {
8338
- let var$2, var$3;
8339
- var$1 = var$1;
8340
- var$2 = var$0.$_06;
8341
- var$3 = new asr_JsCompilationResult$JsCompilationError();
8342
- var$3.$this$016 = var$2;
8343
- var$3.$isWarning0 = var$1.$isWarning;
8344
- var$3.$message2 = var$1.$message0;
8345
- var$3.$macroExpansionHistory0 = asr_ErrorMessage_getMacroExpansionHistory(var$1);
8346
- var$3.$filename2 = var$1.$filename0;
8347
- var$3.$lineNumber0 = var$1.$line;
8348
- var$3.$columnNumber = var$1.$position2;
8349
- return var$3;
8350
- };
8351
- var juf_Supplier = $rt_classWithoutFields(0);
8352
- var asr_JsCompilationResult$_init_$lambda$_0_1 = $rt_classWithoutFields();
8353
- var juf_BiConsumer = $rt_classWithoutFields(0);
8354
- var asr_JsCompilationResult$_init_$lambda$_0_2 = $rt_classWithoutFields();
8355
- var asr_JsCompilationResult$_init_$lambda$_0_3 = $rt_classWithoutFields();
8356
8336
  function asrs_BackStepper$BackstepStack() {
8357
8337
  let a = this;
8358
8338
  jl_Object.call(a);
@@ -8455,6 +8435,29 @@ var asrs_BackStepper$BackstepStack_peek = ($this) => {
8455
8435
  jl_Object_monitorExitSync($this);
8456
8436
  }
8457
8437
  };
8438
+ function asr_JsCompilationResult$_init_$lambda$_0_0() {
8439
+ jl_Object.call(this);
8440
+ this.$_06 = null;
8441
+ }
8442
+ var asr_JsCompilationResult$_init_$lambda$_0_0_apply = (var$0, var$1) => {
8443
+ let var$2, var$3;
8444
+ var$1 = var$1;
8445
+ var$2 = var$0.$_06;
8446
+ var$3 = new asr_JsCompilationResult$JsCompilationError();
8447
+ var$3.$this$016 = var$2;
8448
+ var$3.$isWarning0 = var$1.$isWarning;
8449
+ var$3.$message2 = var$1.$message0;
8450
+ var$3.$macroExpansionHistory0 = asr_ErrorMessage_getMacroExpansionHistory(var$1);
8451
+ var$3.$filename2 = var$1.$filename0;
8452
+ var$3.$lineNumber0 = var$1.$line;
8453
+ var$3.$columnNumber = var$1.$position2;
8454
+ return var$3;
8455
+ };
8456
+ var juf_Supplier = $rt_classWithoutFields(0);
8457
+ var asr_JsCompilationResult$_init_$lambda$_0_1 = $rt_classWithoutFields();
8458
+ var juf_BiConsumer = $rt_classWithoutFields(0);
8459
+ var asr_JsCompilationResult$_init_$lambda$_0_2 = $rt_classWithoutFields();
8460
+ var asr_JsCompilationResult$_init_$lambda$_0_3 = $rt_classWithoutFields();
8458
8461
  var jl_Math = $rt_classWithoutFields();
8459
8462
  var jl_Math_pow = ($x, $y) => {
8460
8463
  return jl_Math_powImpl($x, $y);
@@ -11763,7 +11766,6 @@ var asrrh_RegisterBlock_resetRegisters = ($this) => {
11763
11766
  var$3 = var$3 + 1 | 0;
11764
11767
  }
11765
11768
  };
11766
- var asrrh_StackFrame = $rt_classWithoutFields();
11767
11769
  function asr_ErrorList() {
11768
11770
  let a = this;
11769
11771
  jl_Object.call(a);
@@ -11871,6 +11873,7 @@ var asr_ErrorList_generateReport = ($this, $isWarning) => {
11871
11873
  }
11872
11874
  return jl_AbstractStringBuilder_toString($report);
11873
11875
  };
11876
+ var asrrh_StackFrame = $rt_classWithoutFields();
11874
11877
  function asrrh_MemoryConfiguration() {
11875
11878
  let a = this;
11876
11879
  jl_Object.call(a);
@@ -15907,7 +15910,6 @@ var jl_Thread__clinit_ = () => {
15907
15910
  };
15908
15911
  var jl_IllegalStateException = $rt_classWithoutFields(jl_RuntimeException);
15909
15912
  var jl_IllegalMonitorStateException = $rt_classWithoutFields(jl_RuntimeException);
15910
- var jl_NegativeArraySizeException = $rt_classWithoutFields(jl_RuntimeException);
15911
15913
  var otjc_JSObjects = $rt_classWithoutFields();
15912
15914
  var otji_JSWrapper$Helper = $rt_classWithoutFields();
15913
15915
  var otji_JSWrapper$Helper_hashCodes = null;
@@ -15943,6 +15945,7 @@ var otji_JSWrapper$Helper__clinit_ = () => {
15943
15945
  otji_JSWrapper$Helper_numberFinalizationRegistry = var$1;
15944
15946
  };
15945
15947
  var otjc_JSUndefined = $rt_classWithoutFields();
15948
+ var jl_NegativeArraySizeException = $rt_classWithoutFields(jl_RuntimeException);
15946
15949
  function ju_Arrays$ArrayAsList() {
15947
15950
  ju_AbstractList.call(this);
15948
15951
  this.$array3 = null;
@@ -31374,330 +31377,6 @@ var asrjt_Float32__clinit_ = () => {
31374
31377
  asrjt_Float32_Infinity = asrjt_Float32__init_(2139095040);
31375
31378
  asrjt_Float32_NegativeInfinity = asrjt_Float32__init_(-8388608);
31376
31379
  };
31377
- var asrjo_Conversions = $rt_classWithoutFields();
31378
- var asrjo_Conversions_convertToIntegral = ($f, $max, $min, $env, $quiet) => {
31379
- let $copy, $rounded, var$8, var$9, var$10, var$11, var$12, var$13;
31380
- if ($f.$isNaN()) {
31381
- $f = $env.$flags;
31382
- $min = asrj_Flags_invalid;
31383
- ju_GenericEnumSet_add($f, $min);
31384
- return $max;
31385
- }
31386
- if ($f.$isInfinite()) {
31387
- $env = $env.$flags;
31388
- $copy = asrj_Flags_invalid;
31389
- ju_GenericEnumSet_add($env, $copy);
31390
- if ($f.$isSignMinus())
31391
- $max = $min;
31392
- return $max;
31393
- }
31394
- $copy = asrj_Environment__init_();
31395
- $copy.$mode = $env.$mode;
31396
- if ($f.$isZero())
31397
- $rounded = jm_BigInteger_ZERO;
31398
- else {
31399
- $f = $f.$toExactFloat();
31400
- if (asrji_ExactFloat_isZero($f))
31401
- $rounded = jm_BigInteger_ZERO;
31402
- else {
31403
- if (asrji_ExactFloat_isZero($f))
31404
- $rounded = $f;
31405
- else {
31406
- $rounded = asrji_ExactFloat_normalize($f);
31407
- var$8 = $rounded.$exponent0;
31408
- if (var$8 < 0) {
31409
- var$8 = -var$8 | 0;
31410
- var$9 = jm_BigInteger_shiftLeft(jm_BigInteger_shiftRight($rounded.$significand, var$8), var$8);
31411
- var$10 = jm_BigInteger_subtract($rounded.$significand, var$9);
31412
- var$9 = asrji_ExactFloat_normalize(asrji_ExactFloat__init_($rounded.$sign, $rounded.$exponent0, var$9));
31413
- var$11 = asrji_ExactFloat_add(var$9, asrji_ExactFloat__init_($rounded.$sign, 0, jm_BigInteger_valueOf(Long_fromInt(1))));
31414
- var$12 = $env.$mode;
31415
- if (var$12 === asrj_RoundingMode_zero)
31416
- $rounded = var$9;
31417
- else {
31418
- var$13 = asrj_RoundingMode_max;
31419
- if (var$12 !== var$13 && var$12 !== asrj_RoundingMode_min) {
31420
- $rounded = jm_BigInteger_ONE;
31421
- var$8 = var$8 - 1 | 0;
31422
- $rounded = !jm_BigInteger_equals(var$10, jm_BigInteger_shiftLeft($rounded, var$8)) ? jm_BigInteger_compareTo(var$10, jm_BigInteger_shiftLeft(jm_BigInteger_ONE, var$8)) <= 0 ? var$9 : var$11 : $env.$mode !== asrj_RoundingMode_away && !jm_BigInteger_testBit(var$9.$significand, 0) ? var$9 : var$11;
31423
- } else
31424
- $rounded = (var$12 !== var$13 ? 0 : 1) != $rounded.$sign ? var$11 : var$9;
31425
- }
31426
- }
31427
- }
31428
- $rounded = asrji_ExactFloat_normalize($rounded);
31429
- if (asrji_ExactFloat_compareTo($rounded, $f)) {
31430
- var$9 = $env.$flags;
31431
- var$10 = asrj_Flags_inexact;
31432
- ju_GenericEnumSet_add(var$9, var$10);
31433
- }
31434
- if (!asrji_ExactFloat_$assertionsDisabled && $rounded.$exponent0 < 0)
31435
- $rt_throw(jl_AssertionError__init_($rt_s(1624)));
31436
- $rounded = jm_BigInteger_multiply(jm_BigInteger_shiftLeft($rounded.$significand, $rounded.$exponent0), jm_BigInteger_valueOf(!$f.$sign ? Long_fromInt(1) : Long_fromInt(-1)));
31437
- }
31438
- }
31439
- if (!(jm_BigInteger_compareTo($rounded, $max) <= 0 && jm_BigInteger_compareTo($rounded, $min) >= 0)) {
31440
- $f = $env.$flags;
31441
- $env = asrj_Flags_invalid;
31442
- ju_GenericEnumSet_add($f, $env);
31443
- } else if (!$quiet) {
31444
- $f = $copy.$flags;
31445
- $copy = asrj_Flags_inexact;
31446
- if (ju_GenericEnumSet_contains($f, $copy)) {
31447
- $f = $env.$flags;
31448
- $env = asrj_Flags_inexact;
31449
- ju_GenericEnumSet_add($f, $env);
31450
- }
31451
- }
31452
- if (jm_BigInteger_compareTo($rounded, $max) == -1)
31453
- $max = $rounded;
31454
- if (jm_BigInteger_compareTo($max, $min) == 1)
31455
- $min = $max;
31456
- return $min;
31457
- };
31458
- var asrjo_Conversions_convertToInt = ($f, $env, $quiet) => {
31459
- return jm_BigInteger_intValueExact(asrjo_Conversions_convertToIntegral($f, jm_BigInteger_valueOf(Long_fromInt(2147483647)), jm_BigInteger_valueOf(Long_fromInt(-2147483648)), $env, $quiet));
31460
- };
31461
- var asrjo_Conversions_convertToUnsignedInt = ($f, $env, $quiet) => {
31462
- return Long_lo(Long_and(jm_BigInteger_longValueExact(asrjo_Conversions_convertToIntegral($f, jm_BigInteger_valueOf(Long_create(4294967295, 0)), jm_BigInteger_ZERO, $env, $quiet)), Long_create(4294967295, 0)));
31463
- };
31464
- var asrjo_Conversions_convertToLong = ($f, $env, $quiet) => {
31465
- return jm_BigInteger_longValueExact(asrjo_Conversions_convertToIntegral($f, jm_BigInteger_valueOf(Long_create(4294967295, 2147483647)), jm_BigInteger_valueOf(Long_create(0, 2147483648)), $env, $quiet));
31466
- };
31467
- var asrjo_Conversions_convertToUnsignedLong = ($f, $env, $quiet) => {
31468
- return jm_BigInteger_longValue(asrjo_Conversions_convertToIntegral($f, jm_BigInteger_add(jm_BigInteger_valueOf(Long_fromInt(-1)), jm_BigInteger_shiftLeft(jm_BigInteger_ONE, 64)), jm_BigInteger_ZERO, $env, $quiet));
31469
- };
31470
- var asrjo_Conversions_convertFromInt = ($i, $env, $helper) => {
31471
- let var$4;
31472
- if (jm_BigInteger_equals($i, jm_BigInteger_ZERO))
31473
- return $helper.$Zero();
31474
- var$4 = new asrji_ExactFloat();
31475
- if (jm_BigInteger_compareTo($i, jm_BigInteger_ZERO) >= 0)
31476
- var$4.$sign = 0;
31477
- else {
31478
- var$4.$sign = 1;
31479
- $i = jm_BigInteger_negate($i);
31480
- }
31481
- var$4.$exponent0 = 0;
31482
- var$4.$significand = $i;
31483
- return $helper.$fromExactFloat(var$4, $env);
31484
- };
31485
- function asrjt_Float64() {
31486
- asrjt_Floating.call(this);
31487
- this.$bits1 = Long_ZERO;
31488
- }
31489
- var asrjt_Float64_Zero = null;
31490
- var asrjt_Float64_NegativeZero = null;
31491
- var asrjt_Float64_NaN = null;
31492
- var asrjt_Float64_Infinity = null;
31493
- var asrjt_Float64_NegativeInfinity = null;
31494
- var asrjt_Float64_$assertionsDisabled = 0;
31495
- var asrjt_Float64__init_1 = ($this, $bits) => {
31496
- $this.$bits1 = $bits;
31497
- };
31498
- var asrjt_Float64__init_ = (var_0) => {
31499
- let var_1 = new asrjt_Float64();
31500
- asrjt_Float64__init_1(var_1, var_0);
31501
- return var_1;
31502
- };
31503
- var asrjt_Float64__init_2 = ($this, $sign, $exponent, $significand) => {
31504
- asrjt_Float64__init_1($this, Long_or(Long_or(!$sign ? Long_ZERO : Long_create(0, 2147483648), Long_shl(Long_and(Long_fromInt($exponent + 1023 | 0), Long_fromInt(2047)), 52)), Long_and($significand, Long_create(4294967295, 1048575))));
31505
- };
31506
- var asrjt_Float64__init_0 = (var_0, var_1, var_2) => {
31507
- let var_3 = new asrjt_Float64();
31508
- asrjt_Float64__init_2(var_3, var_0, var_1, var_2);
31509
- return var_3;
31510
- };
31511
- var asrjt_Float64_exponent = ($this) => {
31512
- return (Long_lo(Long_shru($this.$bits1, 52)) & 2047) - 1023 | 0;
31513
- };
31514
- var asrjt_Float64_negate = ($this) => {
31515
- return asrjt_Float64__init_(Long_xor($this.$bits1, Long_create(0, 2147483648)));
31516
- };
31517
- var asrjt_Float64_isSignMinus = ($this) => {
31518
- return Long_ne(Long_shru($this.$bits1, 63), Long_fromInt(1)) ? 0 : 1;
31519
- };
31520
- var asrjt_Float64_isInfinite = ($this) => {
31521
- return asrjt_Float64_exponent($this) == 1024 && Long_eq(Long_and($this.$bits1, Long_create(4294967295, 1048575)), Long_ZERO) ? 1 : 0;
31522
- };
31523
- var asrjt_Float64_isNormal = ($this) => {
31524
- return asrjt_Float64_exponent($this) != -1023 && asrjt_Float64_exponent($this) != 1024 ? 1 : 0;
31525
- };
31526
- var asrjt_Float64_isSubnormal = ($this) => {
31527
- return asrjt_Float64_exponent($this) == -1023 && !asrjt_Float64_isZero($this) ? 1 : 0;
31528
- };
31529
- var asrjt_Float64_isNaN = ($this) => {
31530
- return asrjt_Float64_exponent($this) == 1024 && !asrjt_Float64_isInfinite($this) ? 1 : 0;
31531
- };
31532
- var asrjt_Float64_isSignalling = ($this) => {
31533
- if (!asrjt_Float64_isNaN($this))
31534
- return 0;
31535
- return Long_ne(Long_and($this.$bits1, Long_create(0, 524288)), Long_ZERO) ? 0 : 1;
31536
- };
31537
- var asrjt_Float64_isZero = ($this) => {
31538
- let var$1;
31539
- var$1 = $this.$bits1;
31540
- return Long_ne(var$1, Long_ZERO) && Long_ne(var$1, Long_create(0, 2147483648)) ? 0 : 1;
31541
- };
31542
- var asrjt_Float64_fromExactFloat0 = ($this, $ef, $env) => {
31543
- let $normalizedExponent, $mainBits, $roundedBits, $a, $bitsToRound, $upBits, $towardsZero, $awayZero;
31544
- if (asrji_ExactFloat_isZero($ef))
31545
- return !$ef.$sign ? asrjt_Float64_Zero : asrjt_Float64_NegativeZero;
31546
- $ef = asrji_ExactFloat_normalize($ef);
31547
- $normalizedExponent = $ef.$exponent0 + jm_BigInteger_bitLength($ef.$significand) | 0;
31548
- if ($normalizedExponent > -1022) {
31549
- if ($normalizedExponent > 1024) {
31550
- $mainBits = $env.$flags;
31551
- $roundedBits = asrj_Flags_overflow;
31552
- ju_GenericEnumSet_add($mainBits, $roundedBits);
31553
- $mainBits = $env.$flags;
31554
- $roundedBits = asrj_Flags_inexact;
31555
- ju_GenericEnumSet_add($mainBits, $roundedBits);
31556
- asrjt_Float64$1_$callClinit();
31557
- switch (asrjt_Float64$1_$SwitchMap$app$specy$rars$jsoftfloat$RoundingMode.data[jl_Enum_ordinal($env.$mode)]) {
31558
- case 1:
31559
- break;
31560
- case 2:
31561
- case 3:
31562
- $normalizedExponent = $ef.$sign;
31563
- if ($normalizedExponent == ($env.$mode !== asrj_RoundingMode_max ? 0 : 1))
31564
- return asrjt_Float64__init_0($normalizedExponent, 1023, Long_fromInt(-1));
31565
- return !$normalizedExponent ? asrjt_Float64_Infinity : asrjt_Float64_NegativeInfinity;
31566
- case 4:
31567
- case 5:
31568
- return !$ef.$sign ? asrjt_Float64_Infinity : asrjt_Float64_NegativeInfinity;
31569
- default:
31570
- if (!asrjt_Float64_$assertionsDisabled)
31571
- $rt_throw(jl_AssertionError__init_($rt_s(1617)));
31572
- return !$ef.$sign ? asrjt_Float64_Infinity : asrjt_Float64_NegativeInfinity;
31573
- }
31574
- return asrjt_Float64__init_0($ef.$sign, 1023, Long_fromInt(-1));
31575
- }
31576
- if (jm_BigInteger_bitLength($ef.$significand) <= 53) {
31577
- if (!asrjt_Float64_$assertionsDisabled && (($ef.$exponent0 + jm_BigInteger_bitLength($ef.$significand) | 0) - 1 | 0) <= -1023)
31578
- $rt_throw(jl_AssertionError__init_($rt_s(1618)));
31579
- $a = new asrjt_Float64();
31580
- $normalizedExponent = $ef.$sign;
31581
- $bitsToRound = ($ef.$exponent0 + jm_BigInteger_bitLength($ef.$significand) | 0) - 1 | 0;
31582
- $ef = $ef.$significand;
31583
- asrjt_Float64__init_2($a, $normalizedExponent, $bitsToRound, Long_and(jm_BigInteger_longValueExact(jm_BigInteger_shiftLeft($ef, 53 - jm_BigInteger_bitLength($ef) | 0)), Long_create(4294967295, 1048575)));
31584
- return $a;
31585
- }
31586
- $mainBits = $env.$flags;
31587
- $roundedBits = asrj_Flags_inexact;
31588
- ju_GenericEnumSet_add($mainBits, $roundedBits);
31589
- $bitsToRound = jm_BigInteger_bitLength($ef.$significand) - 53 | 0;
31590
- $mainBits = jm_BigInteger_shiftLeft(jm_BigInteger_shiftRight($ef.$significand, $bitsToRound), $bitsToRound);
31591
- $roundedBits = jm_BigInteger_subtract($ef.$significand, $mainBits);
31592
- $upBits = jm_BigInteger_add(jm_BigInteger_shiftRight($ef.$significand, $bitsToRound), jm_BigInteger_valueOf(Long_fromInt(1)));
31593
- $towardsZero = asrjt_Float64__init_0($ef.$sign, ($ef.$exponent0 + 52 | 0) + $bitsToRound | 0, Long_and(jm_BigInteger_longValueExact(jm_BigInteger_shiftRight($ef.$significand, $bitsToRound)), Long_create(4294967295, 1048575)));
31594
- $awayZero = !jm_BigInteger_testBit($upBits, 0) && jm_BigInteger_bitLength($upBits) > 53 ? asrjt_Float64__init_0($ef.$sign, ($ef.$exponent0 + 53 | 0) + $bitsToRound | 0, Long_and(jm_BigInteger_longValueExact(jm_BigInteger_shiftRight($upBits, 1)), Long_create(4294967295, 1048575))) : asrjt_Float64__init_0($ef.$sign, ($ef.$exponent0 + 52 | 0) + $bitsToRound | 0, Long_and(jm_BigInteger_longValueExact($upBits), Long_create(4294967295, 1048575)));
31595
- } else {
31596
- if ($ef.$exponent0 > -1075) {
31597
- if (!asrjt_Float64_$assertionsDisabled && jm_BigInteger_bitLength($ef.$significand) > 52)
31598
- $rt_throw(jl_AssertionError__init_($rt_s(1619)));
31599
- return asrjt_Float64__init_0($ef.$sign, -1023, jm_BigInteger_longValueExact(jm_BigInteger_shiftLeft($ef.$significand, 1074 + $ef.$exponent0 | 0)));
31600
- }
31601
- $mainBits = $env.$flags;
31602
- $roundedBits = asrj_Flags_inexact;
31603
- ju_GenericEnumSet_add($mainBits, $roundedBits);
31604
- $mainBits = $env.$flags;
31605
- $roundedBits = asrj_Flags_underflow;
31606
- ju_GenericEnumSet_add($mainBits, $roundedBits);
31607
- $bitsToRound = -1074 - $ef.$exponent0 | 0;
31608
- $mainBits = jm_BigInteger_shiftLeft(jm_BigInteger_shiftRight($ef.$significand, $bitsToRound), $bitsToRound);
31609
- $roundedBits = jm_BigInteger_subtract($ef.$significand, $mainBits);
31610
- $towardsZero = asrjt_Float64__init_0($ef.$sign, -1023, jm_BigInteger_longValueExact(jm_BigInteger_shiftRight($ef.$significand, $bitsToRound)));
31611
- $upBits = jm_BigInteger_add(jm_BigInteger_shiftRight($ef.$significand, $bitsToRound), jm_BigInteger_valueOf(Long_fromInt(1)));
31612
- if (!jm_BigInteger_testBit($upBits, 0) && jm_BigInteger_bitLength($upBits) > 52)
31613
- $awayZero = asrjt_Float64__init_0($ef.$sign, -1022, Long_and(jm_BigInteger_longValueExact($upBits), Long_create(4294967295, 1048575)));
31614
- else {
31615
- if (!asrjt_Float64_$assertionsDisabled && jm_BigInteger_bitLength($upBits) > 52)
31616
- $rt_throw(jl_AssertionError__init_1());
31617
- $awayZero = asrjt_Float64__init_0($ef.$sign, -1023, jm_BigInteger_longValueExact($upBits));
31618
- }
31619
- }
31620
- asrjt_Float64$1_$callClinit();
31621
- switch (asrjt_Float64$1_$SwitchMap$app$specy$rars$jsoftfloat$RoundingMode.data[jl_Enum_ordinal($env.$mode)]) {
31622
- case 1:
31623
- break;
31624
- case 2:
31625
- case 3:
31626
- if ($ef.$sign == ($env.$mode !== asrj_RoundingMode_max ? 0 : 1))
31627
- return $towardsZero;
31628
- return $awayZero;
31629
- default:
31630
- $ef = jm_BigInteger_ONE;
31631
- $normalizedExponent = $bitsToRound - 1 | 0;
31632
- if (!jm_BigInteger_equals($roundedBits, jm_BigInteger_shiftLeft($ef, $normalizedExponent))) {
31633
- if (jm_BigInteger_compareTo($roundedBits, jm_BigInteger_shiftLeft(jm_BigInteger_ONE, $normalizedExponent)) <= 0)
31634
- return $towardsZero;
31635
- return $awayZero;
31636
- }
31637
- if ($env.$mode !== asrj_RoundingMode_away && Long_ne(Long_and($awayZero.$bits1, Long_fromInt(1)), Long_ZERO))
31638
- return $towardsZero;
31639
- return $awayZero;
31640
- }
31641
- return $towardsZero;
31642
- };
31643
- var asrjt_Float64_toExactFloat = ($this) => {
31644
- let $sign, $exponent, $significand;
31645
- if (!asrjt_Float64_$assertionsDisabled && asrjt_Float64_isInfinite($this))
31646
- $rt_throw(jl_AssertionError__init_($rt_s(1620)));
31647
- if (!asrjt_Float64_$assertionsDisabled && asrjt_Float64_isNaN($this))
31648
- $rt_throw(jl_AssertionError__init_($rt_s(1621)));
31649
- if (!asrjt_Float64_$assertionsDisabled && asrjt_Float64_isZero($this))
31650
- $rt_throw(jl_AssertionError__init_($rt_s(1622)));
31651
- $sign = asrjt_Float64_isSignMinus($this);
31652
- if (asrjt_Float64_isZero($this)) {
31653
- $exponent = 0;
31654
- $significand = jm_BigInteger_ZERO;
31655
- } else if (asrjt_Float64_isNormal($this)) {
31656
- $exponent = asrjt_Float64_exponent($this) - 52 | 0;
31657
- $significand = jm_BigInteger_valueOf(Long_add(Long_and($this.$bits1, Long_create(4294967295, 1048575)), Long_create(0, 1048576)));
31658
- } else {
31659
- if (!asrjt_Float64_isSubnormal($this)) {
31660
- if (asrjt_Float64_$assertionsDisabled)
31661
- return null;
31662
- $rt_throw(jl_AssertionError__init_($rt_s(1623)));
31663
- }
31664
- $exponent = asrjt_Float64_exponent($this) - 51 | 0;
31665
- $significand = jm_BigInteger_valueOf(Long_and($this.$bits1, Long_create(4294967295, 1048575)));
31666
- }
31667
- return asrji_ExactFloat__init_($sign, $exponent, $significand);
31668
- };
31669
- var asrjt_Float64_maxPrecision = ($this) => {
31670
- return 60;
31671
- };
31672
- var asrjt_Float64_negate0 = ($this) => {
31673
- return asrjt_Float64_negate($this);
31674
- };
31675
- var asrjt_Float64_fromExactFloat = ($this, var$1, var$2) => {
31676
- return asrjt_Float64_fromExactFloat0($this, var$1, var$2);
31677
- };
31678
- var asrjt_Float64_NegativeInfinity0 = ($this) => {
31679
- return asrjt_Float64_NegativeInfinity;
31680
- };
31681
- var asrjt_Float64_Infinity0 = ($this) => {
31682
- return asrjt_Float64_Infinity;
31683
- };
31684
- var asrjt_Float64_NegativeZero0 = ($this) => {
31685
- return asrjt_Float64_NegativeZero;
31686
- };
31687
- var asrjt_Float64_Zero0 = ($this) => {
31688
- return asrjt_Float64_Zero;
31689
- };
31690
- var asrjt_Float64_NaN0 = ($this) => {
31691
- return asrjt_Float64_NaN;
31692
- };
31693
- var asrjt_Float64__clinit_ = () => {
31694
- asrjt_Float64_$assertionsDisabled = 0;
31695
- asrjt_Float64_Zero = asrjt_Float64__init_(Long_ZERO);
31696
- asrjt_Float64_NegativeZero = asrjt_Float64__init_(Long_create(0, 2147483648));
31697
- asrjt_Float64_NaN = asrjt_Float64__init_(Long_create(0, 2146959360));
31698
- asrjt_Float64_Infinity = asrjt_Float64__init_(Long_create(0, 2146435072));
31699
- asrjt_Float64_NegativeInfinity = asrjt_Float64__init_(Long_create(0, 4293918720));
31700
- };
31701
31380
  var asrjo_Comparisons = $rt_classWithoutFields();
31702
31381
  var asrjo_Comparisons_compareNoNAN = ($a, $b) => {
31703
31382
  if ($a.$isZero()) {
@@ -32002,7 +31681,7 @@ var jm_BigInteger_testBit = ($this, $n) => {
32002
31681
  return !($this.$digits.data[0] & 1) ? 0 : 1;
32003
31682
  if ($n < 0) {
32004
31683
  var$2 = new jl_ArithmeticException();
32005
- jl_Throwable__init_0(var$2, $rt_s(1625));
31684
+ jl_Throwable__init_0(var$2, $rt_s(1624));
32006
31685
  $rt_throw(var$2);
32007
31686
  }
32008
31687
  $intCount = $n >> 5;
@@ -32030,7 +31709,7 @@ var jm_BigInteger_intValueExact = ($this) => {
32030
31709
  if ($this.$numberLength <= 1 && jm_BigInteger_bitLength($this) <= 31)
32031
31710
  return $rt_imul($this.$sign0, $this.$digits.data[0]);
32032
31711
  var$1 = new jl_ArithmeticException();
32033
- jl_Throwable__init_0(var$1, $rt_s(1626));
31712
+ jl_Throwable__init_0(var$1, $rt_s(1625));
32034
31713
  $rt_throw(var$1);
32035
31714
  };
32036
31715
  var jm_BigInteger_longValue = ($this) => {
@@ -32048,7 +31727,7 @@ var jm_BigInteger_longValueExact = ($this) => {
32048
31727
  if ($this.$numberLength <= 2 && jm_BigInteger_bitLength($this) <= 63)
32049
31728
  return jm_BigInteger_longValue($this);
32050
31729
  var$1 = new jl_ArithmeticException();
32051
- jl_Throwable__init_0(var$1, $rt_s(1627));
31730
+ jl_Throwable__init_0(var$1, $rt_s(1626));
32052
31731
  $rt_throw(var$1);
32053
31732
  };
32054
31733
  var jm_BigInteger_compareTo = ($this, $val) => {
@@ -32169,6 +31848,330 @@ var jm_BigInteger__clinit_ = () => {
32169
31848
  $i = $i + 1 | 0;
32170
31849
  }
32171
31850
  };
31851
+ var asrjo_Conversions = $rt_classWithoutFields();
31852
+ var asrjo_Conversions_convertToIntegral = ($f, $max, $min, $env, $quiet) => {
31853
+ let $copy, $rounded, var$8, var$9, var$10, var$11, var$12, var$13;
31854
+ if ($f.$isNaN()) {
31855
+ $f = $env.$flags;
31856
+ $min = asrj_Flags_invalid;
31857
+ ju_GenericEnumSet_add($f, $min);
31858
+ return $max;
31859
+ }
31860
+ if ($f.$isInfinite()) {
31861
+ $env = $env.$flags;
31862
+ $copy = asrj_Flags_invalid;
31863
+ ju_GenericEnumSet_add($env, $copy);
31864
+ if ($f.$isSignMinus())
31865
+ $max = $min;
31866
+ return $max;
31867
+ }
31868
+ $copy = asrj_Environment__init_();
31869
+ $copy.$mode = $env.$mode;
31870
+ if ($f.$isZero())
31871
+ $rounded = jm_BigInteger_ZERO;
31872
+ else {
31873
+ $f = $f.$toExactFloat();
31874
+ if (asrji_ExactFloat_isZero($f))
31875
+ $rounded = jm_BigInteger_ZERO;
31876
+ else {
31877
+ if (asrji_ExactFloat_isZero($f))
31878
+ $rounded = $f;
31879
+ else {
31880
+ $rounded = asrji_ExactFloat_normalize($f);
31881
+ var$8 = $rounded.$exponent0;
31882
+ if (var$8 < 0) {
31883
+ var$8 = -var$8 | 0;
31884
+ var$9 = jm_BigInteger_shiftLeft(jm_BigInteger_shiftRight($rounded.$significand, var$8), var$8);
31885
+ var$10 = jm_BigInteger_subtract($rounded.$significand, var$9);
31886
+ var$9 = asrji_ExactFloat_normalize(asrji_ExactFloat__init_($rounded.$sign, $rounded.$exponent0, var$9));
31887
+ var$11 = asrji_ExactFloat_add(var$9, asrji_ExactFloat__init_($rounded.$sign, 0, jm_BigInteger_valueOf(Long_fromInt(1))));
31888
+ var$12 = $env.$mode;
31889
+ if (var$12 === asrj_RoundingMode_zero)
31890
+ $rounded = var$9;
31891
+ else {
31892
+ var$13 = asrj_RoundingMode_max;
31893
+ if (var$12 !== var$13 && var$12 !== asrj_RoundingMode_min) {
31894
+ $rounded = jm_BigInteger_ONE;
31895
+ var$8 = var$8 - 1 | 0;
31896
+ $rounded = !jm_BigInteger_equals(var$10, jm_BigInteger_shiftLeft($rounded, var$8)) ? jm_BigInteger_compareTo(var$10, jm_BigInteger_shiftLeft(jm_BigInteger_ONE, var$8)) <= 0 ? var$9 : var$11 : $env.$mode !== asrj_RoundingMode_away && !jm_BigInteger_testBit(var$9.$significand, 0) ? var$9 : var$11;
31897
+ } else
31898
+ $rounded = (var$12 !== var$13 ? 0 : 1) != $rounded.$sign ? var$11 : var$9;
31899
+ }
31900
+ }
31901
+ }
31902
+ $rounded = asrji_ExactFloat_normalize($rounded);
31903
+ if (asrji_ExactFloat_compareTo($rounded, $f)) {
31904
+ var$9 = $env.$flags;
31905
+ var$10 = asrj_Flags_inexact;
31906
+ ju_GenericEnumSet_add(var$9, var$10);
31907
+ }
31908
+ if (!asrji_ExactFloat_$assertionsDisabled && $rounded.$exponent0 < 0)
31909
+ $rt_throw(jl_AssertionError__init_($rt_s(1627)));
31910
+ $rounded = jm_BigInteger_multiply(jm_BigInteger_shiftLeft($rounded.$significand, $rounded.$exponent0), jm_BigInteger_valueOf(!$f.$sign ? Long_fromInt(1) : Long_fromInt(-1)));
31911
+ }
31912
+ }
31913
+ if (!(jm_BigInteger_compareTo($rounded, $max) <= 0 && jm_BigInteger_compareTo($rounded, $min) >= 0)) {
31914
+ $f = $env.$flags;
31915
+ $env = asrj_Flags_invalid;
31916
+ ju_GenericEnumSet_add($f, $env);
31917
+ } else if (!$quiet) {
31918
+ $f = $copy.$flags;
31919
+ $copy = asrj_Flags_inexact;
31920
+ if (ju_GenericEnumSet_contains($f, $copy)) {
31921
+ $f = $env.$flags;
31922
+ $env = asrj_Flags_inexact;
31923
+ ju_GenericEnumSet_add($f, $env);
31924
+ }
31925
+ }
31926
+ if (jm_BigInteger_compareTo($rounded, $max) == -1)
31927
+ $max = $rounded;
31928
+ if (jm_BigInteger_compareTo($max, $min) == 1)
31929
+ $min = $max;
31930
+ return $min;
31931
+ };
31932
+ var asrjo_Conversions_convertToInt = ($f, $env, $quiet) => {
31933
+ return jm_BigInteger_intValueExact(asrjo_Conversions_convertToIntegral($f, jm_BigInteger_valueOf(Long_fromInt(2147483647)), jm_BigInteger_valueOf(Long_fromInt(-2147483648)), $env, $quiet));
31934
+ };
31935
+ var asrjo_Conversions_convertToUnsignedInt = ($f, $env, $quiet) => {
31936
+ return Long_lo(Long_and(jm_BigInteger_longValueExact(asrjo_Conversions_convertToIntegral($f, jm_BigInteger_valueOf(Long_create(4294967295, 0)), jm_BigInteger_ZERO, $env, $quiet)), Long_create(4294967295, 0)));
31937
+ };
31938
+ var asrjo_Conversions_convertToLong = ($f, $env, $quiet) => {
31939
+ return jm_BigInteger_longValueExact(asrjo_Conversions_convertToIntegral($f, jm_BigInteger_valueOf(Long_create(4294967295, 2147483647)), jm_BigInteger_valueOf(Long_create(0, 2147483648)), $env, $quiet));
31940
+ };
31941
+ var asrjo_Conversions_convertToUnsignedLong = ($f, $env, $quiet) => {
31942
+ return jm_BigInteger_longValue(asrjo_Conversions_convertToIntegral($f, jm_BigInteger_add(jm_BigInteger_valueOf(Long_fromInt(-1)), jm_BigInteger_shiftLeft(jm_BigInteger_ONE, 64)), jm_BigInteger_ZERO, $env, $quiet));
31943
+ };
31944
+ var asrjo_Conversions_convertFromInt = ($i, $env, $helper) => {
31945
+ let var$4;
31946
+ if (jm_BigInteger_equals($i, jm_BigInteger_ZERO))
31947
+ return $helper.$Zero();
31948
+ var$4 = new asrji_ExactFloat();
31949
+ if (jm_BigInteger_compareTo($i, jm_BigInteger_ZERO) >= 0)
31950
+ var$4.$sign = 0;
31951
+ else {
31952
+ var$4.$sign = 1;
31953
+ $i = jm_BigInteger_negate($i);
31954
+ }
31955
+ var$4.$exponent0 = 0;
31956
+ var$4.$significand = $i;
31957
+ return $helper.$fromExactFloat(var$4, $env);
31958
+ };
31959
+ function asrjt_Float64() {
31960
+ asrjt_Floating.call(this);
31961
+ this.$bits1 = Long_ZERO;
31962
+ }
31963
+ var asrjt_Float64_Zero = null;
31964
+ var asrjt_Float64_NegativeZero = null;
31965
+ var asrjt_Float64_NaN = null;
31966
+ var asrjt_Float64_Infinity = null;
31967
+ var asrjt_Float64_NegativeInfinity = null;
31968
+ var asrjt_Float64_$assertionsDisabled = 0;
31969
+ var asrjt_Float64__init_1 = ($this, $bits) => {
31970
+ $this.$bits1 = $bits;
31971
+ };
31972
+ var asrjt_Float64__init_ = (var_0) => {
31973
+ let var_1 = new asrjt_Float64();
31974
+ asrjt_Float64__init_1(var_1, var_0);
31975
+ return var_1;
31976
+ };
31977
+ var asrjt_Float64__init_2 = ($this, $sign, $exponent, $significand) => {
31978
+ asrjt_Float64__init_1($this, Long_or(Long_or(!$sign ? Long_ZERO : Long_create(0, 2147483648), Long_shl(Long_and(Long_fromInt($exponent + 1023 | 0), Long_fromInt(2047)), 52)), Long_and($significand, Long_create(4294967295, 1048575))));
31979
+ };
31980
+ var asrjt_Float64__init_0 = (var_0, var_1, var_2) => {
31981
+ let var_3 = new asrjt_Float64();
31982
+ asrjt_Float64__init_2(var_3, var_0, var_1, var_2);
31983
+ return var_3;
31984
+ };
31985
+ var asrjt_Float64_exponent = ($this) => {
31986
+ return (Long_lo(Long_shru($this.$bits1, 52)) & 2047) - 1023 | 0;
31987
+ };
31988
+ var asrjt_Float64_negate = ($this) => {
31989
+ return asrjt_Float64__init_(Long_xor($this.$bits1, Long_create(0, 2147483648)));
31990
+ };
31991
+ var asrjt_Float64_isSignMinus = ($this) => {
31992
+ return Long_ne(Long_shru($this.$bits1, 63), Long_fromInt(1)) ? 0 : 1;
31993
+ };
31994
+ var asrjt_Float64_isInfinite = ($this) => {
31995
+ return asrjt_Float64_exponent($this) == 1024 && Long_eq(Long_and($this.$bits1, Long_create(4294967295, 1048575)), Long_ZERO) ? 1 : 0;
31996
+ };
31997
+ var asrjt_Float64_isNormal = ($this) => {
31998
+ return asrjt_Float64_exponent($this) != -1023 && asrjt_Float64_exponent($this) != 1024 ? 1 : 0;
31999
+ };
32000
+ var asrjt_Float64_isSubnormal = ($this) => {
32001
+ return asrjt_Float64_exponent($this) == -1023 && !asrjt_Float64_isZero($this) ? 1 : 0;
32002
+ };
32003
+ var asrjt_Float64_isNaN = ($this) => {
32004
+ return asrjt_Float64_exponent($this) == 1024 && !asrjt_Float64_isInfinite($this) ? 1 : 0;
32005
+ };
32006
+ var asrjt_Float64_isSignalling = ($this) => {
32007
+ if (!asrjt_Float64_isNaN($this))
32008
+ return 0;
32009
+ return Long_ne(Long_and($this.$bits1, Long_create(0, 524288)), Long_ZERO) ? 0 : 1;
32010
+ };
32011
+ var asrjt_Float64_isZero = ($this) => {
32012
+ let var$1;
32013
+ var$1 = $this.$bits1;
32014
+ return Long_ne(var$1, Long_ZERO) && Long_ne(var$1, Long_create(0, 2147483648)) ? 0 : 1;
32015
+ };
32016
+ var asrjt_Float64_fromExactFloat0 = ($this, $ef, $env) => {
32017
+ let $normalizedExponent, $mainBits, $roundedBits, $a, $bitsToRound, $upBits, $towardsZero, $awayZero;
32018
+ if (asrji_ExactFloat_isZero($ef))
32019
+ return !$ef.$sign ? asrjt_Float64_Zero : asrjt_Float64_NegativeZero;
32020
+ $ef = asrji_ExactFloat_normalize($ef);
32021
+ $normalizedExponent = $ef.$exponent0 + jm_BigInteger_bitLength($ef.$significand) | 0;
32022
+ if ($normalizedExponent > -1022) {
32023
+ if ($normalizedExponent > 1024) {
32024
+ $mainBits = $env.$flags;
32025
+ $roundedBits = asrj_Flags_overflow;
32026
+ ju_GenericEnumSet_add($mainBits, $roundedBits);
32027
+ $mainBits = $env.$flags;
32028
+ $roundedBits = asrj_Flags_inexact;
32029
+ ju_GenericEnumSet_add($mainBits, $roundedBits);
32030
+ asrjt_Float64$1_$callClinit();
32031
+ switch (asrjt_Float64$1_$SwitchMap$app$specy$rars$jsoftfloat$RoundingMode.data[jl_Enum_ordinal($env.$mode)]) {
32032
+ case 1:
32033
+ break;
32034
+ case 2:
32035
+ case 3:
32036
+ $normalizedExponent = $ef.$sign;
32037
+ if ($normalizedExponent == ($env.$mode !== asrj_RoundingMode_max ? 0 : 1))
32038
+ return asrjt_Float64__init_0($normalizedExponent, 1023, Long_fromInt(-1));
32039
+ return !$normalizedExponent ? asrjt_Float64_Infinity : asrjt_Float64_NegativeInfinity;
32040
+ case 4:
32041
+ case 5:
32042
+ return !$ef.$sign ? asrjt_Float64_Infinity : asrjt_Float64_NegativeInfinity;
32043
+ default:
32044
+ if (!asrjt_Float64_$assertionsDisabled)
32045
+ $rt_throw(jl_AssertionError__init_($rt_s(1617)));
32046
+ return !$ef.$sign ? asrjt_Float64_Infinity : asrjt_Float64_NegativeInfinity;
32047
+ }
32048
+ return asrjt_Float64__init_0($ef.$sign, 1023, Long_fromInt(-1));
32049
+ }
32050
+ if (jm_BigInteger_bitLength($ef.$significand) <= 53) {
32051
+ if (!asrjt_Float64_$assertionsDisabled && (($ef.$exponent0 + jm_BigInteger_bitLength($ef.$significand) | 0) - 1 | 0) <= -1023)
32052
+ $rt_throw(jl_AssertionError__init_($rt_s(1618)));
32053
+ $a = new asrjt_Float64();
32054
+ $normalizedExponent = $ef.$sign;
32055
+ $bitsToRound = ($ef.$exponent0 + jm_BigInteger_bitLength($ef.$significand) | 0) - 1 | 0;
32056
+ $ef = $ef.$significand;
32057
+ asrjt_Float64__init_2($a, $normalizedExponent, $bitsToRound, Long_and(jm_BigInteger_longValueExact(jm_BigInteger_shiftLeft($ef, 53 - jm_BigInteger_bitLength($ef) | 0)), Long_create(4294967295, 1048575)));
32058
+ return $a;
32059
+ }
32060
+ $mainBits = $env.$flags;
32061
+ $roundedBits = asrj_Flags_inexact;
32062
+ ju_GenericEnumSet_add($mainBits, $roundedBits);
32063
+ $bitsToRound = jm_BigInteger_bitLength($ef.$significand) - 53 | 0;
32064
+ $mainBits = jm_BigInteger_shiftLeft(jm_BigInteger_shiftRight($ef.$significand, $bitsToRound), $bitsToRound);
32065
+ $roundedBits = jm_BigInteger_subtract($ef.$significand, $mainBits);
32066
+ $upBits = jm_BigInteger_add(jm_BigInteger_shiftRight($ef.$significand, $bitsToRound), jm_BigInteger_valueOf(Long_fromInt(1)));
32067
+ $towardsZero = asrjt_Float64__init_0($ef.$sign, ($ef.$exponent0 + 52 | 0) + $bitsToRound | 0, Long_and(jm_BigInteger_longValueExact(jm_BigInteger_shiftRight($ef.$significand, $bitsToRound)), Long_create(4294967295, 1048575)));
32068
+ $awayZero = !jm_BigInteger_testBit($upBits, 0) && jm_BigInteger_bitLength($upBits) > 53 ? asrjt_Float64__init_0($ef.$sign, ($ef.$exponent0 + 53 | 0) + $bitsToRound | 0, Long_and(jm_BigInteger_longValueExact(jm_BigInteger_shiftRight($upBits, 1)), Long_create(4294967295, 1048575))) : asrjt_Float64__init_0($ef.$sign, ($ef.$exponent0 + 52 | 0) + $bitsToRound | 0, Long_and(jm_BigInteger_longValueExact($upBits), Long_create(4294967295, 1048575)));
32069
+ } else {
32070
+ if ($ef.$exponent0 > -1075) {
32071
+ if (!asrjt_Float64_$assertionsDisabled && jm_BigInteger_bitLength($ef.$significand) > 52)
32072
+ $rt_throw(jl_AssertionError__init_($rt_s(1619)));
32073
+ return asrjt_Float64__init_0($ef.$sign, -1023, jm_BigInteger_longValueExact(jm_BigInteger_shiftLeft($ef.$significand, 1074 + $ef.$exponent0 | 0)));
32074
+ }
32075
+ $mainBits = $env.$flags;
32076
+ $roundedBits = asrj_Flags_inexact;
32077
+ ju_GenericEnumSet_add($mainBits, $roundedBits);
32078
+ $mainBits = $env.$flags;
32079
+ $roundedBits = asrj_Flags_underflow;
32080
+ ju_GenericEnumSet_add($mainBits, $roundedBits);
32081
+ $bitsToRound = -1074 - $ef.$exponent0 | 0;
32082
+ $mainBits = jm_BigInteger_shiftLeft(jm_BigInteger_shiftRight($ef.$significand, $bitsToRound), $bitsToRound);
32083
+ $roundedBits = jm_BigInteger_subtract($ef.$significand, $mainBits);
32084
+ $towardsZero = asrjt_Float64__init_0($ef.$sign, -1023, jm_BigInteger_longValueExact(jm_BigInteger_shiftRight($ef.$significand, $bitsToRound)));
32085
+ $upBits = jm_BigInteger_add(jm_BigInteger_shiftRight($ef.$significand, $bitsToRound), jm_BigInteger_valueOf(Long_fromInt(1)));
32086
+ if (!jm_BigInteger_testBit($upBits, 0) && jm_BigInteger_bitLength($upBits) > 52)
32087
+ $awayZero = asrjt_Float64__init_0($ef.$sign, -1022, Long_and(jm_BigInteger_longValueExact($upBits), Long_create(4294967295, 1048575)));
32088
+ else {
32089
+ if (!asrjt_Float64_$assertionsDisabled && jm_BigInteger_bitLength($upBits) > 52)
32090
+ $rt_throw(jl_AssertionError__init_1());
32091
+ $awayZero = asrjt_Float64__init_0($ef.$sign, -1023, jm_BigInteger_longValueExact($upBits));
32092
+ }
32093
+ }
32094
+ asrjt_Float64$1_$callClinit();
32095
+ switch (asrjt_Float64$1_$SwitchMap$app$specy$rars$jsoftfloat$RoundingMode.data[jl_Enum_ordinal($env.$mode)]) {
32096
+ case 1:
32097
+ break;
32098
+ case 2:
32099
+ case 3:
32100
+ if ($ef.$sign == ($env.$mode !== asrj_RoundingMode_max ? 0 : 1))
32101
+ return $towardsZero;
32102
+ return $awayZero;
32103
+ default:
32104
+ $ef = jm_BigInteger_ONE;
32105
+ $normalizedExponent = $bitsToRound - 1 | 0;
32106
+ if (!jm_BigInteger_equals($roundedBits, jm_BigInteger_shiftLeft($ef, $normalizedExponent))) {
32107
+ if (jm_BigInteger_compareTo($roundedBits, jm_BigInteger_shiftLeft(jm_BigInteger_ONE, $normalizedExponent)) <= 0)
32108
+ return $towardsZero;
32109
+ return $awayZero;
32110
+ }
32111
+ if ($env.$mode !== asrj_RoundingMode_away && Long_ne(Long_and($awayZero.$bits1, Long_fromInt(1)), Long_ZERO))
32112
+ return $towardsZero;
32113
+ return $awayZero;
32114
+ }
32115
+ return $towardsZero;
32116
+ };
32117
+ var asrjt_Float64_toExactFloat = ($this) => {
32118
+ let $sign, $exponent, $significand;
32119
+ if (!asrjt_Float64_$assertionsDisabled && asrjt_Float64_isInfinite($this))
32120
+ $rt_throw(jl_AssertionError__init_($rt_s(1620)));
32121
+ if (!asrjt_Float64_$assertionsDisabled && asrjt_Float64_isNaN($this))
32122
+ $rt_throw(jl_AssertionError__init_($rt_s(1621)));
32123
+ if (!asrjt_Float64_$assertionsDisabled && asrjt_Float64_isZero($this))
32124
+ $rt_throw(jl_AssertionError__init_($rt_s(1622)));
32125
+ $sign = asrjt_Float64_isSignMinus($this);
32126
+ if (asrjt_Float64_isZero($this)) {
32127
+ $exponent = 0;
32128
+ $significand = jm_BigInteger_ZERO;
32129
+ } else if (asrjt_Float64_isNormal($this)) {
32130
+ $exponent = asrjt_Float64_exponent($this) - 52 | 0;
32131
+ $significand = jm_BigInteger_valueOf(Long_add(Long_and($this.$bits1, Long_create(4294967295, 1048575)), Long_create(0, 1048576)));
32132
+ } else {
32133
+ if (!asrjt_Float64_isSubnormal($this)) {
32134
+ if (asrjt_Float64_$assertionsDisabled)
32135
+ return null;
32136
+ $rt_throw(jl_AssertionError__init_($rt_s(1623)));
32137
+ }
32138
+ $exponent = asrjt_Float64_exponent($this) - 51 | 0;
32139
+ $significand = jm_BigInteger_valueOf(Long_and($this.$bits1, Long_create(4294967295, 1048575)));
32140
+ }
32141
+ return asrji_ExactFloat__init_($sign, $exponent, $significand);
32142
+ };
32143
+ var asrjt_Float64_maxPrecision = ($this) => {
32144
+ return 60;
32145
+ };
32146
+ var asrjt_Float64_negate0 = ($this) => {
32147
+ return asrjt_Float64_negate($this);
32148
+ };
32149
+ var asrjt_Float64_fromExactFloat = ($this, var$1, var$2) => {
32150
+ return asrjt_Float64_fromExactFloat0($this, var$1, var$2);
32151
+ };
32152
+ var asrjt_Float64_NegativeInfinity0 = ($this) => {
32153
+ return asrjt_Float64_NegativeInfinity;
32154
+ };
32155
+ var asrjt_Float64_Infinity0 = ($this) => {
32156
+ return asrjt_Float64_Infinity;
32157
+ };
32158
+ var asrjt_Float64_NegativeZero0 = ($this) => {
32159
+ return asrjt_Float64_NegativeZero;
32160
+ };
32161
+ var asrjt_Float64_Zero0 = ($this) => {
32162
+ return asrjt_Float64_Zero;
32163
+ };
32164
+ var asrjt_Float64_NaN0 = ($this) => {
32165
+ return asrjt_Float64_NaN;
32166
+ };
32167
+ var asrjt_Float64__clinit_ = () => {
32168
+ asrjt_Float64_$assertionsDisabled = 0;
32169
+ asrjt_Float64_Zero = asrjt_Float64__init_(Long_ZERO);
32170
+ asrjt_Float64_NegativeZero = asrjt_Float64__init_(Long_create(0, 2147483648));
32171
+ asrjt_Float64_NaN = asrjt_Float64__init_(Long_create(0, 2146959360));
32172
+ asrjt_Float64_Infinity = asrjt_Float64__init_(Long_create(0, 2146435072));
32173
+ asrjt_Float64_NegativeInfinity = asrjt_Float64__init_(Long_create(0, 4293918720));
32174
+ };
32172
32175
  var asrjo_Arithmetic = $rt_classWithoutFields();
32173
32176
  var asrjo_Arithmetic_$assertionsDisabled = 0;
32174
32177
  var asrjo_Arithmetic_add = ($a, $b, $env) => {
@@ -32693,7 +32696,6 @@ var jm_Elementary_subtract = ($a, $aSize, $b, $bSize) => {
32693
32696
  }
32694
32697
  return $res;
32695
32698
  };
32696
- var jl_ArithmeticException = $rt_classWithoutFields(jl_RuntimeException);
32697
32699
  var jm_BitLevel = $rt_classWithoutFields();
32698
32700
  var jm_BitLevel_shiftLeft = ($source, $count) => {
32699
32701
  let $intCount, var$4, var$5, $resLength, $resDigits, var$8, var$9, var$10, var$11, var$12, $result;
@@ -32808,6 +32810,7 @@ var jm_BitLevel_shiftRight = ($source, $count) => {
32808
32810
  jm_BigInteger_cutOffLeadingZeroes($result);
32809
32811
  return $result;
32810
32812
  };
32813
+ var jl_ArithmeticException = $rt_classWithoutFields(jl_RuntimeException);
32811
32814
  var asrrs_NullString = $rt_classWithoutFields();
32812
32815
  var asrrs_NullString_get = ($statement) => {
32813
32816
  return asrrs_NullString_get0($statement, $rt_s(220));
@@ -33763,34 +33766,34 @@ function ju_Hashtable$Entry() {
33763
33766
  var ju_Hashtable$Entry_equalsKey = ($this, $aKey, $hash) => {
33764
33767
  return $this.$hashcode == jl_String_hashCode($aKey) && $this.$key.$equals($aKey) ? 1 : 0;
33765
33768
  };
33766
- var asrjt_Float32$1 = $rt_classWithoutFields();
33767
- var asrjt_Float32$1_$SwitchMap$app$specy$rars$jsoftfloat$RoundingMode = null;
33768
- var asrjt_Float32$1_$callClinit = () => {
33769
- asrjt_Float32$1_$callClinit = $rt_eraseClinit(asrjt_Float32$1);
33770
- asrjt_Float32$1__clinit_();
33769
+ var asrjt_Float64$1 = $rt_classWithoutFields();
33770
+ var asrjt_Float64$1_$SwitchMap$app$specy$rars$jsoftfloat$RoundingMode = null;
33771
+ var asrjt_Float64$1_$callClinit = () => {
33772
+ asrjt_Float64$1_$callClinit = $rt_eraseClinit(asrjt_Float64$1);
33773
+ asrjt_Float64$1__clinit_();
33771
33774
  };
33772
- var asrjt_Float32$1__clinit_ = () => {
33775
+ var asrjt_Float64$1__clinit_ = () => {
33773
33776
  let var$1, var$2;
33774
33777
  var$1 = $rt_createIntArray(asrj_RoundingMode_values().data.length);
33775
33778
  var$2 = var$1.data;
33776
- asrjt_Float32$1_$SwitchMap$app$specy$rars$jsoftfloat$RoundingMode = var$1;
33779
+ asrjt_Float64$1_$SwitchMap$app$specy$rars$jsoftfloat$RoundingMode = var$1;
33777
33780
  var$2[asrj_RoundingMode_zero.$ordinal0] = 1;
33778
33781
  var$2[asrj_RoundingMode_min.$ordinal0] = 2;
33779
33782
  var$2[asrj_RoundingMode_max.$ordinal0] = 3;
33780
33783
  var$2[asrj_RoundingMode_away.$ordinal0] = 4;
33781
33784
  var$2[asrj_RoundingMode_even.$ordinal0] = 5;
33782
33785
  };
33783
- var asrjt_Float64$1 = $rt_classWithoutFields();
33784
- var asrjt_Float64$1_$SwitchMap$app$specy$rars$jsoftfloat$RoundingMode = null;
33785
- var asrjt_Float64$1_$callClinit = () => {
33786
- asrjt_Float64$1_$callClinit = $rt_eraseClinit(asrjt_Float64$1);
33787
- asrjt_Float64$1__clinit_();
33786
+ var asrjt_Float32$1 = $rt_classWithoutFields();
33787
+ var asrjt_Float32$1_$SwitchMap$app$specy$rars$jsoftfloat$RoundingMode = null;
33788
+ var asrjt_Float32$1_$callClinit = () => {
33789
+ asrjt_Float32$1_$callClinit = $rt_eraseClinit(asrjt_Float32$1);
33790
+ asrjt_Float32$1__clinit_();
33788
33791
  };
33789
- var asrjt_Float64$1__clinit_ = () => {
33792
+ var asrjt_Float32$1__clinit_ = () => {
33790
33793
  let var$1, var$2;
33791
33794
  var$1 = $rt_createIntArray(asrj_RoundingMode_values().data.length);
33792
33795
  var$2 = var$1.data;
33793
- asrjt_Float64$1_$SwitchMap$app$specy$rars$jsoftfloat$RoundingMode = var$1;
33796
+ asrjt_Float32$1_$SwitchMap$app$specy$rars$jsoftfloat$RoundingMode = var$1;
33794
33797
  var$2[asrj_RoundingMode_zero.$ordinal0] = 1;
33795
33798
  var$2[asrj_RoundingMode_min.$ordinal0] = 2;
33796
33799
  var$2[asrj_RoundingMode_max.$ordinal0] = 3;
@@ -34930,16 +34933,6 @@ $rt_metadata([
34930
34933
  0,
34931
34934
  0,
34932
34935
  0,
34933
- asr_JsProgramStatement,
34934
- "JsProgramStatement",
34935
- 10,
34936
- jl_Object,
34937
- [],
34938
- 0,
34939
- 3,
34940
- 0,
34941
- 0,
34942
- 0,
34943
34936
  asrrh_RegisterFile,
34944
34937
  0,
34945
34938
  jl_Object,
@@ -34949,8 +34942,8 @@ $rt_metadata([
34949
34942
  0,
34950
34943
  asrrh_RegisterFile_$callClinit,
34951
34944
  0,
34952
- asr_JsStackFrame,
34953
- "JsStackFrame",
34945
+ asr_JsProgramStatement,
34946
+ "JsProgramStatement",
34954
34947
  10,
34955
34948
  jl_Object,
34956
34949
  [],
@@ -35014,45 +35007,55 @@ $rt_metadata([
35014
35007
  0,
35015
35008
  0,
35016
35009
  0,
35017
- asr_JsCompilationResult,
35018
- "JsCompilationResult",
35019
- 10,
35010
+ asr_JsRiscV$getUndoStack$lambda$_21_0,
35011
+ 0,
35020
35012
  jl_Object,
35021
- [],
35013
+ [juf_Function],
35022
35014
  0,
35023
35015
  3,
35024
35016
  0,
35025
35017
  0,
35018
+ ["$apply0", $rt_wrapFunction1(asr_JsRiscV$getUndoStack$lambda$_21_0_apply)],
35019
+ asr_JsRiscV$getUndoStack$lambda$_21_1,
35020
+ 0,
35021
+ jl_Object,
35022
+ [juf_IntFunction],
35026
35023
  0,
35027
- asr_AssemblyException,
35024
+ 3,
35028
35025
  0,
35029
- jl_Exception,
35026
+ 0,
35027
+ ["$apply", $rt_wrapFunction1(asr_JsRiscV$getUndoStack$lambda$_21_1_apply)],
35028
+ asr_JsBackStep,
35029
+ "JsBackStep",
35030
+ 10,
35031
+ jl_Object,
35030
35032
  [],
35031
35033
  0,
35032
35034
  3,
35033
35035
  0,
35034
35036
  0,
35035
35037
  0,
35036
- asr_JsRiscV$getUndoStack$lambda$_21_0,
35037
- 0,
35038
+ asr_JsCompilationResult,
35039
+ "JsCompilationResult",
35040
+ 10,
35038
35041
  jl_Object,
35039
- [juf_Function],
35042
+ [],
35040
35043
  0,
35041
35044
  3,
35042
35045
  0,
35043
35046
  0,
35044
- ["$apply0", $rt_wrapFunction1(asr_JsRiscV$getUndoStack$lambda$_21_0_apply)],
35045
- asr_JsRiscV$getUndoStack$lambda$_21_1,
35046
35047
  0,
35047
- jl_Object,
35048
- [juf_IntFunction],
35048
+ asr_AssemblyException,
35049
+ 0,
35050
+ jl_Exception,
35051
+ [],
35049
35052
  0,
35050
35053
  3,
35051
35054
  0,
35052
35055
  0,
35053
- ["$apply", $rt_wrapFunction1(asr_JsRiscV$getUndoStack$lambda$_21_1_apply)],
35054
- asr_JsBackStep,
35055
- "JsBackStep",
35056
+ 0,
35057
+ asr_JsStackFrame,
35058
+ "JsStackFrame",
35056
35059
  10,
35057
35060
  jl_Object,
35058
35061
  [],
@@ -35154,25 +35157,25 @@ $rt_metadata([
35154
35157
  0,
35155
35158
  0,
35156
35159
  0,
35157
- asrs_BackStepper,
35158
- 0,
35159
- jl_Object,
35160
+ asrrh_Register,
35161
+ "Register",
35162
+ 7,
35163
+ ju_Observable,
35160
35164
  [],
35161
35165
  0,
35162
35166
  3,
35163
35167
  0,
35164
35168
  0,
35169
+ ["$getValue", $rt_wrapFunction0(asrrh_Register_getValue), "$getValueNoNotify", $rt_wrapFunction0(asrrh_Register_getValueNoNotify), "$setValue", $rt_wrapFunction1(asrrh_Register_setValue), "$resetValue", $rt_wrapFunction0(asrrh_Register_resetValue)],
35170
+ asrs_BackStepper,
35165
35171
  0,
35166
- asrrh_Register,
35167
- "Register",
35168
- 7,
35169
- ju_Observable,
35172
+ jl_Object,
35170
35173
  [],
35171
35174
  0,
35172
35175
  3,
35173
35176
  0,
35174
35177
  0,
35175
- ["$getValue", $rt_wrapFunction0(asrrh_Register_getValue), "$getValueNoNotify", $rt_wrapFunction0(asrrh_Register_getValueNoNotify), "$setValue", $rt_wrapFunction1(asrrh_Register_setValue), "$resetValue", $rt_wrapFunction0(asrrh_Register_resetValue)],
35178
+ 0,
35176
35179
  jl_AutoCloseable,
35177
35180
  0,
35178
35181
  jl_Object,
@@ -35220,6 +35223,15 @@ $rt_metadata([
35220
35223
  0,
35221
35224
  0,
35222
35225
  ["$next1", $rt_wrapFunction1(jusi_ArrayStreamImpl_next), "$estimateSize", $rt_wrapFunction0(jusi_ArrayStreamImpl_estimateSize)],
35226
+ asrs_BackStepper$BackstepStack,
35227
+ 0,
35228
+ jl_Object,
35229
+ [],
35230
+ 0,
35231
+ 3,
35232
+ 0,
35233
+ 0,
35234
+ 0,
35223
35235
  asr_JsCompilationResult$_init_$lambda$_0_0,
35224
35236
  0,
35225
35237
  jl_Object,
@@ -35274,15 +35286,6 @@ $rt_metadata([
35274
35286
  0,
35275
35287
  0,
35276
35288
  0,
35277
- asrs_BackStepper$BackstepStack,
35278
- 0,
35279
- jl_Object,
35280
- [],
35281
- 0,
35282
- 3,
35283
- 0,
35284
- 0,
35285
- 0,
35286
35289
  jl_Math,
35287
35290
  0,
35288
35291
  jl_Object,
@@ -36833,7 +36836,7 @@ $rt_metadata([
36833
36836
  0,
36834
36837
  0,
36835
36838
  0,
36836
- asrrh_StackFrame,
36839
+ asr_ErrorList,
36837
36840
  0,
36838
36841
  jl_Object,
36839
36842
  [],
@@ -36842,7 +36845,7 @@ $rt_metadata([
36842
36845
  0,
36843
36846
  0,
36844
36847
  0,
36845
- asr_ErrorList,
36848
+ asrrh_StackFrame,
36846
36849
  0,
36847
36850
  jl_Object,
36848
36851
  [],
@@ -37743,15 +37746,6 @@ $rt_metadata([
37743
37746
  0,
37744
37747
  0,
37745
37748
  0,
37746
- jl_NegativeArraySizeException,
37747
- 0,
37748
- jl_RuntimeException,
37749
- [],
37750
- 0,
37751
- 3,
37752
- 0,
37753
- 0,
37754
- 0,
37755
37749
  otjc_JSObjects,
37756
37750
  0,
37757
37751
  jl_Object,
@@ -37779,6 +37773,15 @@ $rt_metadata([
37779
37773
  0,
37780
37774
  0,
37781
37775
  0,
37776
+ jl_NegativeArraySizeException,
37777
+ 0,
37778
+ jl_RuntimeException,
37779
+ [],
37780
+ 0,
37781
+ 3,
37782
+ 0,
37783
+ 0,
37784
+ 0,
37782
37785
  ju_Arrays$ArrayAsList,
37783
37786
  0,
37784
37787
  ju_AbstractList,
@@ -40649,6 +40652,24 @@ $rt_metadata([
40649
40652
  "$NaN",
40650
40653
  $rt_wrapFunction0(asrjt_Float32_NaN0)
40651
40654
  ],
40655
+ asrjo_Comparisons,
40656
+ 0,
40657
+ jl_Object,
40658
+ [],
40659
+ 0,
40660
+ 3,
40661
+ 0,
40662
+ 0,
40663
+ 0,
40664
+ jm_BigInteger,
40665
+ 0,
40666
+ jl_Number,
40667
+ [jl_Comparable, ji_Serializable],
40668
+ 0,
40669
+ 3,
40670
+ 0,
40671
+ 0,
40672
+ 0,
40652
40673
  asrjo_Conversions,
40653
40674
  0,
40654
40675
  jl_Object,
@@ -40700,24 +40721,6 @@ $rt_metadata([
40700
40721
  "$NaN",
40701
40722
  $rt_wrapFunction0(asrjt_Float64_NaN0)
40702
40723
  ],
40703
- asrjo_Comparisons,
40704
- 0,
40705
- jl_Object,
40706
- [],
40707
- 0,
40708
- 3,
40709
- 0,
40710
- 0,
40711
- 0,
40712
- jm_BigInteger,
40713
- 0,
40714
- jl_Number,
40715
- [jl_Comparable, ji_Serializable],
40716
- 0,
40717
- 3,
40718
- 0,
40719
- 0,
40720
- 0,
40721
40724
  asrjo_Arithmetic,
40722
40725
  0,
40723
40726
  jl_Object,
@@ -40801,21 +40804,21 @@ $rt_metadata([
40801
40804
  0,
40802
40805
  0,
40803
40806
  0,
40804
- jl_ArithmeticException,
40807
+ jm_BitLevel,
40805
40808
  0,
40806
- jl_RuntimeException,
40809
+ jl_Object,
40807
40810
  [],
40808
40811
  0,
40809
- 3,
40810
40812
  0,
40811
40813
  0,
40812
40814
  0,
40813
- jm_BitLevel,
40814
40815
  0,
40815
- jl_Object,
40816
- [],
40816
+ jl_ArithmeticException,
40817
40817
  0,
40818
+ jl_RuntimeException,
40819
+ [],
40818
40820
  0,
40821
+ 3,
40819
40822
  0,
40820
40823
  0,
40821
40824
  0,
@@ -40956,23 +40959,23 @@ $rt_metadata([
40956
40959
  0,
40957
40960
  0,
40958
40961
  0,
40959
- asrjt_Float32$1,
40962
+ asrjt_Float64$1,
40960
40963
  0,
40961
40964
  jl_Object,
40962
40965
  [],
40963
40966
  32,
40964
40967
  0,
40965
40968
  0,
40966
- asrjt_Float32$1_$callClinit,
40969
+ asrjt_Float64$1_$callClinit,
40967
40970
  0,
40968
- asrjt_Float64$1,
40971
+ asrjt_Float32$1,
40969
40972
  0,
40970
40973
  jl_Object,
40971
40974
  [],
40972
40975
  32,
40973
40976
  0,
40974
40977
  0,
40975
- asrjt_Float64$1_$callClinit,
40978
+ asrjt_Float32$1_$callClinit,
40976
40979
  0,
40977
40980
  jm_Multiplication,
40978
40981
  0,
@@ -41146,7 +41149,7 @@ $rt_stringPool([
41146
41149
  "store address out of range ",
41147
41150
  "store address not aligned on halfword boundary ",
41148
41151
  "Store address to text segment out of range",
41149
- "Cannot read directly from text segment!",
41152
+ "cCannot read directly from text segment!",
41150
41153
  "Load address not aligned to word boundary ",
41151
41154
  "Load address not aligned on halfword boundary ",
41152
41155
  "fetch address for text segment out of range ",
@@ -42697,10 +42700,10 @@ $rt_stringPool([
42697
42700
  "NaNs are not exact",
42698
42701
  "Zeros should be handled explicitly",
42699
42702
  "This should not be reachable",
42700
- "There can't be any fractions at this point",
42701
42703
  "Negative bit address",
42702
42704
  "BigInteger out of int range",
42703
42705
  "BigInteger out of long range",
42706
+ "There can't be any fractions at this point",
42704
42707
  "Square root of a negative number is not real",
42705
42708
  "Cannot get here",
42706
42709
  "Both should definitely be finite by this point",
@@ -42802,22 +42805,6 @@ var $rt_jso_marker = Symbol("jsoClass");
42802
42805
  Object.defineProperty(c, "source", {
42803
42806
  get: $rt_callWithReceiver(asr_JsProgramStatement_getSource$exported$2)
42804
42807
  });
42805
- c = asr_JsStackFrame.prototype;
42806
- Object.defineProperty(c, "pc", {
42807
- get: $rt_callWithReceiver(asr_JsStackFrame_getPc$exported$0)
42808
- });
42809
- Object.defineProperty(c, "registers", {
42810
- get: $rt_callWithReceiver(asr_JsStackFrame_getRegisters$exported$2)
42811
- });
42812
- Object.defineProperty(c, "fp", {
42813
- get: $rt_callWithReceiver(asr_JsStackFrame_getFp$exported$4)
42814
- });
42815
- Object.defineProperty(c, "sp", {
42816
- get: $rt_callWithReceiver(asr_JsStackFrame_getSp$exported$3)
42817
- });
42818
- Object.defineProperty(c, "toAddress", {
42819
- get: $rt_callWithReceiver(asr_JsStackFrame_getToAddress$exported$1)
42820
- });
42821
42808
  c = asr_JsRiscVTokenizedLine.prototype;
42822
42809
  Object.defineProperty(c, "line", {
42823
42810
  get: $rt_callWithReceiver(asr_JsRiscVTokenizedLine_getLine$exported$0)
@@ -42825,6 +42812,19 @@ var $rt_jso_marker = Symbol("jsoClass");
42825
42812
  Object.defineProperty(c, "tokens", {
42826
42813
  get: $rt_callWithReceiver(asr_JsRiscVTokenizedLine_getTokens$exported$1)
42827
42814
  });
42815
+ c = asr_JsBackStep.prototype;
42816
+ Object.defineProperty(c, "pc", {
42817
+ get: $rt_callWithReceiver(asr_JsBackStep_getPc$exported$0)
42818
+ });
42819
+ Object.defineProperty(c, "action", {
42820
+ get: $rt_callWithReceiver(asr_JsBackStep_getAction$exported$2)
42821
+ });
42822
+ Object.defineProperty(c, "param1", {
42823
+ get: $rt_callWithReceiver(asr_JsBackStep_getParam1$exported$3)
42824
+ });
42825
+ Object.defineProperty(c, "param2", {
42826
+ get: $rt_callWithReceiver(asr_JsBackStep_getParam2$exported$1)
42827
+ });
42828
42828
  c = asr_JsCompilationResult.prototype;
42829
42829
  Object.defineProperty(c, "hasErrors", {
42830
42830
  get: $rt_callWithReceiver(asr_JsCompilationResult_hasErrors$exported$1)
@@ -42835,18 +42835,21 @@ var $rt_jso_marker = Symbol("jsoClass");
42835
42835
  Object.defineProperty(c, "errors", {
42836
42836
  get: $rt_callWithReceiver(asr_JsCompilationResult_getErrors$exported$0)
42837
42837
  });
42838
- c = asr_JsBackStep.prototype;
42838
+ c = asr_JsStackFrame.prototype;
42839
42839
  Object.defineProperty(c, "pc", {
42840
- get: $rt_callWithReceiver(asr_JsBackStep_getPc$exported$0)
42840
+ get: $rt_callWithReceiver(asr_JsStackFrame_getPc$exported$0)
42841
42841
  });
42842
- Object.defineProperty(c, "action", {
42843
- get: $rt_callWithReceiver(asr_JsBackStep_getAction$exported$2)
42842
+ Object.defineProperty(c, "registers", {
42843
+ get: $rt_callWithReceiver(asr_JsStackFrame_getRegisters$exported$2)
42844
42844
  });
42845
- Object.defineProperty(c, "param1", {
42846
- get: $rt_callWithReceiver(asr_JsBackStep_getParam1$exported$3)
42845
+ Object.defineProperty(c, "fp", {
42846
+ get: $rt_callWithReceiver(asr_JsStackFrame_getFp$exported$4)
42847
42847
  });
42848
- Object.defineProperty(c, "param2", {
42849
- get: $rt_callWithReceiver(asr_JsBackStep_getParam2$exported$1)
42848
+ Object.defineProperty(c, "sp", {
42849
+ get: $rt_callWithReceiver(asr_JsStackFrame_getSp$exported$3)
42850
+ });
42851
+ Object.defineProperty(c, "toAddress", {
42852
+ get: $rt_callWithReceiver(asr_JsStackFrame_getToAddress$exported$1)
42850
42853
  });
42851
42854
  c = asr_JsCompilationResult$JsCompilationError.prototype;
42852
42855
  Object.defineProperty(c, "macroExpansionHistory", {
@@ -42894,26 +42897,26 @@ function $rt_export_class_JsInstruction_32() {
42894
42897
  throw new Error("Can't instantiate this class directly");
42895
42898
  }
42896
42899
  $rt_export_class_JsInstruction_32.prototype = asr_JsInstruction.prototype;
42897
- function $rt_export_class_JsProgramStatement_70() {
42900
+ function $rt_export_class_JsProgramStatement_71() {
42898
42901
  throw new Error("Can't instantiate this class directly");
42899
42902
  }
42900
- $rt_export_class_JsProgramStatement_70.prototype = asr_JsProgramStatement.prototype;
42901
- function $rt_export_class_JsStackFrame_72() {
42903
+ $rt_export_class_JsProgramStatement_71.prototype = asr_JsProgramStatement.prototype;
42904
+ function $rt_export_class_JsRiscVTokenizedLine_74() {
42902
42905
  throw new Error("Can't instantiate this class directly");
42903
42906
  }
42904
- $rt_export_class_JsStackFrame_72.prototype = asr_JsStackFrame.prototype;
42905
- function $rt_export_class_JsRiscVTokenizedLine_75() {
42907
+ $rt_export_class_JsRiscVTokenizedLine_74.prototype = asr_JsRiscVTokenizedLine.prototype;
42908
+ function $rt_export_class_JsBackStep_80() {
42906
42909
  throw new Error("Can't instantiate this class directly");
42907
42910
  }
42908
- $rt_export_class_JsRiscVTokenizedLine_75.prototype = asr_JsRiscVTokenizedLine.prototype;
42909
- function $rt_export_class_JsCompilationResult_79() {
42911
+ $rt_export_class_JsBackStep_80.prototype = asr_JsBackStep.prototype;
42912
+ function $rt_export_class_JsCompilationResult_81() {
42910
42913
  throw new Error("Can't instantiate this class directly");
42911
42914
  }
42912
- $rt_export_class_JsCompilationResult_79.prototype = asr_JsCompilationResult.prototype;
42913
- function $rt_export_class_JsBackStep_83() {
42915
+ $rt_export_class_JsCompilationResult_81.prototype = asr_JsCompilationResult.prototype;
42916
+ function $rt_export_class_JsStackFrame_83() {
42914
42917
  throw new Error("Can't instantiate this class directly");
42915
42918
  }
42916
- $rt_export_class_JsBackStep_83.prototype = asr_JsBackStep.prototype;
42919
+ $rt_export_class_JsStackFrame_83.prototype = asr_JsStackFrame.prototype;
42917
42920
  function $rt_export_class_JsCompilationError_349() {
42918
42921
  throw new Error("Can't instantiate this class directly");
42919
42922
  }
@@ -43006,7 +43009,10 @@ var RISCVRegisters = /* @__PURE__ */ ((RISCVRegisters2) => {
43006
43009
  RISCVRegisters2[RISCVRegisters2["t6"] = 31] = "t6";
43007
43010
  return RISCVRegisters2;
43008
43011
  })(RISCVRegisters || {});
43009
- var RISCV_REGISTERS = Object.keys(RISCVRegisters);
43012
+ function keysOfEnum(e) {
43013
+ return Object.keys(e).filter((k) => isNaN(Number(k)));
43014
+ }
43015
+ var RISCV_REGISTERS = keysOfEnum(RISCVRegisters);
43010
43016
  function registerHandlers(riscv, handlers) {
43011
43017
  for (const [name, handler] of Object.entries(handlers)) {
43012
43018
  riscv.registerHandler(name, handler);