Index: src/hydrogen-instructions.cc |
diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc |
index fc6c3c599a80b06e004d0ec60aff0212f005d587..84dcde81a9942a90ef6ff067b613a3a1ed676f4c 100644 |
--- a/src/hydrogen-instructions.cc |
+++ b/src/hydrogen-instructions.cc |
@@ -342,6 +342,8 @@ const char* HType::ToString() { |
HType HType::TypeFromValue(Handle<Object> value) { |
+ AllowHandleDereference allow_handle_deref; |
+ |
HType result = HType::Tagged(); |
if (value->IsSmi()) { |
result = HType::Smi(); |
@@ -1119,10 +1121,10 @@ HValue* HCheckInstanceType::Canonicalize() { |
value()->type().IsString()) { |
return NULL; |
} |
- if (check_ == IS_SYMBOL && |
- value()->IsConstant() && |
- HConstant::cast(value())->handle()->IsSymbol()) { |
- return NULL; |
+ |
+ if (check_ == IS_SYMBOL && value()->IsConstant()) { |
+ AllowHandleDereference allow_handle_deref; |
+ if (HConstant::cast(value())->handle()->IsSymbol()) return NULL; |
} |
return this; |
} |
@@ -1555,6 +1557,7 @@ HConstant::HConstant(Handle<Object> handle, Representation r) |
: handle_(handle), |
has_int32_value_(false), |
has_double_value_(false) { |
+ AllowHandleDereference allow_handle_deref; |
SetFlag(kUseGVN); |
if (handle_->IsNumber()) { |
double n = handle_->Number(); |
@@ -1633,12 +1636,12 @@ bool HConstant::ToBoolean() { |
double v = DoubleValue(); |
return v != 0 && !isnan(v); |
} |
- Handle<Object> literal = handle(); |
- if (literal->IsTrue()) return true; |
- if (literal->IsFalse()) return false; |
- if (literal->IsUndefined()) return false; |
- if (literal->IsNull()) return false; |
- if (literal->IsString() && String::cast(*literal)->length() == 0) { |
+ AllowHandleDereference allow_handle_deref; |
+ if (handle_->IsTrue()) return true; |
+ if (handle_->IsFalse()) return false; |
+ if (handle_->IsUndefined()) return false; |
+ if (handle_->IsNull()) return false; |
+ if (handle_->IsString() && String::cast(*handle_)->length() == 0) { |
return false; |
} |
return true; |