| 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/codegen.h" | 7 #include "src/codegen.h" |
| 8 #include "src/debug/debug.h" | 8 #include "src/debug/debug.h" |
| 9 #include "src/deoptimizer.h" | 9 #include "src/deoptimizer.h" |
| 10 #include "src/full-codegen/full-codegen.h" | 10 #include "src/full-codegen/full-codegen.h" |
| (...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 578 Label use_receiver, exit; | 578 Label use_receiver, exit; |
| 579 | 579 |
| 580 // If the result is a smi, it is *not* an object in the ECMA sense. | 580 // If the result is a smi, it is *not* an object in the ECMA sense. |
| 581 // r0: result | 581 // r0: result |
| 582 // sp[0]: receiver | 582 // sp[0]: receiver |
| 583 // sp[1]: new.target | 583 // sp[1]: new.target |
| 584 // sp[2]: number of arguments (smi-tagged) | 584 // sp[2]: number of arguments (smi-tagged) |
| 585 __ JumpIfSmi(r0, &use_receiver); | 585 __ JumpIfSmi(r0, &use_receiver); |
| 586 | 586 |
| 587 // If the type of the result (stored in its map) is less than | 587 // If the type of the result (stored in its map) is less than |
| 588 // FIRST_SPEC_OBJECT_TYPE, it is not an object in the ECMA sense. | 588 // FIRST_JS_RECEIVER_TYPE, it is not an object in the ECMA sense. |
| 589 __ CompareObjectType(r0, r1, r3, FIRST_SPEC_OBJECT_TYPE); | 589 __ CompareObjectType(r0, r1, r3, FIRST_JS_RECEIVER_TYPE); |
| 590 __ b(ge, &exit); | 590 __ b(ge, &exit); |
| 591 | 591 |
| 592 // Throw away the result of the constructor invocation and use the | 592 // Throw away the result of the constructor invocation and use the |
| 593 // on-stack receiver as the result. | 593 // on-stack receiver as the result. |
| 594 __ bind(&use_receiver); | 594 __ bind(&use_receiver); |
| 595 __ ldr(r0, MemOperand(sp)); | 595 __ ldr(r0, MemOperand(sp)); |
| 596 | 596 |
| 597 // Remove receiver from the stack, remove caller arguments, and | 597 // Remove receiver from the stack, remove caller arguments, and |
| 598 // return. | 598 // return. |
| 599 __ bind(&exit); | 599 __ bind(&exit); |
| (...skipping 1358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1958 } | 1958 } |
| 1959 } | 1959 } |
| 1960 | 1960 |
| 1961 | 1961 |
| 1962 #undef __ | 1962 #undef __ |
| 1963 | 1963 |
| 1964 } // namespace internal | 1964 } // namespace internal |
| 1965 } // namespace v8 | 1965 } // namespace v8 |
| 1966 | 1966 |
| 1967 #endif // V8_TARGET_ARCH_ARM | 1967 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |