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

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

Issue 12314155: Allow direct allocation in old pointer space. (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/ia32/stub-cache-ia32.cc ('k') | src/runtime.h » ('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 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 NO_ALLOCATION_FLAGS = 0, 42 NO_ALLOCATION_FLAGS = 0,
43 // Return the pointer to the allocated already tagged as a heap object. 43 // Return the pointer to the allocated already tagged as a heap object.
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
54 PRETENURE_OLD_POINTER_SPACE = 1 << 4
53 }; 55 };
54 56
55 57
56 // Invalid depth in prototype chain. 58 // Invalid depth in prototype chain.
57 const int kInvalidProtoDepth = -1; 59 const int kInvalidProtoDepth = -1;
58 60
59 #if V8_TARGET_ARCH_IA32 61 #if V8_TARGET_ARCH_IA32
60 #include "assembler.h" 62 #include "assembler.h"
61 #include "ia32/assembler-ia32.h" 63 #include "ia32/assembler-ia32.h"
62 #include "ia32/assembler-ia32-inl.h" 64 #include "ia32/assembler-ia32-inl.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 163
162 #else 164 #else
163 165
164 class Comment { 166 class Comment {
165 public: 167 public:
166 Comment(MacroAssembler*, const char*) {} 168 Comment(MacroAssembler*, const char*) {}
167 }; 169 };
168 170
169 #endif // DEBUG 171 #endif // DEBUG
170 172
173
174 class AllocationUtils {
175 public:
176 static ExternalReference GetAllocationTopReference(
177 Isolate* isolate, AllocationFlags flags) {
178 return ((flags & PRETENURE_OLD_POINTER_SPACE) != 0) ?
179 ExternalReference::old_pointer_space_allocation_top_address(isolate) :
180 ExternalReference::new_space_allocation_top_address(isolate);
181 }
182
183
184 static ExternalReference GetAllocationLimitReference(
185 Isolate* isolate, AllocationFlags flags) {
186 return ((flags & PRETENURE_OLD_POINTER_SPACE) != 0) ?
187 ExternalReference::old_pointer_space_allocation_limit_address(isolate) :
188 ExternalReference::new_space_allocation_limit_address(isolate);
189 }
190 };
191
192
171 } } // namespace v8::internal 193 } } // namespace v8::internal
172 194
173 #endif // V8_MACRO_ASSEMBLER_H_ 195 #endif // V8_MACRO_ASSEMBLER_H_
OLDNEW
« no previous file with comments | « src/ia32/stub-cache-ia32.cc ('k') | src/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698