From dd60a1d73c8017fd3d80ccf91e4549fc47a90760 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Mon, 16 Nov 2020 20:44:02 -0800 Subject: 7252 --- html/apps/raytracing/1.mu.html | 2 +- html/apps/raytracing/2.mu.html | 14 +-- html/apps/raytracing/3.mu.html | 172 ++++++++++++++++++------------------- html/apps/raytracing/color.mu.html | 6 +- html/apps/raytracing/ray.mu.html | 10 +-- html/apps/raytracing/vec.mu.html | 52 +++++------ 6 files changed, 128 insertions(+), 128 deletions(-) (limited to 'html/apps/raytracing') diff --git a/html/apps/raytracing/1.mu.html b/html/apps/raytracing/1.mu.html index bc5ab657..b72418ad 100644 --- a/html/apps/raytracing/1.mu.html +++ b/html/apps/raytracing/1.mu.html @@ -65,7 +65,7 @@ if ('onhashchange' in window) { 7 # $ ./translate_mu apps/raytracing/1.mu 8 # $ ./a.elf > 1.ppm 9 -10 fn main -> _/ebx: int { +10 fn main -> _/ebx: int { 11 print-string 0, "P3\n256 256\n255\n" 12 var j/ecx: int <- copy 0xff 13 { diff --git a/html/apps/raytracing/2.mu.html b/html/apps/raytracing/2.mu.html index 8e068b01..56563080 100644 --- a/html/apps/raytracing/2.mu.html +++ b/html/apps/raytracing/2.mu.html @@ -65,7 +65,7 @@ if ('onhashchange' in window) { 6 # $ ./translate_mu apps/raytracing/2.mu 7 # $ ./a.elf > 2.ppm 8 - 9 fn main -> _/ebx: int { + 9 fn main -> _/ebx: int { 10 print-string 0, "P3\n256 256\n255\n" 11 var _four/edx: int <- copy 4 12 var four/xmm1: float <- convert _four @@ -80,7 +80,7 @@ if ('onhashchange' in window) { 21 { 22 compare i, 0xff 23 break-if-> -24 var c: rgb +24 var c: rgb 25 # compute r 26 var tmp/xmm0: float <- convert i 27 tmp <- divide image-size @@ -98,8 +98,8 @@ if ('onhashchange' in window) { 39 var b-addr/edx: (addr float) <- get c, b 40 copy-to *b-addr, one-fourth 41 # emit -42 var c-addr/edx: (addr rgb) <- address c -43 print-rgb 0, c-addr +42 var c-addr/edx: (addr rgb) <- address c +43 print-rgb 0, c-addr 44 i <- increment 45 loop 46 } @@ -109,7 +109,7 @@ if ('onhashchange' in window) { 50 return 0 51 } 52 -53 type rgb { +53 type rgb { 54 # components normalized to within [0.0, 1.0] 55 r: float 56 g: float @@ -117,8 +117,8 @@ if ('onhashchange' in window) { 58 } 59 60 # print translating to [0, 256) -61 fn print-rgb screen: (addr screen), _c: (addr rgb) { -62 var c/esi: (addr rgb) <- copy _c +61 fn print-rgb screen: (addr screen), _c: (addr rgb) { +62 var c/esi: (addr rgb) <- copy _c 63 var n/ecx: int <- copy 0xff # turns out 255 works just as well as 255.999, which is lucky because we don't have floating-point literals 64 var xn/xmm1: float <- convert n 65 # print 255 * c->r diff --git a/html/apps/raytracing/3.mu.html b/html/apps/raytracing/3.mu.html index 9819e2ba..0e6820b4 100644 --- a/html/apps/raytracing/3.mu.html +++ b/html/apps/raytracing/3.mu.html @@ -67,16 +67,16 @@ if ('onhashchange' in window) { 6 # $ ./translate_mu apps/raytracing/3.mu 7 # $ ./a.elf > 3.ppm 8 - 9 fn ray-color _in: (addr ray), _out: (addr rgb) { - 10 var in/esi: (addr ray) <- copy _in - 11 var out/edi: (addr rgb) <- copy _out - 12 var dir/eax: (addr vec3) <- get in, dir + 9 fn ray-color _in: (addr ray), _out: (addr rgb) { + 10 var in/esi: (addr ray) <- copy _in + 11 var out/edi: (addr rgb) <- copy _out + 12 var dir/eax: (addr vec3) <- get in, dir 13 #? print-string 0, "r.dir: " 14 #? print-vec3 0, dir 15 #? print-string 0, "\n" - 16 var unit-storage: vec3 - 17 var unit/ecx: (addr vec3) <- address unit-storage - 18 vec3-unit dir, unit + 16 var unit-storage: vec3 + 17 var unit/ecx: (addr vec3) <- address unit-storage + 18 vec3-unit dir, unit 19 #? print-string 0, "r.dir normalized: " 20 #? print-vec3 0, unit 21 #? print-string 0, "\n" @@ -93,8 +93,8 @@ if ('onhashchange' in window) { 32 #? print-float 0, t 33 #? print-string 0, "\n" 34 # whitening = (1.0 - t) * white - 35 var whitening-storage: rgb - 36 var whitening/ecx: (addr rgb) <- address whitening-storage + 35 var whitening-storage: rgb + 36 var whitening/ecx: (addr rgb) <- address whitening-storage 37 rgb-white whitening 38 var one-minus-t/xmm3: float <- copy one-f 39 one-minus-t <- subtract t @@ -120,7 +120,7 @@ if ('onhashchange' in window) { 59 #? print-string 0, "\n" 60 } 61 - 62 fn main -> _/ebx: int { + 62 fn main -> _/ebx: int { 63 64 # image 65 # width = 400 @@ -171,33 +171,33 @@ if ('onhashchange' in window) { 110 var focal-length/xmm5: float <- convert tmp 111 112 # origin = point3(0, 0, 0) -113 var origin-storage: vec3 -114 var origin/edi: (addr vec3) <- address origin-storage +113 var origin-storage: vec3 +114 var origin/edi: (addr vec3) <- address origin-storage 115 # horizontal = vec3(viewport-width, 0, 0) -116 var horizontal-storage: vec3 +116 var horizontal-storage: vec3 117 var dest/eax: (addr float) <- get horizontal-storage, x 118 copy-to *dest, viewport-width -119 var horizontal/ebx: (addr vec3) <- address horizontal-storage +119 var horizontal/ebx: (addr vec3) <- address horizontal-storage 120 # vertical = vec3(0, viewport-height, 0) -121 var vertical-storage: vec3 +121 var vertical-storage: vec3 122 dest <- get vertical-storage, y 123 copy-to *dest, viewport-height -124 var vertical/edx: (addr vec3) <- address vertical-storage +124 var vertical/edx: (addr vec3) <- address vertical-storage 125 # lower-left-corner = origin - horizontal/2 - vertical/2 - vec3(0, 0, focal-length) 126 # . lower-left-corner = origin -127 var lower-left-corner-storage: vec3 -128 var lower-left-corner/esi: (addr vec3) <- address lower-left-corner-storage +127 var lower-left-corner-storage: vec3 +128 var lower-left-corner/esi: (addr vec3) <- address lower-left-corner-storage 129 copy-object origin, lower-left-corner 130 # . lower-left-corner -= horizontal/2 -131 var tmp2: vec3 -132 var tmp2-addr/eax: (addr vec3) <- address tmp2 +131 var tmp2: vec3 +132 var tmp2-addr/eax: (addr vec3) <- address tmp2 133 copy-object horizontal, tmp2-addr -134 vec3-scale-down tmp2-addr, two-f -135 vec3-subtract-from lower-left-corner, tmp2-addr +134 vec3-scale-down tmp2-addr, two-f +135 vec3-subtract-from lower-left-corner, tmp2-addr 136 # . lower-left-corner -= vertical/2 137 copy-object vertical, tmp2-addr -138 vec3-scale-down tmp2-addr, two-f -139 vec3-subtract-from lower-left-corner, tmp2-addr +138 vec3-scale-down tmp2-addr, two-f +139 vec3-subtract-from lower-left-corner, tmp2-addr 140 # . lower-left-corner -= vec3(0, 0, focal-length) 141 var dest2/ecx: (addr float) <- get lower-left-corner, z 142 var tmp3/xmm0: float <- copy *dest2 @@ -237,42 +237,42 @@ if ('onhashchange' in window) { 176 var v/xmm1: float <- convert j 177 v <- divide image-height-1 178 # r = ray(origin, lower-left-corner + u*horizontal + v*vertical - origin) -179 var r-storage: ray +179 var r-storage: ray 180 # . . we're running out of int registers now, 181 # . . but luckily we don't need i and j in the rest of this loop iteration, 182 # . . so we'll just spill them in a block 183 { 184 # . r.orig = origin -185 var r/eax: (addr ray) <- address r-storage -186 var dest/ecx: (addr vec3) <- get r, orig +185 var r/eax: (addr ray) <- address r-storage +186 var dest/ecx: (addr vec3) <- get r, orig 187 copy-object origin, dest 188 # . r.dir = lower-left-corner 189 dest <- get r, dir 190 copy-object lower-left-corner, dest 191 # . r.dir += horizontal*u -192 var tmp-vec3: vec3 -193 var tmp/eax: (addr vec3) <- address tmp-vec3 +192 var tmp-vec3: vec3 +193 var tmp/eax: (addr vec3) <- address tmp-vec3 194 copy-object horizontal, tmp -195 vec3-scale-up tmp, u -196 vec3-add-to dest, tmp +195 vec3-scale-up tmp, u +196 vec3-add-to dest, tmp 197 # . r.dir += vertical*v 198 copy-object vertical, tmp -199 vec3-scale-up tmp, v -200 vec3-add-to dest, tmp +199 vec3-scale-up tmp, v +200 vec3-add-to dest, tmp 201 # . r.dir -= origin -202 vec3-subtract-from dest, origin +202 vec3-subtract-from dest, origin 203 #? print-string 0, "ray direction: " 204 #? print-vec3 0, dest 205 #? print-string 0, "\n" 206 } 207 # pixel-color = ray-color(r) -208 var c-storage: rgb -209 var c/ecx: (addr rgb) <- address c-storage +208 var c-storage: rgb +209 var c/ecx: (addr rgb) <- address c-storage 210 { -211 var r/eax: (addr ray) <- address r-storage +211 var r/eax: (addr ray) <- address r-storage 212 ray-color r, c 213 # write color -214 print-rgb 0, c +214 print-rgb 0, c 215 #? print-rgb-raw 0, c 216 #? print-string 0, "\n" 217 } @@ -285,32 +285,32 @@ if ('onhashchange' in window) { 224 return 0 225 } 226 -227 type ray { -228 orig: vec3 # point -229 dir: vec3 +227 type ray { +228 orig: vec3 # point +229 dir: vec3 230 } 231 232 # A little different from the constructor at https://raytracing.github.io/books/RayTracingInOneWeekend.html 233 # We immediately normalize the direction vector so we don't have to keep doing 234 # so. -235 fn initialize-ray _self: (addr ray), o: (addr vec3), d: (addr vec3) { -236 var self/esi: (addr ray) <- copy _self -237 var dest/eax: (addr vec3) <- get self, orig +235 fn initialize-ray _self: (addr ray), o: (addr vec3), d: (addr vec3) { +236 var self/esi: (addr ray) <- copy _self +237 var dest/eax: (addr vec3) <- get self, orig 238 copy-object o, dest 239 dest <- get self, dir -240 vec3-unit d, dest +240 vec3-unit d, dest 241 } 242 -243 fn ray-at _self: (addr ray), t: float, out: (addr vec3) { -244 var self/esi: (addr ray) <- copy _self -245 var src/eax: (addr vec3) <- get self, dir +243 fn ray-at _self: (addr ray), t: float, out: (addr vec3) { +244 var self/esi: (addr ray) <- copy _self +245 var src/eax: (addr vec3) <- get self, dir 246 copy-object src, out -247 vec3-scale-up out, t +247 vec3-scale-up out, t 248 src <- get self, orig -249 vec3-add-to out, src +249 vec3-add-to out, src 250 } 251 -252 type rgb { +252 type rgb { 253 # components normalized to within [0.0, 1.0] 254 r: float 255 g: float @@ -318,8 +318,8 @@ if ('onhashchange' in window) { 257 } 258 259 # print translating to [0, 256) -260 fn print-rgb screen: (addr screen), _c: (addr rgb) { -261 var c/esi: (addr rgb) <- copy _c +260 fn print-rgb screen: (addr screen), _c: (addr rgb) { +261 var c/esi: (addr rgb) <- copy _c 262 var xn: float 263 var xn-addr/ecx: (addr float) <- address xn 264 fill-in-rational xn-addr, 0x3e7ff, 0x3e8 # 255999 / 1000 @@ -346,8 +346,8 @@ if ('onhashchange' in window) { 285 print-string screen, "\n" 286 } 287 -288 fn print-rgb-raw screen: (addr screen), _v: (addr rgb) { -289 var v/esi: (addr rgb) <- copy _v +288 fn print-rgb-raw screen: (addr screen), _v: (addr rgb) { +289 var v/esi: (addr rgb) <- copy _v 290 print-string screen, "(" 291 var tmp/eax: (addr float) <- get v, r 292 print-float screen, *tmp @@ -360,8 +360,8 @@ if ('onhashchange' in window) { 299 print-string screen, ")" 300 } 301 -302 fn rgb-white _c: (addr rgb) { -303 var c/esi: (addr rgb) <- copy _c +302 fn rgb-white _c: (addr rgb) { +303 var c/esi: (addr rgb) <- copy _c 304 var one/eax: int <- copy 1 305 var one-f/xmm0: float <- convert one 306 var dest/edi: (addr float) <- get c, r @@ -372,9 +372,9 @@ if ('onhashchange' in window) { 311 copy-to *dest, one-f 312 } 313 -314 fn rgb-add-to _c1: (addr rgb), _c2: (addr rgb) { -315 var c1/edi: (addr rgb) <- copy _c1 -316 var c2/esi: (addr rgb) <- copy _c2 +314 fn rgb-add-to _c1: (addr rgb), _c2: (addr rgb) { +315 var c1/edi: (addr rgb) <- copy _c1 +316 var c2/esi: (addr rgb) <- copy _c2 317 # c1.r += c2.r 318 var arg1/eax: (addr float) <- get c1, r 319 var arg2/ecx: (addr float) <- get c2, r @@ -395,8 +395,8 @@ if ('onhashchange' in window) { 334 copy-to *arg1, result 335 } 336 -337 fn rgb-scale-up _c1: (addr rgb), f: float { -338 var c1/edi: (addr rgb) <- copy _c1 +337 fn rgb-scale-up _c1: (addr rgb), f: float { +338 var c1/edi: (addr rgb) <- copy _c1 339 # c1.r *= f 340 var dest/eax: (addr float) <- get c1, r 341 var result/xmm0: float <- copy *dest @@ -414,14 +414,14 @@ if ('onhashchange' in window) { 353 copy-to *dest, result 354 } 355 -356 type vec3 { +356 type vec3 { 357 x: float 358 y: float 359 z: float 360 } 361 -362 fn print-vec3 screen: (addr screen), _v: (addr vec3) { -363 var v/esi: (addr vec3) <- copy _v +362 fn print-vec3 screen: (addr screen), _v: (addr vec3) { +363 var v/esi: (addr vec3) <- copy _v 364 print-string screen, "(" 365 var tmp/eax: (addr float) <- get v, x 366 print-float screen, *tmp @@ -434,9 +434,9 @@ if ('onhashchange' in window) { 373 print-string screen, ")" 374 } 375 -376 fn vec3-add-to _v1: (addr vec3), _v2: (addr vec3) { -377 var v1/edi: (addr vec3) <- copy _v1 -378 var v2/esi: (addr vec3) <- copy _v2 +376 fn vec3-add-to _v1: (addr vec3), _v2: (addr vec3) { +377 var v1/edi: (addr vec3) <- copy _v1 +378 var v2/esi: (addr vec3) <- copy _v2 379 # v1.x += v2.x 380 var arg1/eax: (addr float) <- get v1, x 381 var arg2/ecx: (addr float) <- get v2, x @@ -457,22 +457,22 @@ if ('onhashchange' in window) { 396 copy-to *arg1, result 397 } 398 -399 fn vec3-subtract-from v1: (addr vec3), v2: (addr vec3) { -400 var tmp-storage: vec3 -401 var tmp/eax: (addr vec3) <- address tmp-storage +399 fn vec3-subtract-from v1: (addr vec3), v2: (addr vec3) { +400 var tmp-storage: vec3 +401 var tmp/eax: (addr vec3) <- address tmp-storage 402 copy-object v2, tmp -403 vec3-negate tmp -404 vec3-add-to v1, tmp +403 vec3-negate tmp +404 vec3-add-to v1, tmp 405 } 406 -407 fn vec3-negate v: (addr vec3) { +407 fn vec3-negate v: (addr vec3) { 408 var negative-one/eax: int <- copy -1 409 var negative-one-f/xmm0: float <- convert negative-one -410 vec3-scale-up v, negative-one-f +410 vec3-scale-up v, negative-one-f 411 } 412 -413 fn vec3-scale-up _v: (addr vec3), f: float { -414 var v/edi: (addr vec3) <- copy _v +413 fn vec3-scale-up _v: (addr vec3), f: float { +414 var v/edi: (addr vec3) <- copy _v 415 # v.x *= f 416 var dest/eax: (addr float) <- get v, x 417 var result/xmm0: float <- copy *dest @@ -490,8 +490,8 @@ if ('onhashchange' in window) { 429 copy-to *dest, result 430 } 431 -432 fn vec3-scale-down _v: (addr vec3), f: float { -433 var v/edi: (addr vec3) <- copy _v +432 fn vec3-scale-down _v: (addr vec3), f: float { +433 var v/edi: (addr vec3) <- copy _v 434 # v.x /= f 435 var dest/eax: (addr float) <- get v, x 436 var result/xmm0: float <- copy *dest @@ -509,23 +509,23 @@ if ('onhashchange' in window) { 448 copy-to *dest, result 449 } 450 -451 fn vec3-unit in: (addr vec3), out: (addr vec3) { -452 var len/xmm0: float <- vec3-length in +451 fn vec3-unit in: (addr vec3), out: (addr vec3) { +452 var len/xmm0: float <- vec3-length in 453 #? print-string 0, "len: " 454 #? print-float 0, len 455 #? print-string 0, "\n" 456 copy-object in, out -457 vec3-scale-down out, len +457 vec3-scale-down out, len 458 } 459 -460 fn vec3-length v: (addr vec3) -> _/xmm0: float { -461 var result/xmm0: float <- vec3-length-squared v +460 fn vec3-length v: (addr vec3) -> _/xmm0: float { +461 var result/xmm0: float <- vec3-length-squared v 462 result <- square-root result 463 return result 464 } 465 -466 fn vec3-length-squared _v: (addr vec3) -> _/xmm0: float { -467 var v/esi: (addr vec3) <- copy _v +466 fn vec3-length-squared _v: (addr vec3) -> _/xmm0: float { +467 var v/esi: (addr vec3) <- copy _v 468 # result = v.x * v.x 469 var src/eax: (addr float) <- get v, x 470 var tmp/xmm1: float <- copy *src diff --git a/html/apps/raytracing/color.mu.html b/html/apps/raytracing/color.mu.html index 8313b7ec..3daaa25b 100644 --- a/html/apps/raytracing/color.mu.html +++ b/html/apps/raytracing/color.mu.html @@ -56,7 +56,7 @@ if ('onhashchange' in window) { https://github.com/akkartik/mu/blob/master/apps/raytracing/color.mu
- 1 type rgb {
+ 1 type rgb {
  2   # components normalized to within [0.0, 1.0]
  3   r: float
  4   g: float
@@ -64,8 +64,8 @@ if ('onhashchange' in window) {
  6 }
  7 
  8 # print translating to [0, 256)
- 9 fn print-rgb screen: (addr screen), _c: (addr rgb) {
-10   var c/esi: (addr rgb) <- copy _c
+ 9 fn print-rgb screen: (addr screen), _c: (addr rgb) {
+10   var c/esi: (addr rgb) <- copy _c
 11   var xn: float
 12   var xn-addr/ecx: (addr float) <- address xn
 13   fill-in-rational xn-addr, 0x3e7ff, 0x3e8  # 255999 / 1000
diff --git a/html/apps/raytracing/ray.mu.html b/html/apps/raytracing/ray.mu.html
index b3fe9789..dbe00587 100644
--- a/html/apps/raytracing/ray.mu.html
+++ b/html/apps/raytracing/ray.mu.html
@@ -56,7 +56,7 @@ if ('onhashchange' in window) {
 
 https://github.com/akkartik/mu/blob/master/apps/raytracing/ray.mu
 
- 1 type ray {
+ 1 type ray {
  2   orig: vec3  # point
  3   dir: vec3
  4 }
@@ -64,16 +64,16 @@ if ('onhashchange' in window) {
  6 # A little different from the constructor at https://raytracing.github.io/books/RayTracingInOneWeekend.html
  7 # We immediately normalize the direction vector so we don't have to keep doing
  8 # so.
- 9 fn initialize-ray _self: (addr ray), o: (addr vec3), d: (addr vec3) {
-10   var self/esi: (addr ray) <- copy _self
+ 9 fn initialize-ray _self: (addr ray), o: (addr vec3), d: (addr vec3) {
+10   var self/esi: (addr ray) <- copy _self
 11   var dest/eax: (addr vec3) <- get self, orig
 12   copy-object o, dest
 13   dest <- get self, dir
 14   vec3-unit d, dest
 15 }
 16 
-17 fn ray-at _self: (addr ray), t: float, out: (addr vec3) {
-18   var self/esi: (addr ray) <- copy _self
+17 fn ray-at _self: (addr ray), t: float, out: (addr vec3) {
+18   var self/esi: (addr ray) <- copy _self
 19   var src/eax: (addr vec3) <- get self, dir
 20   copy-object src, out
 21   vec3-scale-up out, t
diff --git a/html/apps/raytracing/vec.mu.html b/html/apps/raytracing/vec.mu.html
index b3aeb5f0..9b8961c2 100644
--- a/html/apps/raytracing/vec.mu.html
+++ b/html/apps/raytracing/vec.mu.html
@@ -57,14 +57,14 @@ if ('onhashchange' in window) {
 
 https://github.com/akkartik/mu/blob/master/apps/raytracing/vec.mu
 
-  1 type vec3 {
+  1 type vec3 {
   2   x: float
   3   y: float
   4   z: float
   5 }
   6 
-  7 fn print-vec3 screen: (addr screen), _v: (addr vec3) {
-  8   var v/esi: (addr vec3) <- copy _v
+  7 fn print-vec3 screen: (addr screen), _v: (addr vec3) {
+  8   var v/esi: (addr vec3) <- copy _v
   9   print-string screen, "("
  10   var tmp/eax: (addr float) <- get v, x
  11   print-float screen, *tmp
@@ -77,9 +77,9 @@ if ('onhashchange' in window) {
  18   print-string screen, ")"
  19 }
  20 
- 21 fn vec3-add-to _v1: (addr vec3), _v2: (addr vec3) {
- 22   var v1/edi: (addr vec3) <- copy _v1
- 23   var v2/esi: (addr vec3) <- copy _v2
+ 21 fn vec3-add-to _v1: (addr vec3), _v2: (addr vec3) {
+ 22   var v1/edi: (addr vec3) <- copy _v1
+ 23   var v2/esi: (addr vec3) <- copy _v2
  24   # v1.x += v2.x
  25   var arg1/eax: (addr float) <- get v1, x
  26   var arg2/ecx: (addr float) <- get v2, x
@@ -100,22 +100,22 @@ if ('onhashchange' in window) {
  41   copy-to *arg1, result
  42 }
  43 
- 44 fn vec3-subtract-from v1: (addr vec3), v2: (addr vec3) {
- 45   var tmp-storage: vec3
- 46   var tmp/eax: (addr vec3) <- address tmp-storage
+ 44 fn vec3-subtract-from v1: (addr vec3), v2: (addr vec3) {
+ 45   var tmp-storage: vec3
+ 46   var tmp/eax: (addr vec3) <- address tmp-storage
  47   copy-object v2, tmp
- 48   vec3-negate tmp
- 49   vec3-add-to v1, tmp
+ 48   vec3-negate tmp
+ 49   vec3-add-to v1, tmp
  50 }
  51 
- 52 fn vec3-negate v: (addr vec3) {
+ 52 fn vec3-negate v: (addr vec3) {
  53   var negative-one/eax: int <- copy -1
  54   var negative-one-f/xmm0: float <- convert negative-one
- 55   vec3-scale-up v, negative-one-f
+ 55   vec3-scale-up v, negative-one-f
  56 }
  57 
- 58 fn vec3-scale-up _v: (addr vec3), f: float {
- 59   var v/edi: (addr vec3) <- copy _v
+ 58 fn vec3-scale-up _v: (addr vec3), f: float {
+ 59   var v/edi: (addr vec3) <- copy _v
  60   # v.x *= f
  61   var dest/eax: (addr float) <- get v, x
  62   var result/xmm0: float <- copy *dest
@@ -133,8 +133,8 @@ if ('onhashchange' in window) {
  74   copy-to *dest, result
  75 }
  76 
- 77 fn vec3-scale-down _v: (addr vec3), f: float {
- 78   var v/edi: (addr vec3) <- copy _v
+ 77 fn vec3-scale-down _v: (addr vec3), f: float {
+ 78   var v/edi: (addr vec3) <- copy _v
  79   # v.x /= f
  80   var dest/eax: (addr float) <- get v, x
  81   var result/xmm0: float <- copy *dest
@@ -152,23 +152,23 @@ if ('onhashchange' in window) {
  93   copy-to *dest, result
  94 }
  95 
- 96 fn vec3-unit in: (addr vec3), out: (addr vec3) {
- 97   var len/xmm0: float <- vec3-length in
+ 96 fn vec3-unit in: (addr vec3), out: (addr vec3) {
+ 97   var len/xmm0: float <- vec3-length in
  98 #?   print-string 0, "len: "
  99 #?   print-float 0, len
 100 #?   print-string 0, "\n"
 101   copy-object in, out
-102   vec3-scale-down out, len
+102   vec3-scale-down out, len
 103 }
 104 
-105 fn vec3-length v: (addr vec3) -> _/xmm0: float {
-106   var result/xmm0: float <- vec3-length-squared v
+105 fn vec3-length v: (addr vec3) -> _/xmm0: float {
+106   var result/xmm0: float <- vec3-length-squared v
 107   result <- square-root result
 108   return result
 109 }
 110 
-111 fn vec3-length-squared _v: (addr vec3) -> _/xmm0: float {
-112   var v/esi: (addr vec3) <- copy _v
+111 fn vec3-length-squared _v: (addr vec3) -> _/xmm0: float {
+112   var v/esi: (addr vec3) <- copy _v
 113   # result = v.x * v.x
 114   var src/eax: (addr float) <- get v, x
 115   var tmp/xmm1: float <- copy *src
@@ -187,10 +187,10 @@ if ('onhashchange' in window) {
 128   return result
 129 }
 130 
-131 fn vec3-dot _v1: (addr vec3), _v2: (addr vec3) -> _/xmm0: float {
+131 fn vec3-dot _v1: (addr vec3), _v2: (addr vec3) -> _/xmm0: float {
 132 }
 133 
-134 fn vec3-cross _v1: (addr vec3), _v2: (addr vec3), out: (addr vec3) {
+134 fn vec3-cross _v1: (addr vec3), _v2: (addr vec3), out: (addr vec3) {
 135 }
 
-- cgit 1.4.1-2-gfad0