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

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

Issue 6461022: Merge a number of assertion failure fixes to the 3.0 branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/3.0/
Patch Set: '' Created 9 years, 10 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
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 882 matching lines...) Expand 10 before | Expand all | Expand 10 after
893 void HPhi::AddInput(HValue* value) { 893 void HPhi::AddInput(HValue* value) {
894 inputs_.Add(NULL); 894 inputs_.Add(NULL);
895 SetOperandAt(OperandCount() - 1, value); 895 SetOperandAt(OperandCount() - 1, value);
896 // Mark phis that may have 'arguments' directly or indirectly as an operand. 896 // Mark phis that may have 'arguments' directly or indirectly as an operand.
897 if (!CheckFlag(kIsArguments) && value->CheckFlag(kIsArguments)) { 897 if (!CheckFlag(kIsArguments) && value->CheckFlag(kIsArguments)) {
898 SetFlag(kIsArguments); 898 SetFlag(kIsArguments);
899 } 899 }
900 } 900 }
901 901
902 902
903 bool HPhi::HasReceiverOperand() {
904 for (int i = 0; i < OperandCount(); i++) {
905 if (OperandAt(i)->IsParameter() &&
906 HParameter::cast(OperandAt(i))->index() == 0) {
907 return true;
908 }
909 }
910 return false;
911 }
912
913
914 HValue* HPhi::GetRedundantReplacement() const { 903 HValue* HPhi::GetRedundantReplacement() const {
915 HValue* candidate = NULL; 904 HValue* candidate = NULL;
916 int count = OperandCount(); 905 int count = OperandCount();
917 int position = 0; 906 int position = 0;
918 while (position < count && candidate == NULL) { 907 while (position < count && candidate == NULL) {
919 HValue* current = OperandAt(position++); 908 HValue* current = OperandAt(position++);
920 if (current != this) candidate = current; 909 if (current != this) candidate = current;
921 } 910 }
922 while (position < count) { 911 while (position < count) {
923 HValue* current = OperandAt(position++); 912 HValue* current = OperandAt(position++);
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after
1449 1438
1450 1439
1451 void HCheckPrototypeMaps::Verify() { 1440 void HCheckPrototypeMaps::Verify() {
1452 HInstruction::Verify(); 1441 HInstruction::Verify();
1453 ASSERT(HasNoUses()); 1442 ASSERT(HasNoUses());
1454 } 1443 }
1455 1444
1456 #endif 1445 #endif
1457 1446
1458 } } // namespace v8::internal 1447 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698