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

Side by Side Diff: src/heap.h

Issue 11590005: Fix -Wstrict-aliasing warnings.
Patch Set: Created 8 years 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
« no previous file with comments | « no previous file | src/hydrogen.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 1275 matching lines...) Expand 10 before | Expand all | Expand 10 after
1286 roots_[kStoreBufferTopRootIndex] = reinterpret_cast<Smi*>(top); 1286 roots_[kStoreBufferTopRootIndex] = reinterpret_cast<Smi*>(top);
1287 } 1287 }
1288 1288
1289 // Update the next script id. 1289 // Update the next script id.
1290 inline void SetLastScriptId(Object* last_script_id); 1290 inline void SetLastScriptId(Object* last_script_id);
1291 1291
1292 // Generated code can embed this address to get access to the roots. 1292 // Generated code can embed this address to get access to the roots.
1293 Object** roots_array_start() { return roots_; } 1293 Object** roots_array_start() { return roots_; }
1294 1294
1295 Address* store_buffer_top_address() { 1295 Address* store_buffer_top_address() {
1296 return reinterpret_cast<Address*>(&roots_[kStoreBufferTopRootIndex]); 1296 // Avoid type-punning compiler warnings.
1297 union {
1298 Object** in;
1299 Address* out;
1300 } u;
1301 u.in = &roots_[kStoreBufferTopRootIndex];
1302 return u.out;
1297 } 1303 }
1298 1304
1299 // Get address of native contexts list for serialization support. 1305 // Get address of native contexts list for serialization support.
1300 Object** native_contexts_list_address() { 1306 Object** native_contexts_list_address() {
1301 return &native_contexts_list_; 1307 return &native_contexts_list_;
1302 } 1308 }
1303 1309
1304 #ifdef VERIFY_HEAP 1310 #ifdef VERIFY_HEAP
1305 // Verify the heap is in its normal state before or after a GC. 1311 // Verify the heap is in its normal state before or after a GC.
1306 void Verify(); 1312 void Verify();
(...skipping 1572 matching lines...) Expand 10 before | Expand all | Expand 10 after
2879 AssertNoAllocation no_alloc; // i.e. no gc allowed. 2885 AssertNoAllocation no_alloc; // i.e. no gc allowed.
2880 2886
2881 private: 2887 private:
2882 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 2888 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
2883 }; 2889 };
2884 #endif // DEBUG || LIVE_OBJECT_LIST 2890 #endif // DEBUG || LIVE_OBJECT_LIST
2885 2891
2886 } } // namespace v8::internal 2892 } } // namespace v8::internal
2887 2893
2888 #endif // V8_HEAP_H_ 2894 #endif // V8_HEAP_H_
OLDNEW
« no previous file with comments | « no previous file | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698