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

Side by Side Diff: src/macro-assembler.h

Issue 12697011: Implement direct allocation in old data space infrastructure. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 9 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 | « src/hydrogen.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 TAG_OBJECT = 1 << 0, 44 TAG_OBJECT = 1 << 0,
45 // The content of the result register already contains the allocation top in 45 // The content of the result register already contains the allocation top in
46 // new space. 46 // new space.
47 RESULT_CONTAINS_TOP = 1 << 1, 47 RESULT_CONTAINS_TOP = 1 << 1,
48 // Specify that the requested size of the space to allocate is specified in 48 // Specify that the requested size of the space to allocate is specified in
49 // words instead of bytes. 49 // words instead of bytes.
50 SIZE_IN_WORDS = 1 << 2, 50 SIZE_IN_WORDS = 1 << 2,
51 // Align the allocation to a multiple of kDoubleSize 51 // Align the allocation to a multiple of kDoubleSize
52 DOUBLE_ALIGNMENT = 1 << 3, 52 DOUBLE_ALIGNMENT = 1 << 3,
53 // Directly allocate in old pointer space 53 // Directly allocate in old pointer space
54 PRETENURE_OLD_POINTER_SPACE = 1 << 4 54 PRETENURE_OLD_POINTER_SPACE = 1 << 4,
55 // Directly allocate in old data space
56 PRETENURE_OLD_DATA_SPACE = 1 << 5
55 }; 57 };
56 58
57 59
58 // Invalid depth in prototype chain. 60 // Invalid depth in prototype chain.
59 const int kInvalidProtoDepth = -1; 61 const int kInvalidProtoDepth = -1;
60 62
61 #if V8_TARGET_ARCH_IA32 63 #if V8_TARGET_ARCH_IA32
62 #include "assembler.h" 64 #include "assembler.h"
63 #include "ia32/assembler-ia32.h" 65 #include "ia32/assembler-ia32.h"
64 #include "ia32/assembler-ia32-inl.h" 66 #include "ia32/assembler-ia32-inl.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 Comment(MacroAssembler*, const char*) {} 170 Comment(MacroAssembler*, const char*) {}
169 }; 171 };
170 172
171 #endif // DEBUG 173 #endif // DEBUG
172 174
173 175
174 class AllocationUtils { 176 class AllocationUtils {
175 public: 177 public:
176 static ExternalReference GetAllocationTopReference( 178 static ExternalReference GetAllocationTopReference(
177 Isolate* isolate, AllocationFlags flags) { 179 Isolate* isolate, AllocationFlags flags) {
178 return ((flags & PRETENURE_OLD_POINTER_SPACE) != 0) ? 180 if ((flags & PRETENURE_OLD_POINTER_SPACE) != 0) {
179 ExternalReference::old_pointer_space_allocation_top_address(isolate) : 181 return ExternalReference::old_pointer_space_allocation_top_address(
180 ExternalReference::new_space_allocation_top_address(isolate); 182 isolate);
183 } else if ((flags & PRETENURE_OLD_DATA_SPACE) != 0) {
184 return ExternalReference::old_data_space_allocation_top_address(isolate);
185 }
186 return ExternalReference::new_space_allocation_top_address(isolate);
181 } 187 }
182 188
183 189
184 static ExternalReference GetAllocationLimitReference( 190 static ExternalReference GetAllocationLimitReference(
185 Isolate* isolate, AllocationFlags flags) { 191 Isolate* isolate, AllocationFlags flags) {
186 return ((flags & PRETENURE_OLD_POINTER_SPACE) != 0) ? 192 if ((flags & PRETENURE_OLD_POINTER_SPACE) != 0) {
187 ExternalReference::old_pointer_space_allocation_limit_address(isolate) : 193 return ExternalReference::old_pointer_space_allocation_limit_address(
188 ExternalReference::new_space_allocation_limit_address(isolate); 194 isolate);
195 } else if ((flags & PRETENURE_OLD_DATA_SPACE) != 0) {
196 return ExternalReference::old_data_space_allocation_limit_address(
197 isolate);
198 }
199 return ExternalReference::new_space_allocation_limit_address(isolate);
189 } 200 }
190 }; 201 };
191 202
192 203
193 } } // namespace v8::internal 204 } } // namespace v8::internal
194 205
195 #endif // V8_MACRO_ASSEMBLER_H_ 206 #endif // V8_MACRO_ASSEMBLER_H_
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698