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 2971 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2982 __ Ldrb(type_reg, FieldMemOperand(map, Map::kInstanceTypeOffset)); | 2982 __ Ldrb(type_reg, FieldMemOperand(map, Map::kInstanceTypeOffset)); |
2983 __ Sub(type_reg, type_reg, Operand(FIRST_JS_PROXY_TYPE)); | 2983 __ Sub(type_reg, type_reg, Operand(FIRST_JS_PROXY_TYPE)); |
2984 __ Cmp(type_reg, Operand(LAST_JS_PROXY_TYPE - FIRST_JS_PROXY_TYPE)); | 2984 __ Cmp(type_reg, Operand(LAST_JS_PROXY_TYPE - FIRST_JS_PROXY_TYPE)); |
2985 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | 2985 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
2986 Split(ls, if_true, if_false, fall_through); | 2986 Split(ls, if_true, if_false, fall_through); |
2987 | 2987 |
2988 context()->Plug(if_true, if_false); | 2988 context()->Plug(if_true, if_false); |
2989 } | 2989 } |
2990 | 2990 |
2991 | 2991 |
2992 void FullCodeGenerator::EmitIsConstructCall(CallRuntime* expr) { | |
2993 DCHECK(expr->arguments()->length() == 0); | |
2994 | |
2995 Label materialize_true, materialize_false; | |
2996 Label* if_true = NULL; | |
2997 Label* if_false = NULL; | |
2998 Label* fall_through = NULL; | |
2999 context()->PrepareTest(&materialize_true, &materialize_false, | |
3000 &if_true, &if_false, &fall_through); | |
3001 | |
3002 // Get the frame pointer for the calling frame. | |
3003 __ Ldr(x2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); | |
3004 | |
3005 // Skip the arguments adaptor frame if it exists. | |
3006 Label check_frame_marker; | |
3007 __ Ldr(x1, MemOperand(x2, StandardFrameConstants::kContextOffset)); | |
3008 __ Cmp(x1, Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)); | |
3009 __ B(ne, &check_frame_marker); | |
3010 __ Ldr(x2, MemOperand(x2, StandardFrameConstants::kCallerFPOffset)); | |
3011 | |
3012 // Check the marker in the calling frame. | |
3013 __ Bind(&check_frame_marker); | |
3014 __ Ldr(x1, MemOperand(x2, StandardFrameConstants::kMarkerOffset)); | |
3015 __ Cmp(x1, Smi::FromInt(StackFrame::CONSTRUCT)); | |
3016 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | |
3017 Split(eq, if_true, if_false, fall_through); | |
3018 | |
3019 context()->Plug(if_true, if_false); | |
3020 } | |
3021 | |
3022 | |
3023 void FullCodeGenerator::EmitObjectEquals(CallRuntime* expr) { | 2992 void FullCodeGenerator::EmitObjectEquals(CallRuntime* expr) { |
3024 ZoneList<Expression*>* args = expr->arguments(); | 2993 ZoneList<Expression*>* args = expr->arguments(); |
3025 DCHECK(args->length() == 2); | 2994 DCHECK(args->length() == 2); |
3026 | 2995 |
3027 // Load the two objects into registers and perform the comparison. | 2996 // Load the two objects into registers and perform the comparison. |
3028 VisitForStackValue(args->at(0)); | 2997 VisitForStackValue(args->at(0)); |
3029 VisitForAccumulatorValue(args->at(1)); | 2998 VisitForAccumulatorValue(args->at(1)); |
3030 | 2999 |
3031 Label materialize_true, materialize_false; | 3000 Label materialize_true, materialize_false; |
3032 Label* if_true = NULL; | 3001 Label* if_true = NULL; |
(...skipping 1949 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4982 } | 4951 } |
4983 | 4952 |
4984 return INTERRUPT; | 4953 return INTERRUPT; |
4985 } | 4954 } |
4986 | 4955 |
4987 | 4956 |
4988 } // namespace internal | 4957 } // namespace internal |
4989 } // namespace v8 | 4958 } // namespace v8 |
4990 | 4959 |
4991 #endif // V8_TARGET_ARCH_ARM64 | 4960 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |