Index: src/x64/stub-cache-x64.cc |
diff --git a/src/x64/stub-cache-x64.cc b/src/x64/stub-cache-x64.cc |
index 8787c86dae8309d8130c6645b5b53b4f20159878..c01f41e84caf44c1c4577e7d3448570569a3bea7 100644 |
--- a/src/x64/stub-cache-x64.cc |
+++ b/src/x64/stub-cache-x64.cc |
@@ -1834,77 +1834,6 @@ Handle<Code> CallStubCompiler::CompileArrayPushCall( |
} |
-Handle<Code> CallStubCompiler::CompileArrayPopCall( |
- Handle<Object> object, |
- Handle<JSObject> holder, |
- Handle<Cell> cell, |
- Handle<JSFunction> function, |
- Handle<String> name, |
- Code::StubType type) { |
- // If object is not an array or is observed or sealed, bail out to regular |
- // call. |
- if (!object->IsJSArray() || |
- !cell.is_null() || |
- Handle<JSArray>::cast(object)->map()->is_observed() || |
- !Handle<JSArray>::cast(object)->map()->is_extensible()) { |
- return Handle<Code>::null(); |
- } |
- |
- Label miss, return_undefined, call_builtin; |
- |
- HandlerFrontendHeader(object, holder, name, RECEIVER_MAP_CHECK, &miss); |
- |
- // Get the elements array of the object. |
- __ movq(rbx, FieldOperand(rdx, JSArray::kElementsOffset)); |
- |
- // Check that the elements are in fast mode and writable. |
- __ CompareRoot(FieldOperand(rbx, HeapObject::kMapOffset), |
- Heap::kFixedArrayMapRootIndex); |
- __ j(not_equal, &call_builtin); |
- |
- // Get the array's length into rcx and calculate new length. |
- __ SmiToInteger32(rcx, FieldOperand(rdx, JSArray::kLengthOffset)); |
- __ subl(rcx, Immediate(1)); |
- __ j(negative, &return_undefined); |
- |
- // Get the last element. |
- __ LoadRoot(r9, Heap::kTheHoleValueRootIndex); |
- __ movq(rax, FieldOperand(rbx, |
- rcx, times_pointer_size, |
- FixedArray::kHeaderSize)); |
- // Check if element is already the hole. |
- __ cmpq(rax, r9); |
- // If so, call slow-case to also check prototypes for value. |
- __ j(equal, &call_builtin); |
- |
- // Set the array's length. |
- __ Integer32ToSmiField(FieldOperand(rdx, JSArray::kLengthOffset), rcx); |
- |
- // Fill with the hole and return original value. |
- __ movq(FieldOperand(rbx, |
- rcx, times_pointer_size, |
- FixedArray::kHeaderSize), |
- r9); |
- const int argc = arguments().immediate(); |
- __ ret((argc + 1) * kPointerSize); |
- |
- __ bind(&return_undefined); |
- __ LoadRoot(rax, Heap::kUndefinedValueRootIndex); |
- __ ret((argc + 1) * kPointerSize); |
- |
- __ bind(&call_builtin); |
- __ TailCallExternalReference( |
- ExternalReference(Builtins::c_ArrayPop, isolate()), |
- argc + 1, |
- 1); |
- |
- HandlerFrontendFooter(&miss); |
- |
- // Return the generated code. |
- return GetCode(type, name); |
-} |
- |
- |
Handle<Code> CallStubCompiler::CompileFastApiCall( |
const CallOptimization& optimization, |
Handle<Object> object, |