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

Side by Side Diff: src/IceGlobalContext.h

Issue 1522433004: eliminate code related to --no-ir-gen (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Changes suggested by stichnot Created 5 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 | « src/IceConverter.cpp ('k') | src/IceOperand.h » ('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/IceGlobalContext.h - Global context defs -----*- C++ -*-===// 1 //===- subzero/src/IceGlobalContext.h - Global context defs -----*- 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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 /// @} 215 /// @}
216 216
217 /// Return a locked pointer to the registered jump tables. 217 /// Return a locked pointer to the registered jump tables.
218 JumpTableDataList getJumpTables(); 218 JumpTableDataList getJumpTables();
219 /// Create a new jump table entry and return a reference to it. 219 /// Create a new jump table entry and return a reference to it.
220 JumpTableData &addJumpTable(IceString FuncName, SizeT Id, 220 JumpTableData &addJumpTable(IceString FuncName, SizeT Id,
221 const JumpTableData::TargetList &TargetList); 221 const JumpTableData::TargetList &TargetList);
222 222
223 const ClFlags &getFlags() const { return Flags; } 223 const ClFlags &getFlags() const { return Flags; }
224 224
225 bool isIRGenerationDisabled() const {
226 return getFlags().getDisableIRGeneration();
227 }
228
229 /// Allocate data of type T using the global allocator. We allow entities 225 /// Allocate data of type T using the global allocator. We allow entities
230 /// allocated from this global allocator to be either trivially or 226 /// allocated from this global allocator to be either trivially or
231 /// non-trivially destructible. We optimize the case when T is trivially 227 /// non-trivially destructible. We optimize the case when T is trivially
232 /// destructible by not registering a destructor. Destructors will be invoked 228 /// destructible by not registering a destructor. Destructors will be invoked
233 /// during GlobalContext destruction in the reverse object creation order. 229 /// during GlobalContext destruction in the reverse object creation order.
234 template <typename T> 230 template <typename T>
235 typename std::enable_if<std::is_trivially_destructible<T>::value, T>::type * 231 typename std::enable_if<std::is_trivially_destructible<T>::value, T>::type *
236 allocate() { 232 allocate() {
237 return getAllocator()->Allocate<T>(); 233 return getAllocator()->Allocate<T>();
238 } 234 }
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
602 explicit OstreamLocker(GlobalContext *Ctx) : Ctx(Ctx) { Ctx->lockStr(); } 598 explicit OstreamLocker(GlobalContext *Ctx) : Ctx(Ctx) { Ctx->lockStr(); }
603 ~OstreamLocker() { Ctx->unlockStr(); } 599 ~OstreamLocker() { Ctx->unlockStr(); }
604 600
605 private: 601 private:
606 GlobalContext *const Ctx; 602 GlobalContext *const Ctx;
607 }; 603 };
608 604
609 } // end of namespace Ice 605 } // end of namespace Ice
610 606
611 #endif // SUBZERO_SRC_ICEGLOBALCONTEXT_H 607 #endif // SUBZERO_SRC_ICEGLOBALCONTEXT_H
OLDNEW
« no previous file with comments | « src/IceConverter.cpp ('k') | src/IceOperand.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698