| 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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 __ SmiTst(a2, t0); | 156 __ SmiTst(a2, t0); |
| 157 __ Assert(ne, kUnexpectedInitialMapForArrayFunction1, | 157 __ Assert(ne, kUnexpectedInitialMapForArrayFunction1, |
| 158 t0, Operand(zero_reg)); | 158 t0, Operand(zero_reg)); |
| 159 __ GetObjectType(a2, a3, t0); | 159 __ GetObjectType(a2, a3, t0); |
| 160 __ Assert(eq, kUnexpectedInitialMapForArrayFunction2, | 160 __ Assert(eq, kUnexpectedInitialMapForArrayFunction2, |
| 161 t0, Operand(MAP_TYPE)); | 161 t0, Operand(MAP_TYPE)); |
| 162 } | 162 } |
| 163 | 163 |
| 164 // Run the native code for the Array function called as a normal function. | 164 // Run the native code for the Array function called as a normal function. |
| 165 // Tail call a stub. | 165 // Tail call a stub. |
| 166 Handle<Object> megamorphic_sentinel = | 166 __ LoadRoot(a2, Heap::kUndefinedValueRootIndex); |
| 167 TypeFeedbackInfo::MegamorphicSentinel(masm->isolate()); | |
| 168 __ li(a2, Operand(megamorphic_sentinel)); | |
| 169 ArrayConstructorStub stub(masm->isolate()); | 167 ArrayConstructorStub stub(masm->isolate()); |
| 170 __ TailCallStub(&stub); | 168 __ TailCallStub(&stub); |
| 171 } | 169 } |
| 172 | 170 |
| 173 | 171 |
| 174 void Builtins::Generate_StringConstructCode(MacroAssembler* masm) { | 172 void Builtins::Generate_StringConstructCode(MacroAssembler* masm) { |
| 175 // ----------- S t a t e ------------- | 173 // ----------- S t a t e ------------- |
| 176 // -- a0 : number of arguments | 174 // -- a0 : number of arguments |
| 177 // -- a1 : constructor function | 175 // -- a1 : constructor function |
| 178 // -- ra : return address | 176 // -- ra : return address |
| (...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 749 __ mov(s3, t0); | 747 __ mov(s3, t0); |
| 750 __ mov(s4, t0); | 748 __ mov(s4, t0); |
| 751 __ mov(s5, t0); | 749 __ mov(s5, t0); |
| 752 // s6 holds the root address. Do not clobber. | 750 // s6 holds the root address. Do not clobber. |
| 753 // s7 is cp. Do not init. | 751 // s7 is cp. Do not init. |
| 754 | 752 |
| 755 // Invoke the code and pass argc as a0. | 753 // Invoke the code and pass argc as a0. |
| 756 __ mov(a0, a3); | 754 __ mov(a0, a3); |
| 757 if (is_construct) { | 755 if (is_construct) { |
| 758 // No type feedback cell is available | 756 // No type feedback cell is available |
| 759 Handle<Object> megamorphic_sentinel = | 757 __ LoadRoot(a2, Heap::kUndefinedValueRootIndex); |
| 760 TypeFeedbackInfo::MegamorphicSentinel(masm->isolate()); | |
| 761 __ li(a2, Operand(megamorphic_sentinel)); | |
| 762 CallConstructStub stub(NO_CALL_FUNCTION_FLAGS); | 758 CallConstructStub stub(NO_CALL_FUNCTION_FLAGS); |
| 763 __ CallStub(&stub); | 759 __ CallStub(&stub); |
| 764 } else { | 760 } else { |
| 765 ParameterCount actual(a0); | 761 ParameterCount actual(a0); |
| 766 __ InvokeFunction(a1, actual, CALL_FUNCTION, NullCallWrapper()); | 762 __ InvokeFunction(a1, actual, CALL_FUNCTION, NullCallWrapper()); |
| 767 } | 763 } |
| 768 | 764 |
| 769 // Leave internal frame. | 765 // Leave internal frame. |
| 770 } | 766 } |
| 771 | 767 |
| (...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1499 __ bind(&dont_adapt_arguments); | 1495 __ bind(&dont_adapt_arguments); |
| 1500 __ Jump(a3); | 1496 __ Jump(a3); |
| 1501 } | 1497 } |
| 1502 | 1498 |
| 1503 | 1499 |
| 1504 #undef __ | 1500 #undef __ |
| 1505 | 1501 |
| 1506 } } // namespace v8::internal | 1502 } } // namespace v8::internal |
| 1507 | 1503 |
| 1508 #endif // V8_TARGET_ARCH_MIPS | 1504 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |