Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
godot
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
community
godot
Commits
b64f9f03
Unverified
Commit
b64f9f03
authored
Mar 14, 2019
by
Bojidar Marinov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix duplicated lines in GDScript bytecode
Fixes #26789
parent
775e74e0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
7 deletions
+4
-7
test_gdscript.cpp
main/tests/test_gdscript.cpp
+1
-1
gdscript_compiler.cpp
modules/gdscript/gdscript_compiler.cpp
+0
-5
gdscript_parser.cpp
modules/gdscript/gdscript_parser.cpp
+3
-1
No files found.
main/tests/test_gdscript.cpp
View file @
b64f9f03
...
...
@@ -563,7 +563,7 @@ static void _disassemble_class(const Ref<GDScript> &p_class, const Vector<String
case
GDScriptFunction
:
:
OPCODE_OPERATOR
:
{
int
op
=
code
[
ip
+
1
];
txt
+=
"op "
;
txt
+=
"
op "
;
String
opname
=
Variant
::
get_operator_name
(
Variant
::
Operator
(
op
));
...
...
modules/gdscript/gdscript_compiler.cpp
View file @
b64f9f03
...
...
@@ -1396,11 +1396,6 @@ Error GDScriptCompiler::_parse_block(CodeGen &codegen, const GDScriptParser::Blo
case
GDScriptParser
:
:
ControlFlowNode
::
CF_IF
:
{
#ifdef DEBUG_ENABLED
codegen
.
opcodes
.
push_back
(
GDScriptFunction
::
OPCODE_LINE
);
codegen
.
opcodes
.
push_back
(
cf
->
line
);
codegen
.
current_line
=
cf
->
line
;
#endif
int
ret2
=
_parse_expression
(
codegen
,
cf
->
arguments
[
0
],
p_stack_level
,
false
);
if
(
ret2
<
0
)
return
ERR_PARSE_ERROR
;
...
...
modules/gdscript/gdscript_parser.cpp
View file @
b64f9f03
...
...
@@ -2741,6 +2741,8 @@ void GDScriptParser::_parse_block(BlockNode *p_block, bool p_static) {
}
break
;
case
GDScriptTokenizer
:
:
TK_NEWLINE
:
{
int
line
=
tokenizer
->
get_token_line
();
if
(
!
_parse_newline
())
{
if
(
!
error_set
)
{
p_block
->
end_line
=
tokenizer
->
get_token_line
();
...
...
@@ -2750,7 +2752,7 @@ void GDScriptParser::_parse_block(BlockNode *p_block, bool p_static) {
}
NewLineNode
*
nl2
=
alloc_node
<
NewLineNode
>
();
nl2
->
line
=
tokenizer
->
get_token_line
()
;
nl2
->
line
=
line
;
p_block
->
statements
.
push_back
(
nl2
);
}
break
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment