Fix broken HCheckInstanceType::Canonicalize().

R=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/21488002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15999 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
bmeurer@chromium.org 2013-08-01 08:27:46 +00:00
parent d208eea478
commit 9f8d162471

View File

@ -1633,11 +1633,13 @@ HValue* HUnaryMathOperation::Canonicalize() {
HValue* HCheckInstanceType::Canonicalize() {
if (check_ == IS_STRING && value()->type().IsString()) {
return NULL;
return value();
}
if (check_ == IS_INTERNALIZED_STRING && value()->IsConstant()) {
if (HConstant::cast(value())->HasInternalizedStringValue()) return NULL;
if (HConstant::cast(value())->HasInternalizedStringValue()) {
return value();
}
}
return this;
}