OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 1087 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1098 // sp[0]: receiver (newly allocated object) | 1098 // sp[0]: receiver (newly allocated object) |
1099 // sp[1]: constructor function | 1099 // sp[1]: constructor function |
1100 // sp[2]: number of arguments (smi-tagged) | 1100 // sp[2]: number of arguments (smi-tagged) |
1101 __ JumpIfSmi(r0, &use_receiver); | 1101 __ JumpIfSmi(r0, &use_receiver); |
1102 | 1102 |
1103 // If the type of the result (stored in its map) is less than | 1103 // If the type of the result (stored in its map) is less than |
1104 // FIRST_SPEC_OBJECT_TYPE, it is not an object in the ECMA sense. | 1104 // FIRST_SPEC_OBJECT_TYPE, it is not an object in the ECMA sense. |
1105 __ CompareObjectType(r0, r1, r3, FIRST_SPEC_OBJECT_TYPE); | 1105 __ CompareObjectType(r0, r1, r3, FIRST_SPEC_OBJECT_TYPE); |
1106 __ b(ge, &exit); | 1106 __ b(ge, &exit); |
1107 | 1107 |
1108 // Symbols are "objects". | |
1109 __ CompareInstanceType(r1, r3, SYMBOL_TYPE); | |
1110 __ b(eq, &exit); | |
1111 | |
1112 // Throw away the result of the constructor invocation and use the | 1108 // Throw away the result of the constructor invocation and use the |
1113 // on-stack receiver as the result. | 1109 // on-stack receiver as the result. |
1114 __ bind(&use_receiver); | 1110 __ bind(&use_receiver); |
1115 __ ldr(r0, MemOperand(sp)); | 1111 __ ldr(r0, MemOperand(sp)); |
1116 | 1112 |
1117 // Remove receiver from the stack, remove caller arguments, and | 1113 // Remove receiver from the stack, remove caller arguments, and |
1118 // return. | 1114 // return. |
1119 __ bind(&exit); | 1115 __ bind(&exit); |
1120 // r0: result | 1116 // r0: result |
1121 // sp[0]: receiver (newly allocated object) | 1117 // sp[0]: receiver (newly allocated object) |
(...skipping 788 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1910 __ bind(&dont_adapt_arguments); | 1906 __ bind(&dont_adapt_arguments); |
1911 __ Jump(r3); | 1907 __ Jump(r3); |
1912 } | 1908 } |
1913 | 1909 |
1914 | 1910 |
1915 #undef __ | 1911 #undef __ |
1916 | 1912 |
1917 } } // namespace v8::internal | 1913 } } // namespace v8::internal |
1918 | 1914 |
1919 #endif // V8_TARGET_ARCH_ARM | 1915 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |