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_MIPS | 5 #if V8_TARGET_ARCH_MIPS |
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 569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
580 Label use_receiver, exit; | 580 Label use_receiver, exit; |
581 | 581 |
582 // If the result is a smi, it is *not* an object in the ECMA sense. | 582 // If the result is a smi, it is *not* an object in the ECMA sense. |
583 // v0: result | 583 // v0: result |
584 // sp[0]: receiver (newly allocated object) | 584 // sp[0]: receiver (newly allocated object) |
585 // sp[1]: new.target | 585 // sp[1]: new.target |
586 // sp[2]: number of arguments (smi-tagged) | 586 // sp[2]: number of arguments (smi-tagged) |
587 __ JumpIfSmi(v0, &use_receiver); | 587 __ JumpIfSmi(v0, &use_receiver); |
588 | 588 |
589 // If the type of the result (stored in its map) is less than | 589 // If the type of the result (stored in its map) is less than |
590 // FIRST_SPEC_OBJECT_TYPE, it is not an object in the ECMA sense. | 590 // FIRST_JS_RECEIVER_TYPE, it is not an object in the ECMA sense. |
591 __ GetObjectType(v0, a1, a3); | 591 __ GetObjectType(v0, a1, a3); |
592 __ Branch(&exit, greater_equal, a3, Operand(FIRST_SPEC_OBJECT_TYPE)); | 592 __ Branch(&exit, greater_equal, a3, Operand(FIRST_JS_RECEIVER_TYPE)); |
593 | 593 |
594 // Throw away the result of the constructor invocation and use the | 594 // Throw away the result of the constructor invocation and use the |
595 // on-stack receiver as the result. | 595 // on-stack receiver as the result. |
596 __ bind(&use_receiver); | 596 __ bind(&use_receiver); |
597 __ lw(v0, MemOperand(sp)); | 597 __ lw(v0, MemOperand(sp)); |
598 | 598 |
599 // Remove receiver from the stack, remove caller arguments, and | 599 // Remove receiver from the stack, remove caller arguments, and |
600 // return. | 600 // return. |
601 __ bind(&exit); | 601 __ bind(&exit); |
602 // v0: result | 602 // v0: result |
(...skipping 1383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1986 } | 1986 } |
1987 } | 1987 } |
1988 | 1988 |
1989 | 1989 |
1990 #undef __ | 1990 #undef __ |
1991 | 1991 |
1992 } // namespace internal | 1992 } // namespace internal |
1993 } // namespace v8 | 1993 } // namespace v8 |
1994 | 1994 |
1995 #endif // V8_TARGET_ARCH_MIPS | 1995 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |