Commit 9f8d1624 authored by bmeurer@chromium.org's avatar bmeurer@chromium.org

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
parent d208eea4
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment