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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_ARM | 7 #if V8_TARGET_ARCH_ARM |
8 | 8 |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
(...skipping 1423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1434 | 1434 |
1435 Label object_not_null, object_not_null_or_smi; | 1435 Label object_not_null, object_not_null_or_smi; |
1436 __ bind(¬_js_object); | 1436 __ bind(¬_js_object); |
1437 // Before null, smi and string value checks, check that the rhs is a function | 1437 // Before null, smi and string value checks, check that the rhs is a function |
1438 // as for a non-function rhs an exception needs to be thrown. | 1438 // as for a non-function rhs an exception needs to be thrown. |
1439 __ JumpIfSmi(function, &slow); | 1439 __ JumpIfSmi(function, &slow); |
1440 __ CompareObjectType(function, scratch2, scratch, JS_FUNCTION_TYPE); | 1440 __ CompareObjectType(function, scratch2, scratch, JS_FUNCTION_TYPE); |
1441 __ b(ne, &slow); | 1441 __ b(ne, &slow); |
1442 | 1442 |
1443 // Null is not instance of anything. | 1443 // Null is not instance of anything. |
1444 __ cmp(scratch, Operand(isolate()->factory()->null_value())); | 1444 __ cmp(object, Operand(isolate()->factory()->null_value())); |
1445 __ b(ne, &object_not_null); | 1445 __ b(ne, &object_not_null); |
1446 if (ReturnTrueFalseObject()) { | 1446 if (ReturnTrueFalseObject()) { |
1447 __ Move(r0, factory->false_value()); | 1447 __ Move(r0, factory->false_value()); |
1448 } else { | 1448 } else { |
1449 __ mov(r0, Operand(Smi::FromInt(1))); | 1449 __ mov(r0, Operand(Smi::FromInt(1))); |
1450 } | 1450 } |
1451 __ Ret(HasArgsInRegisters() ? 0 : 2); | 1451 __ Ret(HasArgsInRegisters() ? 0 : 2); |
1452 | 1452 |
1453 __ bind(&object_not_null); | 1453 __ bind(&object_not_null); |
1454 // Smi values are not instances of anything. | 1454 // Smi values are not instances of anything. |
(...skipping 3223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4678 MemOperand(fp, 6 * kPointerSize), | 4678 MemOperand(fp, 6 * kPointerSize), |
4679 NULL); | 4679 NULL); |
4680 } | 4680 } |
4681 | 4681 |
4682 | 4682 |
4683 #undef __ | 4683 #undef __ |
4684 | 4684 |
4685 } } // namespace v8::internal | 4685 } } // namespace v8::internal |
4686 | 4686 |
4687 #endif // V8_TARGET_ARCH_ARM | 4687 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |