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