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 3509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3520 __ Ldr(x0, FieldMemOperand(x0, JSValue::kValueOffset)); | 3520 __ Ldr(x0, FieldMemOperand(x0, JSValue::kValueOffset)); |
3521 | 3521 |
3522 __ Bind(&done); | 3522 __ Bind(&done); |
3523 context()->Plug(x0); | 3523 context()->Plug(x0); |
3524 } | 3524 } |
3525 | 3525 |
3526 | 3526 |
3527 void FullCodeGenerator::EmitDateField(CallRuntime* expr) { | 3527 void FullCodeGenerator::EmitDateField(CallRuntime* expr) { |
3528 ZoneList<Expression*>* args = expr->arguments(); | 3528 ZoneList<Expression*>* args = expr->arguments(); |
3529 DCHECK(args->length() == 2); | 3529 DCHECK(args->length() == 2); |
3530 DCHECK_NE(NULL, args->at(1)->AsLiteral()); | 3530 DCHECK(args->at(1)->AsLiteral()); |
3531 Smi* index = Smi::cast(*(args->at(1)->AsLiteral()->value())); | 3531 Smi* index = Smi::cast(*(args->at(1)->AsLiteral()->value())); |
3532 | 3532 |
3533 VisitForAccumulatorValue(args->at(0)); // Load the object. | 3533 VisitForAccumulatorValue(args->at(0)); // Load the object. |
3534 | 3534 |
3535 Label runtime, done, not_date_object; | 3535 Label runtime, done, not_date_object; |
3536 Register object = x0; | 3536 Register object = x0; |
3537 Register result = x0; | 3537 Register result = x0; |
3538 Register stamp_addr = x10; | 3538 Register stamp_addr = x10; |
3539 Register stamp_cache = x11; | 3539 Register stamp_cache = x11; |
3540 | 3540 |
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3866 VisitForAccumulatorValue(args->at(2)); | 3866 VisitForAccumulatorValue(args->at(2)); |
3867 __ Pop(x1, x2); | 3867 __ Pop(x1, x2); |
3868 __ CallStub(&stub); | 3868 __ CallStub(&stub); |
3869 context()->Plug(x0); | 3869 context()->Plug(x0); |
3870 } | 3870 } |
3871 | 3871 |
3872 | 3872 |
3873 void FullCodeGenerator::EmitGetFromCache(CallRuntime* expr) { | 3873 void FullCodeGenerator::EmitGetFromCache(CallRuntime* expr) { |
3874 ZoneList<Expression*>* args = expr->arguments(); | 3874 ZoneList<Expression*>* args = expr->arguments(); |
3875 DCHECK_EQ(2, args->length()); | 3875 DCHECK_EQ(2, args->length()); |
3876 DCHECK_NE(NULL, args->at(0)->AsLiteral()); | 3876 DCHECK(args->at(0)->AsLiteral()); |
3877 int cache_id = Smi::cast(*(args->at(0)->AsLiteral()->value()))->value(); | 3877 int cache_id = Smi::cast(*(args->at(0)->AsLiteral()->value()))->value(); |
3878 | 3878 |
3879 Handle<FixedArray> jsfunction_result_caches( | 3879 Handle<FixedArray> jsfunction_result_caches( |
3880 isolate()->native_context()->jsfunction_result_caches()); | 3880 isolate()->native_context()->jsfunction_result_caches()); |
3881 if (jsfunction_result_caches->length() <= cache_id) { | 3881 if (jsfunction_result_caches->length() <= cache_id) { |
3882 __ Abort(kAttemptToUseUndefinedCache); | 3882 __ Abort(kAttemptToUseUndefinedCache); |
3883 __ LoadRoot(x0, Heap::kUndefinedValueRootIndex); | 3883 __ LoadRoot(x0, Heap::kUndefinedValueRootIndex); |
3884 context()->Plug(x0); | 3884 context()->Plug(x0); |
3885 return; | 3885 return; |
3886 } | 3886 } |
(...skipping 1504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5391 return previous_; | 5391 return previous_; |
5392 } | 5392 } |
5393 | 5393 |
5394 | 5394 |
5395 #undef __ | 5395 #undef __ |
5396 | 5396 |
5397 | 5397 |
5398 } } // namespace v8::internal | 5398 } } // namespace v8::internal |
5399 | 5399 |
5400 #endif // V8_TARGET_ARCH_ARM64 | 5400 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |