summaryrefslogtreecommitdiff
path: root/Source/Modules/javascript.cxx
Commit message (Collapse)AuthorAgeFilesLines
* try to ninja fix jscMomtchil Momtchev2023-04-261-1/+6
| | | | I don't have access to jsc atm
* take into account numinputs when counting argumentsMomtchil Momtchev2023-04-261-15/+9
|
* [js] Turn on C++ output for node tooOlly Betts2023-04-221-8/+4
| | | | | | | | | Nodejs is like V8 and needs C++ output enabled when wrapping C code. The testsuite was masking this bug by using SWIG options `-v8 -DBUILDING_NODE_EXTENSION=1` rather than `-node` when testing with nodejs, while the javascript examples currently all seem to all get processed with -c++.
* use the renamed name when creating a constantMomtchil Momtchev2023-04-221-2/+1
|
* Consolidate name mangling functionsWilliam S Fulton2022-11-121-1/+1
| | | | | | Swig_string_mangle => Swig_name_mangle_string Swig_name_mangle => Swig_name_mangle_string Swig_string_mangle_type => Swig_name_mangle_type
* Cleanup SWIG_VERSION definitionWilliam S Fulton2022-10-131-2/+2
| | | | | | | | | | | | | Add Swig_obligatory_macros which must be called by each target language to define SWIG_VERSION correctly in the generated code, as well as the language specific macro SWIGXXX where XXX is the target language name. Drop the #ifdef SWIGXXX that was previously generated - I can't see the point of this and if users are defining this macro somehow, then users will need to change this Closes #1050
* Use https for swig.org linksOlly Betts2022-10-061-1/+1
|
* Sort out predefined SWIG-specific macrosOlly Betts2022-10-051-0/+4
| | | | | | | | | | | | | | | | | | | Ensure that SWIG_VERSION is defined both at SWIG-time and in the generated C/C++ wrapper code (it was only defined in the wrapper for some target languages previously). SWIGGO and SWIGJAVASCRIPT are now defined in the generated wrappers to match behaviour for all other target languages. Stop defining SWIGVERSION in the wrapper. This only happened as a side-effect of how SWIG_VERSION was defined but was never documented and is redundant. The new testcase also checks that SWIG is defined at SWIG-time but not in the generated wrapper, and that exactly one of a list of target-language specific macros is defined. Fixes #1050
* Improvements to the -debug command line optionsWilliam S Fulton2022-03-251-5/+0
| | | | | | | | | | | The debug command line options that display parse tree nodes (-debug-module, -debug-top, -debug-symtabs) now display previously hidden linked list pointers which are useful for debugging parse trees. Added new command line option -debug-quiet. This suppresses the display of most linked list pointers and symbol table pointers in the parse tree nodes. The keys in the parse tree node are now shown in alphabetical order.
* Add DOH Exit() and SetExitHandler()Olly Betts2022-03-061-11/+11
| | | | | | | | | | | | | | | | | | | | | Exit() is a wrapper for exit() by default, but SetExitHandler() allows specifying a function to call instead. This means that failures within DOH (e.g. Malloc() failing due to lack of memory) will now perform cleanup such as removing output files. This commit also cleans up exit statuses so SWIG should now reliably exit with status 0 if the run was successful and status 1 if there was an error (or a warning and -Werror was in effect). Previously in some situations SWIG would try to exit with the status set to the number of errors encountered, but that's problematic - for example if there were 256 errors this would result in exit status 0 on most platforms. Also some error statuses have special meanings e.g. those defined by <sysexits.h>. Also SWIG/Javascript tried to exit with status -1 in a few places (which typically results in exit status 255).
* Rename `free` variable to `jsfree`Olly Betts2022-03-031-6/+6
| | | | The collision with free() is a latent problem.
* Merge branch 'using-declarations' into upstream-masterWilliam S Fulton2022-02-201-1/+1
|\ | | | | | | | | | | | | | | | | | | | | * using-declarations: Typo fixes Fix warning suppression for WARN_PARSE_USING_UNDEF Using declarations fix in symbol tables Revert recent using-declarations code changes Conflicts: CHANGES.current
| * Typo fixesWilliam S Fulton2022-02-201-1/+1
| |
* | Remove superfluous semicolonsOlly Betts2022-02-151-3/+3
|/
* Remove redundant NULL checks before free()/delete (#2184)Olly Betts2022-01-291-2/+2
| | | | | | | | | Remove redundant NULL checks before free()/delete The ISO C and C++ standards guarantee that it's safe to call these on a NULL pointer, so it's not necessary for the calling code to also check. Fixes https://sourceforge.net/p/swig/feature-requests/70/
* Fix typosDimitris Apostolou2021-11-171-1/+1
|
* Fix more "allows to" and other typosOlly Betts2021-04-211-1/+1
|
* Apply suggestions from code review William S Fulton2020-10-071-2/+2
| | | Print errors to stderr instead of stdout
* javascript: replace exceptions with SWIG_exitAlistair Delva2020-08-131-2/+4
| | | | | | | | | | When building SWIG for Android, there is no support for C++ exceptions. In the cases there is "Illegal state", it seems more like an internal error, so we can replace the throw calls with a debug print and exit immediately. Closes #1858
* Dev Checkpoint 201908200213Chris Walker2019-08-201-8/+0
|
* Dev Checkpoint 201906252210Chris Walker2019-06-251-5/+10
|
* Add JS Native Wrapper APITekuConcept2019-05-081-0/+29
|
* follow-up typosluz.paz2018-05-171-2/+2
|
* Misc. typosluz.paz2018-05-171-3/+3
| | | found via `codespell` and `grep`
* Javascript %nspace fix in generated C++ codeWilliam S Fulton2018-05-151-10/+11
| | | | | When using %nspace on namespaces that are more than two levels deep. Fixes cpp17_nspace_nested_namespaces testcase.
* Fix %import and %fragment forced inclusion to not generate code.William S Fulton2017-06-031-2/+2
|
* Add support for "ret" typemap where missing and improve documentation on it.William S Fulton2016-09-291-0/+5
|
* Cosmetic corrections - Mac OS XWilliam S Fulton2015-08-021-1/+1
|
* C90 fixes for Javascript JSCWilliam S Fulton2015-02-111-0/+1
|
* Fix function naming conflict with class overloads.Jason Turner2014-06-061-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fix takes into account the classname while generating overload handlers. Example: If you have two classes: class A { public: void doSomething(int); void doSomething(double); }; class B { public: void doSomething(int); void doSomething(double); }; Before this patch, the overload handlers for A::doSomething and B::doSomething create conflicting names and function redefinition errors are caused. After the patch, the overload handlers are named classname_doSomething and no longer conflict. This is might not the best way to implement this, but it solves a critical problem on large projects, and specifically can affect operator overloads that are being wrapped.
* Warning fixes compiling with Visual StudioWilliam S Fulton2014-05-271-13/+13
|
* Javascript: preparations for using Language::getNSpace().Oliver Buchtala2014-05-191-2/+22
|
* Javascript cosmetic changesWilliam S Fulton2014-05-011-5/+1
|
* Javascript: ensure banner appears before %begin codeWilliam S Fulton2014-05-011-6/+4
|
* Fix bug and regression in javascript namespace generator.Oliver Buchtala2014-04-271-7/+7
|
* Prettify generated output in JS emitters.Oliver Buchtala2014-04-271-12/+16
|
* Fix regression of 226da4.Oliver Buchtala2014-04-261-1/+1
|
* Print error when specified multiple js engines.Oliver Buchtala2014-04-261-31/+50
| | | | Plus, consolidated names: EmitterType, mode, engine -> engine.
* beautify javascript.cxxWilliam S Fulton2014-04-251-7/+6
|
* Javascript variable naming convention correctionsWilliam S Fulton2014-04-251-38/+38
| | | | Also rename global -> globals just to placate the beautifier
* Cosmetic code changes in javascript.cxxWilliam S Fulton2014-04-241-75/+32
|
* Fix regression in Javascript generator for enums.Oliver Buchtala2014-04-231-12/+7
|
* Fix generator for Javascript enums.Oliver Buchtala2014-04-231-2/+16
|
* Turn on Swig_cparse_cplusplusout for Javascript/v8.Oliver Buchtala2014-04-231-0/+4
|
* Add missing license infoWilliam S Fulton2014-04-161-0/+13
|
* Improve missing JS engine error messageWilliam S Fulton2014-04-161-1/+1
|
* Beautified Javascript module.Oliver Buchtala2014-03-051-311/+269
|
* Fix regressions.Oliver Buchtala2014-03-051-4/+19
| | | | | - Adapted to changes in UTL - Fixed detection of setters and getters.
* Add missing copy ctor for Javascript Code Template class.Oliver Buchtala2014-02-281-1/+7
|
* Added a comment.Oliver Buchtala2014-02-261-2/+2
|