Lars Knoll
7efad31f67
Introduce a Bool typedef for boolean return values
...
This helps in the interpretation of the type returned
by a method. It also makes it easier to later on change
the type back to a real bool if it makes sense. Bool
is currently typedef'ed to uint.
Change-Id: I905d828f4f7b0f7e778b7f197c4ed61117ce5d16
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2012-10-17 09:09:56 +02:00
Lars Knoll
b010e46d03
Convert some more methods to the new calling convention
...
Change-Id: I73a0e0e12b75828c83c5422d1c04a4ade4718324
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2012-10-17 09:08:46 +02:00
Lars Knoll
bb09c83bcf
Converting more runtime methods to the new calling convention
...
Change-Id: I331e7ebe6479bc5b6bac9cf4e3e6506a1cae1053
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2012-10-16 17:26:25 +02:00
Lars Knoll
537c5fa10d
Move conversions to new calling convention
...
Change-Id: Iec01835b4fd27d8b71b7e709b05bcc757d09e417
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2012-10-16 16:57:24 +02:00
Lars Knoll
f730f7526b
More conversions to new calling convention
...
Change-Id: Iac67c9923bc3d7af76bb490cc8ca7cd3e922e192
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2012-10-16 16:57:18 +02:00
Lars Knoll
644804d6b8
More conversions to new calling convention
...
Change-Id: I6002715cc3f5c22d90a9ade6ae2152c2c3c8ebb2
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2012-10-16 16:57:13 +02:00
Lars Knoll
3cdb661ee0
Converting more methods to the new calling convention
...
Change-Id: I5199a9e5439644cc259f131c8b0ba6a941989615
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2012-10-16 16:57:09 +02:00
Lars Knoll
a1475002d6
Converting more runtime methods.
...
Change-Id: I9e5d73004e377cff2819cb82240d50e73c8bda94
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2012-10-16 16:57:05 +02:00
Lars Knoll
c63e799fc2
Convert Value constructors to new calling convention
...
Change-Id: I433f72666499e660618b061cfcf3407f5f9bb166
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2012-10-16 16:57:01 +02:00
Lars Knoll
a0690ab1eb
Convert string literals to new calling convention
...
Change-Id: I8dd6b1975351c36230ed512c55944c9b748ca38b
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2012-10-16 16:56:56 +02:00
Lars Knoll
013098cae8
Further convert runtime methods to the new calling convention
...
Value bassed argument passing.
Change-Id: I95e49ae301221e36946c2ce4f25081461513a6bb
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2012-10-16 16:56:52 +02:00
Lars Knoll
bf98bd9256
Do not return booleans from methods called by JIT generated code
...
For a boolean, only one byte of the the value returned in the
register is defined. But the compiled code afterwards does a
32 bit comparison with 0 or 1, leading to random failures
depending on compiler optimisation settings.
Instead we now consistently return uints, and all boolean
tests in the JIT generated code have to be done as
branch32((Not)Equal, register, TrustedImm32(0)). Never
compare against 1 to avoid potential problems.
Change-Id: I9d7545dd6705bca82dc49f1eedb329fffb86cdb7
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2012-10-15 22:43:23 +02:00
Simon Hausmann
c13a95361a
Add missing license headers
...
Change-Id: I59d602a0f2c1fefb03994ed32a3d697b176791ff
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-10-12 10:51:06 +02:00
Lars Knoll
3c02228bf3
Handle Integer_Type in a switch statement
...
Change-Id: I8e00636f0896cec7d18d645dd70db8a100bf5560
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2012-10-12 09:18:06 +02:00
Lars Knoll
bd0ff1b50d
Remove almost all uses of __qmljs_init_string
...
Change-Id: I88130ec39958c75b70d898a352423908ac2ef1d4
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2012-10-12 09:17:40 +02:00
Lars Knoll
6961f98a85
Remove __qmljs_init_(number|boolean)
...
Change-Id: Iae59dfea39e44931bb2f7a6436bd2f1491bbf843
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2012-10-12 09:16:21 +02:00
Lars Knoll
e28e4e1ac6
Introduce an integer type for Value
...
The type is not being used yet, but all runtime
methods should be updated and able to deal with
integer Values correctly.
In addition started to clean up the use of some of
__qmljs_* Value constructors.
Change-Id: I1cb2169a5731f6adcc990dcbc92bc96aa008079f
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2012-10-12 09:15:16 +02:00
Lars Knoll
7a9ece649e
Emit code for copying values
...
Remove __qmljs_copy in the process.
2012-10-10 13:49:35 +02:00
laknoll
aaea2a9a96
Proper NaN boxing for Value
...
All JS types are now encoded in a 8 byte data
structure. We use the 52 bits that are unused
when a double is a NaN to encode all other types
that can be stored inside a double.
This is being done by using a few bits to determine
the type, and up to 48 bits for data. This works
even on x64, as addresses (ie. pointers) are limited
to 48 bits on these platforms.
For most other types (except doubles), we store the
data in the lower 32 bits of the double.
2012-09-19 23:28:50 +02:00
Roberto Raggi
93e43fb328
Add support for global, eval and function code.
2012-06-13 11:16:35 +02:00
Roberto Raggi
9c9740fcda
Remove dead code
2012-06-13 10:26:10 +02:00
Roberto Raggi
810011f45a
Improve support for the assignment operators.
...
Also, use indirect calls in the amd64 code generator.
2012-06-11 09:38:52 +02:00
Roberto Raggi
27f9497478
Add dummy functions for the assignment operators.
2012-06-07 16:21:21 +02:00
Roberto Raggi
56de925f00
Generate LLVM code for constructor calls
2012-06-07 15:28:45 +02:00
Roberto Raggi
5c869a3c81
Delete properties
2012-06-07 14:28:42 +02:00
Roberto Raggi
55287cde51
Initial work on exceptions for the AOT compiler.
2012-06-06 15:30:50 +02:00
Roberto Raggi
9366999ac2
Generate code for closures.
2012-06-06 14:59:42 +02:00
Roberto Raggi
a9867139d9
Split __qmljs_add
2012-06-06 10:58:49 +02:00
Roberto Raggi
9551c6527a
Some more work on the LLVM-based AOT compiler.
2012-06-05 12:28:58 +02:00
Roberto Raggi
bf46892ccd
Move the defnition of the QML/JS Context to qmljs_runtime.h
2012-06-05 10:47:04 +02:00
Roberto Raggi
66a9d37813
Naive implementation of the Arguments object.
2012-06-04 16:36:00 +02:00
Roberto Raggi
51dcef5cdf
Implemented Object.getPrototypeOf and Object.prototype.valueOf
2012-06-04 15:57:39 +02:00
Roberto Raggi
b25e575ba0
Fix [[construct] and Object.prototype.toString
2012-05-28 22:16:21 +02:00
Roberto Raggi
5b0f452f4d
Implement instanceof
2012-05-28 20:17:13 +02:00
Roberto Raggi
7e7df11464
Fix the initialization of the ECMA library.
2012-05-25 17:45:15 +02:00
Roberto Raggi
fc6f96166f
Refactored Object
2012-05-25 13:43:30 +02:00
Roberto Raggi
a5229e821d
Propagate exceptions
2012-05-25 11:55:50 +02:00
Roberto Raggi
3bc997b2e3
Throw exceptions in the ecma library
2012-05-24 10:01:24 +02:00
Roberto Raggi
86183598a3
Throw exceptions
2012-05-23 18:50:24 +02:00
Roberto Raggi
945c988b45
Initial support for Array objects.
2012-05-21 09:52:55 +02:00
Roberto Raggi
e8bd50dd95
Initial support for inplace assignments.
2012-05-18 22:04:26 +02:00
Roberto Raggi
860bd23e4d
Improve [[DefaultValue]]
2012-05-18 15:28:59 +02:00
Roberto Raggi
ccebbc0641
Implemented the ecma Date object.
2012-05-18 14:10:02 +02:00
Roberto Raggi
41d4ac6294
Refactored the stack frames.
...
The new layout should simplify the use of static context
environments while compiling the code.
2012-05-16 16:29:07 +02:00
Roberto Raggi
37290dc90e
checkpoint
2012-05-16 11:58:07 +02:00
Roberto Raggi
3dd5bfc0fd
Add the Boolean Object.
2012-05-15 11:19:10 +02:00
Roberto Raggi
a909c67279
Remove String::get()
2012-05-15 10:58:22 +02:00
Roberto Raggi
6ffb058b18
Cleanup function prototypes.
2012-05-15 10:53:33 +02:00
Roberto Raggi
d9c263385c
Add methods to allocate JS entities.
2012-05-15 10:35:19 +02:00
Roberto Raggi
35c89b6f0a
Create the activation only when needed.
2012-05-15 10:02:21 +02:00