| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
This also includes a copy of the test262.py script to run
all the tests, which we are going to modify to suit our needs.
Change-Id: I15fd7d0278e39c7076d4e45650fbcf786f7a483f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
| |
Make sure to do leaveLoop() after enterLoop() when processing labelled
statements.
Fixes hang in ch12/12.8/S12.8_A3
Change-Id: Iee96ea515524e9ea879f7528dc43e552b1343020
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
| |
Fixes expected failure of ch12/12.8/S12.8_A1_T2 and others
Change-Id: I261d649f6a29bbd6debfca35e7ccaf1a0a7006b9
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The construct
do {
...
continue;
} while (condition)
Would result in the body basic block ending with a jump to the loop body,
causing an infinite loop.
Instead we have to place the condition into an extra block and set that one as
the target for continue.
This is also covered by ch12/12.14/S12.14_A9_T2, which uses such a loop.
Change-Id: If06de112b338b74b9a49e3d6b51078463645196d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Properties in object literals are defined using
defineOwnProperty, so that they get set even if
the object prototype contains a non writable
property with the same name.
This fixes all remaining test cases for 11.1.5
Change-Id: I3928a144d09c51c5bf20a25bcb1c6c3c243975ee
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
| |
Object literals can only contain duplicated values for data
properties in non strict mode. In all other cases throw a
syntax error.
Change-Id: Icb06ba1c343daffdb6a0532a08f7b9ae027e4e45
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
| |
This will be required later on when Array gets fixed
properly.
Change-Id: I37eccf94b202c9a003aab30b078ee24c422359a1
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: Iae09ec815e3307615299bf97741716b3671c9560
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
| |
Implement support for defining accessor properties
through { ... }. Implementation for moth is pending.
Change-Id: I558b6811bc5656dc0fae78c49e23155043ce9cb1
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: Ieb371c42790b19ee1f12b3622041ac139e1e03c2
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
| |
We don't ship the implementation and we only need a really simple stub
to compile the code we _really_ want to keep.
Change-Id: I36bd0f836b963ed38feb10b970326a4dcd5cbc12
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
| |
...by using the double-conversion code from
http://code.google.com/p/double-conversion/
Change-Id: I4cfc17b65c811b7c20a856d1d38961bec78d85a2
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
| |
Add missing friend declarations for required access to private
fields and moved operator< into namespace so that the compiler can
find it when calling qSort().
Change-Id: I6c94b6fc79c5039903e62ce08b0a6b273133e104
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
| |
Since we have now only one memory manager, we might as well let the
ExecutionEngine create and own it.
Change-Id: I908adadf64da59e0b8f4c09d4d9502785399cb99
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
| |
All we need is the starting address of the stack, not the entire class.
Change-Id: I447482f6900afa0a66efce2dcc32239828b64f8e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
| |
Move some boolean flags from Object and FunctionObject
into the Managed class and reduce the size of these
Objects.
Change-Id: Iee9ab09407ec44b447f9597a9b1d55e9092e7ad5
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
| |
This simplifies the memory manager further, and removes
some book-keeping overhead.
Change-Id: I969c092cee822f7f0ab89e09d76b5c68c6bd50d2
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The old code could lead to crashes because we didn't correctly
check the alignment of objects in the managed heaps. A bogus
pointer on the stack (which can easily happen), can then
point into the middle of an object in the heap and cause
memory corruption.
Change-Id: I741401d278a7926a549810707ca46435bdaf7cc9
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
| |
Unify the base class with the GC memory manager and
remove the memory manager that didn't manage ;-)
Change-Id: I8579bc80b66688e98203448afc645a231c97fede
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
| |
Preparations for some further cleanups.
Change-Id: Id9fa3a8541748ee70085bc84985ac508f989e1d3
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
| |
Pin all temps that escape BBs, not only the return value.
Change-Id: Idf21d117bfd12224cbff4cef35766c454189a5fa
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
| |
Change-Id: Ia02ad1af3bb0f429a6078029bf7aaee5a17f3413
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
| |
Use page allocations instead of the regular libc heap for the chunks
of the memory manager. This will allow for easier return of the memory
to the operation system in the future.
Change-Id: Ie370e54042251b17335e94b497933f06ab62ecc3
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
| |
This also brings in the page allocation code from WTF
Change-Id: If6f9fdb4fb2d10530f06e3e9524c95ff5876d084
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
| |
Change-Id: I53b7301c28314210f96acc358744ff7e2a65546d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
| |
Change-Id: I2bc0c6130248dfca6764222bcc95a4d2e6f82233
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: Ic73a8e4284fd7644e37251498a659e107e49f0d8
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
| |
By passing the inCatch/hasException temps to
builtin_delete_exception_handler, the TEMPs are marked as alive all
through the exception handling block.
Change-Id: Ib0f17059e04c03ca98d264759bb2a7e4786ed9be
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
| |
Change-Id: Ie2ff005e2914bc372e4c6d08dd28d34efdde8da3
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
| |
Change-Id: If5b5a91a69d6b6bf0fd3eaf4c21a42c575839be2
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
| |
While the name may suggest that the blah variable is a very performance
critical piece of the stack traversal algorithm, it turns out to be of little
relevance :)
Change-Id: Ia12eaf5f169a6eae64f005364da7452e1ef86daf
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
| |
Change-Id: I5940e0b1e72c06420ae95ff3adfd78572888c886
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
| |
Also fixed up other error messages.
Change-Id: I26bfab761ab6a8ced3755a8e3dfbc42d428194e3
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: I5c6903446a252139fde4ce180f6c01a5eff85406
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
| |
The test_interpreter script waste a lot of time in the kernel
process, that should be fixed. For know magic '-j' option allows
to speedup test execution a bit.
Change-Id: Ib1f0cbecc2053e434eb8df4e2e1edb22bc3e7846
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
section 10.5 requires that function definitions get initialized
at the beginning of the method. variable declarations do not
override the function definitions. assignments to variables
happen when they appear in the source code.
Also remove a duplicated intializations of variables to
undefined. This is already being done by initCallContext
or builtin_declare_vars, so no need to do it in the generated
code again.
Change-Id: I63805b97017f8676d57e0662073689e852b6ac23
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
| |
references to managed objects
Change-Id: Ie4a26ddc75abd1382af29b966915437ad485a041
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* For the traversal range, don't take the top of the stack but one
value pointer below, as the top is actually the end of the stack
and we can't read beyond it. For the bottom go one pointer beyond
a locally declared (and thus aligned) value. This ensure sane and
aligned boundaries for the traversal.
* For quick elimination of pointer values on the stack that do
not actually point into one of our managed objects, implement Lars'
idea: Take the heap chunk beginning and end pointers and do a lower
bound search. An even index indicates that the pointer is before the
start of a chunk, thus out of range. An odd index indicates that it
is before a chunk end and therefore in range.
* For obscure reasons we also seem to sometimes hit "dangling" pointers
into otherwise already dealloc'ed objects (as debug output in dealloc()
indicates), so protect ourselves against that.
Change-Id: Ic3337932777871bec370a3441581801273d53bd4
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
|
| |
There was a bug in the implementation of unwindException(),
that caused failures when called twice from one catch statement.
Also refactor and simplify the TryStatement code further by
introducing a rethrow builtin.
Change-Id: I77bf37f1707042f402488ef2dfaf4e59bf8dc82a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
| |
Duplicated names for arguments are allowed in JS, later ones
shadow previous ones. So we need to iterate from back to front
to resolve the names correctly.
Change-Id: If427ce9d11ac561457c24e41f79c11263fa0a8dc
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
| |
If we do not have a Function or the function doesn't
need activation, we directly generate code to get and
set formals and locals, so there's no need to look
these up from the execution context.
Change-Id: I888fc65fd2527f9102fab7cae2822600f87f9edc
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
| |
use String::isEqualTo instead of qmljs_string_equal to
allow for inlining.
Change-Id: I55d41ab34f1e04cb0f752d8018e3ce9b11a90d1d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: I1634ce8b105ee0d22b67fafa45962fe7c22b9f3a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
| |
Simplify the code and unify the generic part of object construction
in FunctionObject::construct.
Change-Id: Ie430458bedaa211efba37c8283e26a9b84e6764a
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
|
|
|
|
|
|
|
|
|
|
|
| |
In some cases, the first argument for runtime calls and the
return value where being placed in the same location on the
stack leading to corrupted return values. This mainly
happens when no local variable are defined, but other
functions are being called.
Change-Id: I93f1e518ce2998f62fb9f38c538dd718f41e522d
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
|
|
|
|
|
|
|
|
| |
throw in strict mode, and ignore delete operations on
arguments otherwise.
Change-Id: Icd55f1c99dc5e5c35b3fea1ce5fdf46d5295dbaf
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
| |
Function objects when called as a contructor should return
the return value of the called function if the return value
is an object (see 13.2.2)
Change-Id: I9d9e52859935d62b7f949fff46cb00d257bad90f
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
| |
new Object(x) should convert x to an object and return
it if x is not null or undefined
Change-Id: Icb5547a23df83018757901bfecb5f024610e7c68
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
| |
In destructor we do not need to create a copy off all pointers.
By hiding StringPool::strings in class private
section we reduce risk of it being accidentally copied.
Change-Id: I1b9df6bf9e49bd6926e84b8eac6b3d904277e50a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
| |
The member was a duplicate of stringPool, there is no point in caching
a cache.
Change-Id: If34c80ee120dfaff1dd94326625b02d8014806dc
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|