| Index: src/ia32/codegen-ia32.cc
|
| diff --git a/src/ia32/codegen-ia32.cc b/src/ia32/codegen-ia32.cc
|
| index 6d23dd7df999f732d28654c6af0c7bf071f92f8b..aa03789b75c3ddff8bb9feecb00483fb0a33782f 100644
|
| --- a/src/ia32/codegen-ia32.cc
|
| +++ b/src/ia32/codegen-ia32.cc
|
| @@ -7292,88 +7292,6 @@ void CodeGenerator::GenerateRegExpConstructResult(ZoneList<Expression*>* args) {
|
| }
|
|
|
|
|
| -void CodeGenerator::GenerateRegExpCloneResult(ZoneList<Expression*>* args) {
|
| - ASSERT_EQ(1, args->length());
|
| -
|
| - Load(args->at(0));
|
| - Result object_result = frame_->Pop();
|
| - object_result.ToRegister(eax);
|
| - object_result.Unuse();
|
| - {
|
| - VirtualFrame::SpilledScope spilled_scope;
|
| -
|
| - Label done;
|
| -
|
| - __ test(eax, Immediate(kSmiTagMask));
|
| - __ j(zero, &done);
|
| -
|
| - // Load JSRegExpResult map into edx.
|
| - // Arguments to this function should be results of calling RegExp exec,
|
| - // which is either an unmodified JSRegExpResult or null. Anything not having
|
| - // the unmodified JSRegExpResult map is returned unmodified.
|
| - // This also ensures that elements are fast.
|
| - __ mov(edx, ContextOperand(esi, Context::GLOBAL_INDEX));
|
| - __ mov(edx, FieldOperand(edx, GlobalObject::kGlobalContextOffset));
|
| - __ mov(edx, ContextOperand(edx, Context::REGEXP_RESULT_MAP_INDEX));
|
| - __ cmp(edx, FieldOperand(eax, HeapObject::kMapOffset));
|
| - __ j(not_equal, &done);
|
| -
|
| - if (FLAG_debug_code) {
|
| - // Check that object really has empty properties array, as the map
|
| - // should guarantee.
|
| - __ cmp(FieldOperand(eax, JSObject::kPropertiesOffset),
|
| - Immediate(Factory::empty_fixed_array()));
|
| - __ Check(equal, "JSRegExpResult: default map but non-empty properties.");
|
| - }
|
| -
|
| - DeferredAllocateInNewSpace* allocate_fallback =
|
| - new DeferredAllocateInNewSpace(JSRegExpResult::kSize,
|
| - ebx,
|
| - edx.bit() | eax.bit());
|
| -
|
| - // All set, copy the contents to a new object.
|
| - __ AllocateInNewSpace(JSRegExpResult::kSize,
|
| - ebx,
|
| - ecx,
|
| - no_reg,
|
| - allocate_fallback->entry_label(),
|
| - TAG_OBJECT);
|
| - __ bind(allocate_fallback->exit_label());
|
| -
|
| - // Copy all fields from eax to ebx.
|
| - STATIC_ASSERT(JSRegExpResult::kSize % (2 * kPointerSize) == 0);
|
| - // There is an even number of fields, so unroll the loop once
|
| - // for efficiency.
|
| - for (int i = 0; i < JSRegExpResult::kSize; i += 2 * kPointerSize) {
|
| - STATIC_ASSERT(JSObject::kMapOffset % (2 * kPointerSize) == 0);
|
| - if (i != JSObject::kMapOffset) {
|
| - // The map was already loaded into edx.
|
| - __ mov(edx, FieldOperand(eax, i));
|
| - }
|
| - __ mov(ecx, FieldOperand(eax, i + kPointerSize));
|
| -
|
| - STATIC_ASSERT(JSObject::kElementsOffset % (2 * kPointerSize) == 0);
|
| - if (i == JSObject::kElementsOffset) {
|
| - // If the elements array isn't empty, make it copy-on-write
|
| - // before copying it.
|
| - Label empty;
|
| - __ cmp(Operand(edx), Immediate(Factory::empty_fixed_array()));
|
| - __ j(equal, &empty);
|
| - __ mov(FieldOperand(edx, HeapObject::kMapOffset),
|
| - Immediate(Factory::fixed_cow_array_map()));
|
| - __ bind(&empty);
|
| - }
|
| - __ mov(FieldOperand(ebx, i), edx);
|
| - __ mov(FieldOperand(ebx, i + kPointerSize), ecx);
|
| - }
|
| - __ mov(eax, ebx);
|
| -
|
| - __ bind(&done);
|
| - }
|
| - frame_->Push(eax);
|
| -}
|
| -
|
| -
|
| class DeferredSearchCache: public DeferredCode {
|
| public:
|
| DeferredSearchCache(Register dst, Register cache, Register key)
|
|
|