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

Side by Side Diff: src/IceSwitchLowering.h

Issue 1838753002: Subzero: Remove IceString. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Code review changes 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/IceStringPool.h ('k') | src/IceTargetLowering.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/IceSwitchLowering.h - Switch lowering --------*- C++ -*-===// 1 //===- subzero/src/IceSwitchLowering.h - Switch lowering --------*- C++ -*-===//
2 // 2 //
3 // The LLVM Compiler Infrastructure 3 // The LLVM Compiler Infrastructure
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
11 /// \brief Helpers for switch lowering. 11 /// \brief Helpers for switch lowering.
12 /// 12 ///
13 //===----------------------------------------------------------------------===// 13 //===----------------------------------------------------------------------===//
14 14
15 #ifndef SUBZERO_SRC_ICESWITCHLOWERING_H 15 #ifndef SUBZERO_SRC_ICESWITCHLOWERING_H
16 #define SUBZERO_SRC_ICESWITCHLOWERING_H 16 #define SUBZERO_SRC_ICESWITCHLOWERING_H
17 17
18 #include "IceDefs.h" 18 #include "IceDefs.h"
19 #include "IceStringPool.h"
19 20
20 namespace Ice { 21 namespace Ice {
21 22
22 class CaseCluster; 23 class CaseCluster;
23 24
24 using CaseClusterArray = CfgVector<CaseCluster>; 25 using CaseClusterArray = CfgVector<CaseCluster>;
25 26
26 /// A cluster of cases can be tested by a common method during switch lowering. 27 /// A cluster of cases can be tested by a common method during switch lowering.
27 class CaseCluster { 28 class CaseCluster {
28 CaseCluster() = delete; 29 CaseCluster() = delete;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 78
78 /// Store the jump table data so that it can be emitted later in the correct ELF 79 /// Store the jump table data so that it can be emitted later in the correct ELF
79 /// section once the offsets from the start of the function are known. 80 /// section once the offsets from the start of the function are known.
80 class JumpTableData { 81 class JumpTableData {
81 JumpTableData() = delete; 82 JumpTableData() = delete;
82 JumpTableData &operator=(const JumpTableData &) = delete; 83 JumpTableData &operator=(const JumpTableData &) = delete;
83 84
84 public: 85 public:
85 using TargetList = std::vector<intptr_t>; 86 using TargetList = std::vector<intptr_t>;
86 87
87 JumpTableData(const IceString &FuncName, SizeT Id, 88 JumpTableData(GlobalString FuncName, SizeT Id,
88 const TargetList &TargetOffsets) 89 const TargetList &TargetOffsets)
89 : FuncName(FuncName), Id(Id), TargetOffsets(TargetOffsets) {} 90 : FuncName(FuncName), Id(Id), TargetOffsets(TargetOffsets) {}
90 JumpTableData(const JumpTableData &) = default; 91 JumpTableData(const JumpTableData &) = default;
91 JumpTableData(JumpTableData &&) = default; 92 JumpTableData(JumpTableData &&) = default;
92 JumpTableData &operator=(JumpTableData &&) = default; 93 JumpTableData &operator=(JumpTableData &&) = default;
93 94
94 const IceString &getFunctionName() const { return FuncName; } 95 const GlobalString getFunctionName() const { return FuncName; }
95 SizeT getId() const { return Id; } 96 SizeT getId() const { return Id; }
96 const TargetList &getTargetOffsets() const { return TargetOffsets; } 97 const TargetList &getTargetOffsets() const { return TargetOffsets; }
97 98
98 private: 99 private:
99 IceString FuncName; 100 GlobalString FuncName;
100 SizeT Id; 101 SizeT Id;
101 TargetList TargetOffsets; 102 TargetList TargetOffsets;
102 }; 103 };
103 104
104 using JumpTableDataList = std::vector<JumpTableData>; 105 using JumpTableDataList = std::vector<JumpTableData>;
105 106
106 } // end of namespace Ice 107 } // end of namespace Ice
107 108
108 #endif // SUBZERO_SRC_ICESWITCHLOWERING_H 109 #endif // SUBZERO_SRC_ICESWITCHLOWERING_H
OLDNEW
« no previous file with comments | « src/IceStringPool.h ('k') | src/IceTargetLowering.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698