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

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

Issue 21488002: Fix broken HCheckInstanceType::Canonicalize(). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 4 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 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 1615 matching lines...) Expand 10 before | Expand all | Expand 10 after
1626 // Return NULL to remove this instruction from the graph. 1626 // Return NULL to remove this instruction from the graph.
1627 return NULL; 1627 return NULL;
1628 } 1628 }
1629 } 1629 }
1630 return this; 1630 return this;
1631 } 1631 }
1632 1632
1633 1633
1634 HValue* HCheckInstanceType::Canonicalize() { 1634 HValue* HCheckInstanceType::Canonicalize() {
1635 if (check_ == IS_STRING && value()->type().IsString()) { 1635 if (check_ == IS_STRING && value()->type().IsString()) {
1636 return NULL; 1636 return value();
1637 } 1637 }
1638 1638
1639 if (check_ == IS_INTERNALIZED_STRING && value()->IsConstant()) { 1639 if (check_ == IS_INTERNALIZED_STRING && value()->IsConstant()) {
1640 if (HConstant::cast(value())->HasInternalizedStringValue()) return NULL; 1640 if (HConstant::cast(value())->HasInternalizedStringValue()) {
1641 return value();
1642 }
1641 } 1643 }
1642 return this; 1644 return this;
1643 } 1645 }
1644 1646
1645 1647
1646 void HCheckInstanceType::GetCheckInterval(InstanceType* first, 1648 void HCheckInstanceType::GetCheckInterval(InstanceType* first,
1647 InstanceType* last) { 1649 InstanceType* last) {
1648 ASSERT(is_interval_check()); 1650 ASSERT(is_interval_check());
1649 switch (check_) { 1651 switch (check_) {
1650 case IS_SPEC_OBJECT: 1652 case IS_SPEC_OBJECT:
(...skipping 2818 matching lines...) Expand 10 before | Expand all | Expand 10 after
4469 break; 4471 break;
4470 case kExternalMemory: 4472 case kExternalMemory:
4471 stream->Add("[external-memory]"); 4473 stream->Add("[external-memory]");
4472 break; 4474 break;
4473 } 4475 }
4474 4476
4475 stream->Add("@%d", offset()); 4477 stream->Add("@%d", offset());
4476 } 4478 }
4477 4479
4478 } } // namespace v8::internal 4480 } } // 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