diff options
author | jonyrock <ilms@live.ru> | 2014-05-01 20:15:28 +0400 |
---|---|---|
committer | jonyrock <ilms@live.ru> | 2014-05-01 20:15:28 +0400 |
commit | 209eaf6fa06eba8a05e5222bdab418cd0f20c91c (patch) | |
tree | 94eac56be6ad254a7c09e13d5e14bd843626232c /modules/gdscript/gd_compiler.cpp | |
parent | 34aea718b11e105d30c938ad34e474b1bd8b5d63 (diff) | |
parent | 6572d5128856b2ec55a2c417c92e584899f4906f (diff) |
Merge remote-tracking branch 'upstream/master' into pair_symbols_tool
Diffstat (limited to 'modules/gdscript/gd_compiler.cpp')
-rw-r--r-- | modules/gdscript/gd_compiler.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/gdscript/gd_compiler.cpp b/modules/gdscript/gd_compiler.cpp index dd2834bf34..90c83c201b 100644 --- a/modules/gdscript/gd_compiler.cpp +++ b/modules/gdscript/gd_compiler.cpp @@ -452,6 +452,7 @@ int GDCompiler::_parse_expression(CodeGen& codegen,const GDParser::Node *p_expre const GDParser::Node *instance = on->arguments[0]; + bool in_static=false; if (instance->type==GDParser::Node::TYPE_SELF) { //room for optimization @@ -465,7 +466,10 @@ int GDCompiler::_parse_expression(CodeGen& codegen,const GDParser::Node *p_expre int ret; - if (i==1) { + if (i==0 && on->arguments[i]->type==GDParser::Node::TYPE_SELF && codegen.function_node && codegen.function_node->_static) { + //static call to self + ret=(GDFunction::ADDR_TYPE_CLASS<<GDFunction::ADDR_BITS); + } else if (i==1) { if (on->arguments[i]->type!=GDParser::Node::TYPE_IDENTIFIER) { _set_error("Attempt to call a non-identifier.",on); @@ -475,6 +479,7 @@ int GDCompiler::_parse_expression(CodeGen& codegen,const GDParser::Node *p_expre ret=codegen.get_name_map_pos(id->name); } else { + ret = _parse_expression(codegen,on->arguments[i],slevel); if (ret<0) return ret; |