Reviewers: Kasper Lund, iposva,

Description:
Begin to be more clever about generating code.

* When generating code for a literal (an AST leaf), consider the
   location we want the value in: top of stack, a register, or don't
   care.

* When generating code for the subexpression of a return statement,
   try to generate code to put the value in eax.  If not supported,
   fall back to the old strategy (push on stack and then pop).

Thus we never generate push immediate/pop to eax for this case.  We
eliminate 6 push/pop eliminations (ie, we don't generate them in the
first place) when starting the VM, and 11 on the V8 benchmarks.

Please review this at http://codereview.chromium.org/4326

Affected files:
   M     src/assembler-ia32.cc
   M     src/ast.h
   M     src/codegen-ia32.cc



--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to