| 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 __ add(edi, Operand(ebx)); // Calculate new top | 122 __ add(edi, Operand(ebx)); // Calculate new top |
| 123 ExternalReference new_space_allocation_limit = | 123 ExternalReference new_space_allocation_limit = |
| 124 ExternalReference::new_space_allocation_limit_address(); | 124 ExternalReference::new_space_allocation_limit_address(); |
| 125 __ cmp(edi, Operand::StaticVariable(new_space_allocation_limit)); | 125 __ cmp(edi, Operand::StaticVariable(new_space_allocation_limit)); |
| 126 __ j(greater_equal, &rt_call); | 126 __ j(greater_equal, &rt_call); |
| 127 // Allocated the JSObject, now initialize the fields. | 127 // Allocated the JSObject, now initialize the fields. |
| 128 // eax: initial map | 128 // eax: initial map |
| 129 // ebx: JSObject | 129 // ebx: JSObject |
| 130 // edi: start of next object | 130 // edi: start of next object |
| 131 __ mov(Operand(ebx, JSObject::kMapOffset), eax); | 131 __ mov(Operand(ebx, JSObject::kMapOffset), eax); |
| 132 __ mov(Operand(ecx), Factory::empty_fixed_array()); | 132 __ mov(ecx, Factory::empty_fixed_array()); |
| 133 __ mov(Operand(ebx, JSObject::kPropertiesOffset), ecx); | 133 __ mov(Operand(ebx, JSObject::kPropertiesOffset), ecx); |
| 134 __ mov(Operand(ebx, JSObject::kElementsOffset), ecx); | 134 __ mov(Operand(ebx, JSObject::kElementsOffset), ecx); |
| 135 // Set extra fields in the newly allocated object. | 135 // Set extra fields in the newly allocated object. |
| 136 // eax: initial map | 136 // eax: initial map |
| 137 // ebx: JSObject | 137 // ebx: JSObject |
| 138 // edi: start of next object | 138 // edi: start of next object |
| 139 { Label loop, entry; | 139 { Label loop, entry; |
| 140 __ mov(Operand(edx), Factory::undefined_value()); | 140 __ mov(edx, Factory::undefined_value()); |
| 141 __ lea(ecx, Operand(ebx, JSObject::kHeaderSize)); | 141 __ lea(ecx, Operand(ebx, JSObject::kHeaderSize)); |
| 142 __ jmp(&entry); | 142 __ jmp(&entry); |
| 143 __ bind(&loop); | 143 __ bind(&loop); |
| 144 __ mov(Operand(ecx, 0), edx); | 144 __ mov(Operand(ecx, 0), edx); |
| 145 __ add(Operand(ecx), Immediate(kPointerSize)); | 145 __ add(Operand(ecx), Immediate(kPointerSize)); |
| 146 __ bind(&entry); | 146 __ bind(&entry); |
| 147 __ cmp(ecx, Operand(edi)); | 147 __ cmp(ecx, Operand(edi)); |
| 148 __ j(less, &loop); | 148 __ j(less, &loop); |
| 149 } | 149 } |
| 150 | 150 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 // ecx: start of next object | 191 // ecx: start of next object |
| 192 __ mov(eax, Factory::fixed_array_map()); | 192 __ mov(eax, Factory::fixed_array_map()); |
| 193 __ mov(Operand(edi, JSObject::kMapOffset), eax); // setup the map | 193 __ mov(Operand(edi, JSObject::kMapOffset), eax); // setup the map |
| 194 __ mov(Operand(edi, Array::kLengthOffset), edx); // and length | 194 __ mov(Operand(edi, Array::kLengthOffset), edx); // and length |
| 195 | 195 |
| 196 // Initialize the fields to undefined. | 196 // Initialize the fields to undefined. |
| 197 // ebx: JSObject | 197 // ebx: JSObject |
| 198 // edi: FixedArray | 198 // edi: FixedArray |
| 199 // ecx: start of next object | 199 // ecx: start of next object |
| 200 { Label loop, entry; | 200 { Label loop, entry; |
| 201 __ mov(Operand(edx), Factory::undefined_value()); | 201 __ mov(edx, Factory::undefined_value()); |
| 202 __ lea(eax, Operand(edi, FixedArray::kHeaderSize)); | 202 __ lea(eax, Operand(edi, FixedArray::kHeaderSize)); |
| 203 __ jmp(&entry); | 203 __ jmp(&entry); |
| 204 __ bind(&loop); | 204 __ bind(&loop); |
| 205 __ mov(Operand(eax, 0), edx); | 205 __ mov(Operand(eax, 0), edx); |
| 206 __ add(Operand(eax), Immediate(kPointerSize)); | 206 __ add(Operand(eax), Immediate(kPointerSize)); |
| 207 __ bind(&entry); | 207 __ bind(&entry); |
| 208 __ cmp(eax, Operand(ecx)); | 208 __ cmp(eax, Operand(ecx)); |
| 209 __ j(less, &loop); | 209 __ j(less, &loop); |
| 210 } | 210 } |
| 211 | 211 |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 433 __ EnterInternalFrame(); // preserves eax, ebx, edi | 433 __ EnterInternalFrame(); // preserves eax, ebx, edi |
| 434 | 434 |
| 435 // Store the arguments count on the stack (smi tagged). | 435 // Store the arguments count on the stack (smi tagged). |
| 436 ASSERT(kSmiTag == 0); | 436 ASSERT(kSmiTag == 0); |
| 437 __ shl(eax, kSmiTagSize); | 437 __ shl(eax, kSmiTagSize); |
| 438 __ push(eax); | 438 __ push(eax); |
| 439 | 439 |
| 440 __ push(edi); // save edi across the call | 440 __ push(edi); // save edi across the call |
| 441 __ push(ebx); | 441 __ push(ebx); |
| 442 __ InvokeBuiltin(Builtins::TO_OBJECT, CALL_FUNCTION); | 442 __ InvokeBuiltin(Builtins::TO_OBJECT, CALL_FUNCTION); |
| 443 __ mov(Operand(ebx), eax); | 443 __ mov(ebx, eax); |
| 444 __ pop(edi); // restore edi after the call | 444 __ pop(edi); // restore edi after the call |
| 445 | 445 |
| 446 // Get the arguments count and untag it. | 446 // Get the arguments count and untag it. |
| 447 __ pop(eax); | 447 __ pop(eax); |
| 448 __ shr(eax, kSmiTagSize); | 448 __ shr(eax, kSmiTagSize); |
| 449 | 449 |
| 450 __ LeaveInternalFrame(); | 450 __ LeaveInternalFrame(); |
| 451 __ jmp(&patch_receiver); | 451 __ jmp(&patch_receiver); |
| 452 | 452 |
| 453 // Use the global receiver object from the called function as the receiver. | 453 // Use the global receiver object from the called function as the receiver. |
| (...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 771 __ EnterInternalFrame(); | 771 __ EnterInternalFrame(); |
| 772 | 772 |
| 773 // Store the registers containing object pointers on the expression stack to | 773 // Store the registers containing object pointers on the expression stack to |
| 774 // make sure that these are correctly updated during GC. | 774 // make sure that these are correctly updated during GC. |
| 775 __ PushRegistersFromMemory(pointer_regs); | 775 __ PushRegistersFromMemory(pointer_regs); |
| 776 | 776 |
| 777 #ifdef DEBUG | 777 #ifdef DEBUG |
| 778 __ RecordComment("// Calling from debug break to runtime - come in - over"); | 778 __ RecordComment("// Calling from debug break to runtime - come in - over"); |
| 779 #endif | 779 #endif |
| 780 __ Set(eax, Immediate(0)); // no arguments | 780 __ Set(eax, Immediate(0)); // no arguments |
| 781 __ mov(Operand(ebx), Immediate(ExternalReference::debug_break())); | 781 __ mov(ebx, Immediate(ExternalReference::debug_break())); |
| 782 | 782 |
| 783 CEntryDebugBreakStub ceb; | 783 CEntryDebugBreakStub ceb; |
| 784 __ CallStub(&ceb); | 784 __ CallStub(&ceb); |
| 785 | 785 |
| 786 // Restore the register values containing object pointers from the expression | 786 // Restore the register values containing object pointers from the expression |
| 787 // stack in the reverse order as they where pushed. | 787 // stack in the reverse order as they where pushed. |
| 788 __ PopRegistersToMemory(pointer_regs); | 788 __ PopRegistersToMemory(pointer_regs); |
| 789 | 789 |
| 790 // Get rid of the internal frame. | 790 // Get rid of the internal frame. |
| 791 __ LeaveInternalFrame(); | 791 __ LeaveInternalFrame(); |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 893 // Register state for stub CallFunction (from CallFunctionStub in ic-ia32.cc). | 893 // Register state for stub CallFunction (from CallFunctionStub in ic-ia32.cc). |
| 894 // ----------- S t a t e ------------- | 894 // ----------- S t a t e ------------- |
| 895 // No registers used on entry. | 895 // No registers used on entry. |
| 896 // ----------------------------------- | 896 // ----------------------------------- |
| 897 Generate_DebugBreakCallHelper(masm, 0, false); | 897 Generate_DebugBreakCallHelper(masm, 0, false); |
| 898 } | 898 } |
| 899 | 899 |
| 900 #undef __ | 900 #undef __ |
| 901 | 901 |
| 902 } } // namespace v8::internal | 902 } } // namespace v8::internal |
| OLD | NEW |