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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 2406 matching lines...) Expand 10 before | Expand all | Expand 10 after
2417 #ifdef DEBUG 2417 #ifdef DEBUG
2418 int original_height = frame_->height(); 2418 int original_height = frame_->height();
2419 #endif 2419 #endif
2420 VirtualFrame::SpilledScope spilled_scope; 2420 VirtualFrame::SpilledScope spilled_scope;
2421 Comment cmnt(masm_, "[ Conditional"); 2421 Comment cmnt(masm_, "[ Conditional");
2422 JumpTarget then; 2422 JumpTarget then;
2423 JumpTarget else_; 2423 JumpTarget else_;
2424 JumpTarget exit; 2424 JumpTarget exit;
2425 LoadConditionAndSpill(node->condition(), NOT_INSIDE_TYPEOF, 2425 LoadConditionAndSpill(node->condition(), NOT_INSIDE_TYPEOF,
2426 &then, &else_, true); 2426 &then, &else_, true);
2427 Branch(false, &else_); 2427 if (frame_ != NULL) {
2428 then.Bind(); 2428 Branch(false, &else_);
2429 LoadAndSpill(node->then_expression(), typeof_state()); 2429 }
2430 exit.Jump(); 2430 if (frame_ != NULL || then.is_linked()) {
2431 else_.Bind(); 2431 then.Bind();
2432 LoadAndSpill(node->else_expression(), typeof_state()); 2432 LoadAndSpill(node->then_expression(), typeof_state());
2433 exit.Bind(); 2433 }
2434 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
2435 exit.Jump();
2436 }
2437 if (else_.is_linked()) {
2438 else_.Bind();
2439 LoadAndSpill(node->else_expression(), typeof_state());
2440 }
2441 if (exit.is_linked()) {
2442 exit.Bind();
2443 }
2434 ASSERT(frame_->height() == original_height + 1); 2444 ASSERT(frame_->height() == original_height + 1);
2435 } 2445 }
2436 2446
2437 2447
2438 void CodeGenerator::LoadFromSlot(Slot* slot, TypeofState typeof_state) { 2448 void CodeGenerator::LoadFromSlot(Slot* slot, TypeofState typeof_state) {
2439 VirtualFrame::SpilledScope spilled_scope; 2449 VirtualFrame::SpilledScope spilled_scope;
2440 if (slot->type() == Slot::LOOKUP) { 2450 if (slot->type() == Slot::LOOKUP) {
2441 ASSERT(slot->var()->is_dynamic()); 2451 ASSERT(slot->var()->is_dynamic());
2442 2452
2443 JumpTarget slow; 2453 JumpTarget slow;
(...skipping 3950 matching lines...) Expand 10 before | Expand all | Expand 10 after
6394 int CompareStub::MinorKey() { 6404 int CompareStub::MinorKey() {
6395 // Encode the two parameters in a unique 16 bit value. 6405 // Encode the two parameters in a unique 16 bit value.
6396 ASSERT(static_cast<unsigned>(cc_) >> 28 < (1 << 15)); 6406 ASSERT(static_cast<unsigned>(cc_) >> 28 < (1 << 15));
6397 return (static_cast<unsigned>(cc_) >> 27) | (strict_ ? 1 : 0); 6407 return (static_cast<unsigned>(cc_) >> 27) | (strict_ ? 1 : 0);
6398 } 6408 }
6399 6409
6400 6410
6401 #undef __ 6411 #undef __
6402 6412
6403 } } // namespace v8::internal 6413 } } // namespace v8::internal
OLDNEW
« 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