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

Side by Side Diff: src/IceDefs.h

Issue 2054943002: Implemented global redzones. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Finished reformatting Created 4 years, 6 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
« no previous file with comments | « src/IceCompileServer.cpp ('k') | src/IceGlobalContext.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- subzero/src/IceDefs.h - Common Subzero declarations ------*- C++ -*-===// 1 //===- subzero/src/IceDefs.h - Common Subzero declarations ------*- C++ -*-===//
2 // 2 //
3 // The Subzero Code Generator 3 // The Subzero Code Generator
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 /// 9 ///
10 /// \file 10 /// \file
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 template <typename T> T *allocate_variable_declaration() { 170 template <typename T> T *allocate_variable_declaration() {
171 static_assert(!std::is_trivially_destructible<T>::value, 171 static_assert(!std::is_trivially_destructible<T>::value,
172 "allocate_variable_declaration expects non-trivially " 172 "allocate_variable_declaration expects non-trivially "
173 "destructible types."); 173 "destructible types.");
174 T *Ret = Arena->Allocate<T>(); 174 T *Ret = Arena->Allocate<T>();
175 Dtors.emplace_back([Ret]() { Ret->~T(); }); 175 Dtors.emplace_back([Ret]() { Ret->~T(); });
176 return Ret; 176 return Ret;
177 } 177 }
178 178
179 // This do nothing method is invoked when a global variable is created, but it 179 // This do nothing method is invoked when a global variable is created, but it
180 // will not be emitted. If we ever need to track the created variabled, having 180 // will not be emitted. If we ever need to track the created variable, having
181 // this hook is handy. 181 // this hook is handy.
182 void willNotBeEmitted(VariableDeclaration *) {} 182 void willNotBeEmitted(VariableDeclaration *) {}
183 183
184 /// Merges Other with this, effectively resetting Other to an empty state. 184 /// Merges Other with this, effectively resetting Other to an empty state.
185 void merge(VariableDeclarationList *Other) { 185 void merge(VariableDeclarationList *Other) {
186 assert(Other != nullptr); 186 assert(Other != nullptr);
187 addArena(std::move(Other->Arena)); 187 addArena(std::move(Other->Arena));
188 for (std::size_t i = 0; i < Other->MergedArenas.size(); ++i) { 188 for (std::size_t i = 0; i < Other->MergedArenas.size(); ++i) {
189 addArena(std::move(Other->MergedArenas[i])); 189 addArena(std::move(Other->MergedArenas[i]));
190 } 190 }
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 RPE_PooledConstantReordering, 434 RPE_PooledConstantReordering,
435 RPE_RegAllocRandomization, 435 RPE_RegAllocRandomization,
436 RPE_num 436 RPE_num
437 }; 437 };
438 438
439 using RelocOffsetArray = llvm::SmallVector<class RelocOffset *, 4>; 439 using RelocOffsetArray = llvm::SmallVector<class RelocOffset *, 4>;
440 440
441 } // end of namespace Ice 441 } // end of namespace Ice
442 442
443 #endif // SUBZERO_SRC_ICEDEFS_H 443 #endif // SUBZERO_SRC_ICEDEFS_H
OLDNEW
« no previous file with comments | « src/IceCompileServer.cpp ('k') | src/IceGlobalContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698