platform/upstream/qtdeclarative.git
11 years agoProspective Mac build fix
Simon Hausmann [Fri, 12 Oct 2012 12:24:45 +0000 (14:24 +0200)]
Prospective Mac build fix

Define ahead of time which "feature" set we want, i.e. no LLINT/DFG/JIT
code but only ENABLE(ASSEMBLER). Otherwise Platform.h will make a choice
for us depending on the platform.

Change-Id: I372dc690ecbc624e9d589f6f10078a7647fcb570
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
11 years agoFix LLVM build
Erik Verbruggen [Fri, 12 Oct 2012 11:45:35 +0000 (13:45 +0200)]
Fix LLVM build

Change-Id: I7ae00a5e90087182d9f7d939db0a036c120e3b9b
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoProspective Mac OS X build fix
Simon Hausmann [Fri, 12 Oct 2012 10:15:10 +0000 (12:15 +0200)]
Prospective Mac OS X build fix

open_memstream is not supported beyond Linux it seems, so do the
symbol replacing disassembly printing only on Linux.

Change-Id: I1eff6db9e10bd0ebbc06e967a61f998ee42438a8
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
11 years agoAdd missing license headers
Simon Hausmann [Fri, 12 Oct 2012 08:12:24 +0000 (10:12 +0200)]
Add missing license headers

Change-Id: I59d602a0f2c1fefb03994ed32a3d697b176791ff
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoClean up arithmetic operation calls
Simon Hausmann [Fri, 12 Oct 2012 07:23:17 +0000 (09:23 +0200)]
Clean up arithmetic operation calls

Don't repeat calls to generateFunctionCall but use a helper macro to
get the name.

Change-Id: I394b1980cbd67f3ca94fc41402de2d5b99c45016
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoStore booleans as 32 bit integers
Lars Knoll [Fri, 12 Oct 2012 06:52:51 +0000 (08:52 +0200)]
Store booleans as 32 bit integers

The old code was giving valgrind warnings, because
we loaded the boolean (1 byte) as a 32 bit integer.
Instead simply store all booleans as 32 bit ints
to avoid the warnings.

Change-Id: I46c7f9fc9d8dfe52afd9bab2dbab8923aaa630f8
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoSend all debug output to stderr
Lars Knoll [Fri, 12 Oct 2012 06:51:02 +0000 (08:51 +0200)]
Send all debug output to stderr

qDebug() was used for part of the logging, which
uses stderr. Send everything else there as well.

Change-Id: I363dff3d2e4dd6f95bf0347f1df589ae2528fd32
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoHandle Integer_Type in a switch statement
Lars Knoll [Fri, 12 Oct 2012 06:48:33 +0000 (08:48 +0200)]
Handle Integer_Type in a switch statement

Change-Id: I8e00636f0896cec7d18d645dd70db8a100bf5560
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoRemove almost all uses of __qmljs_init_string
Lars Knoll [Thu, 11 Oct 2012 19:19:08 +0000 (21:19 +0200)]
Remove almost all uses of __qmljs_init_string

Change-Id: I88130ec39958c75b70d898a352423908ac2ef1d4
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoRemove __qmljs_init_(number|boolean)
Lars Knoll [Thu, 11 Oct 2012 14:50:37 +0000 (16:50 +0200)]
Remove __qmljs_init_(number|boolean)

Change-Id: Iae59dfea39e44931bb2f7a6436bd2f1491bbf843
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoIntroduce an integer type for Value
Lars Knoll [Thu, 11 Oct 2012 14:39:17 +0000 (16:39 +0200)]
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>
11 years agoFix: make it possible to change the used LLVM installation.
Erik Verbruggen [Fri, 12 Oct 2012 06:58:29 +0000 (08:58 +0200)]
Fix: make it possible to change the used LLVM installation.

If either the LLVM_INSTALL_DIR environment variable or the qmake
variable are set, use that to find the llvm-config utility. Changing
those is easier than modifying your path. Can be used if you have more
than one LLVM installation installed.

Change-Id: I24265b397e21f468ece61392a112de9a50c67c5a
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix stack corruption on ia32
Simon Hausmann [Fri, 12 Oct 2012 06:25:02 +0000 (08:25 +0200)]
Fix stack corruption on ia32

On ia32 sizeof(void*) < sizeof(Value), so we need to subtract
sizeof(Value) instead of sizeof(void*) before reaching the first
temp.

Added comments to explain the offsets.

Change-Id: Iefbb1dc762fdf36d73002c52dc9c471ec15ff403
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoInitial build fixes for arm
Simon Hausmann [Wed, 10 Oct 2012 20:40:16 +0000 (22:40 +0200)]
Initial build fixes for arm

11 years agoFix a crash when generating optimised code
Lars Knoll [Thu, 11 Oct 2012 07:14:14 +0000 (09:14 +0200)]
Fix a crash when generating optimised code

The base operation for OpInplaceAnd is OpBitAnd,
not OpAnd.

11 years agoImplement copyValue using a single load/store pair in the common case of copying...
Simon Hausmann [Wed, 10 Oct 2012 19:48:27 +0000 (21:48 +0200)]
Implement copyValue using a single load/store pair in the common case of copying temps

11 years agoSimplify boolean conditional jumps
Simon Hausmann [Wed, 10 Oct 2012 19:28:13 +0000 (21:28 +0200)]
Simplify boolean conditional jumps

* Expect the boolean value to be in Gpr0, which means after the __qmljs_to_boolean
  call the move(ReturnValueRegister, Gpr0) becomes a noop
* Instead of loading the true/1 into a register, use it as immediate value in the cmp

11 years agoMake conditional jumps more readable
Simon Hausmann [Wed, 10 Oct 2012 19:25:40 +0000 (21:25 +0200)]
Make conditional jumps more readable

11 years agoFix ia32 build: make loadArgument available on all archs for copyValue
Simon Hausmann [Wed, 10 Oct 2012 19:22:34 +0000 (21:22 +0200)]
Fix ia32 build: make loadArgument available on all archs for copyValue

11 years agoFix stack corruption
Lars Knoll [Wed, 10 Oct 2012 19:15:43 +0000 (21:15 +0200)]
Fix stack corruption

The position of temporaries on the stack was
off by 1, leading to us overwriting other r14, that gets
pushed to the stack after we have allocated space for temps.

11 years agoSimplify function header and footer on x86-64
Lars Knoll [Wed, 10 Oct 2012 12:02:50 +0000 (14:02 +0200)]
Simplify function header and footer on x86-64

Generate a few instructions less per function call.

11 years agoEmit code for copying values
Lars Knoll [Wed, 10 Oct 2012 11:46:12 +0000 (13:46 +0200)]
Emit code for copying values

Remove __qmljs_copy in the process.

11 years agoWork around gcc bug on amd64 with function pointer assignment
Simon Hausmann [Wed, 10 Oct 2012 11:22:47 +0000 (13:22 +0200)]
Work around gcc bug on amd64 with function pointer assignment

11 years agoIgnore generated files
Simon Hausmann [Wed, 10 Oct 2012 11:19:32 +0000 (13:19 +0200)]
Ignore generated files

11 years agoRemove old assembler
Simon Hausmann [Wed, 10 Oct 2012 11:19:17 +0000 (13:19 +0200)]
Remove old assembler

11 years agoMake it really work for 64 bit.
Lars Knoll [Wed, 10 Oct 2012 11:10:07 +0000 (13:10 +0200)]
Make it really work for 64 bit.

crypto.js passes now :)

11 years agoMore 64-bit fixes
Simon Hausmann [Wed, 10 Oct 2012 09:42:38 +0000 (11:42 +0200)]
More 64-bit fixes

11 years agoRudimentary amd64 port
Simon Hausmann [Wed, 10 Oct 2012 09:04:53 +0000 (11:04 +0200)]
Rudimentary amd64 port

11 years agoFix rethrow
Simon Hausmann [Wed, 10 Oct 2012 08:27:04 +0000 (10:27 +0200)]
Fix rethrow

11 years agoRemove generated code
Simon Hausmann [Tue, 9 Oct 2012 08:31:54 +0000 (10:31 +0200)]
Remove generated code

11 years agoFix compilation on amd64 (not working yet, just building)
Simon Hausmann [Tue, 9 Oct 2012 08:28:59 +0000 (10:28 +0200)]
Fix compilation on amd64 (not working yet, just building)

11 years agoCentralize value copying
Simon Hausmann [Tue, 9 Oct 2012 08:05:27 +0000 (10:05 +0200)]
Centralize value copying

11 years agoSave and restore context register before calls
Simon Hausmann [Tue, 9 Oct 2012 07:59:02 +0000 (09:59 +0200)]
Save and restore context register before calls

11 years agoMore debug info
Simon Hausmann [Tue, 9 Oct 2012 07:06:12 +0000 (09:06 +0200)]
More debug info

11 years agoFirst shot at more readable call instructions in output
Simon Hausmann [Tue, 9 Oct 2012 06:17:47 +0000 (08:17 +0200)]
First shot at more readable call instructions in output

11 years agoRemember linked function names in prep for future debug help
Simon Hausmann [Tue, 9 Oct 2012 05:41:36 +0000 (07:41 +0200)]
Remember linked function names in prep for future debug help

11 years agoFix array subscript write: add missing context pointer argument to qmljs_set_element...
Simon Hausmann [Mon, 8 Oct 2012 19:58:24 +0000 (21:58 +0200)]
Fix array subscript write: add missing context pointer argument to qmljs_set_element call

11 years agoUse posix_memalign to ensure assert(!(code & 15))
Simon Hausmann [Mon, 8 Oct 2012 18:22:31 +0000 (20:22 +0200)]
Use posix_memalign to ensure assert(!(code & 15))

11 years agoImplement executalble memory using mmap
Simon Hausmann [Mon, 8 Oct 2012 18:21:40 +0000 (20:21 +0200)]
Implement executalble memory using mmap

11 years agoFix non-release builds
Simon Hausmann [Mon, 8 Oct 2012 08:25:21 +0000 (10:25 +0200)]
Fix non-release builds

11 years agoAdd missing return
Simon Hausmann [Sun, 7 Oct 2012 20:14:01 +0000 (22:14 +0200)]
Add missing return

11 years agoImplement missing movs
Simon Hausmann [Sun, 7 Oct 2012 20:10:27 +0000 (22:10 +0200)]
Implement missing movs

11 years agoimplement visitExp
Simon Hausmann [Sun, 7 Oct 2012 20:02:41 +0000 (22:02 +0200)]
implement visitExp

11 years agoImplement construct property/value
Simon Hausmann [Sun, 7 Oct 2012 20:02:06 +0000 (22:02 +0200)]
Implement construct property/value

11 years agoImplement call value and property
Simon Hausmann [Sun, 7 Oct 2012 19:57:10 +0000 (21:57 +0200)]
Implement call value and property

11 years agoPort remaining code to better function call mechanism
Simon Hausmann [Sun, 7 Oct 2012 19:43:29 +0000 (21:43 +0200)]
Port remaining code to better function call mechanism

11 years agoFix closure init
Simon Hausmann [Sun, 7 Oct 2012 17:45:40 +0000 (19:45 +0200)]
Fix closure init

11 years agoSimplify more function calls
Simon Hausmann [Fri, 5 Oct 2012 09:48:05 +0000 (11:48 +0200)]
Simplify more function calls

11 years agofurther call simplification
Simon Hausmann [Fri, 5 Oct 2012 09:35:46 +0000 (11:35 +0200)]
further call simplification

11 years agoSimpler approach to function calls
Simon Hausmann [Fri, 5 Oct 2012 09:13:54 +0000 (11:13 +0200)]
Simpler approach to function calls

11 years agoSimplify passing temps as method arguments
Simon Hausmann [Fri, 5 Oct 2012 09:02:54 +0000 (11:02 +0200)]
Simplify passing temps as method arguments

11 years agoA bit more inplace assignment implemented
Simon Hausmann [Fri, 5 Oct 2012 06:09:12 +0000 (08:09 +0200)]
A bit more inplace assignment implemented

11 years agoGenerate the code for copying the argments earlier, to avoid register clobbering...
Simon Hausmann [Fri, 5 Oct 2012 05:55:05 +0000 (07:55 +0200)]
Generate the code for copying the argments earlier, to avoid register clobbering between __qmljs_copy calls

11 years agoImplement constructActivationProperty
Simon Hausmann [Thu, 4 Oct 2012 21:23:50 +0000 (23:23 +0200)]
Implement constructActivationProperty

11 years agoImplement mov unop
Simon Hausmann [Thu, 4 Oct 2012 20:50:01 +0000 (22:50 +0200)]
Implement mov unop

11 years agoImplement binop mov
Simon Hausmann [Thu, 4 Oct 2012 20:46:42 +0000 (22:46 +0200)]
Implement binop mov

11 years agoImplement mov as string
Simon Hausmann [Thu, 4 Oct 2012 20:13:34 +0000 (22:13 +0200)]
Implement mov as string

11 years agoSprinkle a few more notImplemented()
Simon Hausmann [Thu, 4 Oct 2012 20:08:22 +0000 (22:08 +0200)]
Sprinkle a few more notImplemented()

11 years agoImplement more of cjump
Simon Hausmann [Thu, 4 Oct 2012 20:02:43 +0000 (22:02 +0200)]
Implement more of cjump

11 years agoAdd missing returns
Simon Hausmann [Thu, 4 Oct 2012 19:48:38 +0000 (21:48 +0200)]
Add missing returns

11 years agoFix argument addressing to be in the right order
Simon Hausmann [Thu, 4 Oct 2012 19:40:33 +0000 (21:40 +0200)]
Fix argument addressing to be in the right order

11 years agoFix move temp -> temp
Simon Hausmann [Thu, 4 Oct 2012 19:40:17 +0000 (21:40 +0200)]
Fix move temp -> temp

11 years agoImplemented part of visitCJump
Simon Hausmann [Thu, 4 Oct 2012 17:24:22 +0000 (19:24 +0200)]
Implemented part of visitCJump

11 years agoCleanup
Simon Hausmann [Tue, 2 Oct 2012 06:56:49 +0000 (08:56 +0200)]
Cleanup

11 years agoImplement callActivationProperty, mov with target as name and closure init
Simon Hausmann [Tue, 2 Oct 2012 06:55:18 +0000 (08:55 +0200)]
Implement callActivationProperty, mov with target as name and closure init

11 years agoFix generation of multiple functions
Simon Hausmann [Tue, 2 Oct 2012 06:53:47 +0000 (08:53 +0200)]
Fix generation of multiple functions

Sine we can't reset the MacroAssembler properly right now, reconstruct
the isel for every function.

11 years agoFix stupid off-by-one in address calculation of temporaries on the stack
Simon Hausmann [Tue, 2 Oct 2012 06:52:38 +0000 (08:52 +0200)]
Fix stupid off-by-one in address calculation of temporaries on the stack

11 years agoSimplified function call helpers
Simon Hausmann [Tue, 2 Oct 2012 05:21:38 +0000 (07:21 +0200)]
Simplified function call helpers

11 years agoProspective jump support
Simon Hausmann [Tue, 2 Oct 2012 04:49:49 +0000 (06:49 +0200)]
Prospective jump support

11 years agoImplement basic name lookup
Simon Hausmann [Mon, 1 Oct 2012 20:52:05 +0000 (22:52 +0200)]
Implement basic name lookup

11 years agoImplement simple value storage
Simon Hausmann [Mon, 1 Oct 2012 20:35:53 +0000 (22:35 +0200)]
Implement simple value storage

11 years agoFix ret argumet passing
Simon Hausmann [Mon, 1 Oct 2012 20:03:59 +0000 (22:03 +0200)]
Fix ret argumet passing

11 years agocleanup, squash
Simon Hausmann [Mon, 1 Oct 2012 20:02:20 +0000 (22:02 +0200)]
cleanup, squash

11 years agoCall helper
Simon Hausmann [Mon, 1 Oct 2012 19:59:09 +0000 (21:59 +0200)]
Call helper

11 years agocorrect temp handling
Simon Hausmann [Mon, 1 Oct 2012 19:39:25 +0000 (21:39 +0200)]
correct temp handling

11 years agoCleanups, some rudimentary stubs so that "return 42" can be compiled :)
Simon Hausmann [Mon, 1 Oct 2012 07:29:20 +0000 (09:29 +0200)]
Cleanups, some rudimentary stubs so that "return 42" can be compiled :)

11 years agoFix code ownership
Simon Hausmann [Wed, 26 Sep 2012 19:46:30 +0000 (21:46 +0200)]
Fix code ownership

