| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_X64 | 7 #if V8_TARGET_ARCH_X64 |
| 8 | 8 |
| 9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 3693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3704 __ movp(rax, FieldOperand(rax, JSValue::kValueOffset)); | 3704 __ movp(rax, FieldOperand(rax, JSValue::kValueOffset)); |
| 3705 | 3705 |
| 3706 __ bind(&done); | 3706 __ bind(&done); |
| 3707 context()->Plug(rax); | 3707 context()->Plug(rax); |
| 3708 } | 3708 } |
| 3709 | 3709 |
| 3710 | 3710 |
| 3711 void FullCodeGenerator::EmitDateField(CallRuntime* expr) { | 3711 void FullCodeGenerator::EmitDateField(CallRuntime* expr) { |
| 3712 ZoneList<Expression*>* args = expr->arguments(); | 3712 ZoneList<Expression*>* args = expr->arguments(); |
| 3713 DCHECK(args->length() == 2); | 3713 DCHECK(args->length() == 2); |
| 3714 DCHECK_NE(NULL, args->at(1)->AsLiteral()); | 3714 DCHECK(args->at(1)->AsLiteral()); |
| 3715 Smi* index = Smi::cast(*(args->at(1)->AsLiteral()->value())); | 3715 Smi* index = Smi::cast(*(args->at(1)->AsLiteral()->value())); |
| 3716 | 3716 |
| 3717 VisitForAccumulatorValue(args->at(0)); // Load the object. | 3717 VisitForAccumulatorValue(args->at(0)); // Load the object. |
| 3718 | 3718 |
| 3719 Label runtime, done, not_date_object; | 3719 Label runtime, done, not_date_object; |
| 3720 Register object = rax; | 3720 Register object = rax; |
| 3721 Register result = rax; | 3721 Register result = rax; |
| 3722 Register scratch = rcx; | 3722 Register scratch = rcx; |
| 3723 | 3723 |
| 3724 __ JumpIfSmi(object, ¬_date_object); | 3724 __ JumpIfSmi(object, ¬_date_object); |
| (...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4056 __ Pop(rcx); | 4056 __ Pop(rcx); |
| 4057 __ CallStub(&stub); | 4057 __ CallStub(&stub); |
| 4058 context()->Plug(rax); | 4058 context()->Plug(rax); |
| 4059 } | 4059 } |
| 4060 | 4060 |
| 4061 | 4061 |
| 4062 void FullCodeGenerator::EmitGetFromCache(CallRuntime* expr) { | 4062 void FullCodeGenerator::EmitGetFromCache(CallRuntime* expr) { |
| 4063 ZoneList<Expression*>* args = expr->arguments(); | 4063 ZoneList<Expression*>* args = expr->arguments(); |
| 4064 DCHECK_EQ(2, args->length()); | 4064 DCHECK_EQ(2, args->length()); |
| 4065 | 4065 |
| 4066 DCHECK_NE(NULL, args->at(0)->AsLiteral()); | 4066 DCHECK(args->at(0)->AsLiteral()); |
| 4067 int cache_id = Smi::cast(*(args->at(0)->AsLiteral()->value()))->value(); | 4067 int cache_id = Smi::cast(*(args->at(0)->AsLiteral()->value()))->value(); |
| 4068 | 4068 |
| 4069 Handle<FixedArray> jsfunction_result_caches( | 4069 Handle<FixedArray> jsfunction_result_caches( |
| 4070 isolate()->native_context()->jsfunction_result_caches()); | 4070 isolate()->native_context()->jsfunction_result_caches()); |
| 4071 if (jsfunction_result_caches->length() <= cache_id) { | 4071 if (jsfunction_result_caches->length() <= cache_id) { |
| 4072 __ Abort(kAttemptToUseUndefinedCache); | 4072 __ Abort(kAttemptToUseUndefinedCache); |
| 4073 __ LoadRoot(rax, Heap::kUndefinedValueRootIndex); | 4073 __ LoadRoot(rax, Heap::kUndefinedValueRootIndex); |
| 4074 context()->Plug(rax); | 4074 context()->Plug(rax); |
| 4075 return; | 4075 return; |
| 4076 } | 4076 } |
| (...skipping 1226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5303 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 5303 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
| 5304 Assembler::target_address_at(call_target_address, | 5304 Assembler::target_address_at(call_target_address, |
| 5305 unoptimized_code)); | 5305 unoptimized_code)); |
| 5306 return OSR_AFTER_STACK_CHECK; | 5306 return OSR_AFTER_STACK_CHECK; |
| 5307 } | 5307 } |
| 5308 | 5308 |
| 5309 | 5309 |
| 5310 } } // namespace v8::internal | 5310 } } // namespace v8::internal |
| 5311 | 5311 |
| 5312 #endif // V8_TARGET_ARCH_X64 | 5312 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |