This repository was archived by the owner on Jul 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstringify-context.cpp
More file actions
35 lines (24 loc) · 1.39 KB
/
stringify-context.cpp
File metadata and controls
35 lines (24 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#ifndef JDECOMPILER_STRINGIFY_CONTEXT_CPP
#define JDECOMPILER_STRINGIFY_CONTEXT_CPP
#include "decompilation-and-stringify-context.cpp"
namespace jdecompiler {
struct StringifyContext final: DecompilationAndStringifyContext {
public:
const map<uint32_t, index_t>& exprIndexTable;
protected:
StringifyContext(const DisassemblerContext& disassemblerContext, const ClassInfo& classinfo, MethodScope& methodScope,
modifiers_t modifiers, const MethodDescriptor& descriptor, const Attributes& attributes, const map<uint32_t, index_t>& exprIndexTable):
DecompilationAndStringifyContext(disassemblerContext, classinfo,
methodScope, modifiers, descriptor, attributes), exprIndexTable(exprIndexTable) {}
public:
StringifyContext(const DisassemblerContext& disassemblerContext, const ClassInfo& classinfo, MethodScope* methodScope,
modifiers_t modifiers, const MethodDescriptor& descriptor, const Attributes& attributes):
StringifyContext(disassemblerContext, classinfo, *methodScope, modifiers, descriptor, attributes, *new map<uint32_t, index_t>()) {}
StringifyContext(const DecompilationContext& context):
StringifyContext(context.disassemblerContext, context.classinfo, context.methodScope,
context.modifiers, context.descriptor, context.attributes, context.exprIndexTable) {}
void enterScope(const Scope*) const;
void exitScope(const Scope*) const;
};
}
#endif