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

Side by Side Diff: src/hydrogen-instructions.cc

Issue 196383018: Check elimination now sets known successor branch of HCompareObjectEqAndBranch (correctness fix). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 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 | « src/hydrogen-instructions.h ('k') | test/mjsunit/regress/regress-crbug-352058.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 3080 matching lines...) Expand 10 before | Expand all | Expand 10 after
3091 3091
3092 void HCompareObjectEqAndBranch::PrintDataTo(StringStream* stream) { 3092 void HCompareObjectEqAndBranch::PrintDataTo(StringStream* stream) {
3093 left()->PrintNameTo(stream); 3093 left()->PrintNameTo(stream);
3094 stream->Add(" "); 3094 stream->Add(" ");
3095 right()->PrintNameTo(stream); 3095 right()->PrintNameTo(stream);
3096 HControlInstruction::PrintDataTo(stream); 3096 HControlInstruction::PrintDataTo(stream);
3097 } 3097 }
3098 3098
3099 3099
3100 bool HCompareObjectEqAndBranch::KnownSuccessorBlock(HBasicBlock** block) { 3100 bool HCompareObjectEqAndBranch::KnownSuccessorBlock(HBasicBlock** block) {
3101 if (known_successor_index() != kNoKnownSuccessorIndex) {
3102 *block = SuccessorAt(known_successor_index());
3103 return true;
3104 }
3101 if (FLAG_fold_constants && left()->IsConstant() && right()->IsConstant()) { 3105 if (FLAG_fold_constants && left()->IsConstant() && right()->IsConstant()) {
3102 *block = HConstant::cast(left())->DataEquals(HConstant::cast(right())) 3106 *block = HConstant::cast(left())->DataEquals(HConstant::cast(right()))
3103 ? FirstSuccessor() : SecondSuccessor(); 3107 ? FirstSuccessor() : SecondSuccessor();
3104 return true; 3108 return true;
3105 } 3109 }
3106 *block = NULL; 3110 *block = NULL;
3107 return false; 3111 return false;
3108 } 3112 }
3109 3113
3110 3114
(...skipping 1464 matching lines...) Expand 10 before | Expand all | Expand 10 after
4575 break; 4579 break;
4576 case kExternalMemory: 4580 case kExternalMemory:
4577 stream->Add("[external-memory]"); 4581 stream->Add("[external-memory]");
4578 break; 4582 break;
4579 } 4583 }
4580 4584
4581 stream->Add("@%d", offset()); 4585 stream->Add("@%d", offset());
4582 } 4586 }
4583 4587
4584 } } // namespace v8::internal 4588 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.h ('k') | test/mjsunit/regress/regress-crbug-352058.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698