summaryrefslogtreecommitdiff
path: root/modules/gdscript/gdscript_compiler.cpp
AgeCommit message (Collapse)Author
2019-09-20Merge pull request #32150 from luzpaz/typosRémi Verschelde
Fix misc. source comment typos
2019-09-19Fix misc. source comment typosluz.paz
Found using `codespell -q 3 -S ./thirdparty,*.po -L ang,ba,cas,dof,doubleclick,fave,hist,leapyear,lod,nd,numer,ois,paket,seeked,sinc,switchs,te,uint -D ~/Projects/codespell/codespell_lib/data/dictionary.txt `
2019-09-11GDScript: add an optional message parameter to assert()Mitch Curtis
Before this patch, assert() only took the condition to assert on: assert(item_data) Now, it can optionally take a string that will be printed upon failure: assert(item_data, item_name + " has no item data in ItemDatabase") This makes it easier to immediately see what the issue is by being able to write informative failure messages. Thanks to @wiped1 for sharing their patch, upon which this is based. Closes #17082
2019-08-09Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in "platform", ↵Robin Hübner
"modules/gdnative", "modules/gdscript" directories.
2019-07-01Remove unnecessary code and add some error explanationsqarmin
2019-06-26Some code changed with Clang-Tidyqarmin
2019-06-02Fix GDSCript inner classes be freed after compilegeequlim
2019-04-10Fix `as` operator generating opcode 38 errorsBojidar Marinov
Closes #27489 Fixup of 466a76ac2c7c6634ed1d78fde4ac011e2e70b710 Additionally, update `GDScriptCompiler` test to use Ref and to include `as` expressions.
2019-03-27Merge pull request #27128 from bojidar-bg/27111-gdscript-confounding-classRémi Verschelde
Fix GDScriptCompiler bugging out with identically-named inner class
2019-03-16Fix GDScriptCompiler bugging out with identically-named inner classBojidar Marinov
Fixes #27111
2019-03-14Fix duplicated lines in GDScript bytecodeBojidar Marinov
Fixes #26789
2019-02-20Add -Wshadow=local to warnings and fix reported issues.marxin
Fixes #25316.
2019-02-20GDScript: Remove unused `switch`, `case` and `do` CF keywordsRémi Verschelde
They had been reserved for future implementation, but we now have the `match` CF keyword which does the same and more. According to @reduz `do` was even added by mistake when copying from the shader language parser, it was never intended to add support for `do`... `while` loops, as the syntax would be awkward in GDScript, and the added sugar is not worth it. Fixes #25787.
2019-01-17GDScript compiler: check if subclass exists before comparisonGeorge Marques
Otherwise these checks might trigger the insertion of an empty value, leading to crashes.
2019-01-01Update copyright statements to 2019Rémi Verschelde
Happy new year to the wonderful Godot community!
2018-11-28Fix many errors found by PVS-StudioAaron Franke
Fix errors 2, 3, 4, 6, 8, 9, 11, 12, 13, 14, and 15.
2018-11-24Revert "Fix crash on signal/resume to dangling target"Pedro J. Estébanez
This reverts commit 54bdc1e1f6a7fb85a5b193c9b8ecf0dcf06949e6.
2018-10-17Fix crash on signal/resume to dangling targetPedro J. Estébanez
Fixes #22443.
2018-09-19GDScript: Fix stack address test in compilerGeorge Marques
2018-09-12Misc. typosluz.paz
Found via `codespell -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"`
2018-08-27Merge pull request #21449 from vnen/gdscript-builtin-isRémi Verschelde
Allow `is` operator to test built-in types
2018-08-26GDScript: Allow `is` operator to test built-in typesGeorge Marques
2018-08-26Fixes several resource leaks in ...Crazy-P
- gdscript - gdscript_compiler - regex - android/export - gles3/rasterizer (scene and storage)
2018-08-24Make some debug prints verbose-only, remove othersRémi Verschelde
2018-08-21GDSCript: Fix cyclic class dependency detectionGeorge Marques
2018-07-25GDScript: Fix main script detectionGeorge Marques
2018-07-26Reduce unnecessary COW on Vector by make writing explicitHein-Pieter van Braam
This commit makes operator[] on Vector const and adds a write proxy to it. From now on writes to Vectors need to happen through the .write proxy. So for instance: Vector<int> vec; vec.push_back(10); std::cout << vec[0] << std::endl; vec.write[0] = 20; Failing to use the .write proxy will cause a compilation error. In addition COWable datatypes can now embed a CowData pointer to their data. This means that String, CharString, and VMap no longer use or derive from Vector. _ALWAYS_INLINE_ and _FORCE_INLINE_ are now equivalent for debug and non-debug builds. This is a lot faster for Vector in the editor and while running tests. The reason why this difference used to exist is because force-inlined methods used to give a bad debugging experience. After extensive testing with modern compilers this is no longer the case.
2018-07-20Use type information to enable GDScript introspectionGeorge Marques
This makes the Script API provide accurate information when requesting property or method info.
2018-07-20Add typed instructions to GDScriptGeorge Marques
- Typed assignment (built-in, native, and script). - Cast (built-in conversion; native and script checks). - Check type of functions arguments on call. - Check type of members on set.
2018-07-20Add static type checks in the parserGeorge Marques
- Resolve types for all identifiers. - Error when identifier is not found. - Match return type and error when not returning a value when it should. - Check unreachable code (code after sure return). - Match argument count and types for function calls. - Determine if return type of function call matches the assignment. - Do static type check with match statement when possible. - Use type hints to determine export type. - Check compatibility between type hint and explicit export type.
2018-07-20Move inheritance resolution to the parserGeorge Marques
2018-07-20Add typing syntaxGeorge Marques
2018-07-18Style: Format code with clang-format 6.0.1Rémi Verschelde
2018-07-15Global class names (and GDScript support for it)Juan Linietsky
2018-06-18Fix onready vars / vars accessing class members if _ready / _init not presentMarcin Zawiejski
2018-05-23Fix positive operator in GDScript compilerGeorge Marques
2018-05-01Enable autoload in editorGeorge Marques
- Tool scripts will be executed and can be accessed by plugins. - Other script languages can implement add/remove_named_global_constant to make use of this functionality.
2018-02-21Fix typos with codespellluz.paz
Found via `codespell -q 3 --skip="./thirdparty,./editor/translations" -I ../godot-word-whitelist.txt` Whitelist consists of: ``` ang doubleclick lod nd que te unselect ```
2018-01-20Allow shadowing class members with local variables in GDScript, closes #15896Juan Linietsky
2018-01-05Add missing copyright headers and fix formattingRémi Verschelde
Using `misc/scripts/fix_headers.py` on all Godot files. Some missing header guards were added, and the header inclusion order was fixed in the Bullet module.
2018-01-01Update copyright statements to 2018Rémi Verschelde
Happy new year to the wonderful Godot community!
2017-12-07Style: Apply new clang-format 5.0 style to all filesRémi Verschelde
2017-11-20Allow to extends constant variablesanikoyes
2017-11-16GDScript: Refactor "GD" class prefix to "GDScript"Rémi Verschelde