Reviewers: Jakob,

Description:
Checking for stack height equality between full codegen and hydrogen.

This comes in two flavors:

1. In debug mode (defining COMPARE_OPT_STACK_HEIGHT), we keep track
   of stack height during full codegen an record the stack height
   at bailout points. The recorded stack height is then compared
   to hydrogen stack height whenever we create a HSimulate instruction.

2. There is also a verification of the stack height calculation in
   full codegen. This verification is only performed when built with
   the verifystackheight=on option. This verification inserts a
   sequence of instructions checking that EBP - ESP is what we
   think it is at every bailout point.

To make this work, I had to fix a couple of stack height mismatches
around inlining. First, we used to visit the return statement of an
inlined function in effect context if the call-site was in effect
context. This caused mismatch in stack height just before we return from
the function. This should be benign (because the stack pointer is about
to be restored), but this change fixes it for consistency. Second, there
are fake simulates (never used for a real deopt, only to calculate
inlined environments) before entering inlined functions. These are off
by the number of arguments. For these, the stack height check takes the
number of arguments as a parameter checking we match up to the number of
arguments.

BUG=

Please review this at https://codereview.chromium.org/192513002/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+708, -348 lines):
  M Makefile
  M build/features.gypi
  M src/deoptimizer.h
  M src/deoptimizer.cc
  M src/full-codegen.h
  M src/full-codegen.cc
  M src/hydrogen.h
  M src/hydrogen.cc
  M src/ia32/full-codegen-ia32.cc
  M src/objects-inl.h
  M src/objects.h
  M src/objects.cc


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to