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

Side by Side Diff: src/IceGlobalContext.h

Issue 1460003003: Fix race condition in jump table list creation (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Add some missing consts Created 5 years, 1 month 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/IceCfg.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 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 /// getConstantPool() returns a copy of the constant pool for constants of a 210 /// getConstantPool() returns a copy of the constant pool for constants of a
211 /// given type. 211 /// given type.
212 ConstantList getConstantPool(Type Ty); 212 ConstantList getConstantPool(Type Ty);
213 /// Returns a copy of the list of external symbols. 213 /// Returns a copy of the list of external symbols.
214 ConstantList getConstantExternSyms(); 214 ConstantList getConstantExternSyms();
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, SizeT NumTargets); 220 JumpTableData &addJumpTable(IceString FuncName, SizeT Id,
221 const JumpTableData::TargetList &TargetList);
221 222
222 const ClFlags &getFlags() const { return Flags; } 223 const ClFlags &getFlags() const { return Flags; }
223 224
224 bool isIRGenerationDisabled() const { 225 bool isIRGenerationDisabled() const {
225 return getFlags().getDisableIRGeneration(); 226 return getFlags().getDisableIRGeneration();
226 } 227 }
227 228
228 /// Allocate data of type T using the global allocator. We allow entities 229 /// Allocate data of type T using the global allocator. We allow entities
229 /// allocated from this global allocator to be either trivially or 230 /// allocated from this global allocator to be either trivially or
230 /// non-trivially destructible. We optimize the case when T is trivially 231 /// non-trivially destructible. We optimize the case when T is trivially
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 explicit OstreamLocker(GlobalContext *Ctx) : Ctx(Ctx) { Ctx->lockStr(); } 602 explicit OstreamLocker(GlobalContext *Ctx) : Ctx(Ctx) { Ctx->lockStr(); }
602 ~OstreamLocker() { Ctx->unlockStr(); } 603 ~OstreamLocker() { Ctx->unlockStr(); }
603 604
604 private: 605 private:
605 GlobalContext *const Ctx; 606 GlobalContext *const Ctx;
606 }; 607 };
607 608
608 } // end of namespace Ice 609 } // end of namespace Ice
609 610
610 #endif // SUBZERO_SRC_ICEGLOBALCONTEXT_H 611 #endif // SUBZERO_SRC_ICEGLOBALCONTEXT_H
OLDNEW
« no previous file with comments | « src/IceCfg.cpp ('k') | src/IceGlobalContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698