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

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: Fix nit in test. 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
« no previous file with comments | « src/IceDefs.h ('k') | src/IceGlobalContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceGlobalContext.h
diff --git a/src/IceGlobalContext.h b/src/IceGlobalContext.h
index cc5da5800ca604f71a239924966a5e8e014679bc..026cb7f017b0ebe918d7c76c3417d5c4331bdd03 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"
#include "IceIntrinsics.h"
#include "IceRNG.h"
#include "IceTimerTree.h"
@@ -29,6 +30,7 @@
namespace Ice {
class ClFlags;
+class FuncSigType;
// This class collects rudimentary statistics during translation.
class CodeStats {
@@ -117,6 +119,17 @@ public:
// getConstantPool() returns a copy of the constant pool for
// constants of a given type.
ConstantList getConstantPool(Type Ty) const;
+ // Returns a new function declaration, allocated in an internal
+ // memory pool. Ownership of the function is maintained by this
+ // class instance.
+ FunctionDeclaration *newFunctionDeclaration(const FuncSigType *Signature,
+ unsigned CallingConv,
+ unsigned Linkage, bool IsProto);
+
+ // Returns a new global variable declaration, allocated in an
+ // internal memory pool. Ownership of the function is maintained by
+ // this class instance.
+ VariableDeclaration *newVariableDeclaration();
const ClFlags &getFlags() const { return Flags; }
@@ -186,6 +199,7 @@ private:
CodeStats StatsFunction;
CodeStats StatsCumulative;
std::vector<TimerStack> Timers;
+ std::vector<GlobalDeclaration *> GlobalDeclarations;
GlobalContext(const GlobalContext &) = delete;
GlobalContext &operator=(const GlobalContext &) = delete;
« no previous file with comments | « src/IceDefs.h ('k') | src/IceGlobalContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698