| 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_MIPS64 | 5 #if V8_TARGET_ARCH_MIPS64 |
| 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 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 576 Label use_receiver, exit; | 576 Label use_receiver, exit; |
| 577 | 577 |
| 578 // If the result is a smi, it is *not* an object in the ECMA sense. | 578 // If the result is a smi, it is *not* an object in the ECMA sense. |
| 579 // v0: result | 579 // v0: result |
| 580 // sp[0]: receiver (newly allocated object) | 580 // sp[0]: receiver (newly allocated object) |
| 581 // sp[1]: new.target | 581 // sp[1]: new.target |
| 582 // sp[2]: number of arguments (smi-tagged) | 582 // sp[2]: number of arguments (smi-tagged) |
| 583 __ JumpIfSmi(v0, &use_receiver); | 583 __ JumpIfSmi(v0, &use_receiver); |
| 584 | 584 |
| 585 // If the type of the result (stored in its map) is less than | 585 // If the type of the result (stored in its map) is less than |
| 586 // FIRST_SPEC_OBJECT_TYPE, it is not an object in the ECMA sense. | 586 // FIRST_JS_RECEIVER_TYPE, it is not an object in the ECMA sense. |
| 587 __ GetObjectType(v0, a1, a3); | 587 __ GetObjectType(v0, a1, a3); |
| 588 __ Branch(&exit, greater_equal, a3, Operand(FIRST_SPEC_OBJECT_TYPE)); | 588 __ Branch(&exit, greater_equal, a3, Operand(FIRST_JS_RECEIVER_TYPE)); |
| 589 | 589 |
| 590 // Throw away the result of the constructor invocation and use the | 590 // Throw away the result of the constructor invocation and use the |
| 591 // on-stack receiver as the result. | 591 // on-stack receiver as the result. |
| 592 __ bind(&use_receiver); | 592 __ bind(&use_receiver); |
| 593 __ ld(v0, MemOperand(sp)); | 593 __ ld(v0, MemOperand(sp)); |
| 594 | 594 |
| 595 // Remove receiver from the stack, remove caller arguments, and | 595 // Remove receiver from the stack, remove caller arguments, and |
| 596 // return. | 596 // return. |
| 597 __ bind(&exit); | 597 __ bind(&exit); |
| 598 // v0: result | 598 // v0: result |
| (...skipping 1380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1979 } | 1979 } |
| 1980 } | 1980 } |
| 1981 | 1981 |
| 1982 | 1982 |
| 1983 #undef __ | 1983 #undef __ |
| 1984 | 1984 |
| 1985 } // namespace internal | 1985 } // namespace internal |
| 1986 } // namespace v8 | 1986 } // namespace v8 |
| 1987 | 1987 |
| 1988 #endif // V8_TARGET_ARCH_MIPS64 | 1988 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |