OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_PPC | 5 #if V8_TARGET_ARCH_PPC |
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 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
594 Label use_receiver, exit; | 594 Label use_receiver, exit; |
595 | 595 |
596 // If the result is a smi, it is *not* an object in the ECMA sense. | 596 // If the result is a smi, it is *not* an object in the ECMA sense. |
597 // r3: result | 597 // r3: result |
598 // sp[0]: receiver | 598 // sp[0]: receiver |
599 // sp[1]: new.target | 599 // sp[1]: new.target |
600 // sp[2]: number of arguments (smi-tagged) | 600 // sp[2]: number of arguments (smi-tagged) |
601 __ JumpIfSmi(r3, &use_receiver); | 601 __ JumpIfSmi(r3, &use_receiver); |
602 | 602 |
603 // If the type of the result (stored in its map) is less than | 603 // If the type of the result (stored in its map) is less than |
604 // FIRST_SPEC_OBJECT_TYPE, it is not an object in the ECMA sense. | 604 // FIRST_JS_RECEIVER_TYPE, it is not an object in the ECMA sense. |
605 __ CompareObjectType(r3, r4, r6, FIRST_SPEC_OBJECT_TYPE); | 605 __ CompareObjectType(r3, r4, r6, FIRST_JS_RECEIVER_TYPE); |
606 __ bge(&exit); | 606 __ bge(&exit); |
607 | 607 |
608 // Throw away the result of the constructor invocation and use the | 608 // Throw away the result of the constructor invocation and use the |
609 // on-stack receiver as the result. | 609 // on-stack receiver as the result. |
610 __ bind(&use_receiver); | 610 __ bind(&use_receiver); |
611 __ LoadP(r3, MemOperand(sp)); | 611 __ LoadP(r3, MemOperand(sp)); |
612 | 612 |
613 // Remove receiver from the stack, remove caller arguments, and | 613 // Remove receiver from the stack, remove caller arguments, and |
614 // return. | 614 // return. |
615 __ bind(&exit); | 615 __ bind(&exit); |
(...skipping 1393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2009 __ bkpt(0); | 2009 __ bkpt(0); |
2010 } | 2010 } |
2011 } | 2011 } |
2012 | 2012 |
2013 | 2013 |
2014 #undef __ | 2014 #undef __ |
2015 } // namespace internal | 2015 } // namespace internal |
2016 } // namespace v8 | 2016 } // namespace v8 |
2017 | 2017 |
2018 #endif // V8_TARGET_ARCH_PPC | 2018 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |