Fix a bug in deoptimization after logical expressions in an effect context.
authorkmillikin@chromium.org <kmillikin@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 17 Feb 2011 11:06:50 +0000 (11:06 +0000)
committerkmillikin@chromium.org <kmillikin@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 17 Feb 2011 11:06:50 +0000 (11:06 +0000)
commit82cdd48b2f383fbed82dc4ba71cfd326176facde
treed80f04db49bde9bacacaad2f60cc09a7797789ae
parent26421683317dd8083f9eed10a14524975ee02076
Fix a bug in deoptimization after logical expressions in an effect context.

When deoptimizing to after an expression of the form (expr0 || expr1)
or (expr0 && expr1) in an effect context, the unoptimized code could
incorrectly see the value of the expression.

Handle the short-circuit binary operators specially in effect contexts.
This fixes the issue and will generate better code when the left
subexpression is boolean-valued.

BUG=v8:1166

Review URL: http://codereview.chromium.org/6519046

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6831 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/hydrogen.cc
src/hydrogen.h
test/mjsunit/regress/regress-1166.js [new file with mode: 0644]