Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/ia32/builtins-ia32.cc

Issue 173568: Add allocation support to x64 macro assembler (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/ia32/macro-assembler-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 __ lea(ecx, Operand(ebx, JSObject::kHeaderSize)); 151 __ lea(ecx, Operand(ebx, JSObject::kHeaderSize));
152 __ jmp(&entry); 152 __ jmp(&entry);
153 __ bind(&loop); 153 __ bind(&loop);
154 __ mov(Operand(ecx, 0), edx); 154 __ mov(Operand(ecx, 0), edx);
155 __ add(Operand(ecx), Immediate(kPointerSize)); 155 __ add(Operand(ecx), Immediate(kPointerSize));
156 __ bind(&entry); 156 __ bind(&entry);
157 __ cmp(ecx, Operand(edi)); 157 __ cmp(ecx, Operand(edi));
158 __ j(less, &loop); 158 __ j(less, &loop);
159 } 159 }
160 160
161 // Mostly done with the JSObject. Add the heap tag and store the new top, so 161 // Add the object tag to make the JSObject real, so that we can continue and
162 // that we can continue and jump into the continuation code at any time from 162 // jump into the continuation code at any time from now on. Any failures
163 // now on. Any failures need to undo the setting of the new top, so that the 163 // need to undo the allocation, so that the heap is in a consistent state
164 // heap is in a consistent state and verifiable. 164 // and verifiable.
165 // eax: initial map 165 // eax: initial map
166 // ebx: JSObject 166 // ebx: JSObject
167 // edi: start of next object 167 // edi: start of next object
168 __ or_(Operand(ebx), Immediate(kHeapObjectTag)); 168 __ or_(Operand(ebx), Immediate(kHeapObjectTag));
169 169
170 // Check if a non-empty properties array is needed. 170 // Check if a non-empty properties array is needed.
171 // Allocate and initialize a FixedArray if it is. 171 // Allocate and initialize a FixedArray if it is.
172 // eax: initial map 172 // eax: initial map
173 // ebx: JSObject 173 // ebx: JSObject
174 // edi: start of next object 174 // edi: start of next object
(...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after
769 // Dont adapt arguments. 769 // Dont adapt arguments.
770 // ------------------------------------------- 770 // -------------------------------------------
771 __ bind(&dont_adapt_arguments); 771 __ bind(&dont_adapt_arguments);
772 __ jmp(Operand(edx)); 772 __ jmp(Operand(edx));
773 } 773 }
774 774
775 775
776 #undef __ 776 #undef __
777 777
778 } } // namespace v8::internal 778 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/ia32/macro-assembler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698