| Index: src/ia32/codegen-ia32.cc
|
| diff --git a/src/ia32/codegen-ia32.cc b/src/ia32/codegen-ia32.cc
|
| index 95aeba6817f789c6c56d3190508a4e0c415de6a6..c883a48f7bdf9b1e6284dd5ff0ed25bf2516d052 100644
|
| --- a/src/ia32/codegen-ia32.cc
|
| +++ b/src/ia32/codegen-ia32.cc
|
| @@ -12638,7 +12638,6 @@ void StringCharCodeAtGenerator::GenerateSlow(
|
| call_helper.BeforeCall(masm);
|
| __ push(object_);
|
| __ push(index_);
|
| - __ push(result_);
|
| __ push(index_); // Consumed by runtime conversion function.
|
| if (index_flags_ == STRING_INDEX_IS_NUMBER) {
|
| __ CallRuntime(Runtime::kNumberToIntegerMapMinusZero, 1);
|
| @@ -12652,9 +12651,11 @@ void StringCharCodeAtGenerator::GenerateSlow(
|
| // have a chance to overwrite it.
|
| __ mov(scratch_, eax);
|
| }
|
| - __ pop(result_);
|
| __ pop(index_);
|
| __ pop(object_);
|
| + // Reload the instance type.
|
| + __ mov(result_, FieldOperand(object_, HeapObject::kMapOffset));
|
| + __ movzx_b(result_, FieldOperand(result_, Map::kInstanceTypeOffset));
|
| call_helper.AfterCall(masm);
|
| // If index is still not a smi, it must be out of range.
|
| ASSERT(kSmiTag == 0);
|
|
|