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
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;
}