Index: src/builtins.cc |
diff --git a/src/builtins.cc b/src/builtins.cc |
index 16e672c16f6f7e2f25131de106e28d609b484aca..188528b6e0cb0e1eda448271c5a0213f9e1f0354 100644 |
--- a/src/builtins.cc |
+++ b/src/builtins.cc |
@@ -525,12 +525,9 @@ BUILTIN(ArrayPush) { |
} |
if (!maybe_elms_obj->To(&elms_obj)) return maybe_elms_obj; |
- if (FLAG_harmony_observation && |
- JSObject::cast(receiver)->map()->is_observed()) { |
- return CallJsBuiltin(isolate, "ArrayPush", args); |
- } |
- |
JSArray* array = JSArray::cast(receiver); |
+ ASSERT(!array->map()->is_observed()); |
+ |
ElementsKind kind = array->GetElementsKind(); |
if (IsFastSmiOrObjectElementsKind(kind)) { |
@@ -642,10 +639,7 @@ BUILTIN(ArrayPop) { |
if (!maybe_elms->To(&elms_obj)) return maybe_elms; |
JSArray* array = JSArray::cast(receiver); |
- |
- if (FLAG_harmony_observation && array->map()->is_observed()) { |
- return CallJsBuiltin(isolate, "ArrayPop", args); |
- } |
+ ASSERT(!array->map()->is_observed()); |
int len = Smi::cast(array->length())->value(); |
if (len == 0) return heap->undefined_value(); |
@@ -680,10 +674,7 @@ BUILTIN(ArrayShift) { |
return CallJsBuiltin(isolate, "ArrayShift", args); |
} |
JSArray* array = JSArray::cast(receiver); |
- |
- if (FLAG_harmony_observation && array->map()->is_observed()) { |
- return CallJsBuiltin(isolate, "ArrayShift", args); |
- } |
+ ASSERT(!array->map()->is_observed()); |
int len = Smi::cast(array->length())->value(); |
if (len == 0) return heap->undefined_value(); |
@@ -734,15 +725,12 @@ BUILTIN(ArrayUnshift) { |
return CallJsBuiltin(isolate, "ArrayUnshift", args); |
} |
JSArray* array = JSArray::cast(receiver); |
+ ASSERT(!array->map()->is_observed()); |
if (!array->HasFastSmiOrObjectElements()) { |
return CallJsBuiltin(isolate, "ArrayUnshift", args); |
} |
FixedArray* elms = FixedArray::cast(elms_obj); |
- if (FLAG_harmony_observation && array->map()->is_observed()) { |
- return CallJsBuiltin(isolate, "ArrayUnshift", args); |
- } |
- |
int len = Smi::cast(array->length())->value(); |
int to_add = args.length() - 1; |
int new_length = len + to_add; |
@@ -938,10 +926,7 @@ BUILTIN(ArraySplice) { |
return CallJsBuiltin(isolate, "ArraySplice", args); |
} |
JSArray* array = JSArray::cast(receiver); |
- |
- if (FLAG_harmony_observation && array->map()->is_observed()) { |
- return CallJsBuiltin(isolate, "ArraySplice", args); |
- } |
+ ASSERT(!array->map()->is_observed()); |
int len = Smi::cast(array->length())->value(); |