OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_ARM | 5 #if V8_TARGET_ARCH_ARM |
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 3166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3177 __ JumpIfSmi(r0, &done); | 3177 __ JumpIfSmi(r0, &done); |
3178 // If the object is not a value type, return the object. | 3178 // If the object is not a value type, return the object. |
3179 __ CompareObjectType(r0, r1, r1, JS_VALUE_TYPE); | 3179 __ CompareObjectType(r0, r1, r1, JS_VALUE_TYPE); |
3180 __ ldr(r0, FieldMemOperand(r0, JSValue::kValueOffset), eq); | 3180 __ ldr(r0, FieldMemOperand(r0, JSValue::kValueOffset), eq); |
3181 | 3181 |
3182 __ bind(&done); | 3182 __ bind(&done); |
3183 context()->Plug(r0); | 3183 context()->Plug(r0); |
3184 } | 3184 } |
3185 | 3185 |
3186 | 3186 |
3187 void FullCodeGenerator::EmitIsDate(CallRuntime* expr) { | |
3188 ZoneList<Expression*>* args = expr->arguments(); | |
3189 DCHECK_EQ(1, args->length()); | |
3190 | |
3191 VisitForAccumulatorValue(args->at(0)); | |
3192 | |
3193 Label materialize_true, materialize_false; | |
3194 Label* if_true = nullptr; | |
3195 Label* if_false = nullptr; | |
3196 Label* fall_through = nullptr; | |
3197 context()->PrepareTest(&materialize_true, &materialize_false, &if_true, | |
3198 &if_false, &fall_through); | |
3199 | |
3200 __ JumpIfSmi(r0, if_false); | |
3201 __ CompareObjectType(r0, r1, r1, JS_DATE_TYPE); | |
3202 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | |
3203 Split(eq, if_true, if_false, fall_through); | |
3204 | |
3205 context()->Plug(if_true, if_false); | |
3206 } | |
3207 | |
3208 | |
3209 void FullCodeGenerator::EmitOneByteSeqStringSetChar(CallRuntime* expr) { | 3187 void FullCodeGenerator::EmitOneByteSeqStringSetChar(CallRuntime* expr) { |
3210 ZoneList<Expression*>* args = expr->arguments(); | 3188 ZoneList<Expression*>* args = expr->arguments(); |
3211 DCHECK_EQ(3, args->length()); | 3189 DCHECK_EQ(3, args->length()); |
3212 | 3190 |
3213 Register string = r0; | 3191 Register string = r0; |
3214 Register index = r1; | 3192 Register index = r1; |
3215 Register value = r2; | 3193 Register value = r2; |
3216 | 3194 |
3217 VisitForStackValue(args->at(0)); // index | 3195 VisitForStackValue(args->at(0)); // index |
3218 VisitForStackValue(args->at(1)); // value | 3196 VisitForStackValue(args->at(1)); // value |
(...skipping 1399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4618 DCHECK(interrupt_address == | 4596 DCHECK(interrupt_address == |
4619 isolate->builtins()->OsrAfterStackCheck()->entry()); | 4597 isolate->builtins()->OsrAfterStackCheck()->entry()); |
4620 return OSR_AFTER_STACK_CHECK; | 4598 return OSR_AFTER_STACK_CHECK; |
4621 } | 4599 } |
4622 | 4600 |
4623 | 4601 |
4624 } // namespace internal | 4602 } // namespace internal |
4625 } // namespace v8 | 4603 } // namespace v8 |
4626 | 4604 |
4627 #endif // V8_TARGET_ARCH_ARM | 4605 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |