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

Side by Side Diff: src/v8globals.h

Issue 11188031: Move DescriptorArray into the map (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: remove padding area Created 8 years, 2 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/transitions-inl.h ('k') | src/x64/macro-assembler-x64.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 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 const intptr_t kObjectAlignmentMask = kObjectAlignment - 1; 45 const intptr_t kObjectAlignmentMask = kObjectAlignment - 1;
46 46
47 // Desired alignment for pointers. 47 // Desired alignment for pointers.
48 const intptr_t kPointerAlignment = (1 << kPointerSizeLog2); 48 const intptr_t kPointerAlignment = (1 << kPointerSizeLog2);
49 const intptr_t kPointerAlignmentMask = kPointerAlignment - 1; 49 const intptr_t kPointerAlignmentMask = kPointerAlignment - 1;
50 50
51 // Desired alignment for double values. 51 // Desired alignment for double values.
52 const intptr_t kDoubleAlignment = 8; 52 const intptr_t kDoubleAlignment = 8;
53 const intptr_t kDoubleAlignmentMask = kDoubleAlignment - 1; 53 const intptr_t kDoubleAlignmentMask = kDoubleAlignment - 1;
54 54
55 // Desired alignment for maps.
56 #if V8_HOST_ARCH_64_BIT
57 const intptr_t kMapAlignmentBits = kObjectAlignmentBits;
58 #else
59 const intptr_t kMapAlignmentBits = kObjectAlignmentBits + 3;
60 #endif
61 const intptr_t kMapAlignment = (1 << kMapAlignmentBits);
62 const intptr_t kMapAlignmentMask = kMapAlignment - 1;
63
64 // Desired alignment for generated code is 32 bytes (to improve cache line 55 // Desired alignment for generated code is 32 bytes (to improve cache line
65 // utilization). 56 // utilization).
66 const int kCodeAlignmentBits = 5; 57 const int kCodeAlignmentBits = 5;
67 const intptr_t kCodeAlignment = 1 << kCodeAlignmentBits; 58 const intptr_t kCodeAlignment = 1 << kCodeAlignmentBits;
68 const intptr_t kCodeAlignmentMask = kCodeAlignment - 1; 59 const intptr_t kCodeAlignmentMask = kCodeAlignment - 1;
69 60
70 // Tag information for Failure. 61 // Tag information for Failure.
71 const int kFailureTag = 3; 62 const int kFailureTag = 3;
72 const int kFailureTagSize = 2; 63 const int kFailureTagSize = 2;
73 const intptr_t kFailureTagMask = (1 << kFailureTagSize) - 1; 64 const intptr_t kFailureTagMask = (1 << kFailureTagSize) - 1;
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 ((reinterpret_cast<intptr_t>(value) & kFailureTagMask) == kFailureTag) 380 ((reinterpret_cast<intptr_t>(value) & kFailureTagMask) == kFailureTag)
390 381
391 // OBJECT_POINTER_ALIGN returns the value aligned as a HeapObject pointer 382 // OBJECT_POINTER_ALIGN returns the value aligned as a HeapObject pointer
392 #define OBJECT_POINTER_ALIGN(value) \ 383 #define OBJECT_POINTER_ALIGN(value) \
393 (((value) + kObjectAlignmentMask) & ~kObjectAlignmentMask) 384 (((value) + kObjectAlignmentMask) & ~kObjectAlignmentMask)
394 385
395 // POINTER_SIZE_ALIGN returns the value aligned as a pointer. 386 // POINTER_SIZE_ALIGN returns the value aligned as a pointer.
396 #define POINTER_SIZE_ALIGN(value) \ 387 #define POINTER_SIZE_ALIGN(value) \
397 (((value) + kPointerAlignmentMask) & ~kPointerAlignmentMask) 388 (((value) + kPointerAlignmentMask) & ~kPointerAlignmentMask)
398 389
399 // MAP_POINTER_ALIGN returns the value aligned as a map pointer.
400 #define MAP_POINTER_ALIGN(value) \
401 (((value) + kMapAlignmentMask) & ~kMapAlignmentMask)
402
403 // CODE_POINTER_ALIGN returns the value aligned as a generated code segment. 390 // CODE_POINTER_ALIGN returns the value aligned as a generated code segment.
404 #define CODE_POINTER_ALIGN(value) \ 391 #define CODE_POINTER_ALIGN(value) \
405 (((value) + kCodeAlignmentMask) & ~kCodeAlignmentMask) 392 (((value) + kCodeAlignmentMask) & ~kCodeAlignmentMask)
406 393
407 // Support for tracking C++ memory allocation. Insert TRACK_MEMORY("Fisk") 394 // Support for tracking C++ memory allocation. Insert TRACK_MEMORY("Fisk")
408 // inside a C++ class and new and delete will be overloaded so logging is 395 // inside a C++ class and new and delete will be overloaded so logging is
409 // performed. 396 // performed.
410 // This file (globals.h) is included before log.h, so we use direct calls to 397 // This file (globals.h) is included before log.h, so we use direct calls to
411 // the Logger rather than the LOG macro. 398 // the Logger rather than the LOG macro.
412 #ifdef DEBUG 399 #ifdef DEBUG
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
572 559
573 enum ClearExceptionFlag { 560 enum ClearExceptionFlag {
574 KEEP_EXCEPTION, 561 KEEP_EXCEPTION,
575 CLEAR_EXCEPTION 562 CLEAR_EXCEPTION
576 }; 563 };
577 564
578 565
579 } } // namespace v8::internal 566 } } // namespace v8::internal
580 567
581 #endif // V8_V8GLOBALS_H_ 568 #endif // V8_V8GLOBALS_H_
OLDNEW
« no previous file with comments | « src/transitions-inl.h ('k') | src/x64/macro-assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698