OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 __ j(equal, &rt_call); | 125 __ j(equal, &rt_call); |
126 | 126 |
127 // Now allocate the JSObject on the heap. | 127 // Now allocate the JSObject on the heap. |
128 // edi: constructor | 128 // edi: constructor |
129 // eax: initial map | 129 // eax: initial map |
130 __ movzx_b(edi, FieldOperand(eax, Map::kInstanceSizeOffset)); | 130 __ movzx_b(edi, FieldOperand(eax, Map::kInstanceSizeOffset)); |
131 __ shl(edi, kPointerSizeLog2); | 131 __ shl(edi, kPointerSizeLog2); |
132 // Make sure that the maximum heap object size will never cause us | 132 // Make sure that the maximum heap object size will never cause us |
133 // problem here, because it is always greater than the maximum | 133 // problem here, because it is always greater than the maximum |
134 // instance size that can be represented in a byte. | 134 // instance size that can be represented in a byte. |
135 ASSERT(Heap::MaxObjectSizeInPagedSpace() >= JSObject::kMaxInstanceSize); | 135 ASSERT(Heap::MaxObjectSizeInPagedSpace() >= (1 << kBitsPerByte)); |
136 ExternalReference new_space_allocation_top = | 136 ExternalReference new_space_allocation_top = |
137 ExternalReference::new_space_allocation_top_address(); | 137 ExternalReference::new_space_allocation_top_address(); |
138 __ mov(ebx, Operand::StaticVariable(new_space_allocation_top)); | 138 __ mov(ebx, Operand::StaticVariable(new_space_allocation_top)); |
139 __ add(edi, Operand(ebx)); // Calculate new top | 139 __ add(edi, Operand(ebx)); // Calculate new top |
140 ExternalReference new_space_allocation_limit = | 140 ExternalReference new_space_allocation_limit = |
141 ExternalReference::new_space_allocation_limit_address(); | 141 ExternalReference::new_space_allocation_limit_address(); |
142 __ cmp(edi, Operand::StaticVariable(new_space_allocation_limit)); | 142 __ cmp(edi, Operand::StaticVariable(new_space_allocation_limit)); |
143 __ j(above_equal, &rt_call); | 143 __ j(above_equal, &rt_call); |
144 // Allocated the JSObject, now initialize the fields. | 144 // Allocated the JSObject, now initialize the fields. |
145 // eax: initial map | 145 // eax: initial map |
(...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
774 // Dont adapt arguments. | 774 // Dont adapt arguments. |
775 // ------------------------------------------- | 775 // ------------------------------------------- |
776 __ bind(&dont_adapt_arguments); | 776 __ bind(&dont_adapt_arguments); |
777 __ jmp(Operand(edx)); | 777 __ jmp(Operand(edx)); |
778 } | 778 } |
779 | 779 |
780 | 780 |
781 #undef __ | 781 #undef __ |
782 | 782 |
783 } } // namespace v8::internal | 783 } } // namespace v8::internal |
OLD | NEW |