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

Side by Side Diff: src/global-handles.cc

Issue 12040094: Unbreak build (offsetof only works for POD types) (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 10 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 | 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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 NEAR_DEATH // Callback has informed the handle is near death. 53 NEAR_DEATH // Callback has informed the handle is near death.
54 }; 54 };
55 55
56 // Maps handle location (slot) to the containing node. 56 // Maps handle location (slot) to the containing node.
57 static Node* FromLocation(Object** location) { 57 static Node* FromLocation(Object** location) {
58 ASSERT(OFFSET_OF(Node, object_) == 0); 58 ASSERT(OFFSET_OF(Node, object_) == 0);
59 return reinterpret_cast<Node*>(location); 59 return reinterpret_cast<Node*>(location);
60 } 60 }
61 61
62 Node() { 62 Node() {
63 STATIC_ASSERT(offsetof(Node, class_id_) == Internals::kNodeClassIdOffset); 63 ASSERT(OFFSET_OF(Node, class_id_) == Internals::kNodeClassIdOffset);
64 STATIC_ASSERT(offsetof(Node, flags_) == Internals::kNodeFlagsOffset); 64 ASSERT(OFFSET_OF(Node, flags_) == Internals::kNodeFlagsOffset);
65 STATIC_ASSERT(static_cast<int>(NodeState::kMask) == 65 STATIC_ASSERT(static_cast<int>(NodeState::kMask) ==
66 Internals::kNodeStateMask); 66 Internals::kNodeStateMask);
67 STATIC_ASSERT(WEAK == Internals::kNodeStateIsWeakValue); 67 STATIC_ASSERT(WEAK == Internals::kNodeStateIsWeakValue);
68 STATIC_ASSERT(NEAR_DEATH == Internals::kNodeStateIsNearDeathValue); 68 STATIC_ASSERT(NEAR_DEATH == Internals::kNodeStateIsNearDeathValue);
69 STATIC_ASSERT(static_cast<int>(IsIndependent::kShift) == 69 STATIC_ASSERT(static_cast<int>(IsIndependent::kShift) ==
70 Internals::kNodeIsIndependentShift); 70 Internals::kNodeIsIndependentShift);
71 STATIC_ASSERT(static_cast<int>(IsPartiallyDependent::kShift) == 71 STATIC_ASSERT(static_cast<int>(IsPartiallyDependent::kShift) ==
72 Internals::kNodeIsPartiallyDependentShift); 72 Internals::kNodeIsPartiallyDependentShift);
73 } 73 }
74 74
(...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after
844 implicit_ref_groups_.Clear(); 844 implicit_ref_groups_.Clear();
845 } 845 }
846 846
847 847
848 void GlobalHandles::TearDown() { 848 void GlobalHandles::TearDown() {
849 // TODO(1428): invoke weak callbacks. 849 // TODO(1428): invoke weak callbacks.
850 } 850 }
851 851
852 852
853 } } // namespace v8::internal 853 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698