summaryrefslogtreecommitdiff
path: root/modules/gdscript/gd_parser.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2016-03-01 18:09:48 +0100
committerRémi Verschelde <rverschelde@gmail.com>2016-03-01 18:09:48 +0100
commit002ff3cc9a6479695034b556f15ef4d9fa4bc6fe (patch)
treef1423d79df9873e7601d1c765310d961f9173f60 /modules/gdscript/gd_parser.cpp
parent46bfcd350745d3053a0cab2985d73baae0a4a88d (diff)
Revert "Merge pull request #3814 from est31/iterators_for_for"
This reverts commit adf50568890cefb5fc354dbc1b21c4140bb410f9, reversing changes made to ee2bc87c0ef3cc1a432655ff935e60f32977904d.
Diffstat (limited to 'modules/gdscript/gd_parser.cpp')
-rw-r--r--modules/gdscript/gd_parser.cpp14
1 files changed, 0 insertions, 14 deletions
diff --git a/modules/gdscript/gd_parser.cpp b/modules/gdscript/gd_parser.cpp
index 4b0164d8a2..4f572b7b6e 100644
--- a/modules/gdscript/gd_parser.cpp
+++ b/modules/gdscript/gd_parser.cpp
@@ -1779,20 +1779,6 @@ void GDParser::_parse_block(BlockNode *p_block,bool p_static) {
return;
}
- // Little optimisation for common usage "for i in range(...):":
- // don't create and initialize a possibly huge array as range()
- // would do, but instead create an iterator using xrange()
- if (container->type == Node::TYPE_OPERATOR) {
- OperatorNode *op = static_cast<OperatorNode *>(container);
- if (op->arguments.size() > 0 &&
- op->arguments[0]->type == Node::TYPE_BUILT_IN_FUNCTION) {
- BuiltInFunctionNode *c = static_cast<BuiltInFunctionNode *>(op->arguments[0]);
- if (c->function == GDFunctions::GEN_RANGE) {
- c->function = GDFunctions::GEN_XRANGE;
- }
- }
- }
-
ControlFlowNode *cf_for = alloc_node<ControlFlowNode>();
cf_for->cf_type=ControlFlowNode::CF_FOR;