| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 6808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6819 __ movq(Operand(index2.reg(), 0), object.reg()); | 6819 __ movq(Operand(index2.reg(), 0), object.reg()); |
| 6820 __ movq(Operand(index1.reg(), 0), tmp2.reg()); | 6820 __ movq(Operand(index1.reg(), 0), tmp2.reg()); |
| 6821 | 6821 |
| 6822 #ifdef ENABLE_CARDMARKING_WRITE_BARRIER | 6822 #ifdef ENABLE_CARDMARKING_WRITE_BARRIER |
| 6823 Label done; | 6823 Label done; |
| 6824 __ InNewSpace(tmp1.reg(), tmp2.reg(), equal, &done); | 6824 __ InNewSpace(tmp1.reg(), tmp2.reg(), equal, &done); |
| 6825 // Possible optimization: do a check that both values are Smis | 6825 // Possible optimization: do a check that both values are Smis |
| 6826 // (or them and test against Smi mask.) | 6826 // (or them and test against Smi mask.) |
| 6827 | 6827 |
| 6828 __ movq(tmp2.reg(), tmp1.reg()); | 6828 __ movq(tmp2.reg(), tmp1.reg()); |
| 6829 RecordWriteStub recordWrite1(tmp2.reg(), index1.reg(), object.reg()); | 6829 __ RecordWriteHelper(tmp1.reg(), index1.reg(), object.reg()); |
| 6830 __ CallStub(&recordWrite1); | 6830 __ RecordWriteHelper(tmp2.reg(), index2.reg(), object.reg()); |
| 6831 | |
| 6832 RecordWriteStub recordWrite2(tmp1.reg(), index2.reg(), object.reg()); | |
| 6833 __ CallStub(&recordWrite2); | |
| 6834 | |
| 6835 __ bind(&done); | 6831 __ bind(&done); |
| 6836 #endif | 6832 #endif |
| 6837 | 6833 |
| 6838 deferred->BindExit(); | 6834 deferred->BindExit(); |
| 6839 frame_->Push(Factory::undefined_value()); | 6835 frame_->Push(Factory::undefined_value()); |
| 6840 } | 6836 } |
| 6841 | 6837 |
| 6842 | 6838 |
| 6843 void CodeGenerator::GenerateCallFunction(ZoneList<Expression*>* args) { | 6839 void CodeGenerator::GenerateCallFunction(ZoneList<Expression*>* args) { |
| 6844 Comment cmnt(masm_, "[ GenerateCallFunction"); | 6840 Comment cmnt(masm_, "[ GenerateCallFunction"); |
| (...skipping 1985 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8830 masm.GetCode(&desc); | 8826 masm.GetCode(&desc); |
| 8831 // Call the function from C++. | 8827 // Call the function from C++. |
| 8832 return FUNCTION_CAST<ModuloFunction>(buffer); | 8828 return FUNCTION_CAST<ModuloFunction>(buffer); |
| 8833 } | 8829 } |
| 8834 | 8830 |
| 8835 #endif | 8831 #endif |
| 8836 | 8832 |
| 8837 | 8833 |
| 8838 #undef __ | 8834 #undef __ |
| 8839 | 8835 |
| 8840 void RecordWriteStub::Generate(MacroAssembler* masm) { | |
| 8841 #ifdef ENABLE_CARDMARKING_WRITE_BARRIER | |
| 8842 masm->RecordWriteHelper(object_, addr_, scratch_); | |
| 8843 #endif | |
| 8844 masm->ret(0); | |
| 8845 } | |
| 8846 | |
| 8847 } } // namespace v8::internal | 8836 } } // namespace v8::internal |
| 8848 | 8837 |
| 8849 #endif // V8_TARGET_ARCH_X64 | 8838 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |