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

Side by Side Diff: src/spaces.h

Issue 7277038: make gc branch compile on Win32. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/gc
Patch Set: Created 9 years, 5 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
OLDNEW
1 // Copyright 2006-2010 the V8 project authors. All rights reserved. 1 // Copyright 2006-2010 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 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 bool is_valid() { return address() != NULL; } 296 bool is_valid() { return address() != NULL; }
297 297
298 MemoryChunk* next_chunk() const { return next_chunk_; } 298 MemoryChunk* next_chunk() const { return next_chunk_; }
299 299
300 void set_next_chunk(MemoryChunk* next) { next_chunk_ = next; } 300 void set_next_chunk(MemoryChunk* next) { next_chunk_ = next; }
301 301
302 Space* owner() const { return owner_; } 302 Space* owner() const { return owner_; }
303 303
304 Address body() { return address() + kBodyOffset; } 304 Address body() { return address() + kBodyOffset; }
305 305
306 int body_size() { return size() - kBodyOffset; } 306 int body_size() { return static_cast<int>(size() - kBodyOffset); }
307 307
308 enum MemoryChunkFlags { 308 enum MemoryChunkFlags {
309 IS_EXECUTABLE, 309 IS_EXECUTABLE,
310 NUM_MEMORY_CHUNK_FLAGS 310 NUM_MEMORY_CHUNK_FLAGS
311 }; 311 };
312 312
313 void SetFlag(int flag) { 313 void SetFlag(int flag) {
314 flags_ |= 1 << flag; 314 flags_ |= static_cast<uintptr_t>(1) << flag;
315 } 315 }
316 316
317 void ClearFlag(int flag) { 317 void ClearFlag(int flag) {
318 flags_ &= ~(1 << flag); 318 flags_ &= ~(static_cast<uintptr_t>(1) << flag);
319 } 319 }
320 320
321 bool IsFlagSet(int flag) { 321 bool IsFlagSet(int flag) {
322 return (flags_ & (1 << flag)) != 0; 322 return (flags_ & (static_cast<uintptr_t>(1) << flag)) != 0;
323 } 323 }
324 324
325 static const intptr_t kAlignment = (1 << kPageSizeBits); 325 static const intptr_t kAlignment =
326 (static_cast<uintptr_t>(1) << kPageSizeBits);
326 327
327 static const intptr_t kAlignmentMask = kAlignment - 1; 328 static const intptr_t kAlignmentMask = kAlignment - 1;
328 329
329 static const size_t kHeaderSize = kPointerSize + kPointerSize + kPointerSize + 330 static const size_t kHeaderSize = kPointerSize + kPointerSize + kPointerSize +
330 kPointerSize + kPointerSize + kPointerSize; 331 kPointerSize + kPointerSize + kPointerSize;
331 332
332 static const size_t kMarksBitmapLength = 333 static const size_t kMarksBitmapLength =
333 (1 << kPageSizeBits) >> (kPointerSizeLog2); 334 (1 << kPageSizeBits) >> (kPointerSizeLog2);
334 335
335 static const size_t kMarksBitmapSize = 336 static const size_t kMarksBitmapSize =
(...skipping 1951 matching lines...) Expand 10 before | Expand all | Expand 10 after
2287 2288
2288 private: 2289 private:
2289 LargePage* current_; 2290 LargePage* current_;
2290 HeapObjectCallback size_func_; 2291 HeapObjectCallback size_func_;
2291 }; 2292 };
2292 2293
2293 2294
2294 } } // namespace v8::internal 2295 } } // namespace v8::internal
2295 2296
2296 #endif // V8_SPACES_H_ 2297 #endif // V8_SPACES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698