aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* wince: Build fix, assert() is not present in this platform.Sérgio Martins2013-08-293-5/+14
| | | | | Change-Id: Ib29f1411b9829bc9bf6a94e4fb23a33f955ee1b2 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* wince: Build fix, disable the assembler when JIT is disabled.Sérgio Martins2013-08-298-16/+18
| | | | | Change-Id: Ibd22f27401c3751bc64749c6f1eea3aba57d66eb Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Generate code for conversion to signed int32.Erik Verbruggen2013-08-295-21/+94
| | | | | Change-Id: I862a8c9c262b658859cc9b57ea0b6e9eb60e32e5 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Generate code for conversion to boolean.Erik Verbruggen2013-08-293-5/+54
| | | | | Change-Id: I59e24264325b6560ee1c0dbdafacb1f08c3671d5 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* qmltest: Add QTestDefinedVariablesCaroline Chao2013-08-281-1/+10
| | | | | | | | | | | QTestDefinedVariables is used by the QTestRootObject to check is a preprocessor variable is defined. Adding QT_OPENGL_ES_2_ANGLE. It can be useful to know if it is defined (Win32 + Angle) while running a test. Change-Id: I2f9ffb1028c94095c711ab64737b53b60c055312 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* qmltest: Register test object as a singletonCaroline Chao2013-08-282-11/+29
| | | | | | Change-Id: I5f6c404ff2901082f22b953b29aed08d3488f31d Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* V4 regalloc: fix off-by-one in availability calculation.Erik Verbruggen2013-08-281-26/+10
| | | | | | | | | Simplified the algorithm, and use it to iterate over all registers. The previous version did not initialize bestReg correctly, thereby skipping the first register (which could also be the best one). Change-Id: I7e33f93a27e8fe64cd00acac755cf67ca5f0b1b8 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* V4 regalloc: do not overwrite register availability in hole.Erik Verbruggen2013-08-281-1/+1
| | | | | | | | | | | When a fixed interval for a register is inactive, the register is free until that interval becomes active, or (and this was missing), until another interval uses it before that position. So instead of blindly overwriting the freeUntilPos, take the qMin of the existing one with the intersection position. Change-Id: I2730a748ef1e46b4782fbb9814e800eca52172f0 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* wince: Build fix, abort() is not available on this platformSergio Martins2013-08-282-3/+3
| | | | | Change-Id: I0962f8b89de465d84d913b46ba482a538fe25495 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Generate code conversion to double.Erik Verbruggen2013-08-286-11/+94
| | | | | | | | Performance improves by about 15% on fact.3.js when Qt is build in debug mode. Change-Id: I4a1c868fe211c1e0f9e7d9a5652f7726b37405d1 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* wince: Build fix, CONST conflicts with Windows macros.Sérgio Martins2013-08-282-2/+12
| | | | | | | | Don't #undef system macros in header files, they propagate quickly through other headers and make it very difficult to fix these problems. Change-Id: Id5efdfa69d0eefa8c740b14f839194039bd9752b Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix unused variable warningKai Koehne2013-08-281-1/+1
| | | | | | | | Fix gcc warning: unused parameter ‘newEffect’ Change-Id: If4ca8058b5b637518a868947226c834d571f7037 Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* QQuickPlatformFileDialog: fix directoryEntered() signal connectionJ-P Nurmi2013-08-271-1/+1
| | | | | | Task-number: QTBUG-33008 Change-Id: I8c4d06bb9dded7b894ca576efd0a64dce9f9a720 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* The fast and the furious, register drift.Erik Verbruggen2013-08-2711-422/+1047
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable the register allocator for X86_64 on Linux and MacOS. The implications are: - handle as much as possible with current code with as few changes as possible - temporarily force the register allocator to spill unop/binop arguments to the stack by doing a call in the implementation (as is the current case), so no change is needed here - only have loadThis and loadConst handle registers - have any method that might need to handle registrers actually cope with them - the inline versions of binops are not generated, as they cannot cope with registers. This will change when ISel for binops is added in the next patch. This means that we are still running with the handbrakes on, but allow for full-throttle in certain/limited cases. Note about the changed test: multiplication always returns a Number (double), so the operands are passed as doubles, so __qmljs_mul will return a double. For addition this is different: because it might return a Number or a String, the operands are passed as whatever fits best. So __qmljs_add will return an int when both operands are ints. Hence the change to the tests. Change-Id: If5bd7dffca8f7de5ba45af700b9c7bb568fc74b7 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* wince: vsnprintf is not available, use qvsnprintfSergio Martins2013-08-271-2/+3
| | | | | | | Change-Id: I42c87b2c319ce5b530ac5dc673edc99b067fafd7 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com>
* Silence MinGW/gcc-4.8.1 compiler warnings.Friedemann Kleint2013-08-262-60/+69
| | | | | | | | | | | | | | | | | Reorder V4::Object's and V4::Value's private object inline functions such that its definitions are visible from where they are being referenced. qv4object_p.h:418:13: warning: 'uint QV4::Object::arrayLength() const' redeclared without dllimport attribute after being referenced with dll linkage qv4object_p.h:430:13: warning: 'void QV4::Object::setArrayLengthUnchecked(uint)' redeclared without dllimport attribute after being referenced with dll linkage Change-Id: I49a3c9d1da637eaf038f53b29ec13c35253de9f1 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Interpreter fixes.Erik Verbruggen2013-08-261-7/+15
| | | | | | | | - Support constants in phi-nodes - Fix possible null-pointer dereference. Change-Id: I7cb773f1b4469d1cda648317670d9993d5b35ca3 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Allow for function declarations inside conditionalsSimon Hausmann2013-08-232-32/+0
| | | | | | | | | This is strictly speaking a regression from 5.1/v8, which allows for that as real world JavaScript appears to require it. Task-number: QTBUG-33064 Change-Id: Iceaca84373f12fb08459ed007afb25b5a705fa31 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Don't crash with deferred propertiesAlan Alpert2013-08-221-1/+1
| | | | | | | | | | | There are cases where a qmlExecuteDeferred(o) can be postponed until the context of o is being destroyed, at which point it's too late to create an object in that context. Task-number: QTBUG-33112 Change-Id: I7f981b5e34e3cb8a52c00de4742a7242d7e4df54 Reviewed-by: Christopher Adams <chris.adams@jollamobile.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* TestLib: Fix regression in error location outputCaroline Chao2013-08-221-6/+6
| | | | | | | | Error location returned should be given in the test file not in TestCase.qml. Change-Id: Ifea51fe5e39890a369c4dca6754abd46d2ee9bc2 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Cleanup: Rename overloaded () operators of CodeGen to more descriptive ↵Simon Hausmann2013-08-224-7/+7
| | | | | | | function names Change-Id: I529c3d5c80ed7f703046a2803c492c4b15511049 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Cleanup: Separate JS environment scanner class declaration from definitionSimon Hausmann2013-08-222-306/+358
| | | | | | | This will allow the use of it from outside. Change-Id: Ia05a17b4b4f3e772554979e215a6252a75a63273 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix compilation with MSVC 2008 (and prospective Windows CE build fix)Simon Hausmann2013-08-2217-33/+90
| | | | | | | | | | | | | | | | | * Only 2010 and newer ship stdint.h, so for 2008 we have to provide a little stdint.h compat header, for some of the third-party code we import. Our own Qt code this patch changes to use quint* types instead. * Include math.h and float.h for some math functions. * disable the JIT on Windows CE for now. * Change use of intptr_t to qintptr in Qt code. intptr_t is in inttypes.h, except that with VS 2008 it is indirectly available through stdio.h. Let's avoid the mess and just use the qt type, that's always available. Change-Id: I19055edd89e0a6b147d9edbb3b711798ed3c05a5 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Prospective build fix for shadow builds with MSVCSimon Hausmann2013-08-211-6/+6
| | | | | | | | | Don't rely on MSVC's slightly different semantics of #include with quotes, simply include the header files from the other directory through the syncqt generated wrappers that always work. Change-Id: Idebb4121e4a14732494613e9b5bc383a8f52fb00 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* Change convertUInt32ToDouble to use an int scratch register.Erik Verbruggen2013-08-202-10/+12
| | | | | | | Only on X86, and still untested. Change-Id: I746daa47ed019ce0017a67a228a719983b1ebaa6 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Merge branch 'wip/v4' of ssh://codereview.qt-project.org/qt/qtdeclarative ↵Simon Hausmann2013-08-2031-516/+1497
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into dev Conflicts: src/qml/compiler/qv4codegen.cpp src/qml/compiler/qv4codegen_p.h src/qml/compiler/qv4isel_moth.cpp src/qml/jsruntime/qv4context_p.h src/qml/jsruntime/qv4functionobject.cpp src/qml/jsruntime/qv4runtime.cpp src/qml/jsruntime/qv4runtime_p.h src/qml/jsruntime/qv4script.cpp sync.profile Change-Id: I1d785e2134bffac9553a1c16eed12816cbd1ad2c
| * Cleanup: Determine the root/entry function in isel independent codeSimon Hausmann2013-08-196-31/+7
| | | | | | | | | | Change-Id: I99004b872be9bd7d9dd0c798eb2d9bb4ddfa4cbd Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Fix ARM buildSimon Hausmann2013-08-192-2/+3
| | | | | | | | | | | | | | | | Re-add variable only needed for ARM build and replace references to removed codeRef variables from QV4::Function. Change-Id: Id47fe57be2aa653bd8f81996463d970f27427f37 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * Fix class vs. struct mismatchSimon Hausmann2013-08-191-1/+1
| | | | | | | | | | | | | | Breaks with visual studio otherwise Change-Id: I80ce7ec269ad750e3c9a1dcfef980f57cc395461 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * Prospective MSVC build fixSimon Hausmann2013-08-193-6/+6
| | | | | | | | | | | | | | | | It seems LoadString is somehow expanded as a macro, so call the instruction LoadRuntimeString, which is closer to the meaning. Change-Id: I16836b495d29db8cb1af5874762c8e66acb9c529 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * Prospective build fix for namespaced Qt buildsSimon Hausmann2013-08-181-0/+4
| | | | | | | | | | | | | | Add missing QT_BEGIN/END_NAMESPACE Change-Id: I6beed22d8d1713be99de114ba747cf5e17223591 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Cleanup: Make isel subclass the unit generatorSimon Hausmann2013-08-184-49/+39
| | | | | | | | | | Change-Id: Iadff4974ec6fde25c6586d03d23136ea280f9555 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Get rid of engine pointer in iselSimon Hausmann2013-08-1810-26/+24
| | | | | | | | | | Change-Id: I58759712624713cd2215621dca4ccc86fa9a9194 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Fix invalid reads with stringsSimon Hausmann2013-08-183-25/+26
| | | | | | | | | | | | | | | | | | | | | | It may happen that a dynamically created compilation unit disappears before any QV4::Strings it created. Those strings would still have a reference to the QString data in the compilation unit. I don't see a choice other than making a copy of the string data ;(. But this patch adds a flag that would allow for avoiding it if we happen to know that the compilation unit data is static. Change-Id: Ib35a4d2a566b301a25ffe56e392809e44e7b4ae8 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Fix eval operating on incorrect runtime dataSimon Hausmann2013-08-186-31/+51
| | | | | | | | | | | | | | | | Moved compilationUnit and compiledFunction into the context and set it also during eval, along with the runtime strings. Change-Id: I627b3bea0f7c38ad91bc5e8ee85e1484d08ed3f3 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Remove unused Function::engine member and line number mapping typeSimon Hausmann2013-08-162-10/+0
| | | | | | | | | | Change-Id: Id227139bf385aa92e539cdb0d0012e1360679c81 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Merge Function::init with the constructorSimon Hausmann2013-08-165-31/+29
| | | | | | | | | | Change-Id: I557f8a80aa2c74398b94e87ed0f29fe8d2297150 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Eliminate all vm functions on the isel sideSimon Hausmann2013-08-169-46/+13
| | | | | | | | | | Change-Id: I7c0e50498c937ce554b019f98829fa8c5d96c18e Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Use indices into the runtime functions array instead of function pointers in ↵Simon Hausmann2013-08-165-9/+9
| | | | | | | | | | | | | | the isel for closures Change-Id: Ieaf7b112f80adc3f1041cb1397db4eab55fb0184 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Get rid of the functions list in QV4::ExecutionEngineSimon Hausmann2013-08-168-32/+41
| | | | | | | | | | Change-Id: I97067dbb2819936a1b2029c9f63f0627cb6b8bd2 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Refcount the compilation unit and remove refcount from runtime functionSimon Hausmann2013-08-166-26/+5
| | | | | | | | | | Change-Id: Iaa2f96a6814f1b39589ffcfe3c84e3c229e25f1f Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Reduce ExecutionEngine dependencies in the moth and masm iselSimon Hausmann2013-08-163-9/+9
| | | | | | | | | | Change-Id: Ic3d0287e15c404c5527fa6fe0dfa759631b66dd4 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Get rid of QV4::Function::lineNumberMappings by porting moth to the new mappingSimon Hausmann2013-08-162-8/+7
| | | | | | | | | | Change-Id: Ib79489ac4c6c93042143be1f512d29c13d4cd3c6 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Get rid of QV4::Function::generatedValues by porting moths' regexps to ↵Simon Hausmann2013-08-165-11/+14
| | | | | | | | | | | | | | runtime expressions Change-Id: Iaae3c4855016948952159596d2528fca73341b72 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Ported identifiers in moth to use runtime stringsSimon Hausmann2013-08-167-83/+87
| | | | | | | | | | Change-Id: I09f04994a2ebe631b12fa76b77a622711de31926 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Initial port of moth to the new compile data structuresSimon Hausmann2013-08-167-21/+66
| | | | | | | | | | Change-Id: I2ead40c5c8c9b12b29c48c387ea424838d1f7d9e Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Get rid of the QV4::Function in the masm iselSimon Hausmann2013-08-165-31/+21
| | | | | | | | | | Change-Id: Ide70ca5a3f3dcc793fb96fd64f8b8df6b07d1168 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Ported the compile-time class setup for object literals to be run-time basedSimon Hausmann2013-08-1611-16/+116
| | | | | | | | | | Change-Id: I21225e4bf0f66914229cf64fa29ce870548c0e93 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Cleanup: Store lookup tables inside the CompilationUnitSimon Hausmann2013-08-162-21/+25
| | | | | | | | | | | | | | The size of each lookup is fixed, so it's easier to include in the unit itself. Change-Id: I66135efe4056eb0b4d7ff312eaa347fe98d8887f Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Store line number mappings in the compiled functionSimon Hausmann2013-08-168-31/+84
| | | | | | | | | | Change-Id: I4e37aac3618b20ccd52ce4833098781374a3daf6 Reviewed-by: Lars Knoll <lars.knoll@digia.com>