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

Unified Diff: src/IceGlobalContext.h

Issue 641193002: Introduce the notion of function addresses in Subzero. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Clean up code and fix nits. Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: src/IceGlobalContext.h
diff --git a/src/IceGlobalContext.h b/src/IceGlobalContext.h
index cc5da5800ca604f71a239924966a5e8e014679bc..fa6223923547762fd7b156a34db51713011aacf6 100644
--- a/src/IceGlobalContext.h
+++ b/src/IceGlobalContext.h
@@ -21,6 +21,7 @@
#include "llvm/Support/raw_ostream.h"
#include "IceDefs.h"
+#include "IceClFlags.h"
Jim Stichnoth 2014/10/10 13:15:00 Is this new include necessary?
Karl 2014/10/10 20:17:30 See line 220. On that line it uses Ctx>getFlags().
#include "IceIntrinsics.h"
#include "IceRNG.h"
#include "IceTimerTree.h"
@@ -29,6 +30,9 @@
namespace Ice {
class ClFlags;
+class FuncSigType;
+class Function;
+class GlobalVariable;
// This class collects rudimentary statistics during translation.
class CodeStats {
@@ -117,6 +121,15 @@ public:
// getConstantPool() returns a copy of the constant pool for
// constants of a given type.
ConstantList getConstantPool(Type Ty) const;
+ // Returns a new function, allocated in an internal memory pool.
+ // Ownership of the function is maintained by this class instance.
+ Function *newFunction(const FuncSigType *Signature, unsigned CallingConv,
+ unsigned Linkage, bool IsProto);
+
+ // Returns a new global variable, allocated in an internal memory
+ // pool. Ownership of the function is maintained by this class
+ // instance.
+ GlobalVariable *newGlobalVariable();
const ClFlags &getFlags() const { return Flags; }
@@ -186,6 +199,7 @@ private:
CodeStats StatsFunction;
CodeStats StatsCumulative;
std::vector<TimerStack> Timers;
+ std::vector<GlobalAddress *> GlobalAddresses;
GlobalContext(const GlobalContext &) = delete;
GlobalContext &operator=(const GlobalContext &) = delete;

Powered by Google App Engine
This is Rietveld 408576698