11 years agoAdd udis86 support
Simon Hausmann [Sun, 23 Sep 2012 08:44:12 +0000 (10:44 +0200)]
Add udis86 support

11 years agoInitial import of MASM
Simon Hausmann [Sun, 23 Sep 2012 08:28:13 +0000 (10:28 +0200)]
Initial import of MASM

11 years agoFix division operation
laknoll [Thu, 20 Sep 2012 08:28:43 +0000 (10:28 +0200)]
Fix division operation

11 years agoProper NaN boxing for Value
laknoll [Wed, 19 Sep 2012 19:08:47 +0000 (21:08 +0200)]
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.

12 years agoInitial work on `eval'.
Roberto Raggi [Tue, 26 Jun 2012 13:36:03 +0000 (15:36 +0200)]
Initial work on `eval'.

12 years agoDo not try to optimize the `global object'.
Roberto Raggi [Tue, 26 Jun 2012 13:17:31 +0000 (15:17 +0200)]
Do not try to optimize the `global object'.

This should simplify the implementation of `eval' and `with'.

12 years agoRemove dead code.
Roberto Raggi [Tue, 26 Jun 2012 11:43:00 +0000 (13:43 +0200)]
Remove dead code.

12 years agoReduce the number of register-to-register copies.
Roberto Raggi [Tue, 26 Jun 2012 11:36:37 +0000 (13:36 +0200)]
Reduce the number of register-to-register copies.

12 years agoRemember the value of the last executed expression only in EvalMode
Roberto Raggi [Wed, 13 Jun 2012 09:19:15 +0000 (11:19 +0200)]
Remember the value of the last executed expression only in EvalMode

12 years agoAdd support for global, eval and function code.
Roberto Raggi [Wed, 13 Jun 2012 09:02:23 +0000 (11:02 +0200)]
Add support for global, eval and function code.

12 years agoRemove specialized version of __qmljs_set
Roberto Raggi [Wed, 13 Jun 2012 08:45:12 +0000 (10:45 +0200)]
Remove specialized version of __qmljs_set

12 years agoRemove dead code
Roberto Raggi [Wed, 13 Jun 2012 08:26:10 +0000 (10:26 +0200)]
Remove dead code

12 years agoFix bug in jump logic
Aaron Kennedy [Tue, 12 Jun 2012 17:26:29 +0000 (18:26 +0100)]
Fix bug in jump logic

Make the jump relative to the offset value in the instruction stream.

12 years agoBegin to implement moth vm
Aaron Kennedy [Tue, 12 Jun 2012 17:13:55 +0000 (18:13 +0100)]
Begin to implement moth vm

12 years agoImplemented Function.prototype.apply
Roberto Raggi [Tue, 12 Jun 2012 10:35:36 +0000 (12:35 +0200)]
Implemented Function.prototype.apply

12 years agoFix possible crash when executing invalid code.
Roberto Raggi [Tue, 12 Jun 2012 10:10:33 +0000 (12:10 +0200)]
Fix possible crash when executing invalid code.

12 years agoAdd skeleton moth vme
Aaron Kennedy [Mon, 11 Jun 2012 16:58:52 +0000 (17:58 +0100)]
Add skeleton moth vme

12 years agoKeep alive the exception handler block.
Roberto Raggi [Mon, 11 Jun 2012 12:38:56 +0000 (14:38 +0200)]
Keep alive the exception handler block.

12 years agoRemove dead code.
Roberto Raggi [Mon, 11 Jun 2012 12:21:02 +0000 (14:21 +0200)]
Remove dead code.

12 years agoFix make llvm_runtime
Roberto Raggi [Mon, 11 Jun 2012 11:59:42 +0000 (13:59 +0200)]
Fix make llvm_runtime

12 years agoAdd moth skeleton
Aaron Kennedy [Fri, 8 Jun 2012 19:09:13 +0000 (20:09 +0100)]
Add moth skeleton

12 years agoMake IR types stricter
Aaron Kennedy [Fri, 8 Jun 2012 19:09:13 +0000 (20:09 +0100)]
Make IR types stricter

We can always loosen these again if we need to.

12 years agoImport crypto.js from the V8 benchmark tests
Roberto Raggi [Mon, 11 Jun 2012 09:51:14 +0000 (11:51 +0200)]
Import crypto.js from the V8 benchmark tests