Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Unified Diff: src/arm/codegen-arm.cc

Issue 155234: Fix crash in arm conditional expression code generation. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/codegen-arm.cc
===================================================================
--- src/arm/codegen-arm.cc (revision 2383)
+++ src/arm/codegen-arm.cc (working copy)
@@ -2424,13 +2424,23 @@
JumpTarget exit;
LoadConditionAndSpill(node->condition(), NOT_INSIDE_TYPEOF,
&then, &else_, true);
- Branch(false, &else_);
- then.Bind();
- LoadAndSpill(node->then_expression(), typeof_state());
- exit.Jump();
- else_.Bind();
- LoadAndSpill(node->else_expression(), typeof_state());
- exit.Bind();
+ if (frame_ != NULL) {
+ Branch(false, &else_);
+ }
+ if (frame_ != NULL || then.is_linked()) {
+ then.Bind();
+ LoadAndSpill(node->then_expression(), typeof_state());
+ }
+ if (frame_ != NULL) {
Kevin Millikin (Chromium) 2009/07/09 01:20:31 You only need to jump around the else part if you
Mads Ager (chromium) 2009/07/09 04:11:08 Done. I left the binding of the else_ JumpTarget
+ exit.Jump();
+ }
+ if (else_.is_linked()) {
+ else_.Bind();
+ LoadAndSpill(node->else_expression(), typeof_state());
+ }
+ if (exit.is_linked()) {
+ exit.Bind();
+ }
ASSERT(frame_->height() == original_height + 1);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698