| Index: src/ia32/stub-cache-ia32.cc
|
| diff --git a/src/ia32/stub-cache-ia32.cc b/src/ia32/stub-cache-ia32.cc
|
| index 352eae1f927577d815d76c7089df232c6dfdb627..2f13d43c98e39372f2daf6ed070b1e732aaee020 100644
|
| --- a/src/ia32/stub-cache-ia32.cc
|
| +++ b/src/ia32/stub-cache-ia32.cc
|
| @@ -1478,7 +1478,10 @@ MaybeObject* CallStubCompiler::CompileArrayPushCall(Object* object,
|
| __ j(not_equal, &call_builtin);
|
|
|
| if (argc == 1) { // Otherwise fall through to call builtin.
|
| - Label exit, with_write_barrier, attempt_to_grow_elements;
|
| + Label exit, attempt_to_grow_elements;
|
| +#ifndef BASELINE_GC
|
| + Label with_write_barrier;
|
| +#endif
|
|
|
| // Get the array's length into eax and calculate new length.
|
| __ mov(eax, FieldOperand(edx, JSArray::kLengthOffset));
|
| @@ -1503,19 +1506,23 @@ MaybeObject* CallStubCompiler::CompileArrayPushCall(Object* object,
|
| __ mov(ecx, Operand(esp, argc * kPointerSize));
|
| __ mov(Operand(edx, 0), ecx);
|
|
|
| +#ifndef BASELINE_GC
|
| // Check if value is a smi.
|
| __ test(ecx, Immediate(kSmiTagMask));
|
| __ j(not_zero, &with_write_barrier);
|
| +#endif
|
|
|
| __ bind(&exit);
|
| __ ret((argc + 1) * kPointerSize);
|
|
|
| +#ifndef BASELINE_GC
|
| __ bind(&with_write_barrier);
|
|
|
| __ InNewSpace(ebx, ecx, equal, &exit);
|
|
|
| __ RecordWriteHelper(ebx, edx, ecx);
|
| __ ret((argc + 1) * kPointerSize);
|
| +#endif
|
|
|
| __ bind(&attempt_to_grow_elements);
|
| if (!FLAG_inline_new) {
|
|
|