| 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> undefined_sentinel( | 166 Handle<Object> megamorphic_sentinel = |
| 167 masm->isolate()->heap()->undefined_value(), | 167 TypeFeedbackInfo::MegamorphicSentinel(masm->isolate()); |
| 168 masm->isolate()); | 168 __ li(a2, Operand(megamorphic_sentinel)); |
| 169 __ li(a2, Operand(undefined_sentinel)); | |
| 170 ArrayConstructorStub stub(masm->isolate()); | 169 ArrayConstructorStub stub(masm->isolate()); |
| 171 __ TailCallStub(&stub); | 170 __ TailCallStub(&stub); |
| 172 } | 171 } |
| 173 | 172 |
| 174 | 173 |
| 175 void Builtins::Generate_StringConstructCode(MacroAssembler* masm) { | 174 void Builtins::Generate_StringConstructCode(MacroAssembler* masm) { |
| 176 // ----------- S t a t e ------------- | 175 // ----------- S t a t e ------------- |
| 177 // -- a0 : number of arguments | 176 // -- a0 : number of arguments |
| 178 // -- a1 : constructor function | 177 // -- a1 : constructor function |
| 179 // -- ra : return address | 178 // -- ra : return address |
| (...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 750 __ mov(s3, t0); | 749 __ mov(s3, t0); |
| 751 __ mov(s4, t0); | 750 __ mov(s4, t0); |
| 752 __ mov(s5, t0); | 751 __ mov(s5, t0); |
| 753 // s6 holds the root address. Do not clobber. | 752 // s6 holds the root address. Do not clobber. |
| 754 // s7 is cp. Do not init. | 753 // s7 is cp. Do not init. |
| 755 | 754 |
| 756 // Invoke the code and pass argc as a0. | 755 // Invoke the code and pass argc as a0. |
| 757 __ mov(a0, a3); | 756 __ mov(a0, a3); |
| 758 if (is_construct) { | 757 if (is_construct) { |
| 759 // No type feedback cell is available | 758 // No type feedback cell is available |
| 760 Handle<Object> undefined_sentinel( | 759 Handle<Object> megamorphic_sentinel = |
| 761 masm->isolate()->heap()->undefined_value(), masm->isolate()); | 760 TypeFeedbackInfo::MegamorphicSentinel(masm->isolate()); |
| 762 __ li(a2, Operand(undefined_sentinel)); | 761 __ li(a2, Operand(megamorphic_sentinel)); |
| 763 CallConstructStub stub(NO_CALL_FUNCTION_FLAGS); | 762 CallConstructStub stub(NO_CALL_FUNCTION_FLAGS); |
| 764 __ CallStub(&stub); | 763 __ CallStub(&stub); |
| 765 } else { | 764 } else { |
| 766 ParameterCount actual(a0); | 765 ParameterCount actual(a0); |
| 767 __ InvokeFunction(a1, actual, CALL_FUNCTION, NullCallWrapper()); | 766 __ InvokeFunction(a1, actual, CALL_FUNCTION, NullCallWrapper()); |
| 768 } | 767 } |
| 769 | 768 |
| 770 // Leave internal frame. | 769 // Leave internal frame. |
| 771 } | 770 } |
| 772 | 771 |
| (...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1500 __ bind(&dont_adapt_arguments); | 1499 __ bind(&dont_adapt_arguments); |
| 1501 __ Jump(a3); | 1500 __ Jump(a3); |
| 1502 } | 1501 } |
| 1503 | 1502 |
| 1504 | 1503 |
| 1505 #undef __ | 1504 #undef __ |
| 1506 | 1505 |
| 1507 } } // namespace v8::internal | 1506 } } // namespace v8::internal |
| 1508 | 1507 |
| 1509 #endif // V8_TARGET_ARCH_MIPS | 1508 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |