Commit Graph

36 Commits

Author SHA1 Message Date
Mattias Gaertner
eee0074eb4 pas2js: rtl.js set version
git-svn-id: trunk@40580 -
2018-12-16 22:39:31 +00:00
Mattias Gaertner
cea0060507 pastojs: procedure val(const string; out enum; out int)
git-svn-id: trunk@40551 -
2018-12-14 15:36:12 +00:00
Mattias Gaertner
f9e426c45a pas2js: clean up $shared in sets
git-svn-id: trunk@40148 -
2018-11-01 13:37:49 +00:00
Mattias Gaertner
ef3b1ee5ba pas2js: hide $shared in sets
git-svn-id: trunk@40146 -
2018-11-01 13:35:12 +00:00
Mattias Gaertner
05243a2de6 pas2js: hide $shared in sets
git-svn-id: trunk@40143 -
2018-11-01 13:32:19 +00:00
Mattias Gaertner
ff431f0106 pastojs: fixed calling destructor after exception in constructor
git-svn-id: trunk@40116 -
2018-10-31 23:02:01 +00:00
Mattias Gaertner
91d7658844 pas2js: fixed calling $final, do not call BeforeDestruction on exception in constructor
git-svn-id: trunk@39966 -
2018-10-18 10:00:02 +00:00
Mattias Gaertner
cec7188704 pastojs: added option -JoCheckVersion
git-svn-id: trunk@39851 -
2018-10-02 14:58:05 +00:00
Mattias Gaertner
a672107894 pastojs: fixed override class interface map
git-svn-id: trunk@39799 -
2018-09-24 17:28:58 +00:00
Mattias Gaertner
2086bdbbc0 pastojs: check reserved global JS identifiers only for non prefixed identifiers
git-svn-id: trunk@39360 -
2018-07-03 14:05:38 +00:00
Mattias Gaertner
821182d518 pas2js: docs
git-svn-id: trunk@39284 -
2018-06-23 08:36:45 +00:00
Mattias Gaertner
cd4eb4738c pas2js: fixed rtti module
git-svn-id: trunk@38992 -
2018-05-14 16:55:04 +00:00
Mattias Gaertner
47b350947f pas2js: added hexstr
git-svn-id: trunk@38846 -
2018-04-26 08:12:55 +00:00
michael
0adfb4fb02 * Fix bug ID #33651
git-svn-id: trunk@38845 -
2018-04-26 07:08:41 +00:00
Mattias Gaertner
1215cafb4e pastojs: range check string index
git-svn-id: trunk@38835 -
2018-04-24 18:01:53 +00:00
Mattias Gaertner
268ffcb854 pastojs: range check array index
git-svn-id: trunk@38834 -
2018-04-24 17:42:31 +00:00
Mattias Gaertner
65ae09a914 pastojs: range check char:=, char parameter
git-svn-id: trunk@38831 -
2018-04-24 11:51:49 +00:00
Mattias Gaertner
0601b437a4 pas2js: added option -JoUseStrict
git-svn-id: trunk@38793 -
2018-04-19 12:42:00 +00:00
Mattias Gaertner
2945f4a3c9 pas2js: changed TGuid to record
git-svn-id: trunk@38792 -
2018-04-19 12:16:03 +00:00
Mattias Gaertner
e1ead17c77 pas2js: simplify
git-svn-id: trunk@38721 -
2018-04-09 22:36:10 +00:00
Mattias Gaertner
52b1649b8f pas2js: utility functions for com interfaces
git-svn-id: trunk@38697 -
2018-04-06 10:38:37 +00:00
Mattias Gaertner
0fa83eade8 pas2js: rtl.js: added corba interface helper functions
git-svn-id: trunk@38652 -
2018-03-30 15:16:09 +00:00
Mattias Gaertner
898b566837 pas2js:: rtl.js: add Math.trunc only if used
git-svn-id: trunk@38059 -
2018-01-27 14:15:36 +00:00
michael
0ef3fc2f29 * Math.trunc polyfill
git-svn-id: trunk@38051 -
2018-01-26 20:33:42 +00:00
michael
7d355ffffc call rtl function cloneset with fully qualified name
git-svn-id: trunk@38036 -
2018-01-25 13:58:39 +00:00
Mattias Gaertner
32f4d9e3a5 pas2js: range check int:=
git-svn-id: trunk@38011 -
2018-01-19 17:00:20 +00:00
Mattias Gaertner
89382e0929 pas2js: rtl.js isExt with check for instance
git-svn-id: trunk@38003 -
2018-01-19 00:03:08 +00:00
Mattias Gaertner
b54ca867b1 pas2js: rtl.js: set functions: remove hasOwnProperty - other properties are not enumerable, added rtl.checkMethodCall
git-svn-id: trunk@37999 -
2018-01-18 21:43:47 +00:00
michael
8342c502c5 * Initial check-in of pas2js changes
git-svn-id: trunk@37749 -
2017-12-16 15:55:10 +00:00
michael
a1303eecde * Fixed from Mattias Gaertner
pasresolver: checking all varargs arguments
  pasresolver: checking arguments are readable
  fppas2js: fixed using externals from other units

git-svn-id: trunk@35631 -
2017-03-20 07:31:39 +00:00
michael
78e7f59982 * Patch from Mattias Gaertner
- external vars
    - untyped parameters
    - varargs
    - SetLength(s,len) is now converted to s.length=len
    - destructor now clears references
    - dynamic arrays now are never null.
      - anArr:=nil  becomes  anArr = []
      - anArr=nil becomes anArr.length==0
      - passing nil to an array parameter passes []
      - length(anArr) becomes anArr.length
      - High(anArr) becomes anArr.length-1
    - sets now uses references when assigning and passing to a parameter.
      Far less clone operations.

git-svn-id: trunk@35505 -
2017-03-01 17:41:16 +00:00
michael
0da38fd281 * Patch from Mattias Gaertner:
- local const: declare as local var in singleton parent function 
  - give procedure overloads in module unique names by appending $1, $2, ...
  - give nested procedure overloads unique names by appending $1, $2, ...
  - give reintroduced/overloaded class members unique names by appending $1, $2, ...
  - record operators = and <>
  - static arrays
    - range: enumtype
    - init as arr = rtl.arrayNewMultiDim([dim1,dim2,...],value)
    - init with expression from const array
    - length(1-dim array)
    - low(1-dim array), high(1-dim array)
  - property TargetProcessor
  - ECMAScript6:
    - use 0b for binary literals, and 0o for octal literals

git-svn-id: trunk@35491 -
2017-02-28 13:23:49 +00:00
michael
2d36af85bb * Patch from Mattias Gaertner with various improvements:
+ changed varname/funcname properties to string, saving many conversion
  + array of record
  + pass by reference
    - pass local var to a var/out parameter
    - pass variable to a var/out parameter
    - pass reference to a var/out parameter
    - pass array element to a var/out parameter
  + proc types
    - implemented as immutable wrapper function
    - assign := nil, proctype (not clone), @function, @method
    - call  explicit and implicit
    - compare equal and notequal with nil, proctype, address, function
    - assigned(proctype)
    - pass as argument
    - methods
    - mode delphi: proctype:=proc
    - mode delphi: functype=funcresulttype
  + class-of
    - assign :=   nil, var
    - call class method
    - call constructor
    - operators =, <>
    - class var, property, method
    - Self in class method
    - typecast

git-svn-id: trunk@35472 -
2017-02-22 20:59:23 +00:00
michael
7702ebb261 * Patch from Mattias Gaertner; SetCharAt
git-svn-id: trunk@35429 -
2017-02-12 15:17:12 +00:00
michael
f5b76b62fe * Patch from Mattias Gaertner:
- set operator functions
  - dyn array can be null

git-svn-id: trunk@35418 -
2017-02-10 23:26:14 +00:00
michael
eaa02f2f88 * Basic RTL for pas2js generated programs
git-svn-id: trunk@35384 -
2017-02-04 11:31:55 +00:00