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

Side by Side Diff: src/IceGlobalContext.h

Issue 1860473002: Subzero. Refactors Switch Lowering. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: git pull Created 4 years, 8 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/IceELFObjectWriter.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/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
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
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
OLDNEW
« no previous file with comments | « src/IceELFObjectWriter.cpp ('k') | src/IceGlobalContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698