Commit Graph

14 Commits

Author SHA1 Message Date
Simon Hausmann 85e92adeb6 Get rid of 'Value ExecutionEngine::exception' member
Instead the JS exception value is now part of the C++ Exception object.

This also allows getting rid of some run-time functions.

Change-Id: I43ff773cacd5e925ba96601f3633ccf3b62273be
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-03-06 22:19:32 +01:00
Lars Knoll 745dfae77b Implement external object comparison
Change-Id: Ieec34aa1b410766510919a99c5964c288b4addc1
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-03-06 16:04:48 +01:00
Simon Hausmann f09042c2ee Move function execution into a little ExecutionEngine::run helper function
This will allow for re-use from the v8 wrapper API.

Change-Id: I2330432dad43d7fd7af6147e96a0cbbb340cd917
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-03-05 16:34:10 +01:00
Simon Hausmann 03b0e23cce Cleanup unwind handler
Store the platform specific unwind info (CIE/FDE on Linux/Mac x86/x86-64) directly
inside the VM::Function and therefore make all the functions of UnwindHelper static.

Also calculate the function size correctly.

Change-Id: If6a6b92a250044c6799218ef3506f34d630674c7
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-03-05 08:41:22 +01:00
Lars Knoll 5aeccbe297 Optimise array construction
Cache the InternalClass for ArrayObject and
use it directly in the constructor.

Change-Id: I17346045cd14852c400c7f3886414953e4dff869
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-03-04 11:58:19 +01:00
Erik Verbruggen 5e0c24fd17 Add class to help the platform unwind JIT code.
Currently only x86_64 and x86 is supported.

Change-Id: I80fe60543b71e7073a0666d5ebb10144a75a488c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-02-27 13:50:00 +01:00
Lars Knoll a7e9ea3c1f Various cleanups in the runtime
Remove unused code, inline where we only use a method
once.

Change-Id: I1896efc3f4d309082aff2f80f944e19c1ede2f50
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-02-15 07:42:34 +01:00
Lars Knoll b5333bdcf1 Use internal classes to store the layout of members
Add an internal class structure to Object that will allow
us to do much more efficient property lookups in the future.

Change-Id: I9ee72f6d73113a489f00ad7a31a20e91fbba18ed
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-02-12 14:54:16 +01:00
Simon Hausmann a1c23195c8 Fix build with Visual Studio
Which doesn't have nan(const char *tagp). Instead let's just use
std::numeric_limits<double>::quiet_NaN().

Change-Id: I13127a3813fc84e85681883c5a0ec89f7cd69667
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-02-09 10:50:14 +01:00
Simon Hausmann a0a58bf6e2 Fix build on platforms without INFINITY
Use Q_INFINITY from qnumeric.h as portable wrapper.

Change-Id: I2dc2ef1c5e31ace89730b010c2a884e5b532b01f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-02-09 10:47:30 +01:00
Lars Knoll 90a710fe96 Move the Array code into Object itself
This allows simplifications of the code moving forward.

Change-Id: If65809fd3646e6dc2da6bc62190d6465b1b1ec12
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-02-04 15:47:32 +01:00
Lars Knoll b2bf89d53c Remove some unused methods
Change-Id: Ib487078db163e03bb0bd1be762f1aa0da04434b4
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-01-30 17:34:12 +01:00
Lars Knoll 38094f774b Add an identifier cache
This is very similar to the old string cache with a slight
twist:

Only strings we know will be used as identifiers (property names)
get entered into the cache. These are then also persistent and
won't ever get collected.

Change-Id: Id441694ef9faf30a87433ae22eb833d1db1d84f1
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-01-30 15:26:33 +01:00
Jędrzej Nowacki 74fba4d806 Say hello to QtV4 module.
Change-Id: I507cd5707b7d7223a0d901cf939896fb2649b684
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-01-30 13:20:40 +01:00