| Index: src/x64/full-codegen-x64.cc
|
| diff --git a/src/x64/full-codegen-x64.cc b/src/x64/full-codegen-x64.cc
|
| index 5e306dda57dc5b694281d2240174e522744f4958..78e1dec51358f5aa40ff2854ffdd989452d0608f 100644
|
| --- a/src/x64/full-codegen-x64.cc
|
| +++ b/src/x64/full-codegen-x64.cc
|
| @@ -3036,19 +3036,18 @@ void FullCodeGenerator::EmitDateField(CallRuntime* expr) {
|
|
|
| VisitForAccumulatorValue(args->at(0)); // Load the object.
|
|
|
| - Label runtime, done;
|
| + Label runtime, done, not_date_object;
|
| Register object = rax;
|
| Register result = rax;
|
| Register scratch = rcx;
|
|
|
| -#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) {
|
| __ movq(result, FieldOperand(object, JSDate::kValueOffset));
|
| + __ jmp(&done);
|
| } else {
|
| if (index->value() < JSDate::kFirstUncachedField) {
|
| ExternalReference stamp = ExternalReference::date_cache_stamp(isolate());
|
| @@ -3070,8 +3069,12 @@ void FullCodeGenerator::EmitDateField(CallRuntime* expr) {
|
| #endif
|
| __ CallCFunction(ExternalReference::get_date_field_function(isolate()), 2);
|
| __ movq(rsi, Operand(rbp, StandardFrameConstants::kContextOffset));
|
| - __ bind(&done);
|
| + __ jmp(&done);
|
| }
|
| +
|
| + __ bind(¬_date_object);
|
| + __ CallRuntime(Runtime::kThrowNotDateError, 0);
|
| + __ bind(&done);
|
| context()->Plug(rax);
|
| }
|
|
|
| @@ -3495,9 +3498,7 @@ void FullCodeGenerator::EmitGetCachedArrayIndex(CallRuntime* expr) {
|
| ASSERT(args->length() == 1);
|
| VisitForAccumulatorValue(args->at(0));
|
|
|
| - if (generate_debug_code_) {
|
| - __ AbortIfNotString(rax);
|
| - }
|
| + __ AbortIfNotString(rax);
|
|
|
| __ movl(rax, FieldOperand(rax, String::kHashFieldOffset));
|
| ASSERT(String::kHashShift >= kSmiTagSize);
|
|
|