Commit a70960e3 authored by Isaac Oscar Gariano's avatar Isaac Oscar Gariano

Properly fixed bug when refering to top-level entities before they are defined

parent 994faece
......@@ -66,10 +66,11 @@ namespace C
int inline_decl = 0; // if this is greater than 0 we are inside an inline decl
std::string gen_local(std::string name = ""s) {
std::string id_name = "L("s + std::to_string(last_global_id++) + (name.empty() ? ""s : ", "s + name) + ")"s;
std::string id_name = "L("s + std::to_string(last_local_id++) + (name.empty() ? ""s : ", "s + name) + ")"s;
write_line("MuID "s + id_name + " = " + irbuilder + "->gen_sym(" + irbuilder + ", " + (name.empty() ? "NULL" : "\"@" + name + "\"")+ ");");
return id_name;
}
std::string gen_global(std::string name = ""s) {
std::string id = std::to_string(last_global_id++);
std::string id_name = "G("s + id + (name.empty() ? ""s : ", "s + name) + ")"s;
......@@ -95,12 +96,8 @@ namespace C
}
} else {
id = symbols[name];
if (global && globals.count(name) == 0) {
globals[name] = id;
if (name[0] != '_')
whitelist.push_back(id);
}
}
if (name == primordial_name) // We found the primordial function!
primordial_id = id;
......@@ -958,7 +955,7 @@ namespace C
/***************** Used by instructions **********************/
virtual Any<MuID> visitInstName(UIRParser::InstNameContext *context) override {
write_line();
return context->name() ? accept<MuID>(context->name()) : gen_local();
return context->nam ? accept<MuID>(context->nam) : gen_local();
}
virtual Any<std::vector<MuID>> visitInstResults(UIRParser::InstResultsContext *context) override {
return accept_list("MuVarNode", context->results);
......@@ -1057,10 +1054,7 @@ namespace C
}
}
virtual Any<MuConstNode> visitConstant(UIRParser::ConstantContext *context) override {
if (context->NAME())
// Must refer to a constant (so the name references a global entity)
return get_id(::last_name = context->NAME()->getText(), true);
else if (context->nam)
if (context->nam)
return accept<MuID>(context->nam);
else {
std::string old_type = current_type;
......@@ -1077,55 +1071,41 @@ namespace C
// ******************************* TERMINALS *****************************
// Names
virtual Any<MuVarNode> visitValue(UIRParser::ValueContext *context) override {
if (context->NAME()) {
// If theres a previous local name with this name
if (symbols.count(::last_name = ::parent_names.top() + "."s + context->NAME()->getText()))
return get_id(::last_name, false);
else // Must reference a global
return get_id(::last_name = context->NAME()->getText(), true);
}
else return accept<MuID>(context->children[0]);
}
virtual Any<MuID> visitGlobalName(UIRParser::GlobalNameContext *context) override {
// References a top level entity, interpret as a global name
if (context->NAME())
return get_id(::last_name = context->NAME()->getText(), true);
else if (context->LOCAL_NAME())
return get_id(::last_name = ::bundle_name + "."s + context->LOCAL_NAME()->getText().substr(1, std::string::npos), true);
else // if (context->GLOBAL_NAME())
return get_id(::last_name = context->GLOBAL_NAME()->getText().substr(1, std::string::npos), true);
}
virtual Any<MuID> visitLocalName(UIRParser::LocalNameContext *context) override {
if (context->NAME()) // Interpret as a local name
return get_id(::last_name = ::parent_names.top() + "."s + context->NAME()->getText(), false);
else if (context->LOCAL_NAME())
return get_id(::last_name = ::parent_names.top() + "."s + context->LOCAL_NAME()->getText().substr(1, std::string::npos), false);
else // if (context->GLOBAL_NAME())
return get_id(::last_name = context->GLOBAL_NAME()->getText().substr(1, std::string::npos), false);
}
virtual Any<MuID> visitName(UIRParser::NameContext *context) override {
// Interpret as a local name if previously defined, otherwise global
virtual Any<MuID> visitName(UIRParser::NameContext *context) override {
if (context->NAME()) // Interpret as a local name
return get_id(::last_name = ::parent_names.top() + "."s + context->NAME()->getText(), true);
else return accept<MuID>(context->children[0]);
}
std::string suffix =
context->NAME() ? context->NAME()->getText()
: context->LOCAL_NAME() ? context->LOCAL_NAME()->getText().substr(1, std::string::npos)
: context->GLOBAL_NAME()->getText().substr(1, std::string::npos);
virtual Any<MuID> visitGlobalName(UIRParser::GlobalNameContext *context) override {
// Get the id corresponding to this token (ignoring the first character which is a '@')
return get_id(::last_name = context->GLOBAL_NAME()->getText().substr(1, std::string::npos), true);
}
virtual Any<MuID> visitGlobalLocalName(UIRParser::GlobalLocalNameContext *context) override {
// Get the id corresponding to this token (ignoring the first character which is a '@')
return get_id(::last_name = ::bundle_name + "."s + context->LOCAL_NAME()->getText().substr(1, std::string::npos), true);
}
virtual Any<MuID> visitLocalName(UIRParser::LocalNameContext *context) override {
// Get the id of the local name corresponding to this token (ignoring the first character which is a '%') converted to a global name
return get_id(::last_name = ::parent_names.top() + "."s + context->LOCAL_NAME()->getText().substr(1, std::string::npos), false);
}
virtual Any<MuID> visitLocalGlobalName(UIRParser::LocalGlobalNameContext *context) override {
// Get the id corresponding to this token (ignoring the first character which is a '@')
return get_id(::last_name = context->GLOBAL_NAME()->getText().substr(1, std::string::npos), false);
}
virtual Any<MuID> visitLocalGlobalLocalName(UIRParser::LocalGlobalLocalNameContext *context) override {
// Get the id of the local name corresponding to this token (ignoring the first character which is a '%') converted to a global name
std::string suffix = "."s + context->LOCAL_NAME()->getText().substr(1, std::string::npos);
::last_name = context->GLOBAL_NAME() ? suffix : ::parent_names.top() + "."s + suffix;
if (symbols.count(::last_name = ::parent_names.top() + suffix))
return get_id(::last_name, false);
else // Not previously defined, must refer to a global entity
return get_id(::last_name = ::bundle_name + suffix, true);
}
virtual Any<MuID> visitTopLevelName(UIRParser::TopLevelNameContext *context) override {
// References a top level entity, interpret as a global name
if (context->NAME())
return get_id(::last_name = context->NAME()->getText(), true);
else
return accept<MuID>(context->children[0]);
}
if (symbols.count(::last_name) != 0)
return get_id(::last_name, false);
// Must be a global name
::last_name = context->LOCAL_NAME() ? ::bundle_name + "."s + suffix : suffix;
return get_id(::last_name, true);
}
virtual Any<MuWPID> visitWpid(UIRParser::WpidContext *context) override {
// MuWPID is an alias for uint32_t and 'unsigned long' is required to be at least 32 bits
......@@ -1209,7 +1189,8 @@ namespace C
return "MU_ARMW_"s + context->getText();
}
virtual Any<MuCommInst> visitCommInst(UIRParser::CommInstContext *context) override {
std::string op = context->GLOBAL_NAME()->getText().substr(1, std::string::npos);
std::string op = context->NAME() ? context->NAME()->getText()
: context->GLOBAL_NAME()->getText().substr(1, std::string::npos);
// Use the following regex on the MU_CI... definition section in muapi.h to generate this code:
// search #[^ ]* ([A-Z_0-9]*)[^@]*@([a-z0-9.-_]*)
// replace : op == "$2" ? "$1"s
......@@ -1348,9 +1329,10 @@ namespace C
// ******************************* Trivials, mearly accept ther child *****************************
virtual Any<MuFuncNode> visitFunc(UIRParser::FuncContext *context) override { return accept<MuID>(context->nam); }
virtual Any<MuGlobalVarNode> visitGlobalVar(UIRParser::GlobalVarContext *context) override { return accept<MuID>(context->nam); }
virtual Any<MuBBNode> visitBb(UIRParser::BbContext *context) override { return accept<MuID>(context->name()); }
virtual Any<MuBBNode> visitBb(UIRParser::BbContext *context) override { return accept<MuID>(context->nam); }
virtual Any<MuID> visitInstResult(UIRParser::InstResultContext *context) override { return accept<MuID>(context->result); }
virtual Any<MuFlag> visitFlag(UIRParser::FlagContext *context) override { return context->callConv() ? accept<MuCallConv>(context->callConv()) : accept<MuBinOpStatus>(context->binopStatus()); }
virtual Any<MuVarNode> visitValue(UIRParser::ValueContext *context) override { return context->nam ? accept<MuID>(context->nam) : accept<MuConstNode>(context->constant()); }
};
}
......
......@@ -52,9 +52,15 @@ the name can be changed again with another `.bundle` directive. Muc will automat
* Top level declarations with a global name starting with an '_' are not passed to the whitelist of make bootimage (such as names local to unamed bundles)
* You may ommit the `@` or `%` in front of names, where the name `foo` is interpreted according to the following rules:
* if the name could be interpreted as a keyword/part of the syntax, it is (e.g. `.global v <void>` creates a new anonymous type with value `void`, it does not refer to `@void`)
* if the name is used for a 'value' (an operand of an instruction) and `%foo` was declared, then it is interpreted as `%foo`
* if it is used where the name of a top-level declaration is expected, it is interepreted as `@foo`
* if the name is used for a 'value' (an operand of an instruction, but not a constant) and `%foo` was declared, then it is interpreted as `%foo`
* if it is used where the name of a top-level declaration is expected (such as a constant), it is interepreted as `@foo`
* otherwise it is interpereted as `%foo`
* A local name `%foo` is interpreted according to the following rules (a superset of those in the mu-spec)
* if the name is used for a 'value' and `@block.foo` was previously declared, then it is interpreted as that
* if the name is used for a function version name it is interpreted as `@function.foo`
* if it is used as the name of a basic block (in either a defintion or a destination clause) it is interpreted as `@function_version.foo`
* if it is used as the name of an instruction or result of an instruction, it is interpreted as `@block.foo`
* otherwise it is interpreted as `@bundle.foo`
Notes:
A new declaration will be generated for each unique inline declaration. In addition, they will not be passed to the white list of boot images.
......@@ -70,6 +76,10 @@ Declares 2 types `@int32` and an anonymous `int<32>`.
## Limitations
Muc will only check for correct syntax, it is up to you to ensure your input is semantically valid.
There is a bug in Zebu in that it will not allow you to reference entities declared in another bundle, to overcome this
combine your bundles into 1, e.g. `./muc -r <(cat bundle1.uir bundle2.uir) out`, unfortunently this will change the behaviour
of how local top level names are interpret, unless you put `.bundle` directives at the start of each bundle file.
The file mu-fastimpl.h was taken from 'mu/mu-impl-fast' (master branch) and muapi.h from 'mu/mu-spec' they are kept up to date on each commit of mu-tool-compiler.
If they are changed (or Zebu's behaviour or the spec changes with respect to hem), muc may not work correctly.
......@@ -80,5 +90,5 @@ In all other cases (except for referencing the result of an instruction or a blo
When using `-c`, float and double inline constants will be be considered unique (for the purposes of generating inline declarations) if there text is unique, e.g:
`%a = FADD <float> <float>1.1f <float>1.10f` will generate two constants, whereas when using `-r` it will only generate one (since 1.1 = 1.10).
Inline declarations will call `gen_sym` with names of the form `@__#` where '#' is a number, this is due to a limitation in Zebu (and possibly the mu-spec) were all top-level declarations
must have names. Bundle names will be generated in the form `@__bundle_#`. (so to be safe never write global names starting with a `__` in your input files).
\ No newline at end of file
Inline declarations will call `gen_sym` with names of the form `@__#` where '#' is a number, this is due to a bug in Zebu were all top-level declarations
must have names. In addition bundle names will be generated in the form `@__bundle_#`. (so to be safe never write global names starting with a `__` in your input files).
\ No newline at end of file
......@@ -56,11 +56,6 @@ namespace Runtime
}
} else {
id = symbols[name];
if (global && globals.count(name) == 0) {
globals[name] = id;
if (name[0] != '_')
whitelist.push_back(id);
}
}
if (name == primordial_name)
......@@ -895,7 +890,7 @@ namespace Runtime
/***************** Used by instructions **********************/
virtual Any<MuID> visitInstName(UIRParser::InstNameContext *context) override {
return context->name() ? accept<MuID>(context->name()) : irbuilder->gen_sym(irbuilder, nullptr);
return context->nam ? accept<MuID>(context->nam) : irbuilder->gen_sym(irbuilder, nullptr);
}
virtual Any<std::vector<MuID>> visitInstResults(UIRParser::InstResultsContext *context) override {
return accept_list<MuVarNode>(context->results);
......@@ -994,10 +989,7 @@ namespace Runtime
}
}
virtual Any<MuConstNode> visitConstant(UIRParser::ConstantContext *context) override {
if (context->NAME())
// Must refer to a constant (so the name references a global entity)
return (MuConstNode)get_id(::last_name = context->NAME()->getText(), true);
else if (context->nam)
if (context->nam)
return (MuConstNode)accept<MuID>(context->nam);
else {
MuID old_type = current_type;
......@@ -1015,55 +1007,40 @@ namespace Runtime
// ******************************* TERMINALS *****************************
// Names
virtual Any<MuVarNode> visitValue(UIRParser::ValueContext *context) override {
if (context->NAME()) {
// If theres a previous local name with this name
if (symbols.count(::last_name = ::parent_names.top() + "."s + context->NAME()->getText()))
return (MuVarNode)get_id(::last_name, false);
else // Must reference a global
return (MuVarNode)get_id(::last_name = context->NAME()->getText(), true);
}
else return (MuVarNode)accept<MuID>(context->children[0]);
}
virtual Any<MuID> visitGlobalName(UIRParser::GlobalNameContext *context) override {
// References a top level entity, interpret as a global name
if (context->NAME())
return get_id(::last_name = context->NAME()->getText(), true);
else if (context->LOCAL_NAME())
return get_id(::last_name = ::bundle_name + "."s + context->LOCAL_NAME()->getText().substr(1, std::string::npos), true);
else // if (context->GLOBAL_NAME())
return get_id(::last_name = context->GLOBAL_NAME()->getText().substr(1, std::string::npos), true);
}
virtual Any<MuID> visitLocalName(UIRParser::LocalNameContext *context) override {
if (context->NAME()) // Interpret as a local name
return get_id(::last_name = ::parent_names.top() + "."s + context->NAME()->getText(), false);
else if (context->LOCAL_NAME())
return get_id(::last_name = ::parent_names.top() + "."s + context->LOCAL_NAME()->getText().substr(1, std::string::npos), false);
else // if (context->GLOBAL_NAME())
return get_id(::last_name = context->GLOBAL_NAME()->getText().substr(1, std::string::npos), false);
}
virtual Any<MuID> visitName(UIRParser::NameContext *context) override {
if (context->NAME()) // Interpret as a local name
return get_id(::last_name = ::parent_names.top() + "."s + context->NAME()->getText(), true);
else return accept<MuID>(context->children[0]);
}
virtual Any<MuID> visitGlobalName(UIRParser::GlobalNameContext *context) override {
// Get the id corresponding to this token (ignoring the first character which is a '@')
return get_id(::last_name = context->GLOBAL_NAME()->getText().substr(1, std::string::npos), true);
}
virtual Any<MuID> visitGlobalLocalName(UIRParser::GlobalLocalNameContext *context) override {
// Get the id corresponding to this token (ignoring the first character which is a '@')
return get_id(::last_name = ::bundle_name + "."s + context->LOCAL_NAME()->getText().substr(1, std::string::npos), true);
}
virtual Any<MuID> visitLocalName(UIRParser::LocalNameContext *context) override {
// Get the id of the local name corresponding to this token (ignoring the first character which is a '%') converted to a global name
return get_id(::last_name = ::parent_names.top() + "."s + context->LOCAL_NAME()->getText().substr(1, std::string::npos), false);
}
virtual Any<MuID> visitLocalGlobalName(UIRParser::LocalGlobalNameContext *context) override {
// Get the id corresponding to this token (ignoring the first character which is a '@')
return get_id(::last_name = context->GLOBAL_NAME()->getText().substr(1, std::string::npos), false);
}
// Interpret as a local name if previously defined, otherwise global
virtual Any<MuID> visitLocalGlobalLocalName(UIRParser::LocalGlobalLocalNameContext *context) override {
// Get the id of the local name corresponding to this token (ignoring the first character which is a '%') converted to a global name
std::string suffix = "."s + context->LOCAL_NAME()->getText().substr(1, std::string::npos);
std::string suffix =
context->NAME() ? context->NAME()->getText()
: context->LOCAL_NAME() ? context->LOCAL_NAME()->getText().substr(1, std::string::npos)
: context->GLOBAL_NAME()->getText().substr(1, std::string::npos);
if (symbols.count(::last_name = ::parent_names.top() + suffix))
return get_id(::last_name, false);
else // Not previously defined, must refer to a global entity
return get_id(::last_name = ::bundle_name + suffix, true);
::last_name = context->GLOBAL_NAME() ? suffix : ::parent_names.top() + "."s + suffix;
}
virtual Any<MuID> visitTopLevelName(UIRParser::TopLevelNameContext *context) override {
// References a top level entity, interpret as a global name
if (context->NAME())
return get_id(::last_name = context->NAME()->getText(), true);
else
return accept<MuID>(context->children[0]);
if (symbols.count(::last_name) != 0)
return get_id(::last_name, false);
// Must be a global name
::last_name = context->LOCAL_NAME() ? ::bundle_name + "."s + suffix : suffix;
return get_id(::last_name, true);
}
// Literals
......@@ -1225,7 +1202,8 @@ namespace Runtime
: MU_ARMW_UMIN;
}
virtual Any<MuCommInst> visitCommInst(UIRParser::CommInstContext *context) override {
std::string op = context->GLOBAL_NAME()->getText().substr(1, std::string::npos);
std::string op = context->NAME() ? context->NAME()->getText()
: context->GLOBAL_NAME()->getText().substr(1, std::string::npos);
// Use the following regex on the MU_CI... definition section in muapi.h to generate this code:
// search #[^ ]* ([A-Z_0-9]*)[^@]*@([a-z0-9.-_]*)
// replace : op == "$2" ? $1
......@@ -1364,9 +1342,10 @@ namespace Runtime
// ******************************* Trivials, mearly accept ther child *****************************
virtual Any<MuFuncNode> visitFunc(UIRParser::FuncContext *context) override { return (MuFuncNode)accept<MuID>(context->nam); }
virtual Any<MuGlobalVarNode> visitGlobalVar(UIRParser::GlobalVarContext *context) override { return (MuGlobalVarNode)accept<MuID>(context->nam); }
virtual Any<MuBBNode> visitBb(UIRParser::BbContext *context) override { return (MuBBNode)accept<MuID>(context->name()); }
virtual Any<MuBBNode> visitBb(UIRParser::BbContext *context) override { return (MuBBNode)accept<MuID>(context->nam); }
virtual Any<MuID> visitInstResult(UIRParser::InstResultContext *context) override { return accept<MuID>(context->result); }
virtual Any<MuFlag> visitFlag(UIRParser::FlagContext *context) override { return context->callConv() ? (MuFlag)accept<MuCallConv>(context->callConv()) : (MuFlag)accept<MuBinOpStatus>(context->binopStatus()); }
virtual Any<MuVarNode> visitValue(UIRParser::ValueContext *context) override { return context->nam ? (MuVarNode)accept<MuID>(context->nam) : (MuVarNode)accept<MuConstNode>(context->constant()); }
};
}
......
......@@ -8,15 +8,15 @@ ir
topLevelDef
: '.bundle' (NAME | GLOBAL_NAME) # BundleDef
| '.typedef' nam=topLevelName '=' ctor=typeConstructor # TypeDef
| '.funcsig' nam=topLevelName '=' ctor=funcSigConstructor # FuncSigDef
| '.const' nam=topLevelName '<' ty=type '>' '=' ctor=constConstructor # ConstDef
| '.global' nam=topLevelName '<' ty=type '>' # GlobalDef
| '.typedef' nam=globalName '=' ctor=typeConstructor # TypeDef
| '.funcsig' nam=globalName '=' ctor=funcSigConstructor # FuncSigDef
| '.const' nam=globalName '<' ty=type '>' '=' ctor=constConstructor # ConstDef
| '.global' nam=globalName '<' ty=type '>' # GlobalDef
| '.funcdecl' nam=func '<' sig=funcSig '>' # FuncDecl
| '.expose' nam=topLevelName '=' func callConv cookie=constant # FuncExpDef
| '.expose' nam=globalName '=' func callConv cookie=constant # FuncExpDef
| '.funcdef' nam=func
(('<' sig=funcSig '>' ('VERSION' ver=name)?) |
('VERSION' ver=name ('<' sig=funcSig '>')?))? '{' body+=basicBlock+ '}' # FuncDef
(('<' sig=funcSig '>' ('VERSION' ver=localName)?) |
('VERSION' ver=localName ('<' sig=funcSig '>')?))? '{' body+=basicBlock+ '}' # FuncDef
;
typeConstructor
: 'int' '<' length=intParam '>' # TypeInt
......@@ -54,52 +54,56 @@ constConstructor
;
type
: nam=topLevelName
: nam=globalName
| typeConstructor
;
funcSig
: nam=topLevelName
funcSig
: nam=globalName
| funcSigConstructor
;
value
: nam=name
| constant
;
constant
: NAME
| nam=name
: nam=globalName
| '<' ty=type '>' constConstructor
;
func
: nam=topLevelName
: nam=globalName
;
globalVar
: nam=topLevelName
: nam=globalName
;
basicBlock
: nam=name '(' ('<' param_tys+=type '>' params+=name)* ')' ('[' exc=name ']')? ':' inst+
: nam=localName '(' ('<' param_tys+=type '>' params+=localName)* ')' ('[' exc=localName ']')? ':' inst+
;
instName
: ('[' nam=name ']')?
instName
: ('[' nam=localName ']')?
;
instResult
: result=name '='
: result=localName '='
;
instResults
: results+=name '='
| '(' results+=name* ')' '='
: results+=localName '='
| '(' results+=localName* ')' '='
|
;
pairResult
:'(' first=name second=name ')' '='
:'(' first=localName second=localName ')' '='
;
pairResults
: first=name '='
|'(' first=name second+=name+ ')' '='
: first=localName '='
|'(' first=localName second+=localName+ ')' '='
;
inst
......@@ -153,15 +157,9 @@ destClause
;
bb
: nam=name
: nam=localName
;
value
: NAME
| nam=localGlobalLocalName
| constant
;
typeList
: '<' tys+=type* '>'
;
......@@ -256,24 +254,25 @@ stringLiteral
: STRING_LITERAL
;
topLevelName
globalName // References a global (i.e. top level localName)
: NAME
| LOCAL_NAME
| GLOBAL_NAME
;
localName
: NAME
| globalLocalName
| globalName
| GLOBAL_NAME
| LOCAL_NAME
;
name
: NAME
| localGlobalName
| localName
| GLOBAL_NAME
| LOCAL_NAME
;
commInst: GLOBAL_NAME;
globalName : GLOBAL_NAME;
localName : LOCAL_NAME;
localGlobalLocalName: LOCAL_NAME; // A name that refers to a local entity if it's already defined, otherwise a global entity
globalLocalName: LOCAL_NAME; // A global name in local form
localGlobalName : GLOBAL_NAME; // A Local name in global form
commInst: NAME | GLOBAL_NAME;
// LEXER
INT_DEC
......
......@@ -4,6 +4,8 @@
#include <map>
#include <string>
#include <set>
#include <stack>
#include <vector>
#include <utility>
#include <exception>
#include <memory>
......
......@@ -37,6 +37,23 @@ int show_usage() {
}
int main(int argc, char* argv[]) {
if (argc > 1 && argv[1] == "-t"s) {
while (true) {
std::string str, find, replace;
std::cout << "Input: ";
std::cin >> str;
std::cout << "Find: ";
std::cin >> find;
std::cout << "Replace: ";
std::cin >> replace;
find_and_replace(str, find, replace);
std::cout << "Result: " << std::endl;
}
return 0;
}
if (argc < 4)
return show_usage();
......@@ -125,8 +142,8 @@ int main(int argc, char* argv[]) {
<< "#include \"muapi.h\"" << std::endl
<< "#include \"mu-fastimpl.h\"" << std::endl
<< std::endl
<< "#define G(id, ...) muid_ ## id" << std::endl
<< "#define L(id, ...) muid_ ## id" << std::endl
<< "#define G(id, ...) global_ ## id" << std::endl
<< "#define L(id, ...) local_ ## id" << std::endl
<< std::endl;
// Function header
......
......@@ -163,6 +163,10 @@ public:
return visitChildren(ctx);
}
virtual antlrcpp::Any visitValue(UIRParser::ValueContext *ctx) override {
return visitChildren(ctx);
}
virtual antlrcpp::Any visitConstant(UIRParser::ConstantContext *ctx) override {
return visitChildren(ctx);
}
......@@ -363,10 +367,6 @@ public:
return visitChildren(ctx);
}
virtual antlrcpp::Any visitValue(UIRParser::ValueContext *ctx) override {
return visitChildren(ctx);
}
virtual antlrcpp::Any visitTypeList(UIRParser::TypeListContext *ctx) override {
return visitChildren(ctx);
}
......@@ -483,18 +483,6 @@ public:
return visitChildren(ctx);
}
virtual antlrcpp::Any visitTopLevelName(UIRParser::TopLevelNameContext *ctx) override {
return visitChildren(ctx);
}
virtual antlrcpp::Any visitName(UIRParser::NameContext *ctx) override {
return visitChildren(ctx);
}
virtual antlrcpp::Any visitCommInst(UIRParser::CommInstContext *ctx) override {
return visitChildren(ctx);
}
virtual antlrcpp::Any visitGlobalName(UIRParser::GlobalNameContext *ctx) override {
return visitChildren(ctx);
}
......@@ -503,15 +491,11 @@ public:
return visitChildren(ctx);
}
virtual antlrcpp::Any visitLocalGlobalLocalName(UIRParser::LocalGlobalLocalNameContext *ctx) override {
return visitChildren(ctx);
}
virtual antlrcpp::Any visitGlobalLocalName(UIRParser::GlobalLocalNameContext *ctx) override {
virtual antlrcpp::Any visitName(UIRParser::NameContext *ctx) override {
return visitChildren(ctx);
}
virtual antlrcpp::Any visitLocalGlobalName(UIRParser::LocalGlobalNameContext *ctx) override {
virtual antlrcpp::Any visitCommInst(UIRParser::CommInstContext *ctx) override {
return visitChildren(ctx);
}
......
This diff is collapsed.
This diff is collapsed.
......@@ -93,6 +93,8 @@ public:
virtual antlrcpp::Any visitFuncSig(UIRParser::FuncSigContext *context) = 0;
virtual antlrcpp::Any visitValue(UIRParser::ValueContext *context) = 0;
virtual antlrcpp::Any visitConstant(UIRParser::ConstantContext *context) = 0;
virtual antlrcpp::Any visitFunc(UIRParser::FuncContext *context) = 0;
......@@ -193,8 +195,6 @@ public:
virtual antlrcpp::Any visitBb(UIRParser::BbContext *context) = 0;
virtual antlrcpp::Any visitValue(UIRParser::ValueContext *context) = 0;
virtual antlrcpp::Any visitTypeList(UIRParser::TypeListContext *context) = 0;
virtual antlrcpp::Any visitExcClause(UIRParser::ExcClauseContext *context) = 0;
......@@ -253,21 +253,13 @@ public:
virtual antlrcpp::Any visitStringLiteral(UIRParser::StringLiteralContext *context) = 0;
virtual antlrcpp::Any visitTopLevelName(UIRParser::TopLevelNameContext *context) = 0;
virtual antlrcpp::Any visitName(UIRParser::NameContext *context) = 0;
virtual antlrcpp::Any visitCommInst(UIRParser::CommInstContext *context) = 0;
virtual antlrcpp::Any visitGlobalName(UIRParser::GlobalNameContext *context) = 0;
virtual antlrcpp::Any visitLocalName(UIRParser::LocalNameContext *context) = 0;
virtual antlrcpp::Any visitLocalGlobalLocalName(UIRParser::LocalGlobalLocalNameContext *context) = 0;
virtual antlrcpp::Any visitGlobalLocalName(UIRParser::GlobalLocalNameContext *context) = 0;
virtual antlrcpp::Any visitName(UIRParser::NameContext *context) = 0;
virtual antlrcpp::Any visitLocalGlobalName(UIRParser::LocalGlobalNameContext *context) = 0;
virtual antlrcpp::Any visitCommInst(UIRParser::CommInstContext *context) = 0;
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment