| OLD | NEW |
| 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 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 Constant *getRuntimeHelperFunc(RuntimeHelper FuncID) const { | 261 Constant *getRuntimeHelperFunc(RuntimeHelper FuncID) const { |
| 262 assert(FuncID < RuntimeHelper::H_Num); | 262 assert(FuncID < RuntimeHelper::H_Num); |
| 263 Constant *Result = RuntimeHelperFunc[static_cast<size_t>(FuncID)]; | 263 Constant *Result = RuntimeHelperFunc[static_cast<size_t>(FuncID)]; |
| 264 assert(Result != nullptr && "No such runtime helper function"); | 264 assert(Result != nullptr && "No such runtime helper function"); |
| 265 return Result; | 265 return Result; |
| 266 } | 266 } |
| 267 GlobalString getGlobalString(const std::string &Name); | 267 GlobalString getGlobalString(const std::string &Name); |
| 268 | 268 |
| 269 /// Return a locked pointer to the registered jump tables. | 269 /// Return a locked pointer to the registered jump tables. |
| 270 JumpTableDataList getJumpTables(); | 270 JumpTableDataList getJumpTables(); |
| 271 /// Create a new jump table entry and return a reference to it. | 271 /// Adds JumpTable to the list of know jump tables, for a posteriori emission. |
| 272 JumpTableData &addJumpTable(GlobalString FuncName, SizeT Id, | 272 void addJumpTableData(JumpTableData JumpTable); |
| 273 const JumpTableData::TargetList &TargetList); | |
| 274 | 273 |
| 275 /// Allocate data of type T using the global allocator. We allow entities | 274 /// Allocate data of type T using the global allocator. We allow entities |
| 276 /// allocated from this global allocator to be either trivially or | 275 /// allocated from this global allocator to be either trivially or |
| 277 /// non-trivially destructible. We optimize the case when T is trivially | 276 /// non-trivially destructible. We optimize the case when T is trivially |
| 278 /// destructible by not registering a destructor. Destructors will be invoked | 277 /// destructible by not registering a destructor. Destructors will be invoked |
| 279 /// during GlobalContext destruction in the reverse object creation order. | 278 /// during GlobalContext destruction in the reverse object creation order. |
| 280 template <typename T> | 279 template <typename T> |
| 281 typename std::enable_if<std::is_trivially_destructible<T>::value, T>::type * | 280 typename std::enable_if<std::is_trivially_destructible<T>::value, T>::type * |
| 282 allocate() { | 281 allocate() { |
| 283 return getAllocator()->Allocate<T>(); | 282 return getAllocator()->Allocate<T>(); |
| (...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 677 explicit OstreamLocker(GlobalContext *Ctx) : Ctx(Ctx) { Ctx->lockStr(); } | 676 explicit OstreamLocker(GlobalContext *Ctx) : Ctx(Ctx) { Ctx->lockStr(); } |
| 678 ~OstreamLocker() { Ctx->unlockStr(); } | 677 ~OstreamLocker() { Ctx->unlockStr(); } |
| 679 | 678 |
| 680 private: | 679 private: |
| 681 GlobalContext *const Ctx; | 680 GlobalContext *const Ctx; |
| 682 }; | 681 }; |
| 683 | 682 |
| 684 } // end of namespace Ice | 683 } // end of namespace Ice |
| 685 | 684 |
| 686 #endif // SUBZERO_SRC_ICEGLOBALCONTEXT_H | 685 #endif // SUBZERO_SRC_ICEGLOBALCONTEXT_H |
| OLD | NEW |