OLD | NEW |
---|---|
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 930 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
941 | 941 |
942 // If the result is a smi, it is *not* an object in the ECMA sense. | 942 // If the result is a smi, it is *not* an object in the ECMA sense. |
943 // r0: result | 943 // r0: result |
944 // sp[0]: receiver (newly allocated object) | 944 // sp[0]: receiver (newly allocated object) |
945 // sp[1]: constructor function | 945 // sp[1]: constructor function |
946 // sp[2]: number of arguments (smi-tagged) | 946 // sp[2]: number of arguments (smi-tagged) |
947 __ tst(r0, Operand(kSmiTagMask)); | 947 __ tst(r0, Operand(kSmiTagMask)); |
948 __ b(eq, &use_receiver); | 948 __ b(eq, &use_receiver); |
949 | 949 |
950 // If the type of the result (stored in its map) is less than | 950 // If the type of the result (stored in its map) is less than |
951 // FIRST_JS_OBJECT_TYPE, it is not an object in the ECMA sense. | 951 // FIRST_OBJECT_OR_FUNCTION_CLASS_TYPE, it is not an object in the ECMA sense. |
Kevin Millikin (Chromium)
2011/05/26 09:31:08
Maybe the terminology is still not quite right. T
rossberg
2011/05/31 14:50:24
Changed according to your suggestion on the list.
| |
952 __ CompareObjectType(r0, r3, r3, FIRST_JS_OBJECT_TYPE); | 952 __ CompareObjectType(r0, r3, r3, FIRST_OBJECT_OR_FUNCTION_CLASS_TYPE); |
953 __ b(ge, &exit); | 953 __ b(ge, &exit); |
954 | 954 |
955 // Throw away the result of the constructor invocation and use the | 955 // Throw away the result of the constructor invocation and use the |
956 // on-stack receiver as the result. | 956 // on-stack receiver as the result. |
957 __ bind(&use_receiver); | 957 __ bind(&use_receiver); |
958 __ ldr(r0, MemOperand(sp)); | 958 __ ldr(r0, MemOperand(sp)); |
959 | 959 |
960 // Remove receiver from the stack, remove caller arguments, and | 960 // Remove receiver from the stack, remove caller arguments, and |
961 // return. | 961 // return. |
962 __ bind(&exit); | 962 __ bind(&exit); |
(...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1635 __ bind(&dont_adapt_arguments); | 1635 __ bind(&dont_adapt_arguments); |
1636 __ Jump(r3); | 1636 __ Jump(r3); |
1637 } | 1637 } |
1638 | 1638 |
1639 | 1639 |
1640 #undef __ | 1640 #undef __ |
1641 | 1641 |
1642 } } // namespace v8::internal | 1642 } } // namespace v8::internal |
1643 | 1643 |
1644 #endif // V8_TARGET_ARCH_ARM | 1644 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |