profile/ivi/qtjsbackend.git
11 years agoUpdate to 5.0.0-beta1 83/1783/1 1.0 1.0_branch accepted/trunk/20120919.004224 submit/trunk/20120918.230636
Rusty Lynch [Tue, 18 Sep 2012 23:04:35 +0000 (16:04 -0700)]
Update to 5.0.0-beta1

11 years agoupdating snapshot 82/1782/1
Rusty Lynch [Mon, 9 Jul 2012 16:54:19 +0000 (09:54 -0700)]
updating snapshot

11 years agoAdd packaging files for Tizen 81/1781/1
Rusty Lynch [Wed, 13 Jun 2012 00:53:30 +0000 (17:53 -0700)]
Add packaging files for Tizen

11 years agoCompile v8.cc under C++11 mode using MinGW-w64 4.7.1 80/1780/1
Yuchen Deng [Mon, 20 Aug 2012 11:00:42 +0000 (19:00 +0800)]
Compile v8.cc under C++11 mode using MinGW-w64 4.7.1

error: 'random' was not declared in this scope

WIN32 is not defined on C++11 mode, but _WIN32 is defined.
Simply change WIN32 to _WIN32 is enough

Change-Id: I8cad360945e7f31c34a70f54c754fafeffc2f36a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
11 years agofollow rename of qt_module_config.prf to qt_module.prf 79/1779/1
Oswald Buddenhagen [Tue, 7 Aug 2012 17:09:59 +0000 (19:09 +0200)]
follow rename of qt_module_config.prf to qt_module.prf

Change-Id: I6e8c72771340b72a457072c8b3e85c039465639b
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
11 years agoOnly read symbol_id for strings which are known to be symbols 78/1778/1
Chris Adams [Thu, 9 Aug 2012 04:34:58 +0000 (14:34 +1000)]
Only read symbol_id for strings which are known to be symbols

Ensures that uninitialised symbol_id is not dereferenced if the
string is created on the stack via code generators instead of on
the heap.

Task-number: QTBUG-23126
Change-Id: I083586ad46796e70b0246413742d326c60f379e5
Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
11 years agoSet the Qt API level to compatibility mode in all tests. 77/1777/1
Thiago Macieira [Wed, 1 Aug 2012 12:11:56 +0000 (14:11 +0200)]
Set the Qt API level to compatibility mode in all tests.

Qt 5.0 beta requires changing the default to the 5.0 API, disabling
the deprecated code. However, tests should test (and often do) the
compatibility API too, so turn it back on.

Task-number: QTBUG-25053
Change-Id: I43873a55fbaf106efc4fb2955569a643aff19480
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
11 years agoMark v8 as an internal module. 76/1776/1
Stephen Kelly [Mon, 23 Jul 2012 07:39:38 +0000 (09:39 +0200)]
Mark v8 as an internal module.

This causes the avoidance of creation of CMake files.

Change-Id: I089de2ceb6b7dfc9673f1273c87977757686f820
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
11 years agoAdd the CMake directory created during unit testing to .gitignore. 75/1775/1
Stephen Kelly [Mon, 23 Jul 2012 07:57:27 +0000 (09:57 +0200)]
Add the CMake directory created during unit testing to .gitignore.

Change-Id: I60e4fe6a07f1060876146275e2bbe91e7bebb467
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
11 years agouse centralized handling of QT_BUILD_PARTS 74/1774/1
Oswald Buddenhagen [Tue, 3 Jul 2012 19:38:05 +0000 (21:38 +0200)]
use centralized handling of QT_BUILD_PARTS

Change-Id: Ie03a620853eb315716b2586ebe556320788a1547
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
11 years ago[V8] QNX: Initialize mutex in SignalSender
Sean Harmer [Mon, 25 Jun 2012 11:13:49 +0000 (12:13 +0100)]
[V8] QNX: Initialize mutex in SignalSender

This prevents an assertion in ScopedLock on QNX following the recent
V8 version bump.

Change-Id: I4dde3021a26293e131269c58781739e078169d19
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
11 years agoMerge branch 'buildsystem'
Oswald Buddenhagen [Tue, 19 Jun 2012 16:42:13 +0000 (18:42 +0200)]
Merge branch 'buildsystem'

Change-Id: I1c898c399cab02bcaeeb2bdf6c86e06aa96c5fe9

11 years agocompile mkv8snapshot in host mode
Oswald Buddenhagen [Thu, 12 Apr 2012 17:57:03 +0000 (19:57 +0200)]
compile mkv8snapshot in host mode

this permits actually using it for x-compiles

Change-Id: Id89e53cf2394e6f6773e2b06946769d4951eae80
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
11 years agobuild system cleanups
Oswald Buddenhagen [Thu, 12 Apr 2012 10:15:23 +0000 (12:15 +0200)]
build system cleanups

- load(qt_module) => load(qt_build_config)
- remove:
  - CONFIG+=module (obsolete)
  - code relating to module version headers (automated now)
  - %mastercontent assignment (automated now)
  - pointless QPRO_PWD assignments
  - qmake -project boilerplate

Change-Id: I7b2cd36920a2b56bf745965a8a682d85af3ed48e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
11 years agoswitch to new-style configure tests
Oswald Buddenhagen [Thu, 5 Apr 2012 12:45:38 +0000 (14:45 +0200)]
switch to new-style configure tests

Change-Id: Ia374567babe00a5ca0692e95e88b154d846e0882
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
11 years agoauto-generate module pris
Oswald Buddenhagen [Thu, 12 Apr 2012 08:53:12 +0000 (10:53 +0200)]
auto-generate module pris

Change-Id: Ia7eb1091c62269a7787ad4a21aac8ecfa5a80f66
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
11 years ago[V8] Implement OS::SetUp() and OS::TearDown() for QNX
Sean Harmer [Wed, 13 Jun 2012 12:42:03 +0000 (13:42 +0100)]
[V8] Implement OS::SetUp() and OS::TearDown() for QNX

This is needed to not have unresolved symbols following a V8 version
bump.

Change-Id: Ie5888d3256f2c93514f0b78463f6a9fe1b53b2e0
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
11 years ago[V8] Implement new parts of platform port for QNX
Sean Harmer [Thu, 26 Apr 2012 14:53:19 +0000 (15:53 +0100)]
[V8] Implement new parts of platform port for QNX

Change-Id: I066a4e21aa42134a446a4e693de90e3639d3aecd
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
11 years ago[V8] Update QNX platform port so that it builds once again
Sean Harmer [Thu, 26 Apr 2012 13:03:16 +0000 (14:03 +0100)]
[V8] Update QNX platform port so that it builds once again

Change-Id: I2802faac0d9e72f5db4a64935f4dae91319ff786
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
11 years ago[V8] Disable randomize hashes in V8
Peter Varga [Mon, 16 Apr 2012 12:35:27 +0000 (14:35 +0200)]
[V8] Disable randomize hashes in V8

Should be disabled for now due to regressions in QtDeclarative auto
tests.

Change-Id: I59ea5a22c9b36465148472ad8fe6da2504899371
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
11 years ago[V8] Fix compilation with Intel CC.
Thiago Macieira [Thu, 1 Sep 2011 09:30:40 +0000 (11:30 +0200)]
[V8] Fix compilation with Intel CC.

Issue reported upstream at:
http://code.google.com/p/v8/issues/detail?id=1885
http://code.google.com/p/v8/issues/detail?id=689

Change-Id: I8ee37e11b42c724a450e56c10f01e0fbb51bc6f0
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
11 years ago[V8] Add support for QNX platform
Sean Harmer [Fri, 13 Jan 2012 18:32:41 +0000 (18:32 +0000)]
[V8] Add support for QNX platform

This submission is based on code originally contributed by Jeff Rogers <jrogers@rim.com> with permission from Research in
Motion.

We have tried to make this change as unobtrusive as possible. For example in the atomic_ops.h header we have added a
conditional include for a qnx-specific atomicops_internals_arm_qnx.h as the existing atomicops_internals_arm_gcc.h is
actually Linux-specific despite the name of the file. In the longer term it would make sense to use an asm implementation
that is only dependent upon the CPU rather than OS-specific system calls. See qtbase/src/corelib/arch/qatomic_armv*.h
for a good reference.

Here we decided not to risk breaking existing platforms for the initial introduction of this new platform.

The QNX platform integration is built on top of the posix base.

Change-Id: If0bdf3ea3a6888472e6389ab6e74c76511e94093
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
11 years ago[V8] Add flag to avoid breakpoint relocation
Kai Koehne [Thu, 10 Nov 2011 15:00:37 +0000 (16:00 +0100)]
[V8] Add flag to avoid breakpoint relocation

Add a flag that prevents v8 from relocating breakpoints across
line boundaries.

Change-Id: I29dea335ad362d995326dea09ecf4d3aba3f462d
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
11 years ago[V8] Fix warnings
Aaron Kennedy [Fri, 27 May 2011 03:04:15 +0000 (13:04 +1000)]
[V8] Fix warnings

Change-Id: I0e11d9ae92d22a7af118a5b532284411a0e72775
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
11 years ago[V8] Remove execute flag from v8-debug.h
Aaron Kennedy [Thu, 25 Aug 2011 01:09:58 +0000 (11:09 +1000)]
[V8] Remove execute flag from v8-debug.h

Change-Id: I0241226cac9d4c690edf27041400579e5f4fff0b
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
11 years ago[V8] QtScript/V8: Add new v8 api to check if a value is an error.
Jedrzej Nowacki [Tue, 7 Dec 2010 10:56:42 +0000 (11:56 +0100)]
[V8] QtScript/V8: Add new v8 api to check if a value is an error.

New function v8::Value::IsError was created.

This API is experimental and added only for the purposes of our
research.

Change-Id: Id2f5a6728d15fc02ae3c03e6b49928afed0f62fa
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
11 years ago[V8] Allow a script to be flagged as "native"
Aaron Kennedy [Fri, 9 Sep 2011 04:16:12 +0000 (14:16 +1000)]
[V8] Allow a script to be flagged as "native"

Native scripts do not appear in backtraces, or in the source and
line number when exceptions are thrown from within them.  This is
useful to be able to write code in JavaScript instead of C++ and
still have it appear sensibly to the user.

Change-Id: I0a772f7bdde24257b0aa19216b932f6a546ab918
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
11 years ago[V8] Add custom object compare callback
Aaron Kennedy [Thu, 27 Oct 2011 12:40:00 +0000 (13:40 +0100)]
[V8] Add custom object compare callback

A global custom object comparison callback can be set with:
    V8::SetUserObjectComparisonCallbackFunction()
When two JSObjects are compared (== or !=), if either one has
the MarkAsUseUserObjectComparison() bit set, the custom comparison
callback is invoked to do the actual comparison.

This is useful when you have "value" objects that you want to
compare as equal, even though they are actually different JS object
instances.

Change-Id: Id1794ffc17131566c7ee30ab5fcf11445dab2ab2
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
11 years ago[V8] Allow access to the calling script data
Aaron Kennedy [Fri, 14 Oct 2011 07:03:06 +0000 (17:03 +1000)]
[V8] Allow access to the calling script data

Change-Id: I626c8bd090b83af1379fbd85e42b2dae44b5723d
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
11 years ago[V8] Introduce a QML compilation mode
Aaron Kennedy [Thu, 27 Oct 2011 12:34:16 +0000 (13:34 +0100)]
[V8] Introduce a QML compilation mode

In QML mode, there is a second global object - known as the QML
global object.  During property resolution, if a property is not
present on the JS global object, it is resolved on the QML global
object.

This global object behavior is only enabled if a script is being
compiled in QML mode.  The object to use as the QML global object
is passed as a parameter to the Script::Run() method.  Any function
closures etc. created during the run will retain a reference to this
object, so different objects can be passed in different script
runs.

Change-Id: I86851683200d02208379744c887dfebc010a7ccc
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
11 years ago[V8] Generalize external object resources
Aaron Kennedy [Tue, 4 Oct 2011 06:06:09 +0000 (16:06 +1000)]
[V8] Generalize external object resources

V8 was already able to manage and finalize an external string
resource.  This change generalizes that mechanism to handle a
single generic external resource - a v8::Object::ExternalResource
derived instance - on normal JSObject's.

This is useful for mapping C++ objects to JS objects where the
C++ object's memory is effectively owned by the JS Object, and
thus needs to destroyed when the JS Object is garbage collected.
The V8 mailing list suggests using a weak persistent handle for
this purpose, but that seems to incur a fairly massive performance
penalty for short lived objects as weak persistent handle callbacks
are not called until the object has been promoted into the old
object space.

Change-Id: I8f1a1f2a2be052339e8507b98058b289c7f16b0a
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
11 years ago[V8] Add a "fallback" mode for named property interceptors
Aaron Kennedy [Thu, 27 Oct 2011 10:31:56 +0000 (11:31 +0100)]
[V8] Add a "fallback" mode for named property interceptors

By default interceptors are called before the normal property
resolution on objects.  When an interceptor is installed as a
"fallback" interceptor, it is only called if the object doesn't
already have the property.

In the case of a global object having an fallback interceptor,
the interceptor is not invoked at all for var or function
declarations.

Change-Id: Icf2b84aeca37358df22d6e2229dddd6ff6e1876e
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
11 years ago[V8] Add hashing and comparison methods to v8::String
Aaron Kennedy [Tue, 4 Oct 2011 05:04:21 +0000 (15:04 +1000)]
[V8] Add hashing and comparison methods to v8::String

This allows us to more rapidly search for a v8::String inside a hash
of QStrings.

Change-Id: I3243d9c97f93bc521cbbdca79cf9b2edac5969b7
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
11 years agoUpdated V8 from git://github.com/v8/v8.git to 3e6ec7e018bbf2c63ef04b85ff688198ea204c04
Peter Varga [Wed, 13 Jun 2012 07:21:17 +0000 (09:21 +0200)]
Updated V8 from git://github.com/v8/v8.git to 3e6ec7e018bbf2c63ef04b85ff688198ea204c04

Update V8 source to version 3.11.4

* Performance and stability improvements on all platforms.
* Fixed native ARM build (issues 1744, 539)
* Fixed several bugs in heap profiles (including issue 2078).
* Throw syntax errors on illegal escape sequences.
* Made handling of const more consistent when combined with 'eval' and
  'with'.
* Fixed V8 on MinGW-x64 (issue 2026).
* Put new global var semantics behind a flag until WebKit tests are
  cleaned up.
* Enabled inlining some V8 API functions.
* Enabled MIPS cross-compilation.
* Implemented clearing of CompareICs (issue 2102).
* Fixed python deprecations. (issue 1391)
* Fixed GCC 4.7 (C++11) compilation. (issue 2136)

Change-Id: I72594bd22356391dd55e315c022d0c9f3fd5b451
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
11 years agoFix GCC 4.7 (C++11) compilation.
yangguo@chromium.org [Thu, 7 Jun 2012 22:40:36 +0000 (15:40 -0700)]
Fix GCC 4.7 (C++11) compilation.

Cherry-pick of 90d12ab92e857dbb437cd4e0c132369d27947cbc from v8 git.

Original patch by Olivier Goffart <ogoffart@kde.org>.

BUG=v8:2136
TEST=

Review URL: https://chromiumcodereview.appspot.com/10387210

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@11600 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

Change-Id: Ib0f30c83596b66db053600cdae4ca86814046dc4
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
11 years agoV8: Fix cross builds with win32-g++-cross mkspec
Yuchen Deng [Fri, 18 May 2012 14:12:19 +0000 (22:12 +0800)]
V8: Fix cross builds with win32-g++-cross mkspec

MinGW installations on case-sensitive filesystems expect lowercase names
of include-libraries and (usually) include files.
When crosscompiling on Linux (targeting MS Windows) linking fails
because mingw is looking for non-existent include-libraries.
Using lowercase names solves this.

Change-Id: If842ffbbc1307c1f338742402b75227eeab6453c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
11 years ago[V8] Add support for MinGW-w64
Jonathan Liu [Sat, 19 May 2012 14:25:37 +0000 (00:25 +1000)]
[V8] Add support for MinGW-w64

This includes several upstream patches to allow V8 to work properly
with MinGW-w64.

Upstream patches:
- https://chromiumcodereview.appspot.com/9959050
- https://chromiumcodereview.appspot.com/10103030
- https://chromiumcodereview.appspot.com/10019012
- https://chromiumcodereview.appspot.com/10108022
- https://chromiumcodereview.appspot.com/10116001

Change-Id: I86876aa67a5bdea1208c7ee33a739eb7c00fd72b
Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
11 years ago[V8] Update expected results of V8's cctests
Peter Varga [Fri, 18 May 2012 14:06:54 +0000 (16:06 +0200)]
[V8] Update expected results of V8's cctests

Expected results need to be updated for snapshot build due to the change
in src/bootstrapper.cc performed by "[V8] Introduce a QML compilation
mode" patch.

Change-Id: Ie067b53dde6c885a25ee434a82816439f2a75bfd
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
11 years agotest: Allow linking to the gyp build mips/arm release/debug build
Holger Hans Peter Freyther [Tue, 15 May 2012 19:46:25 +0000 (21:46 +0200)]
test: Allow linking to the gyp build mips/arm release/debug build

SCons will be deprecated soon and the new gyp buildsystem allows to
build for MIPS/ARM debug/release at the same time in different build
directories. Add Makefile targets to link arm/mips test applications.
I plan to use them for nigthly builds on my public jenkins.

Change-Id: I16e7637e1066d1f27724ec3403bcc770cd190a61
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
11 years agoRe-enable snapshots for non-cross-compiled builds
Kent Hansen [Mon, 7 May 2012 07:17:34 +0000 (09:17 +0200)]
Re-enable snapshots for non-cross-compiled builds

This reverts commit 9a006574a7036d0d47b359dcf2598860ddbfa399.

Since commit 3c47b52bd37488d41a3ad068de7976c838b7d63c in qtbase
("Add cross_compile to qconfig.pri for global advertising"), the
cross_compile variable is available to modules outside of qtbase
again, so we can use it.

Change-Id: I2797d75af362cea02cfda519ea772d610e504da4
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
11 years agoMIPS: Removed unused variables.
yangguo@chromium.org [Fri, 27 Apr 2012 12:57:01 +0000 (12:57 +0000)]
MIPS: Removed unused variables.

These were found by compilation errors with gcc 4.6.

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10253004
Patch from Daniel Kalmar <kalmard@homejinni.com>.

Change-Id: Ifb75bafb480a607749f090986f1d593fcc64ee29
From-svn: r11459
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
11 years agomips: Fix the global compare routines for mips
Holger Hans Peter Freyther [Wed, 9 May 2012 12:10:30 +0000 (14:10 +0200)]
mips: Fix the global compare routines for mips

The code got broken during the 3.10.1 upgrade. Registers a2 and a3
will hold the maps for a0 and a1. Use the right registers to fetch
the map fields.

Change-Id: I8678ddd1e6126cca6c80dc811b08a5c1b933cb35
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
11 years agomips: Add the qml mode to the lithium code generation as well
Holger Hans Peter Freyther [Tue, 8 May 2012 20:55:37 +0000 (22:55 +0200)]
mips: Add the qml mode to the lithium code generation as well

When adding qml mode to the MIPS backend, the MIPS JIT didn't have
support for lithium yet. On the upgrade to 3.10.1 MIPS gained this
support but the qml mode was not patched into the lithium code. Add
the qml mode to lithium based on the patch for the ARM jit.

Change-Id: Ia0aba2fd8b7533f38e864b54aa1d4df1e02f26c7
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
11 years agov8: Fix the compilation of the standalone test on GNU/Linux systems
Holger Hans Peter Freyther [Wed, 9 May 2012 08:35:37 +0000 (10:35 +0200)]
v8: Fix the compilation of the standalone test on GNU/Linux systems

Without including string.h, memcmp will not be known and will lead
to the following error:
v8main.cpp:59:5: error: â€˜::strcmp’ has not been declared
v8main.cpp:60:5: error: â€˜::strcmp’ has not been declared
...

Change-Id: I82382ca930f654c090a78a39f54abc8fb0a88f63
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
11 years agoFix regression in custom object comparison on arm
Kent Hansen [Wed, 9 May 2012 08:14:54 +0000 (10:14 +0200)]
Fix regression in custom object comparison on arm

When the "Add custom object compare callback" patch was rebased on
top of V8 3.10.1, a regression was introduced; the
kUseUserObjectComparison flag was fetched from the wrong location.

With this fix, tst_v8::userobjectcompare() passes again on arm.

Change-Id: I7f0dc2cc9d077b2018facb413dbe7a119dd9de5f
Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
11 years agoFix regression in eval compilation on arm
Kent Hansen [Wed, 9 May 2012 06:31:08 +0000 (08:31 +0200)]
Fix regression in eval compilation on arm

When the "Introduce a QML compilation mode" patch was rebased on top
of V8 3.10.1, a regression was introduced that caused the last two
arguments to Runtime_ResolvePossiblyDirectEval to be passed in the
wrong order.

With this fix, tst_v8::eval() passes again on arm.

Change-Id: I0c518eb56e4c390f7684d8e5c38cce3dece3085e
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
11 years agoAdd testcases for fallback interceptors
Peter Varga [Thu, 12 Apr 2012 13:08:28 +0000 (15:08 +0200)]
Add testcases for fallback interceptors

Change-Id: I85d31c5443cbfca7462aa671d59a50f22fead9c4
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
12 years ago[V8] Implement new parts of platform port for QNX
Sean Harmer [Thu, 26 Apr 2012 14:53:19 +0000 (15:53 +0100)]
[V8] Implement new parts of platform port for QNX

Change-Id: I9caea92e9c45511c2450f15dd6b22c8c48bafe52
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
12 years ago[V8] Update QNX platform port so that it builds once again
Sean Harmer [Thu, 26 Apr 2012 13:03:16 +0000 (14:03 +0100)]
[V8] Update QNX platform port so that it builds once again

Change-Id: I3e1709eb9560e1016533af9e7889c764782ba7fb
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
12 years ago[V8] Disable randomize hashes in V8
Peter Varga [Mon, 16 Apr 2012 12:35:27 +0000 (14:35 +0200)]
[V8] Disable randomize hashes in V8

Should be disabled for now due to regressions in QtDeclarative auto
tests.

Change-Id: I74c774103a89c09f30d1f7698e999052c3ae1df9
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
12 years agoFix compilation after V8 update
Peter Varga [Tue, 10 Apr 2012 12:00:19 +0000 (14:00 +0200)]
Fix compilation after V8 update

Change-Id: Icd4dc1be4e8b532212e3f7c43ed67c1dab21c9fa
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
12 years ago[V8] Fix compilation with Intel CC.
Thiago Macieira [Thu, 1 Sep 2011 09:30:40 +0000 (11:30 +0200)]
[V8] Fix compilation with Intel CC.

Issue reported upstream at:
http://code.google.com/p/v8/issues/detail?id=1885
http://code.google.com/p/v8/issues/detail?id=689

Change-Id: I050e505e6a1977203ef95b51468d420507295203
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
12 years ago[V8] Add support for QNX platform
Sean Harmer [Fri, 13 Jan 2012 18:32:41 +0000 (18:32 +0000)]
[V8] Add support for QNX platform

This submission is based on code originally contributed by Jeff Rogers <jrogers@rim.com> with permission from Research in
Motion.

We have tried to make this change as unobtrusive as possible. For example in the atomic_ops.h header we have added a
conditional include for a qnx-specific atomicops_internals_arm_qnx.h as the existing atomicops_internals_arm_gcc.h is
actually Linux-specific despite the name of the file. In the longer term it would make sense to use an asm implementation
that is only dependent upon the CPU rather than OS-specific system calls. See qtbase/src/corelib/arch/qatomic_armv*.h
for a good reference.

Here we decided not to risk breaking existing platforms for the initial introduction of this new platform.

The QNX platform integration is built on top of the posix base.

Change-Id: I2ba25c227401c540c52067c31898e81a1f25855d
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
12 years ago[V8] Add flag to avoid breakpoint relocation
Kai Koehne [Thu, 10 Nov 2011 15:00:37 +0000 (16:00 +0100)]
[V8] Add flag to avoid breakpoint relocation

Add a flag that prevents v8 from relocating breakpoints across
line boundaries.

Change-Id: I007f06744094add7e700818b010e021a649e2294
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
12 years ago[V8] Fix warnings
Aaron Kennedy [Fri, 27 May 2011 03:04:15 +0000 (13:04 +1000)]
[V8] Fix warnings

Change-Id: I2cef35e1d153735c3de5730ff763da85c5d534a5
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
12 years ago[V8] Remove execute flag from v8-debug.h
Aaron Kennedy [Thu, 25 Aug 2011 01:09:58 +0000 (11:09 +1000)]
[V8] Remove execute flag from v8-debug.h

Change-Id: I2c930d05a6eaf5599920c682552a6a24dd3a6a2c
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
12 years ago[V8] Fix deprecated Python code
Kent Hansen [Fri, 2 Sep 2011 10:03:09 +0000 (12:03 +0200)]
[V8] Fix deprecated Python code

Needed to make the scripts run on Python 3, which is the
default python interpreter on some newer distros.

Patch from http://code.google.com/p/v8/issues/detail?id=1391

Change-Id: I5d5a0250b252b114586cfad7b1a713fde1cae1cf
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
12 years ago[V8] QtScript/V8: Add new v8 api to check if a value is an error.
Jedrzej Nowacki [Tue, 7 Dec 2010 10:56:42 +0000 (11:56 +0100)]
[V8] QtScript/V8: Add new v8 api to check if a value is an error.

New function v8::Value::IsError was created.

This API is experimental and added only for the purposes of our
research.

Change-Id: I21c8a3484c2b5a0341b932bd81492b8ebc1f0e05
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
12 years ago[V8] Allow a script to be flagged as "native"
Aaron Kennedy [Fri, 9 Sep 2011 04:16:12 +0000 (14:16 +1000)]
[V8] Allow a script to be flagged as "native"

Native scripts do not appear in backtraces, or in the source and
line number when exceptions are thrown from within them.  This is
useful to be able to write code in JavaScript instead of C++ and
still have it appear sensibly to the user.

Change-Id: I324ad60d8712c0afba7f0e4f26ce5ab931ae91dd
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
12 years ago[V8] Add custom object compare callback
Aaron Kennedy [Thu, 27 Oct 2011 12:40:00 +0000 (13:40 +0100)]
[V8] Add custom object compare callback

A global custom object comparison callback can be set with:
    V8::SetUserObjectComparisonCallbackFunction()
When two JSObjects are compared (== or !=), if either one has
the MarkAsUseUserObjectComparison() bit set, the custom comparison
callback is invoked to do the actual comparison.

This is useful when you have "value" objects that you want to
compare as equal, even though they are actually different JS object
instances.

Change-Id: Icd3419349874ee845684fff8455862da73f5ff2d
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
12 years ago[V8] Allow access to the calling script data
Aaron Kennedy [Fri, 14 Oct 2011 07:03:06 +0000 (17:03 +1000)]
[V8] Allow access to the calling script data

Change-Id: I6efcd64530357a5ca789cd6cccd5426f370b64eb
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
12 years ago[V8] Introduce a QML compilation mode
Aaron Kennedy [Thu, 27 Oct 2011 12:34:16 +0000 (13:34 +0100)]
[V8] Introduce a QML compilation mode

In QML mode, there is a second global object - known as the QML
global object.  During property resolution, if a property is not
present on the JS global object, it is resolved on the QML global
object.

This global object behavior is only enabled if a script is being
compiled in QML mode.  The object to use as the QML global object
is passed as a parameter to the Script::Run() method.  Any function
closures etc. created during the run will retain a reference to this
object, so different objects can be passed in different script
runs.

Change-Id: Id3753db6f5723f6d624bd497d6f606244a4ff09a
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
12 years ago[V8] Generalize external object resources
Aaron Kennedy [Tue, 4 Oct 2011 06:06:09 +0000 (16:06 +1000)]
[V8] Generalize external object resources

V8 was already able to manage and finalize an external string
resource.  This change generalizes that mechanism to handle a
single generic external resource - a v8::Object::ExternalResource
derived instance - on normal JSObject's.

This is useful for mapping C++ objects to JS objects where the
C++ object's memory is effectively owned by the JS Object, and
thus needs to destroyed when the JS Object is garbage collected.
The V8 mailing list suggests using a weak persistent handle for
this purpose, but that seems to incur a fairly massive performance
penalty for short lived objects as weak persistent handle callbacks
are not called until the object has been promoted into the old
object space.

Change-Id: I83677c9d906742a2bf0596961491eecb7ee60003
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
12 years ago[V8] Add a "fallback" mode for named property interceptors
Aaron Kennedy [Thu, 27 Oct 2011 10:31:56 +0000 (11:31 +0100)]
[V8] Add a "fallback" mode for named property interceptors

By default interceptors are called before the normal property
resolution on objects.  When an interceptor is installed as a
"fallback" interceptor, it is only called if the object doesn't
already have the property.

In the case of a global object having an fallback interceptor,
the interceptor is not invoked at all for var or function
declarations.

Change-Id: Ia8c2b4d37070c97d9ef327da9e62d431427afe89
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
12 years ago[V8] Add hashing and comparison methods to v8::String
Aaron Kennedy [Tue, 4 Oct 2011 05:04:21 +0000 (15:04 +1000)]
[V8] Add hashing and comparison methods to v8::String

This allows us to more rapidly search for a v8::String inside a hash
of QStrings.

Change-Id: I7d3dc8903bd2c64adc201da924ca2e4954711ec6
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
12 years agoUpdated V8 from git://github.com/v8/v8.git to 57f8959fb264354ba1a2e5118db512f588917061
Peter Varga [Tue, 17 Apr 2012 09:03:39 +0000 (11:03 +0200)]
Updated V8 from git://github.com/v8/v8.git to 57f8959fb264354ba1a2e5118db512f588917061

Update V8 source to version 3.10.1.

* Added optimizations and stability improvements on all platforms.
* Various performance improvements.
* Cleanup ScopeInfo and SerializedScopeInfo.
* Introduce extended mode.
* Implemented performance improvements to the incremental garbage
  collector.
* Fixed handling of arrays in DefineOwnProperty. (issue 1756)
* Fixed GCC 4.7 warnings.
* Performance improvements for large Smi-only arrays.
* Reduce the space used by the stack for the profiling thread.
* Reduced memory use immediately after starting V8.
* Fixed VFP detection through compiler defines. (issue 1996)
* Remove static initializers in v8. (issue 1859)
* Optimized boot-up memory use.
* Optimized regular expressions.

Change-Id: I2dad3092612de279179950dae4dd43daf0463a9f
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
12 years agoImprove .gitignore list
Yuchen Deng [Fri, 20 Apr 2012 07:50:47 +0000 (15:50 +0800)]
Improve .gitignore list

Change-Id: I14c635659abb1132f98d59d31dcfd5ab9c5afc30
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoFix compilation with Intel CC.
Thiago Macieira [Thu, 1 Sep 2011 09:30:40 +0000 (11:30 +0200)]
Fix compilation with Intel CC.

Issue reported upstream at:
http://code.google.com/p/v8/issues/detail?id=1885
http://code.google.com/p/v8/issues/detail?id=689

Change-Id: I96744851145e0077c21a03271dc1f0d165fb4672
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
12 years agoFix GCC 4.7 warnings, which are related to char being signed in GCC
vegorov@chromium.org [Tue, 13 Dec 2011 13:02:08 +0000 (13:02 +0000)]
Fix GCC 4.7 warnings, which are related to char being signed in GCC
("narrowing conversion ... inside { } is ill-formed in C++11").

* src/mksnapshot.cc: Cast "char" to "unsigned char" when outputting snapshot.
* test/cctest/test-regexp.cc: Use static_cast to uc16 as the char
literal is signed.

Review URL: http://codereview.chromium.org/8825003
Patch from Tobias Burnus <burnus@net-b.de>.

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@10241 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

Change-Id: I180b302d8d38b859b0954553985ea038f27135eb
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
12 years ago[V8] Remove dependency on _mkgmtime to determine local timezone offset
Jonathan Liu [Tue, 27 Mar 2012 09:56:36 +0000 (20:56 +1100)]
[V8] Remove dependency on _mkgmtime to determine local timezone offset

This fixes "new Date()" returning wrong hour and time zone offset with
MinGW.

Upstream patch: https://chromiumcodereview.appspot.com/9600018

Change-Id: I00036ce7c3c5b8586c4c1eaa41facf792ef0f0e6
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
12 years agomips: Fix the build on MIPS by adding the lithium files to the sources. qt-v5.0.0-alpha1
Holger Hans Peter Freyther [Thu, 22 Mar 2012 12:14:33 +0000 (13:14 +0100)]
mips: Fix the build on MIPS by adding the lithium files to the sources.

Change-Id: Idf54bb887f4627edacc40544066982684ad8ef12
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
12 years agoFix assert in stub-cache.cc when loading qml-mode functions
Kent Hansen [Tue, 20 Mar 2012 13:13:31 +0000 (14:13 +0100)]
Fix assert in stub-cache.cc when loading qml-mode functions

Commit c511fa8a6a631e45ee4075453bcb2eeb7f01ba63 introduced a
regression that could cause an assert in V8 to be triggered:

Fatal error in ../3rdparty/v8/src/stub-cache.cc, line 1171
CHECK(!CallIC::Contextual::decode( Code::ExtractExtraICStateFromFlags(flags))) failed

The assert would be triggered when 1) the "QML global object"
(implicit receiver in qml-mode evaluation) defined more than 12
properties, and 2) a function property of the QML global object was
looked up at least twice from JavaScript. In particular, the V8 IC
would assert that there should be an explicit receiver when
advancing the function lookup from pre-monomorphic state to
monomorphic state.

(The magic number 12 (number of properties needed to trigger the bug)
is the kMaxFastProperties constant. This is the threshold where V8
switches to using a dictionary for the object storage, instead of
using "fast properties" (array).)

The IC correctly determines that the property holder object (the QML
global object) is not the JS Global Object, and hence compiles it as
a "normal" call, in which it asserts that "there must be an explicit
receiver here". But in QML mode, the receiver can be implicit when
the holder is the QML global object.

Propagate this information to the stub cache to avoid the assert
triggering. The generated JIT code still works as expected when the
receiver is implicit (i.e., the receiver is always loaded).
None of the other property/function-load IC handlers have a similar
assert.

It might be worth investigating whether "QML global object" property
loading should have dedicated cache stubs; e.g. a
ComputeCallQmlGlobal() akin to ComputeCallGlobal(). This could
potentially simplify/speed up the generated code, since we can take
advantage of the read-only nature of the QML global object type right
off the bat. But that's a bigger change that would require all the
JIT compilers and the GC to be adapted.

Task-number: QTBUG-24871
Change-Id: I55e499d9c61ff264e3a96e5628e2f30292ee565d
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
12 years ago[V8] Add support for QNX platform
Sean Harmer [Fri, 13 Jan 2012 18:32:41 +0000 (18:32 +0000)]
[V8] Add support for QNX platform

This submission is based on code originally contributed by Jeff Rogers <jrogers@rim.com> with permission from Research in
Motion.

We have tried to make this change as unobtrusive as possible. For example in the atomic_ops.h header we have added a
conditional include for a qnx-specific atomicops_internals_arm_qnx.h as the existing atomicops_internals_arm_gcc.h is
actually Linux-specific despite the name of the file. In the longer term it would make sense to use an asm implementation
that is only dependent upon the CPU rather than OS-specific system calls. See qtbase/src/corelib/arch/qatomic_armv*.h
for a good reference.

Here we decided not to risk breaking existing platforms for the initial introduction of this new platform.

The QNX platform integration is built on top of the posix base.

Change-Id: Ic4758f8bc1cbdf5085278f79c9914f2f79b55148
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
12 years agoLet V8 throw the exception when QML property lookup fails
Kent Hansen [Wed, 14 Mar 2012 12:06:26 +0000 (13:06 +0100)]
Let V8 throw the exception when QML property lookup fails

This should be squashed into the "Introduce a QML compilation mode"
commit (8a4d849a0152c76bd9107a1b38a641cf8c0ff226) the next time V8
is rebased.

In normal (non-QML) mode, when a global property lookup fails
(implicit receiver ("this") object), V8 decides to throw an exception
iff the expression evaluation is not part of a "typeof" evaluation.
If it is evaluated as part of "typeof", the result silently becomes
"undefined". This is the expected behavior as per the ECMA-262
standard; "typeof" shouldn't throw a ReferenceError even if the
expression involves a global variable that doesn't exist.

This commit brings the QML mode behavior in line with normal mode.
When the receiver object is a QML global object, V8 up until now
hasn't detected whether it should throw an error in that case. The
QML implementation has been working around that by explicitly
throwing the ReferenceError in the QML context wrapper, but that
breaks the "typeof" operator in QML mode. The QML context wrapper
should rather return an empty handle, and leave it up to V8 to
throw the exception as appropriate.

This also reverts the parts of the original QML mode patch that
changed the RelocInfo mode for QML variables, since V8 relies
precisely on this mode to know whether it's evaluating a "typeof".
(It's no longer clear why the RelocInfo mode was modified in the
first place.)

Task-number: QTBUG-24448
Change-Id: Ic33610d5e91bdf373b22d97a3181e6e5f2fc1843
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
12 years ago[V8] BreakPoint Relocation
Aurindam Jana [Wed, 14 Mar 2012 10:50:48 +0000 (11:50 +0100)]
[V8] BreakPoint Relocation

Do not return undefined breakpoint.

This patch should be squashed into --
61fd072c17785c93001ffa9532c61f166e03b385 [V8] Add flag to avoid
breakpoint relocation -- in the next V8 rebase as this code only
improves code in that patch

Change-Id: I83a3867f5052eb308af5c28874a25d51ad475ff7
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
12 years agoDon't pass CAN_USE_VFP_INSTRUCTIONS to V8.
Girish Ramakrishnan [Mon, 12 Mar 2012 23:52:50 +0000 (16:52 -0700)]
Don't pass CAN_USE_VFP_INSTRUCTIONS to V8.

V8 is already capable of auto-detecting VFP3 support at runtime.
The only reason to pass this flag is for the emulator when
creating snapshots.

Currently, there is no way to figure if a target is VFP3 enabled
or not. There are no compiler flags to detect this automatically
either, so we have to add an option to qtbase/configure.

https://bugreports.qt-project.org/browse/QTBUG-24760 tracks
the addition of the option.

Change-Id: I3482ae483b925d5f153a1631cc04a52ecab72f4e
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
12 years ago[V8] Add flag to avoid breakpoint relocation
Aurindam Jana [Tue, 13 Mar 2012 08:13:58 +0000 (09:13 +0100)]
[V8] Add flag to avoid breakpoint relocation

Add a flag that prevents v8 from relocating breakpoints across
line boundaries.

This patch should be squashed into --
cf3296721194eafb9bb07ee94026cfb5bcc5d092 [V8] Add flag to avoid
breakpoint relocation -- in the next V8 rebase as this code only
improves code in that patch

Change-Id: I4fefc08f18874f2fa26ffff64eefb11dc949ddfd
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
12 years agoFixed VFP detection through compiler defines.
yangguo@chromium.org [Fri, 9 Mar 2012 22:11:16 +0000 (22:11 +0000)]
Fixed VFP detection through compiler defines.

BUG=http://code.google.com/p/v8/issues/detail?id=1996
TEST=none

Review URL: https://chromiumcodereview.appspot.com/9669003
Patch from Rodolph Perfetta <rodolph.perfetta@gmail.com>.

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@10993 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

Change-Id: I5534563915caa74ec458243415d5d56c2be074d2
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
Reviewed-by: Johannes Zellner <johannes.zellner@nokia.com>
12 years ago[V8] Simplify silent abort by raising SIGABRT directly
Jonathan Liu [Thu, 8 Mar 2012 09:19:51 +0000 (20:19 +1100)]
[V8] Simplify silent abort by raising SIGABRT directly

This adds support for silent OS::Abort() with compilers other than
Microsoft Visual C++ (e.g. MinGW and MinGW-w64).

Upstream patch: https://chromiumcodereview.appspot.com/9597012/

Change-Id: Idfb80c7aaee0d6ba74900a076c715ae1f9535b3f
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
12 years ago[V8] Fix double-rounding in strtod for MinGW
Jonathan Liu [Thu, 8 Mar 2012 09:24:12 +0000 (20:24 +1100)]
[V8] Fix double-rounding in strtod for MinGW

Upstream patch: https://chromiumcodereview.appspot.com/9578011/

Change-Id: I6dceb7052f0812a619f660af22ed44b5de88acef
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
12 years agoDisable snapshots
Kent Hansen [Fri, 9 Mar 2012 19:37:23 +0000 (20:37 +0100)]
Disable snapshots

Back when v8 lived in qtbase, "cross_compile" would evaluate to
true when cross-compiling. But now, inside the qtjsbackend module,
"cross_compile" seems to evaluate to false always, which means
that snapshots are erroneously turned on when building for arm
(snapshots can't be built for arm due to QTBUG-23447).

Disable snapshots until the cause of this issue has been found.

Change-Id: If0c87ec82bf41e32bf4974b10028dcb7fa42b328
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
12 years agoDon't assume hardfloat passing convention.
Girish Ramakrishnan [Thu, 8 Mar 2012 12:08:58 +0000 (04:08 -0800)]
Don't assume hardfloat passing convention.

Add configure test to detect the floating point abi. Test the value
of the test in the v8.pri to enable hardfloat usage.

Change-Id: I2312763bb1b814915a74e734ab477ba66f1ee0d2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years ago[V8] Fix MinGW-w64 compilation
Jonathan Liu [Sat, 3 Mar 2012 09:58:32 +0000 (20:58 +1100)]
[V8] Fix MinGW-w64 compilation

This is a backport of the following patches:
- https://chromiumcodereview.appspot.com/9169007/
- https://chromiumcodereview.appspot.com/9428027/
- https://chromiumcodereview.appspot.com/9584047/
- https://chromiumcodereview.appspot.com/9581045/

Change-Id: Idbef0c2707a05f99721316220d07e60bf6b6670a
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
12 years agoAdd testcase for Context::GetCallingQmlGlobal function
Peter Varga [Wed, 29 Feb 2012 14:19:18 +0000 (15:19 +0100)]
Add testcase for Context::GetCallingQmlGlobal function

Change-Id: I509b168b6923e1a9e92c6ab3505d51ea607e979c
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
12 years agoRemove pin of qtbase for qtjsbackend.
Toby Tomkins [Fri, 2 Mar 2012 02:20:38 +0000 (12:20 +1000)]
Remove pin of qtbase for qtjsbackend.

Task-number: QTBUG-24608

Change-Id: Ibef6574c3cc145ea482564a0f82571727fdeba8f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoPin qtjsbackend to set version of qtbase.
Toby Tomkins [Fri, 2 Mar 2012 01:06:03 +0000 (11:06 +1000)]
Pin qtjsbackend to set version of qtbase.

Changes to qmake in qtbase prevent modules from compiling. This commit
pins qtjsbackend to the last integrated qtbase version of qt5. This is
a temporary measure until qmake handles .qmake.cache correctly.

Change-Id: Ia311a036fa4ee9bb07486ba741d156bbbeaf830a
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
12 years ago[V8] Fix crash when querying for scopes
Aurindam Jana [Tue, 10 Jan 2012 18:33:44 +0000 (19:33 +0100)]
[V8] Fix crash when querying for scopes

For function code, the compilation info was incorrectly
marked as global if the shared_info had qml_mode set.
The ASSERT for the length of nested scopes failed when
querying for scopes and hence the crash. This fix sets the
qml_mode for function code correctly.

Fixes https://bugreports.qt.nokia.com/browse/QTBUG-23256

This patch should be squashed into
-- 2fe857938c3d1683df88133582bc3e7736264b10 [V8] Introduce a
QML compilation mode -- in the next v8 rebase as this code
only improves code in that patch.

Change-Id: Ibc969432cd245ace40602e9e2f5824b2287e8107
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
12 years ago[V8] Update ScriptBreakPoints for ScriptRegExp
Aurindam Jana [Tue, 13 Dec 2011 12:43:23 +0000 (13:43 +0100)]
[V8] Update ScriptBreakPoints for ScriptRegExp

Update breakpoints of type ScriptRegExpwhen a new script
is compiled. Solves Issue 1853
(http://code.google.com/p/v8/issues/detail?id=1853)

Change-Id: I03524b10d02295419bab37578d9e15379e7614e6
Reviewed-by: aaron.kennedy@nokia.com
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
12 years ago[V8] mips: Add support for custom object compare callback
Holger Hans Peter Freyther [Wed, 14 Dec 2011 17:35:12 +0000 (18:35 +0100)]
[V8] mips: Add support for custom object compare callback

Implement the compare callback for MIPS based on the ARM
code. It was tested using the Qt V8 tests.

Change-Id: Ia509ad5c4b334af157e4054191c8482749a62d8e
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
12 years ago[V8] uclibc: __GLIBC__ might be defined on uclibc builds
Holger Hans Peter Freyther [Mon, 5 Dec 2011 10:46:09 +0000 (18:46 +0800)]
[V8] uclibc: __GLIBC__ might be defined on uclibc builds

Uclibc defines __GLIBC__ becuase it is compatible in some ways with,
but it does not provide execinfo. Uclibc provides a define to disable
defining __GLIBC__ but Qt does not build with that right now. Check
for GLIBC and !UCLIBC here.

Change-Id: I582a16d16151f30c696ed0e9d185e2706599abe7
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
12 years ago[V8] Add flag to avoid breakpoint relocation
Kai Koehne [Thu, 10 Nov 2011 15:00:37 +0000 (16:00 +0100)]
[V8] Add flag to avoid breakpoint relocation

Add a flag that prevents v8 from relocating breakpoints across
line boundaries.

Change-Id: Ida410b2d7f0ffa3edcf76ce2ec2614497f68f3f3
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
12 years ago[V8] Fix warnings
Aaron Kennedy [Fri, 27 May 2011 03:04:15 +0000 (13:04 +1000)]
[V8] Fix warnings

Change-Id: I4012abecb41945ce31c82ff8dfcf84583f957256
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
12 years ago[V8] Remove execute flag from v8-debug.h
Aaron Kennedy [Thu, 25 Aug 2011 01:09:58 +0000 (11:09 +1000)]
[V8] Remove execute flag from v8-debug.h

Change-Id: I1162cf4636c1bf0aae84d8497ac79a1d816c75c8
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
12 years ago[V8] Fix deprecated Python code
Kent Hansen [Fri, 2 Sep 2011 10:03:09 +0000 (12:03 +0200)]
[V8] Fix deprecated Python code

Needed to make the scripts run on Python 3, which is the
default python interpreter on some newer distros.

Patch from http://code.google.com/p/v8/issues/detail?id=1391

Change-Id: I5528baa43f1be8d06efc9159fee7ea52f77d3ad8
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
12 years ago[V8] QtScript/V8: Add new v8 api to check if a value is an error.
Jedrzej Nowacki [Tue, 7 Dec 2010 10:56:42 +0000 (11:56 +0100)]
[V8] QtScript/V8: Add new v8 api to check if a value is an error.

New function v8::Value::IsError was created.

This API is experimental and added only for the purposes of our
research.

Change-Id: I8f20d46bd81b18bcd7a7c2f7cfc25775d82a6834
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
12 years ago[V8] Allow a script to be flagged as "native"
Aaron Kennedy [Fri, 9 Sep 2011 04:16:12 +0000 (14:16 +1000)]
[V8] Allow a script to be flagged as "native"

Native scripts do not appear in backtraces, or in the source and
line number when exceptions are thrown from within them.  This is
useful to be able to write code in JavaScript instead of C++ and
still have it appear sensibly to the user.

Change-Id: I93b7b9f0d93ff38204332be6544b1309082b2720
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
12 years ago[V8] Add custom object compare callback
Aaron Kennedy [Thu, 27 Oct 2011 12:40:00 +0000 (13:40 +0100)]
[V8] Add custom object compare callback

A global custom object comparison callback can be set with:
    V8::SetUserObjectComparisonCallbackFunction()
When two JSObjects are compared (== or !=), if either one has
the MarkAsUseUserObjectComparison() bit set, the custom comparison
callback is invoked to do the actual comparison.

This is useful when you have "value" objects that you want to
compare as equal, even though they are actually different JS object
instances.

Change-Id: Ifb4074058566062accc2be20d43e3febc1089d13
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
12 years ago[V8] Allow access to the calling script data
Aaron Kennedy [Fri, 14 Oct 2011 07:03:06 +0000 (17:03 +1000)]
[V8] Allow access to the calling script data

Change-Id: Ia62421388693604ca5666924337180734be891c0
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
12 years ago[V8] Introduce a QML compilation mode
Aaron Kennedy [Thu, 27 Oct 2011 12:34:16 +0000 (13:34 +0100)]
[V8] Introduce a QML compilation mode

In QML mode, there is a second global object - known as the QML
global object.  During property resolution, if a property is not
present on the JS global object, it is resolved on the QML global
object.

This global object behavior is only enabled if a script is being
compiled in QML mode.  The object to use as the QML global object
is passed as a parameter to the Script::Run() method.  Any function
closures etc. created during the run will retain a reference to this
object, so different objects can be passed in different script
runs.

Change-Id: Ib6b4ed363b7e8089d38a9cdcfb0d3b314dc333ca
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
12 years ago[V8] Generalize external object resources
Aaron Kennedy [Tue, 4 Oct 2011 06:06:09 +0000 (16:06 +1000)]
[V8] Generalize external object resources

V8 was already able to manage and finalize an external string
resource.  This change generalizes that mechanism to handle a
single generic external resource - a v8::Object::ExternalResource
derived instance - on normal JSObject's.

This is useful for mapping C++ objects to JS objects where the
C++ object's memory is effectively owned by the JS Object, and
thus needs to destroyed when the JS Object is garbage collected.
The V8 mailing list suggests using a weak persistent handle for
this purpose, but that seems to incur a fairly massive performance
penalty for short lived objects as weak persistent handle callbacks
are not called until the object has been promoted into the old
object space.

Change-Id: I3d7b5fe4ca6e37d49c92f3314b80d42bd4c84fcd
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>