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 #if V8_TARGET_ARCH_ARM64 | 5 #if V8_TARGET_ARCH_ARM64 |
6 | 6 |
7 #include "src/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 2976 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2987 __ JumpIfSmi(x0, &done); | 2987 __ JumpIfSmi(x0, &done); |
2988 // If the object is not a value type, return the object. | 2988 // If the object is not a value type, return the object. |
2989 __ JumpIfNotObjectType(x0, x10, x11, JS_VALUE_TYPE, &done); | 2989 __ JumpIfNotObjectType(x0, x10, x11, JS_VALUE_TYPE, &done); |
2990 __ Ldr(x0, FieldMemOperand(x0, JSValue::kValueOffset)); | 2990 __ Ldr(x0, FieldMemOperand(x0, JSValue::kValueOffset)); |
2991 | 2991 |
2992 __ Bind(&done); | 2992 __ Bind(&done); |
2993 context()->Plug(x0); | 2993 context()->Plug(x0); |
2994 } | 2994 } |
2995 | 2995 |
2996 | 2996 |
2997 void FullCodeGenerator::EmitIsDate(CallRuntime* expr) { | |
2998 ZoneList<Expression*>* args = expr->arguments(); | |
2999 DCHECK_EQ(1, args->length()); | |
3000 | |
3001 VisitForAccumulatorValue(args->at(0)); | |
3002 | |
3003 Label materialize_true, materialize_false; | |
3004 Label* if_true = nullptr; | |
3005 Label* if_false = nullptr; | |
3006 Label* fall_through = nullptr; | |
3007 context()->PrepareTest(&materialize_true, &materialize_false, &if_true, | |
3008 &if_false, &fall_through); | |
3009 | |
3010 __ JumpIfSmi(x0, if_false); | |
3011 __ CompareObjectType(x0, x10, x11, JS_DATE_TYPE); | |
3012 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | |
3013 Split(eq, if_true, if_false, fall_through); | |
3014 | |
3015 context()->Plug(if_true, if_false); | |
3016 } | |
3017 | |
3018 | |
3019 void FullCodeGenerator::EmitOneByteSeqStringSetChar(CallRuntime* expr) { | 2997 void FullCodeGenerator::EmitOneByteSeqStringSetChar(CallRuntime* expr) { |
3020 ZoneList<Expression*>* args = expr->arguments(); | 2998 ZoneList<Expression*>* args = expr->arguments(); |
3021 DCHECK_EQ(3, args->length()); | 2999 DCHECK_EQ(3, args->length()); |
3022 | 3000 |
3023 Register string = x0; | 3001 Register string = x0; |
3024 Register index = x1; | 3002 Register index = x1; |
3025 Register value = x2; | 3003 Register value = x2; |
3026 Register scratch = x10; | 3004 Register scratch = x10; |
3027 | 3005 |
3028 VisitForStackValue(args->at(0)); // index | 3006 VisitForStackValue(args->at(0)); // index |
(...skipping 1565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4594 } | 4572 } |
4595 | 4573 |
4596 return INTERRUPT; | 4574 return INTERRUPT; |
4597 } | 4575 } |
4598 | 4576 |
4599 | 4577 |
4600 } // namespace internal | 4578 } // namespace internal |
4601 } // namespace v8 | 4579 } // namespace v8 |
4602 | 4580 |
4603 #endif // V8_TARGET_ARCH_ARM64 | 4581 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |