| 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 3099 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3110 | 3110 |
| 3111 __ JumpIfSmi(x0, if_false); | 3111 __ JumpIfSmi(x0, if_false); |
| 3112 __ CompareObjectType(x0, x10, x11, JS_REGEXP_TYPE); | 3112 __ CompareObjectType(x0, x10, x11, JS_REGEXP_TYPE); |
| 3113 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | 3113 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
| 3114 Split(eq, if_true, if_false, fall_through); | 3114 Split(eq, if_true, if_false, fall_through); |
| 3115 | 3115 |
| 3116 context()->Plug(if_true, if_false); | 3116 context()->Plug(if_true, if_false); |
| 3117 } | 3117 } |
| 3118 | 3118 |
| 3119 | 3119 |
| 3120 void FullCodeGenerator::EmitIsJSProxy(CallRuntime* expr) { |
| 3121 ZoneList<Expression*>* args = expr->arguments(); |
| 3122 DCHECK(args->length() == 1); |
| 3123 |
| 3124 VisitForAccumulatorValue(args->at(0)); |
| 3125 |
| 3126 Label materialize_true, materialize_false; |
| 3127 Label* if_true = NULL; |
| 3128 Label* if_false = NULL; |
| 3129 Label* fall_through = NULL; |
| 3130 context()->PrepareTest(&materialize_true, &materialize_false, &if_true, |
| 3131 &if_false, &fall_through); |
| 3132 |
| 3133 __ JumpIfSmi(x0, if_false); |
| 3134 Register map = x10; |
| 3135 Register type_reg = x11; |
| 3136 __ Ldr(map, FieldMemOperand(x0, HeapObject::kMapOffset)); |
| 3137 __ Ldrb(type_reg, FieldMemOperand(map, Map::kInstanceTypeOffset)); |
| 3138 __ Sub(type_reg, type_reg, Operand(FIRST_JS_PROXY_TYPE)); |
| 3139 __ Cmp(type_reg, Operand(LAST_JS_PROXY_TYPE - FIRST_JS_PROXY_TYPE)); |
| 3140 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
| 3141 Split(ls, if_true, if_false, fall_through); |
| 3142 |
| 3143 context()->Plug(if_true, if_false); |
| 3144 } |
| 3145 |
| 3120 | 3146 |
| 3121 void FullCodeGenerator::EmitIsConstructCall(CallRuntime* expr) { | 3147 void FullCodeGenerator::EmitIsConstructCall(CallRuntime* expr) { |
| 3122 DCHECK(expr->arguments()->length() == 0); | 3148 DCHECK(expr->arguments()->length() == 0); |
| 3123 | 3149 |
| 3124 Label materialize_true, materialize_false; | 3150 Label materialize_true, materialize_false; |
| 3125 Label* if_true = NULL; | 3151 Label* if_true = NULL; |
| 3126 Label* if_false = NULL; | 3152 Label* if_false = NULL; |
| 3127 Label* fall_through = NULL; | 3153 Label* fall_through = NULL; |
| 3128 context()->PrepareTest(&materialize_true, &materialize_false, | 3154 context()->PrepareTest(&materialize_true, &materialize_false, |
| 3129 &if_true, &if_false, &fall_through); | 3155 &if_true, &if_false, &fall_through); |
| (...skipping 2079 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5209 return previous_; | 5235 return previous_; |
| 5210 } | 5236 } |
| 5211 | 5237 |
| 5212 | 5238 |
| 5213 #undef __ | 5239 #undef __ |
| 5214 | 5240 |
| 5215 | 5241 |
| 5216 } } // namespace v8::internal | 5242 } } // namespace v8::internal |
| 5217 | 5243 |
| 5218 #endif // V8_TARGET_ARCH_ARM64 | 5244 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |