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

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

Issue 65643003: Regression fix: HForceRepresentation shouldn't be an idef. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 1 month 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') | 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 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 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 !(block()->IsReachable() || 514 !(block()->IsReachable() ||
515 IsBlockEntry() || 515 IsBlockEntry() ||
516 IsControlInstruction() || 516 IsControlInstruction() ||
517 IsSimulate() || 517 IsSimulate() ||
518 IsEnterInlined() || 518 IsEnterInlined() ||
519 IsLeaveInlined()); 519 IsLeaveInlined());
520 } 520 }
521 521
522 522
523 bool HValue::IsInteger32Constant() { 523 bool HValue::IsInteger32Constant() {
524 return IsConstant() && HConstant::cast(this)->HasInteger32Value(); 524 HValue* value_to_check = IsForceRepresentation()
525 ? HForceRepresentation::cast(this)->value()
526 : this;
527 return value_to_check->IsConstant() &&
528 HConstant::cast(value_to_check)->HasInteger32Value();
525 } 529 }
526 530
527 531
528 int32_t HValue::GetInteger32Constant() { 532 int32_t HValue::GetInteger32Constant() {
529 return HConstant::cast(this)->Integer32Value(); 533 HValue* constant_value = IsForceRepresentation()
534 ? HForceRepresentation::cast(this)->value()
535 : this;
536 return HConstant::cast(constant_value)->Integer32Value();
530 } 537 }
531 538
532 539
533 bool HValue::EqualsInteger32Constant(int32_t value) { 540 bool HValue::EqualsInteger32Constant(int32_t value) {
534 return IsInteger32Constant() && GetInteger32Constant() == value; 541 return IsInteger32Constant() && GetInteger32Constant() == value;
535 } 542 }
536 543
537 544
538 void HValue::SetOperandAt(int index, HValue* value) { 545 void HValue::SetOperandAt(int index, HValue* value) {
539 RegisterUse(index, value); 546 RegisterUse(index, value);
(...skipping 3804 matching lines...) Expand 10 before | Expand all | Expand 10 after
4344 break; 4351 break;
4345 case kExternalMemory: 4352 case kExternalMemory:
4346 stream->Add("[external-memory]"); 4353 stream->Add("[external-memory]");
4347 break; 4354 break;
4348 } 4355 }
4349 4356
4350 stream->Add("@%d", offset()); 4357 stream->Add("@%d", offset());
4351 } 4358 }
4352 4359
4353 } } // namespace v8::internal 4360 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698