summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript_function.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix invalid comparison warnings: [-Wbool-compare] and [-Wenum-compare]Rémi Verschelde2018-09-271-1/+1
| | | | | | | | | | | | | Fixes the following GCC 5 warnings and actual bugs: ``` drivers/unix/net_socket_posix.cpp:562:28: warning: comparison between 'enum IP::Type' and 'enum NetSocket::Type' [-Wenum-compare] modules/gdscript/gdscript_function.cpp:792:26: warning: comparison of constant '17' with boolean expression is always true [-Wbool-compare] modules/gdscript/gdscript_function.cpp:792:26: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses] modules/gdscript/gdscript_parser.cpp:5082:58: warning: comparison of constant '6' with boolean expression is always false [-Wbool-compare] modules/gdscript/gdscript_parser.cpp:5082:58: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses] modules/mbedtls/stream_peer_mbed_tls.cpp:286:45: warning: comparison between 'enum StreamPeerTCP::Status' and 'enum StreamPeerSSL::Status' [-Wenum-compare] modules/mbedtls/stream_peer_mbed_tls.cpp:313:45: warning: comparison between 'enum StreamPeerTCP::Status' and 'enum StreamPeerSSL::Status' [-Wenum-compare] ```
* Make core/ includes absolute, remove subfolders from include pathRémi Verschelde2018-09-121-1/+1
| | | | | | This allows more consistency in the manner we include core headers, where previously there would be a mix of absolute, relative and include path-dependent includes.
* GDScript: Allow `is` operator to test built-in typesGeorge Marques2018-08-261-0/+16
|
* GDScript: Fix type detection on Object typed assignGeorge Marques2018-07-251-3/+14
| | | | | Also make typed assigns a debug-only thing, so release builds are more lenient on errors.
* GDScript: Allow strict conversion when assigning typed variablesGeorge Marques2018-07-251-5/+10
|
* GDScript: Fix returned value of get_default_argument_count()George Marques2018-07-251-1/+1
|
* Reduce unnecessary COW on Vector by make writing explicitHein-Pieter van Braam2018-07-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | 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.
* Add typed instructions to GDScriptGeorge Marques2018-07-201-3/+220
| | | | | | | - 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.
* Add static type checks in the parserGeorge Marques2018-07-201-0/+9
| | | | | | | | | | | | - 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.
* Fix memory leak in GDScript during infinnity loops with yieldsYasha Borevich2018-06-281-10/+10
|
* Refactor RPCMode enum and checksFabio Alessandrelli2018-05-291-1/+1
|
* Revert "RPCMode refactor, more sync modes"Max Hilbrunner2018-05-291-1/+1
|
* Refactor RPCMode enum and checksFabio Alessandrelli2018-05-261-1/+1
|
* Merge pull request #18545 from vnen/editor-autoloadJuan Linietsky2018-05-141-0/+15
|\ | | | | Enable autoload in editor
| * Enable autoload in editorGeorge Marques2018-05-011-0/+15
| | | | | | | | | | | | - 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.
* | Fix a crash when trying to run Godot debugger on a release build.Brian Richardson2018-05-011-1/+1
|/ | | | The GDScriptLanguage::enter_function is wrapped in #ifdef DEBUG but the exit_function is not, resulting in a stack underflow error.
* Change ".." punctuation for "..." in editor strings (#16507)Hugo Locurcio2018-04-221-1/+1
|
* completed-signal is emitted by all GDScriptFunctionStates of a coroutine ↵Lars Kokemohr2018-03-141-4/+16
| | | | now, allowing to yield for completion of a function with more than one yield inside.
* Add missing copyright headers and fix formattingRémi Verschelde2018-01-051-0/+1
| | | | | | 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.
* Merge pull request #15089 from poke1024/funcref-warnRémi Verschelde2018-01-031-1/+1
|\ | | | | Warn about funcref creation
| * Warn about funcref creationBernhard Liebl2017-12-261-1/+1
| |
* | Update copyright statements to 2018Rémi Verschelde2018-01-011-2/+2
|/ | | | Happy new year to the wonderful Godot community!
* Cleanup some #if 0'd codeRémi Verschelde2017-12-171-0/+2
|
* Style: Re-apply clang-format over recent invalid additionsRémi Verschelde2017-12-101-2/+2
|
* Fixed is_playing funtion (was reporting wrong), closes #13928Juan Linietsky2017-12-071-2/+2
| | | | Made error reporting to opcode_set in gdscript a bit clearer
* Style: Apply new clang-format 5.0 style to all filesRémi Verschelde2017-12-071-3/+3
|
* GDScript: Refactor "GD" class prefix to "GDScript"Rémi Verschelde2017-11-161-0/+1628