| Index: src/ia32/full-codegen-ia32.cc
|
| diff --git a/src/ia32/full-codegen-ia32.cc b/src/ia32/full-codegen-ia32.cc
|
| index de8e490d2873c87cc4c43c46b7326eafcb0411fb..7fb7cc3215239810232cf8e9cf2e3eb24c474311 100644
|
| --- a/src/ia32/full-codegen-ia32.cc
|
| +++ b/src/ia32/full-codegen-ia32.cc
|
| @@ -3068,19 +3068,18 @@ void FullCodeGenerator::EmitDateField(CallRuntime* expr) {
|
|
|
| VisitForAccumulatorValue(args->at(0)); // Load the object.
|
|
|
| - Label runtime, done;
|
| + Label runtime, done, not_date_object;
|
| Register object = eax;
|
| Register result = eax;
|
| Register scratch = ecx;
|
|
|
| -#ifdef DEBUG
|
| - __ AbortIfSmi(object);
|
| + __ JumpIfSmi(object, ¬_date_object);
|
| __ CmpObjectType(object, JS_DATE_TYPE, scratch);
|
| - __ Assert(equal, "Trying to get date field from non-date.");
|
| -#endif
|
| + __ j(not_equal, ¬_date_object);
|
|
|
| if (index->value() == 0) {
|
| __ mov(result, FieldOperand(object, JSDate::kValueOffset));
|
| + __ jmp(&done);
|
| } else {
|
| if (index->value() < JSDate::kFirstUncachedField) {
|
| ExternalReference stamp = ExternalReference::date_cache_stamp(isolate());
|
| @@ -3096,8 +3095,12 @@ void FullCodeGenerator::EmitDateField(CallRuntime* expr) {
|
| __ mov(Operand(esp, 0), object);
|
| __ mov(Operand(esp, 1 * kPointerSize), Immediate(index));
|
| __ CallCFunction(ExternalReference::get_date_field_function(isolate()), 2);
|
| - __ bind(&done);
|
| + __ jmp(&done);
|
| }
|
| +
|
| + __ bind(¬_date_object);
|
| + __ CallRuntime(Runtime::kThrowNotDateError, 0);
|
| + __ bind(&done);
|
| context()->Plug(result);
|
| }
|
|
|
| @@ -3522,9 +3525,7 @@ void FullCodeGenerator::EmitGetCachedArrayIndex(CallRuntime* expr) {
|
| ASSERT(args->length() == 1);
|
| VisitForAccumulatorValue(args->at(0));
|
|
|
| - if (generate_debug_code_) {
|
| - __ AbortIfNotString(eax);
|
| - }
|
| + __ AbortIfNotString(eax);
|
|
|
| __ mov(eax, FieldOperand(eax, String::kHashFieldOffset));
|
| __ IndexFromHash(eax, eax);
|
|
|