Smi element fixes in Builtins.
R=jkummerow@chromium.org BUG=none TEST=dromaeo-object-array-array-deconstruction-pop doesn't regress Review URL: http://codereview.chromium.org/8054007 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9448 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
0df7441668
commit
ebc3010ca3
@ -660,7 +660,7 @@ BUILTIN(ArraySlice) {
|
||||
int len = -1;
|
||||
if (receiver->IsJSArray()) {
|
||||
JSArray* array = JSArray::cast(receiver);
|
||||
if (!array->HasFastElements() ||
|
||||
if (!array->HasFastTypeElements() ||
|
||||
!IsJSArrayFastElementMovingAllowed(heap, array)) {
|
||||
return CallJsBuiltin(isolate, "ArraySlice", args);
|
||||
}
|
||||
@ -676,7 +676,7 @@ BUILTIN(ArraySlice) {
|
||||
bool is_arguments_object_with_fast_elements =
|
||||
receiver->IsJSObject()
|
||||
&& JSObject::cast(receiver)->map() == arguments_map
|
||||
&& JSObject::cast(receiver)->HasFastElements();
|
||||
&& JSObject::cast(receiver)->HasFastTypeElements();
|
||||
if (!is_arguments_object_with_fast_elements) {
|
||||
return CallJsBuiltin(isolate, "ArraySlice", args);
|
||||
}
|
||||
@ -963,7 +963,7 @@ BUILTIN(ArrayConcat) {
|
||||
int result_len = 0;
|
||||
for (int i = 0; i < n_arguments; i++) {
|
||||
Object* arg = args[i];
|
||||
if (!arg->IsJSArray() || !JSArray::cast(arg)->HasFastElements()
|
||||
if (!arg->IsJSArray() || !JSArray::cast(arg)->HasFastTypeElements()
|
||||
|| JSArray::cast(arg)->GetPrototype() != array_proto) {
|
||||
return CallJsBuiltin(isolate, "ArrayConcat", args);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user