summary refs log tree commit diff stats
path: root/compiler/jsgen.nim
Commit message (Collapse)AuthorAgeFilesLines
* Fixes 10202 (#10283)rec2019-01-121-2/+2
| | | | | | * Add a test case for #10202 * Fix asgn for object tyVars; fixes #10202 * Check the variant kind before accessing the sym field
* void object fields are now ignored by codegen and fields/fieldPairs iterator ↵Neelesh Chandola2019-01-101-0/+2
| | | | | | | | | (#10144) * Codegen now ignores object fields of type void * Fix `$` bug for objects/tuples where it does not add a comma * fields/fieldPairs iterators now ignore void types * Use `isEmptyType` instead of checking for `tyVoid` directly
* Support undefined in isNil (#9960)Alexander Ivanov2018-12-301-3/+4
|
* Make copies for params which are captured in closures. Fixes #7048 (#10050)rec2018-12-201-1/+19
| | | | | * Copy params which are captured in closures. Fixes #7048 * Forgot to emit a newline; minor adjustments to the test
* Fixes #10005recloser2018-12-151-33/+16
|
* tyProc does not require copying in JS codegenNeelesh Chandola2018-12-111-1/+1
|
* Fix fat pointers, object copying, magic double evals on JS (#9411) [backport]rec2018-12-041-75/+242
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add a test for issue #9389 * Fixes #9389. * Make object contructors copy objects properly by checking whether the expressions passed to them don't need to be copied. * Make mArrToSeq implementation actually check if a copy needs to be made. * Avoid unnecessary copy in mChr impl * Assume set constructor elements need no copy * Add a test for issue #9410 * Add a test * fix passing fat pointers (#9410) * Enhance tests * More tests and fixes * Add more (failing) tests [ci skip] * Added equality operator for fat pointers, more tests and fixes * Fix printing uninitialized strings * Fix mInc, mDec double eval, add more tests * Tests * Refactored, fixed multiple evals, revamped the tests, added missing ops * Fix ups * Fix #9643 and #9644 * add pointer normalization
* fixes #9675Andreas Rumpf2018-11-261-0/+1
|
* Change the order of compilation passes, transformation is made lazy at code ↵cooldome2018-10-181-3/+5
| | | | | | | | | | | | | | | gen (#8489) * Ast no transformation * Add getImplNoTransform to the macros module * progress on delaying transf * Fix methods tranformation * Fix lazy lambdalifting * fix create thread wrapper * transform for lambda lifting * improve getImplTransformed * Fix destructor tests * try to fix nimprof for linux
* implement sizeof and alignof operator (manually squashed #5664) (#9356)Timothee Cour2018-10-141-2/+0
|
* Unchecked arrays now have their own type (#9267)LemonBoy2018-10-101-2/+2
|
* Fixes #9154 (#9193)manterolat2018-10-101-0/+3
|
* Field checks for everybody (#8957)LemonBoy2018-10-091-9/+46
| | | | | | | | | | | | | | | | | | | | | * Field checks for JS backend * Clean nkCall nodes with no arguments Generating a nkEmpty in place of no arguments makes no sense form the AST point of view and also trips up the VM codegen. * Field checks for VM backend * Test case for #6612 This patchset fixes #6612 * Add test case for LHS double evaluation * Prevent LHS double-eval for JS backend * Prevent double evaluation in VM backend
* Try/Catch support for native JS exceptions (#8955)LemonBoy2018-10-091-6/+32
| | | | | | * Try/Catch support for native JS exceptions * Better tests
* Make the registered passes local to the ModuleGraph (#9259)LemonBoy2018-10-091-2/+2
| | | Closes #9068
* Merge branch 'devel' into araq-better-docgenAraq2018-09-141-25/+23
|\
| * Fix concat behaviour for uninitialized strings (#8950)LemonBoy2018-09-111-10/+12
| |
| * JS strings have no trailing zero anymore (#8936)LemonBoy2018-09-111-19/+15
| |
* | fixes bootstrapping problemsAraq2018-09-071-1/+1
| |
* | compiler refactoring; use typesafe path handing; docgen: render symbols ↵Andreas Rumpf2018-09-071-6/+6
|/ | | | between modules
* Sync line generation between C and JS backends (#8888)LemonBoy2018-09-071-3/+3
| | | Fixes #7224
* Automatic deref for everything but pointers in asm/emit (#8891)LemonBoy2018-09-071-2/+13
| | | Fixes #7249
* Correctly mangle `this` in the JS backend (#8853)LemonBoy2018-09-031-1/+2
| | | | | As shown in pragmagic/karax#67 using `this` as parameter name made the codegen output wrong code (and the user didn't notice the errors in the browser console).
* even more strict isNil handling for strings/seqs in order to detect bugsAraq2018-08-221-4/+2
|
* WIP: disallow 'nil' for strings and seqsAndreas Rumpf2018-08-131-2/+2
|
* fixes #6255, add `system.ashr` arithmetic right shift (#8547)andri lim2018-08-071-0/+1
|
* AST change: keep nkStaticStmt in the AST for incremental compilation supportAndreas Rumpf2018-06-031-1/+1
|
* incremental compilation: implemented basic replay logicAndreas Rumpf2018-06-021-6/+2
|
* baby steps for incremental compilationAndreas Rumpf2018-05-301-2/+2
|
* jsgen refactoring: use graph.backend field instead of a global variableAndreas Rumpf2018-05-281-11/+10
|
* remove more global variables in the Nim compilerAndreas Rumpf2018-05-271-1/+1
|
* platform.nim doesn't use globals anymore; prepare msgs.nim for not using globalsAndreas Rumpf2018-05-181-16/+16
|
* preparations of making compiler/msgs.nim free of global variablesAndreas Rumpf2018-05-171-4/+4
|
* options.nim: no global variables anymoreAndreas Rumpf2018-05-131-3/+3
|
* the remaining passes all compile againAndreas Rumpf2018-05-131-76/+79
|
* refactoring: make FileIndex a distinct type; make line information an ↵Andreas Rumpf2018-04-211-1/+1
| | | | uint16; fixes #7654
* Remove PHP backend. (#7606)treeform2018-04-181-408/+154
| | | | | | | | | | * remove php * fix * keep nimphpext * remove targetJS enum
* the new feature's name is hotCodeReloadingAndreas Rumpf2018-04-131-3/+3
|
* fixes #4470Andreas Rumpf2018-04-131-0/+2
|
* Support code hot reloading for JavaScript projects (#7362)zah2018-04-131-24/+52
| | | | | | | | | | | | | | | | | | | | | | * Support code hot reloading for JavaScript projects * Add some missing JavaScript symbols and APIs * fix the Travis build * (review changes) remove the js type from the standard library as it doesn't follow NEP-1 * more additions to the DOM module * Follow NEP-1 in jsffi; spell 'hot code reloading' correctly * introduce a jscore module * Document jscore module. * readded js type * Remove the '$' operator that doesn't behave
* introduce nkTupleConstr AST node for unary tuple construction; breaking changeAndreas Rumpf2018-04-131-4/+4
|
* move new sha1 module into the new 'std' namespaceAndreas Rumpf2018-02-061-1/+1
|
* fixes #6961Andreas Rumpf2018-02-021-1/+1
|
* Fixes codegen bug with literal negative zero, fixes #7079 (#7158)GULPF2018-01-311-5/+11
| | | | | | * Fixes #7079 * Fix handling of neg zero during constant folding
* fixes #7129Andreas Rumpf2018-01-301-3/+3
|
* JS codegen bugfix: don't crash on wrong importcpp patternsAndreas Rumpf2018-01-251-0/+3
|
* preparations for language extensions: 'sink' and 'lent' typesAndreas Rumpf2018-01-071-17/+19
|
* jsgen: bool genConv generates boolean values instead of numeric (#7016)qqquinta2018-01-031-2/+2
|
* first steps in adding template/macro calls to stack tracesAraq2017-12-211-0/+2
|
* make JS tests green againAraq2017-12-151-1/+1
|