Files
sdk/runtime
kmillikin@google.com 013864dcec Implement x64 compilation for loading and storing local variables.
Continue to bailout on optional parameters and context-allocated local
variables.

Implement compilation of Bind and Do instructions, LoadLocal and StoreLocal
computations, and temporary values.  Temporary allocation assumes they obey
a stack-discipline and have a single use---so any use is always the last
use.  Temporaries can then be allocated via push and used via pop.  This
dart function:

hukairs(a) {
  var b, c;
  c = b = a;
  return c;
}

compiles to this annotated generated code snippet:

	;; StoreLocal(b, #null)
  66:	mov    $0x7f99303c0021,%rax
  70:	mov    %rax,-0x8(%rbp)
	;; StoreLocal(c, #null)
  74:	mov    $0x7f99303c0021,%rax
  7e:	mov    %rax,-0x10(%rbp)
	;; t0 <-LoadLocal(a)
  82:	mov    0x10(%rbp),%ax
  86:	push   %rax
	;; t0 <-StoreLocal(b, t0)
  87:	pop    %rax
  88:	mov    %rax,-0x8(%rbp)
  8c:	push   %rax
	;; StoreLocal(c, t0)
  8d:	pop    %rax
  8e:	mov    %rax,-0x10(%rbp)
	;; t0 <-LoadLocal(c)
  92:	mov    -0x10(%rbp),%ax
  96:	push   %rax
	;; return t0
  97:	pop    %rax
	;; ...
  bf:	mov    %rbp,%rsp
  c2:	pop    %rbp
  c3:	retq

R=srdjan@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//9447102

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4666 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-28 09:11:18 +00:00
..
2012-02-28 08:51:07 +00:00
2012-02-27 22:00:28 +00:00
2012-02-23 15:24:18 +00:00