Commit 0f9b0ad8 authored by vitalyr@chromium.org's avatar vitalyr@chromium.org

Don't check symbol literals for being symbols.

R=fschneider@chromium.org

Review URL: http://codereview.chromium.org/7312024

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8563 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent c1e1e97b
......@@ -784,6 +784,21 @@ void HChange::PrintDataTo(StringStream* stream) {
}
HValue* HCheckInstanceType::Canonicalize() {
if (check_ == IS_STRING &&
!value()->type().IsUninitialized() &&
value()->type().IsString()) {
return NULL;
}
if (check_ == IS_SYMBOL &&
value()->IsConstant() &&
HConstant::cast(value())->handle()->IsSymbol()) {
return NULL;
}
return this;
}
void HCheckInstanceType::GetCheckInterval(InstanceType* first,
InstanceType* last) {
ASSERT(is_interval_check());
......
......@@ -2003,14 +2003,7 @@ class HCheckInstanceType: public HUnaryOperation {
virtual void Verify();
#endif
virtual HValue* Canonicalize() {
if (!value()->type().IsUninitialized() &&
value()->type().IsString() &&
check_ == IS_STRING) {
return NULL;
}
return this;
}
virtual HValue* Canonicalize();
bool is_interval_check() const { return check_ <= LAST_INTERVAL_CHECK; }
void GetCheckInterval(InstanceType* first, InstanceType* last);
......
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