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 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
466 // a3: object size (in words, including memento if create_memento) | 466 // a3: object size (in words, including memento if create_memento) |
467 // t4: JSObject (not tagged) | 467 // t4: JSObject (not tagged) |
468 // t5: First in-object property of JSObject (not tagged) | 468 // t5: First in-object property of JSObject (not tagged) |
469 ASSERT_EQ(3 * kPointerSize, JSObject::kHeaderSize); | 469 ASSERT_EQ(3 * kPointerSize, JSObject::kHeaderSize); |
470 | 470 |
471 if (count_constructions) { | 471 if (count_constructions) { |
472 __ LoadRoot(t7, Heap::kUndefinedValueRootIndex); | 472 __ LoadRoot(t7, Heap::kUndefinedValueRootIndex); |
473 __ lw(a0, FieldMemOperand(a2, Map::kInstanceSizesOffset)); | 473 __ lw(a0, FieldMemOperand(a2, Map::kInstanceSizesOffset)); |
474 __ Ext(a0, a0, Map::kPreAllocatedPropertyFieldsByte * kBitsPerByte, | 474 __ Ext(a0, a0, Map::kPreAllocatedPropertyFieldsByte * kBitsPerByte, |
475 kBitsPerByte); | 475 kBitsPerByte); |
476 __ sll(t0, a0, kPointerSizeLog2); | 476 __ sll(at, a0, kPointerSizeLog2); |
477 __ addu(a0, t5, t0); | 477 __ addu(a0, t5, at); |
| 478 __ sll(at, a3, kPointerSizeLog2); |
| 479 __ Addu(t6, t4, Operand(at)); // End of object. |
478 // a0: offset of first field after pre-allocated fields | 480 // a0: offset of first field after pre-allocated fields |
479 if (FLAG_debug_code) { | 481 if (FLAG_debug_code) { |
480 __ Assert(le, kUnexpectedNumberOfPreAllocatedPropertyFields, | 482 __ Assert(le, kUnexpectedNumberOfPreAllocatedPropertyFields, |
481 a0, Operand(t6)); | 483 a0, Operand(t6)); |
482 } | 484 } |
483 __ InitializeFieldsWithFiller(t5, a0, t7); | 485 __ InitializeFieldsWithFiller(t5, a0, t7); |
484 // To allow for truncation. | 486 // To allow for truncation. |
485 __ LoadRoot(t7, Heap::kOnePointerFillerMapRootIndex); | 487 __ LoadRoot(t7, Heap::kOnePointerFillerMapRootIndex); |
486 __ sll(at, a3, kPointerSizeLog2); | 488 __ InitializeFieldsWithFiller(t5, t6, t7); |
487 __ Addu(a0, t4, Operand(at)); // End of object. | |
488 __ InitializeFieldsWithFiller(t5, a0, t7); | |
489 } else if (create_memento) { | 489 } else if (create_memento) { |
490 __ Subu(t7, a3, Operand(AllocationMemento::kSize / kPointerSize)); | 490 __ Subu(t7, a3, Operand(AllocationMemento::kSize / kPointerSize)); |
491 __ sll(at, t7, kPointerSizeLog2); | 491 __ sll(at, t7, kPointerSizeLog2); |
492 __ Addu(a0, t4, Operand(at)); // End of object. | 492 __ Addu(a0, t4, Operand(at)); // End of object. |
493 __ LoadRoot(t7, Heap::kUndefinedValueRootIndex); | 493 __ LoadRoot(t7, Heap::kUndefinedValueRootIndex); |
494 __ InitializeFieldsWithFiller(t5, a0, t7); | 494 __ InitializeFieldsWithFiller(t5, a0, t7); |
495 | 495 |
496 // Fill in memento fields. | 496 // Fill in memento fields. |
497 // t5: points to the allocated but uninitialized memento. | 497 // t5: points to the allocated but uninitialized memento. |
498 __ LoadRoot(t7, Heap::kAllocationMementoMapRootIndex); | 498 __ LoadRoot(t7, Heap::kAllocationMementoMapRootIndex); |
(...skipping 1070 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1569 __ bind(&dont_adapt_arguments); | 1569 __ bind(&dont_adapt_arguments); |
1570 __ Jump(a3); | 1570 __ Jump(a3); |
1571 } | 1571 } |
1572 | 1572 |
1573 | 1573 |
1574 #undef __ | 1574 #undef __ |
1575 | 1575 |
1576 } } // namespace v8::internal | 1576 } } // namespace v8::internal |
1577 | 1577 |
1578 #endif // V8_TARGET_ARCH_MIPS | 1578 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |