This commit is contained in:
Kartik Agaram 2020-03-25 09:54:53 -07:00
parent 84c426d2ab
commit 606c1ab49a
2 changed files with 6 additions and 6 deletions

View File

@ -177,7 +177,7 @@ var/reg <span class="Special">&lt;-</span> multiply *var2/reg2 =&gt; <span cl
In the following instructions types are provided for clarity even if they must In the following instructions types are provided for clarity even if they must
be provided in an earlier 'var' declaration. be provided in an earlier 'var' declaration.
Address operations <span class="Comment"># Address operations</span>
var/reg: (addr T) <span class="Special">&lt;-</span> address var2: T var/reg: (addr T) <span class="Special">&lt;-</span> address var2: T
=&gt; <span class="Constant">&quot;8d/copy-address *(ebp+&quot;</span> var2.stack-offset <span class="Constant">&quot;) &quot;</span> reg <span class="Constant">&quot;/r32&quot;</span> =&gt; <span class="Constant">&quot;8d/copy-address *(ebp+&quot;</span> var2.stack-offset <span class="Constant">&quot;) &quot;</span> reg <span class="Constant">&quot;/r32&quot;</span>
@ -202,7 +202,7 @@ var/reg: (offset T) <span class="Special">&lt;-</span> compute-offset arr: (addr
var/reg <span class="Special">&lt;-</span> index arr/rega: (addr array T), o/rego: offset var/reg <span class="Special">&lt;-</span> index arr/rega: (addr array T), o/rego: offset
=&gt; <span class="Constant">&quot;8d/copy-address *(&quot;</span> rega <span class="Constant">&quot;+&quot;</span> rego <span class="Constant">&quot;+4) &quot;</span> reg <span class="Constant">&quot;/r32&quot;</span> =&gt; <span class="Constant">&quot;8d/copy-address *(&quot;</span> rega <span class="Constant">&quot;+&quot;</span> rego <span class="Constant">&quot;+4) &quot;</span> reg <span class="Constant">&quot;/r32&quot;</span>
User-defined types <span class="Comment"># User-defined types</span>
If a record (product) type T was defined to have elements a, b, c, ... of If a record (product) type T was defined to have elements a, b, c, ... of
types T_a, T_b, T_c, ..., then accessing one of those elements f of type T_f: types T_a, T_b, T_c, ..., then accessing one of those elements f of type T_f:
@ -212,7 +212,7 @@ var/reg: (addr T_f) <span class="Special">&lt;-</span> get var2/reg2: (addr F),
var/reg: (addr T_f) <span class="Special">&lt;-</span> get var2: (addr F), f var/reg: (addr T_f) <span class="Special">&lt;-</span> get var2: (addr F), f
=&gt; <span class="Constant">&quot;8d/copy-address *(ebp+&quot;</span> var2.stack-offset <span class="Constant">&quot;+&quot;</span> offset(f) <span class="Constant">&quot;) &quot;</span> reg <span class="Constant">&quot;/r32&quot;</span> =&gt; <span class="Constant">&quot;8d/copy-address *(ebp+&quot;</span> var2.stack-offset <span class="Constant">&quot;+&quot;</span> offset(f) <span class="Constant">&quot;) &quot;</span> reg <span class="Constant">&quot;/r32&quot;</span>
Handles for safe access to the heap <span class="Comment"># Handles for safe access to the heap</span>
copy-handle-to dest: (handle T), src: (handle T) copy-handle-to dest: (handle T), src: (handle T)
=&gt; <span class="Constant">&quot;50/push-eax&quot;</span> =&gt; <span class="Constant">&quot;50/push-eax&quot;</span>

View File

@ -152,7 +152,7 @@ loop-if-addr>= label => "0f 83/jump-if-addr>= " label ":loop/disp32
In the following instructions types are provided for clarity even if they must In the following instructions types are provided for clarity even if they must
be provided in an earlier 'var' declaration. be provided in an earlier 'var' declaration.
Address operations # Address operations
var/reg: (addr T) <- address var2: T var/reg: (addr T) <- address var2: T
=> "8d/copy-address *(ebp+" var2.stack-offset ") " reg "/r32" => "8d/copy-address *(ebp+" var2.stack-offset ") " reg "/r32"
@ -177,7 +177,7 @@ var/reg: (offset T) <- compute-offset arr: (addr array T), idx: int # arr
var/reg <- index arr/rega: (addr array T), o/rego: offset var/reg <- index arr/rega: (addr array T), o/rego: offset
=> "8d/copy-address *(" rega "+" rego "+4) " reg "/r32" => "8d/copy-address *(" rega "+" rego "+4) " reg "/r32"
User-defined types # User-defined types
If a record (product) type T was defined to have elements a, b, c, ... of If a record (product) type T was defined to have elements a, b, c, ... of
types T_a, T_b, T_c, ..., then accessing one of those elements f of type T_f: types T_a, T_b, T_c, ..., then accessing one of those elements f of type T_f:
@ -187,7 +187,7 @@ var/reg: (addr T_f) <- get var2/reg2: (addr F), f
var/reg: (addr T_f) <- get var2: (addr F), f var/reg: (addr T_f) <- get var2: (addr F), f
=> "8d/copy-address *(ebp+" var2.stack-offset "+" offset(f) ") " reg "/r32" => "8d/copy-address *(ebp+" var2.stack-offset "+" offset(f) ") " reg "/r32"
Handles for safe access to the heap # Handles for safe access to the heap
copy-handle-to dest: (handle T), src: (handle T) copy-handle-to dest: (handle T), src: (handle T)
=> "50/push-eax" => "50/push-eax"