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

Side by Side Diff: src/IceTranslator.h

Issue 656123003: Subzero: Class definition cleanup. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Changes for Karl 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 unified diff | Download patch
« no previous file with comments | « src/IceTimerTree.h ('k') | src/PNaClTranslator.h » ('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/IceTranslator.h - ICE to machine code --------*- C++ -*-===// 1 //===- subzero/src/IceTranslator.h - ICE to machine code --------*- 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 // This file declares the general driver class for translating ICE to 10 // This file declares the general driver class for translating ICE to
(...skipping 14 matching lines...) Expand all
25 25
26 class ClFlags; 26 class ClFlags;
27 class Cfg; 27 class Cfg;
28 class VariableDeclaration; 28 class VariableDeclaration;
29 class GlobalContext; 29 class GlobalContext;
30 30
31 // Base class for translating ICE to machine code. Derived classes convert 31 // Base class for translating ICE to machine code. Derived classes convert
32 // other intermediate representations down to ICE, and then call the appropriate 32 // other intermediate representations down to ICE, and then call the appropriate
33 // (inherited) methods to convert ICE into machine instructions. 33 // (inherited) methods to convert ICE into machine instructions.
34 class Translator { 34 class Translator {
35 Translator(const Translator &) = delete;
36 Translator &operator=(const Translator &) = delete;
37
35 public: 38 public:
36 typedef std::vector<VariableDeclaration *> VariableDeclarationListType; 39 typedef std::vector<VariableDeclaration *> VariableDeclarationListType;
37 40
38 Translator(GlobalContext *Ctx, const ClFlags &Flags) 41 Translator(GlobalContext *Ctx, const ClFlags &Flags)
39 : Ctx(Ctx), Flags(Flags), ErrorStatus(0) {} 42 : Ctx(Ctx), Flags(Flags), ErrorStatus(0) {}
40 43
41 ~Translator(); 44 ~Translator();
42 bool getErrorStatus() const { return ErrorStatus; } 45 bool getErrorStatus() const { return ErrorStatus; }
43 46
44 GlobalContext *getContext() const { return Ctx; } 47 GlobalContext *getContext() const { return Ctx; }
(...skipping 29 matching lines...) Expand all
74 bool ErrorStatus; 77 bool ErrorStatus;
75 // Ideally, Func would be inside the methods that converts IR to 78 // Ideally, Func would be inside the methods that converts IR to
76 // functions. However, emitting the constant pool requires a valid 79 // functions. However, emitting the constant pool requires a valid
77 // Cfg object, so we need to defer deleting the last non-empty Cfg 80 // Cfg object, so we need to defer deleting the last non-empty Cfg
78 // object to emit the constant pool (via emitConstants). TODO: 81 // object to emit the constant pool (via emitConstants). TODO:
79 // Since all constants are globally pooled in the GlobalContext 82 // Since all constants are globally pooled in the GlobalContext
80 // object, change all Constant related functions to use 83 // object, change all Constant related functions to use
81 // GlobalContext instead of Cfg, and then make emitConstantPool use 84 // GlobalContext instead of Cfg, and then make emitConstantPool use
82 // that. 85 // that.
83 std::unique_ptr<Cfg> Func; 86 std::unique_ptr<Cfg> Func;
87 };
84 88
85 private: 89 } // end of namespace Ice
86 Translator(const Translator &) = delete;
87 Translator &operator=(const Translator &) = delete;
88 };
89 }
90 90
91 #endif // SUBZERO_SRC_ICETRANSLATOR_H 91 #endif // SUBZERO_SRC_ICETRANSLATOR_H
OLDNEW
« no previous file with comments | « src/IceTimerTree.h ('k') | src/PNaClTranslator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698