OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_ARM64 | 7 #if V8_TARGET_ARCH_ARM64 |
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 3504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3515 __ Ldr(x0, FieldMemOperand(x0, JSValue::kValueOffset)); | 3515 __ Ldr(x0, FieldMemOperand(x0, JSValue::kValueOffset)); |
3516 | 3516 |
3517 __ Bind(&done); | 3517 __ Bind(&done); |
3518 context()->Plug(x0); | 3518 context()->Plug(x0); |
3519 } | 3519 } |
3520 | 3520 |
3521 | 3521 |
3522 void FullCodeGenerator::EmitDateField(CallRuntime* expr) { | 3522 void FullCodeGenerator::EmitDateField(CallRuntime* expr) { |
3523 ZoneList<Expression*>* args = expr->arguments(); | 3523 ZoneList<Expression*>* args = expr->arguments(); |
3524 DCHECK(args->length() == 2); | 3524 DCHECK(args->length() == 2); |
3525 DCHECK_NE(NULL, args->at(1)->AsLiteral()); | 3525 DCHECK_NOT_NULL(args->at(1)->AsLiteral()); |
3526 Smi* index = Smi::cast(*(args->at(1)->AsLiteral()->value())); | 3526 Smi* index = Smi::cast(*(args->at(1)->AsLiteral()->value())); |
3527 | 3527 |
3528 VisitForAccumulatorValue(args->at(0)); // Load the object. | 3528 VisitForAccumulatorValue(args->at(0)); // Load the object. |
3529 | 3529 |
3530 Label runtime, done, not_date_object; | 3530 Label runtime, done, not_date_object; |
3531 Register object = x0; | 3531 Register object = x0; |
3532 Register result = x0; | 3532 Register result = x0; |
3533 Register stamp_addr = x10; | 3533 Register stamp_addr = x10; |
3534 Register stamp_cache = x11; | 3534 Register stamp_cache = x11; |
3535 | 3535 |
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3861 VisitForAccumulatorValue(args->at(2)); | 3861 VisitForAccumulatorValue(args->at(2)); |
3862 __ Pop(x1, x2); | 3862 __ Pop(x1, x2); |
3863 __ CallStub(&stub); | 3863 __ CallStub(&stub); |
3864 context()->Plug(x0); | 3864 context()->Plug(x0); |
3865 } | 3865 } |
3866 | 3866 |
3867 | 3867 |
3868 void FullCodeGenerator::EmitGetFromCache(CallRuntime* expr) { | 3868 void FullCodeGenerator::EmitGetFromCache(CallRuntime* expr) { |
3869 ZoneList<Expression*>* args = expr->arguments(); | 3869 ZoneList<Expression*>* args = expr->arguments(); |
3870 DCHECK_EQ(2, args->length()); | 3870 DCHECK_EQ(2, args->length()); |
3871 DCHECK_NE(NULL, args->at(0)->AsLiteral()); | 3871 DCHECK_NOT_NULL(args->at(0)->AsLiteral()); |
3872 int cache_id = Smi::cast(*(args->at(0)->AsLiteral()->value()))->value(); | 3872 int cache_id = Smi::cast(*(args->at(0)->AsLiteral()->value()))->value(); |
3873 | 3873 |
3874 Handle<FixedArray> jsfunction_result_caches( | 3874 Handle<FixedArray> jsfunction_result_caches( |
3875 isolate()->native_context()->jsfunction_result_caches()); | 3875 isolate()->native_context()->jsfunction_result_caches()); |
3876 if (jsfunction_result_caches->length() <= cache_id) { | 3876 if (jsfunction_result_caches->length() <= cache_id) { |
3877 __ Abort(kAttemptToUseUndefinedCache); | 3877 __ Abort(kAttemptToUseUndefinedCache); |
3878 __ LoadRoot(x0, Heap::kUndefinedValueRootIndex); | 3878 __ LoadRoot(x0, Heap::kUndefinedValueRootIndex); |
3879 context()->Plug(x0); | 3879 context()->Plug(x0); |
3880 return; | 3880 return; |
3881 } | 3881 } |
(...skipping 1504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5386 return previous_; | 5386 return previous_; |
5387 } | 5387 } |
5388 | 5388 |
5389 | 5389 |
5390 #undef __ | 5390 #undef __ |
5391 | 5391 |
5392 | 5392 |
5393 } } // namespace v8::internal | 5393 } } // namespace v8::internal |
5394 | 5394 |
5395 #endif // V8_TARGET_ARCH_ARM64 | 5395 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |