| OLD | NEW |
| 1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 1769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1780 #endif | 1780 #endif |
| 1781 | 1781 |
| 1782 // Now allocate the JSObject in new space. | 1782 // Now allocate the JSObject in new space. |
| 1783 // rdi: constructor | 1783 // rdi: constructor |
| 1784 // rbx: initial map | 1784 // rbx: initial map |
| 1785 __ movzxbq(rcx, FieldOperand(rbx, Map::kInstanceSizeOffset)); | 1785 __ movzxbq(rcx, FieldOperand(rbx, Map::kInstanceSizeOffset)); |
| 1786 __ shl(rcx, Immediate(kPointerSizeLog2)); | 1786 __ shl(rcx, Immediate(kPointerSizeLog2)); |
| 1787 // Make sure that the maximum heap object size will never cause us | 1787 // Make sure that the maximum heap object size will never cause us |
| 1788 // problems here. | 1788 // problems here. |
| 1789 ASSERT(Heap::MaxObjectSizeInPagedSpace() >= JSObject::kMaxInstanceSize); | 1789 ASSERT(Heap::MaxObjectSizeInPagedSpace() >= JSObject::kMaxInstanceSize); |
| 1790 __ AllocateObjectInNewSpace(rcx, rdx, rcx, no_reg, &generic_stub_call, false); | 1790 __ AllocateObjectInNewSpace(rcx, |
| 1791 rdx, |
| 1792 rcx, |
| 1793 no_reg, |
| 1794 &generic_stub_call, |
| 1795 NO_ALLOCATION_FLAGS); |
| 1791 | 1796 |
| 1792 // Allocated the JSObject, now initialize the fields and add the heap tag. | 1797 // Allocated the JSObject, now initialize the fields and add the heap tag. |
| 1793 // rbx: initial map | 1798 // rbx: initial map |
| 1794 // rdx: JSObject (untagged) | 1799 // rdx: JSObject (untagged) |
| 1795 __ movq(Operand(rdx, JSObject::kMapOffset), rbx); | 1800 __ movq(Operand(rdx, JSObject::kMapOffset), rbx); |
| 1796 __ Move(rbx, Factory::empty_fixed_array()); | 1801 __ Move(rbx, Factory::empty_fixed_array()); |
| 1797 __ movq(Operand(rdx, JSObject::kPropertiesOffset), rbx); | 1802 __ movq(Operand(rdx, JSObject::kPropertiesOffset), rbx); |
| 1798 __ movq(Operand(rdx, JSObject::kElementsOffset), rbx); | 1803 __ movq(Operand(rdx, JSObject::kElementsOffset), rbx); |
| 1799 | 1804 |
| 1800 // rax: argc | 1805 // rax: argc |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1864 __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET); | 1869 __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET); |
| 1865 | 1870 |
| 1866 // Return the generated code. | 1871 // Return the generated code. |
| 1867 return GetCode(); | 1872 return GetCode(); |
| 1868 } | 1873 } |
| 1869 | 1874 |
| 1870 | 1875 |
| 1871 #undef __ | 1876 #undef __ |
| 1872 | 1877 |
| 1873 } } // namespace v8::internal | 1878 } } // namespace v8::internal |
| OLD | NEW |