| Index: src/ast/ast.cc
|
| diff --git a/src/ast/ast.cc b/src/ast/ast.cc
|
| index a943fdf05cafd437e75ce5ab1524365569d4227a..27e325fb1e8c134c17392cbfc642e63ccef2b781 100644
|
| --- a/src/ast/ast.cc
|
| +++ b/src/ast/ast.cc
|
| @@ -59,12 +59,19 @@
|
|
|
|
|
| bool Expression::IsNullLiteral() const {
|
| - return IsLiteral() && AsLiteral()->value()->IsNull();
|
| + if (!IsLiteral()) return false;
|
| + Handle<Object> value = AsLiteral()->value();
|
| + return !value->IsSmi() &&
|
| + value->IsNull(HeapObject::cast(*value)->GetIsolate());
|
| }
|
|
|
| bool Expression::IsUndefinedLiteral() const {
|
| - if (IsLiteral() && AsLiteral()->value()->IsUndefined()) {
|
| - return true;
|
| + if (IsLiteral()) {
|
| + Handle<Object> value = AsLiteral()->value();
|
| + if (!value->IsSmi() &&
|
| + value->IsUndefined(HeapObject::cast(*value)->GetIsolate())) {
|
| + return true;
|
| + }
|
| }
|
|
|
| const VariableProxy* var_proxy = AsVariableProxy();
|
| @@ -387,7 +394,7 @@
|
| if (property->is_computed_name()) continue;
|
| if (property->kind() == ObjectLiteral::Property::PROTOTYPE) continue;
|
| Literal* literal = property->key()->AsLiteral();
|
| - DCHECK(!literal->value()->IsNull());
|
| + DCHECK(!literal->IsNullLiteral());
|
|
|
| // If there is an existing entry do not emit a store unless the previous
|
| // entry was also an accessor.
|
| @@ -457,11 +464,11 @@
|
| // (value->IsNumber()).
|
| // TODO(verwaest): Remove once we can store them inline.
|
| if (FLAG_track_double_fields &&
|
| - (value->IsNumber() || value->IsUninitialized())) {
|
| + (value->IsNumber() || value->IsUninitialized(isolate))) {
|
| may_store_doubles_ = true;
|
| }
|
|
|
| - is_simple = is_simple && !value->IsUninitialized();
|
| + is_simple = is_simple && !value->IsUninitialized(isolate);
|
|
|
| // Keep track of the number of elements in the object literal and
|
| // the largest element index. If the largest element index is
|
| @@ -529,7 +536,7 @@
|
| continue;
|
| }
|
|
|
| - if (boilerplate_value->IsUninitialized()) {
|
| + if (boilerplate_value->IsUninitialized(isolate)) {
|
| boilerplate_value = handle(Smi::FromInt(0), isolate);
|
| is_simple = false;
|
| }
|
|
|