ZiluTian / economic_simulations

0 stars 1 forks source link

Duplication in generated code regarding calls #44

Closed ZiluTian closed 3 years ago

ZiluTian commented 3 years ago

Remove the duplication in generated code regarding save to the stack and set method.

  val x_0 = p1@642239bd.argss;
  val x_1 = x_0(0);
  val x_2 = x_1(0);
  x@696076df.prepend(x_2);
  val x_3 = p1@642239bd.argss;
  val x_4 = x_3(0);
  val x_5 = x_4(0);
  val x_6= x_5.asInstanceOf[scala.Int];
  methodArgsMut@7fcabbfc.:=(x_6);
ZiluTian commented 3 years ago

After the fix:

  val x_0 = p1@642239bd.argss;
  val x_1 = x_0(0);
  val x_2 = x_1(0);
  x@696076df.prepend(x_2);
  val x_3 = x_2.asInstanceOf[scala.Int];
  methodArgsMut@7fcabbfc.:=(x_3);