aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4script.cpp
Commit message (Collapse)AuthorAgeFilesLines
* QtQml: Fix assignment of fileName and URL during compilationUlf Hermann2025-02-041-4/+4
| | | | | | | | | | | We need to assign them right away when creating the module. If we do it later on, there are a lot of different code paths to cover and in fact we were missing some. Pick-to: 6.9 6.8 Task-number: QTBUG-133053 Change-Id: I57e381c787f504eb9bcd8c2041e41b4f1d1f8b53 Reviewed-by: Fabian Kosmale <[email protected]>
* Prepare for white allocation during gc(3/9): FunctionFabian Kosmale2024-03-051-3/+4
| | | | | | | | | | | | | | | | Function(Data) keeps references to two heap-items; use the newly introduced wrapper classes to ensure writes always go through the WriteBarrier. Provide a "mark" function in ExecutableCompilationUnit so that the wrapper can actually pick it up - the existing function there was called markObjects. We don't rename the existing function to keep the diff minimal. Provide a mark function in Function for the same reason. Task-number: QTBUG-121910 Change-Id: Ib56eb2f3f2315036ce43273c9ebc629d10458e9a Reviewed-by: Olivier De Cannière <[email protected]> Reviewed-by: Ulf Hermann <[email protected]>
* QtQml: Use a multihash to store executable CUsUlf Hermann2024-01-251-2/+2
| | | | | | | | | | | | | | | You can produce multiple CUs for the same URL with createQmlObject() and friends. They need to be marked during garbage collection and therefore the engine needs to keep track of them. With the multihash there can be a lot of CUs of the same URL. Searching through them can take a lot of time. However, there is no point in searching for an existing executable CU if we've just freshly compiled the base CU. So, in those cases, insert directly instead. Fixes: QTBUG-121436 Change-Id: I804dbc74d2ade118f6680a7fbde3f234699ccbc3 Reviewed-by: Fabian Kosmale <[email protected]>
* QtQml: Move creation of ExecutableCompilationUnit into engineUlf Hermann2024-01-111-4/+3
| | | | | | | This is in preparation for letting the engine cache the executable CUs. Change-Id: Ideac10d8dda0784b41304b58f9b9fbd106173ea6 Reviewed-by: Fabian Kosmale <[email protected]>
* QtQml: Always link executable CU on creationUlf Hermann2024-01-101-7/+6
| | | | | | | | | | | | | | | We don't want floating unlinked executable CUs. They should always be tied to an engine, and the engine should not change. This gives us one definite point where to register them with the engine (to be done in subsequent change). Unfortunately, due to the refcounting, we need to remove the engine from any still-referenced CUs when the engine itself is destructed. We will be able to drop the refcounting and make the engine fully own its executable CUs once we can hold base CUs in most places. Change-Id: I9a53e83d5c4746c2b2bca896b51baa4fe7fee757 Reviewed-by: Fabian Kosmale <[email protected]>
* QtQml: Make base CU a member of ExecutableCompilationUnitUlf Hermann2024-01-101-2/+5
| | | | | | | | | | | | We want to re-use the base compilation unit across engines. For that to work it cannot be a slice of the engine-specific ExecutableCompilationUnit. Since CompiledData::CompilationUnit is refcounted on its own now, make it unmovable. Change-Id: I8418c9754d7a07e5210c1e7a7fc69355e1d57807 Reviewed-by: Fabian Kosmale <[email protected]>
* QtQml: Disambiguate static variables and methodsFriedemann Kleint2023-02-091-3/+1
| | | | | | | | | They cause clashes in CMake Unity (Jumbo) builds. Pick-to: 6.5 Task-number: QTBUG-109394 Change-Id: I0408c01d3e6f0f4dc74904e12a3036a855cc3225 Reviewed-by: Ulf Hermann <[email protected]>
* QtQml: Allow more fine grained control of the disk cacheUlf Hermann2023-01-021-3/+10
| | | | | | | | | You can now enable and disable the AOT-compiled code and the loading and saving of .qmlc files separately. Fixes: QTBUG-101358 Change-Id: I1305c4f2f75d8cff544a127e956589d1ed1aeb52 Reviewed-by: Fabian Kosmale <[email protected]>
* QtQml: Remove unused includes in qml, final partSemih Yavuz2022-09-141-3/+0
| | | | | | | | | | | | | | Drop unnecessary includes detected by clangd-iwyu. Add new includes due to the transitive includes. Also, some of the includes were detected as unused even if they were actually in use. In those cases, use angular brackets instead of "" which deceives the tool not to complain. Affected subfolders: JsRuntime, Qml Fixes: QTBUG-106473 Change-Id: I483da15d42a8e3ce6cd3b654909665fff3075d6b Reviewed-by: Fabian Kosmale <[email protected]>
* Use SPDX license identifiersLucie Gérard2022-06-111-38/+2
| | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Pick-to: 6.4 Task-number: QTBUG-67283 Change-Id: I63563bbeb6f60f89d2c99660400dca7fab78a294 Reviewed-by: Shawn Rutledge <[email protected]>
* Respect QML_DISABLE_DISK_CACHE also for caches built into the binaryUlf Hermann2020-12-101-1/+3
| | | | | | | | Previously it would only disable loading of separate cache files. Change-Id: Iae92fc03d2e5566ef7dc44a6730b788b7512fd3d Reviewed-by: Maximilian Goldstein <[email protected]> Reviewed-by: Fabian Kosmale <[email protected]>
* Port QtDeclarative from QStringRef to QStringViewKarsten Heimrich2020-06-161-1/+1
| | | | | | | | Task-number: QTBUG-84319 Change-Id: I2dcfb8a2db98282c7a1acdad1e6f4f949f26df15 Reviewed-by: Mårten Nordheim <[email protected]> Reviewed-by: Shawn Rutledge <[email protected]> Reviewed-by: Timur Pocheptsov <[email protected]>
* Add a hook that allows for ahead-of-time compiled functionsSimon Hausmann2020-04-221-1/+1
| | | | | | | | | | | | | Use the unused field in the CachedUnit structure provided by qmlcachegen to allow for providing function pointers for functions and bindings that are compiled ahead of time. Provided is the pointer into an array that is terminated with a {index: 0, functionPtr: nullptr} entry. The array index field in each array entry allows for gaps. Change-Id: I7457f5eea5f14e5f94431b9cc6da042cb03517a0 Reviewed-by: Fabian Kosmale <[email protected]>
* Prepare for new members in QQmlPrivate::CachedQmlUnitSimon Hausmann2020-04-211-2/+2
| | | | | | | | Pass the address of the entire structure through to the compiler, so that when adding new members we can easily access them. Change-Id: I5da75ba4e64d3e0e750a3ff3df4edbb88cdb6937 Reviewed-by: Fabian Kosmale <[email protected]>
* Restore offset/length in QQmlJS::DiagnosticMessageSimon Hausmann2020-03-021-4/+5
| | | | | | | | | | | | This is needed in a few places outside of declarative, so this change restores the loc member in DiagnosticMessage and moves QQmlJS::AST::SourceLocation into common's QQmlJS namespace/directory. QQmlError is unaffected and retains only line/column. Amends d4d197d06279f9257647628f7e1ccc9ec763a6bb Change-Id: Ifb9d344228e3c6e9e26fc4fe112686f9336ea2b2 Reviewed-by: Fabian Kosmale <[email protected]>
* Disentangle includes and namespacesUlf Hermann2019-07-111-1/+1
| | | | | | | | Avoid using namespace in headers and include only the headers we actually need. Change-Id: I526a0f874dc09b07693fd87070665be396d3b637 Reviewed-by: Simon Hausmann <[email protected]>
* Split qqmltypeloader{_p.h|.cpp} into a several filesUlf Hermann2019-07-111-0/+1
| | | | | | | No one can read this mess. Change-Id: Icec4f2afc466435c1ae5e4e80fa2c1b5baf7d087 Reviewed-by: Simon Hausmann <[email protected]>
* remove QmlIR::Document::removeScriptPragmasUlf Hermann2019-07-091-1/+0
| | | | | | | | | We don't need to blank the script pragmas as the parser will ignore them anyway. Change-Id: Id93e9ba0a6aacb38692cb294fb140d8ef99a2d23 Reviewed-by: Simon Hausmann <[email protected]> Reviewed-by: Fabian Kosmale <[email protected]>
* Simplify codegen error handlingUlf Hermann2019-07-041-11/+8
| | | | | | | | | | There can only ever be one error, either a syntax error or a reference error. We record the error type as we want to get rid of the virtual throw<X>Error methods in favor of an explicit compilation result. Change-Id: Ie228490aad8efb7885083f6485f931299567f54c Reviewed-by: Fabian Kosmale <[email protected]> Reviewed-by: Simon Hausmann <[email protected]>
* Simplify errors and diagnosticsUlf Hermann2019-06-141-6/+15
| | | | | | | | | | | | | | | | We only need two classes to describe all possible diagnostics: * A low-level private POD DiagnosticMessage. This is easily copied and passed around internally. It doesn't need to adhere to a stable API and it doesn't carry any extra baggage. * The high-level public QQmlError with its stable interface. This can internally also use a DiagnosticMessage as storage. Change-Id: I52be88d9b5d9855a661b8032b01eedb43a0fb0b3 Reviewed-by: Simon Hausmann <[email protected]>
* Split CompiledData::CompilationUnit in twoUlf Hermann2019-05-161-8/+10
| | | | | | | | We need a CompilationUnit that only holds the data needed for compilation and another one that is executable by the runtime. Change-Id: I704d859ba028576a18460f5e3a59f210f64535d3 Reviewed-by: Simon Hausmann <[email protected]>
* Enable lookups for imported scripts and worker scriptsSimon Hausmann2019-03-251-1/+0
| | | | | | | | | | | | | This is straight-forward to enable, with the minor adjustment that we need to handle the case where a global lookup is done without a calling qml context (worker script). We don't know at compile time whether a script will be imported directly or used as a worker script, so we have to generate the global qml lookup instruction regardless and handle it at run-time. Change-Id: Ia033afa214d919d906c676498dd3eceb1c5639d8 Reviewed-by: Michael Brasser <[email protected]> Reviewed-by: Ulf Hermann <[email protected]>
* Merge remote-tracking branch 'origin/5.12.0' into 5.12Qt Forward Merge Bot2018-12-071-0/+1
|\ | | | | | | | | | | | | | | Conflicts: src/qml/jsruntime/qv4script.cpp src/qml/parser/qqmljslexer.cpp Change-Id: I82252a8c504a4b77c45f4f8efe849ff9acb949fd
| * Generate lookups into the global object more aggressivelyLars Knoll2018-11-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since change 9333ea8649838d7e0400b0e94c8cbd4fa5d216b0, we lookup properties in the QML context object before the global object to have proper scoping rules for QML. Unfortunately this lead to a performance regression when using global properties such as Math in imported script files, as the lookup would always go through the qml context first. This can be fixed, as we know that the global object is frozen in qml mode, and the standard names of properties in the global object are illegal to use in QML. So simply check for those names in the code generator and create lookups into the global object for those. Change-Id: I4b2089178c9e5f9440abdfd834cf7d92c3c0e2c3 Fixes: QTBUG-71591 Reviewed-by: Erik Verbruggen <[email protected]>
* | Fix parsing of js files via Qt.include()Simon Hausmann2018-11-291-17/+1
|/ | | | | | | | | | | Make sure to parse them as JavaScript, not as QML, so that certain keywords such as char or double map to identifiers as expected. Also removed an unused function. Fixes: QTBUG-71524 Change-Id: Ie8a8dabe717ee12def6af512943e6d01efcf9876 Reviewed-by: Lars Knoll <[email protected]>
* Clone ContextType::Global as ContextType::ScriptImportedByQMLJüri Valdmann2018-11-011-2/+3
| | | | | | | | | | Add new enum value QV4::Compiler::ContextType::ScriptImportedByQML, which behaves exactly the same as ContextType::Global. A follow-up patch will change the behavior slightly. Task-number: QTBUG-69408 Change-Id: I20d27804fd1433f2229704546bcd78a0ac108c01 Reviewed-by: Simon Hausmann <[email protected]>
* Add support for importing ES modules in .qml filesSimon Hausmann2018-08-171-17/+1
| | | | | | | | | | | | | | | | | This is a straight-forward hook into the module implementation in QV4::ExecutionEngine. Modules are pre-compiled in the QML type loader thread. That thread keeps track of all pending loading scripts through the type loader's m_scriptCache. Once a module is compiled, it's thread-safely registered with the execution engine. Script instantiation and evaluation is done solely in the QQmlEngine's thread. ES Modules are identified in imports as well as qmldir files by the .mjs extension. Change-Id: Ie9c59785118afcb49f43a1e176a9f7db00f09428 Reviewed-by: Lars Knoll <[email protected]>
* Get rid of TemporaryAssignmentSimon Hausmann2018-07-171-1/+2
| | | | | | | We can use QScopedValueRollback from QtCore for the same purpose. Change-Id: I5ca37a52bde5469cdb76928913835140241d42b1 Reviewed-by: Erik Verbruggen <[email protected]>
* Merge remote-tracking branch 'origin/5.11' into devUlf Hermann2018-06-251-3/+4
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/qmltooling/packetprotocol/qpacketprotocol.cpp src/quick/handlers/qquickhandlerpoint.cpp src/quick/handlers/qquicksinglepointhandler.cpp tests/auto/qml/ecmascripttests/test262 Change-Id: I8908ec8c6116ca626fbd269af7625d4c429429ca
| * Script::parse(): improve "function expressions as statement" error msgMitch Curtis2018-06-201-3/+4
| | | | | | | | | | Change-Id: I3c54c90bfa48d2f6ba78b898413133e49b66c208 Reviewed-by: Simon Hausmann <[email protected]>
* | Fix heap-use-after-freeSimon Hausmann2018-05-021-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit a1e5364b492610adf0636fefa3fc400558e211b6 introduced the use of AST elements at qml compilation unit generation time, which uncovered the issue that for scripts imported from qml files, the memory pool for the AST was local to QV4::Script::precompile. Therefore the memory where the AST stored was freed afterwards and any use after ::precompile() would produce ASAN errors. There's no good reason for Script::precompile to have its own local memory pool. Change-Id: I4f8eb5ee4e9d62d8874241bc95fc71a912e26cea Reviewed-by: Simon Hausmann <[email protected]>
* | Rename the CompilationMode enum to ContextTypeLars Knoll2018-05-021-2/+2
| | | | | | | | | | | | | | | | | | And make it an enum class. The new name fits better, as it's mainly used to determine the type of the context when parsing. Also already added the 'Block' value that will be needed. Change-Id: I70d963b6a0b22db1a3c607cce6bdd2054b29e000 Reviewed-by: Simon Hausmann <[email protected]>
* | Clean up manual reference of QQmlTypeData and QQmlPropertyCacheSimon Hausmann2018-04-261-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | We have a few places in the type loader where we do adventurous manual reference counting, where getType() returns a raw pointer that has been addref()'ed and then sometimes somehow we call release() later. Commit 0b394e30bba4f6bb7e6f7dbe5585a2e15aa0f21d is an example of where this can easily go wrong. As a consequence and also in preparation for future work on the type loader, this patch starts replacing the manual reference counting there. Changing the return type from QQmlTypeData *getType() to a QQmlRefPointer<> itself is not sufficient though, as the implicit operator T*() will still allow the caller to store the result as a raw pointer. Therefore this patch removes the "unsafe" implicit extraction operator. As a result of that change, other types that are sometimes stored in QQmlRefPointer are also affected and their usage needs to be adapted to QQmlRefPointer usage or manual raw pointer extraction with .data(). Change-Id: I18fd40634047f13196a237f4e6766cbef3bfbea2 Reviewed-by: Lars Knoll <[email protected]>
* Warn about non spec compliant extension being usedLars Knoll2018-04-111-0/+6
| | | | | | | | | | | | eval("function(){}") would return a function object in our engine. This is not compliant with the ES spec, so warn about it, as it'll start throwing a syntax error in 5.12. Also fix the two places where we were using that syntax in our auto tests. Change-Id: I573c2ad0ec4955570b857c69edef2f75998d55a9 Reviewed-by: Simon Hausmann <[email protected]>
* Fix QML data structure version checking for ahead-of-time generated filesSimon Hausmann2018-03-201-3/+14
| | | | | | | | | | | | | | | | | | We must also do version checking for QML and JS files that were compiled ahead of time and are embedded in resources. If the lookup for the original source code fails, then we must generate an appropriate error message. As an upside we get better error reporting when trying to load an empty file and Qt.include() now reports the error message in the statusText field. The error reporting for imported scripts was not changed as importing an empty script is (oddly) allowed. Task-number: QTBUG-66986 Change-Id: Ie0ef81af371a51ecf8c66ae7954d43f5cc6c12de Reviewed-by: Erik Verbruggen <[email protected]>
* Pass "this" object when evaluating debug jobsUlf Hermann2018-03-171-3/+4
| | | | | | | | | We have to explicitly specify the "this" object on QV4::Function::call, otherwise it will assume undefined or the QML global object. Task-number: QTBUG-66942 Change-Id: I1af7742b4fee1b49e9760a413834daf3edb15d74 Reviewed-by: Simon Hausmann <[email protected]>
* use nullptr consistently (clang-tidy)Shawn Rutledge2018-02-261-8/+8
| | | | | | | | | | | | | From now on we prefer nullptr instead of 0 to clarify cases where we are assigning or testing a pointer rather than a numeric zero. Also, replaced cases where 0 was passed as Qt::KeyboardModifiers with Qt::NoModifier (clang-tidy replaced them with nullptr, which waas wrong, so it was just as well to make the tests more readable rather than to revert those lines). Change-Id: I4735d35e4d9f42db5216862ce091429eadc6e65d Reviewed-by: Simon Hausmann <[email protected]>
* Merge remote-tracking branch 'origin/5.10' into devLiang Qi2018-02-021-6/+6
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservice.cpp src/qml/compiler/qqmlirbuilder.cpp src/qml/compiler/qqmlirbuilder_p.h src/qml/compiler/qqmltypecompiler.cpp src/qml/compiler/qv4codegen.cpp src/qml/compiler/qv4codegen_p.h src/qml/compiler/qv4compileddata_p.h src/qml/compiler/qv4compiler.cpp src/qml/compiler/qv4compilercontext_p.h src/qml/compiler/qv4isel_moth.cpp src/qml/compiler/qv4jsir.cpp src/qml/compiler/qv4jsir_p.h src/qml/jit/qv4isel_masm.cpp src/qml/jsruntime/qv4engine.cpp src/qml/jsruntime/qv4functionobject.cpp src/qml/jsruntime/qv4runtimecodegen.cpp src/qml/jsruntime/qv4script.cpp src/qml/jsruntime/qv4script_p.h src/qml/qml/qqmltypeloader.cpp src/quick/items/qquickanimatedimage.cpp src/quick/items/qquickanimatedimage_p_p.h src/quick/scenegraph/compressedtexture/qsgpkmhandler.cpp tests/auto/qml/qmlplugindump/qmlplugindump.pro tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp tools/qmlcachegen/qmlcachegen.cpp tools/qmljs/qmljs.cpp Done-with: Shawn Rutledge <[email protected]> Done-with: Lars Knoll <[email protected]> Done-with: Ulf Hermann <[email protected]> Change-Id: I010e6525440a85f3b9a10bb9083f8e4352751b1d
| * Use potentially intercepted URL as ID for compilation unitsUlf Hermann2017-12-211-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We generally have to pass a URL and a file name everywhere because the logical URL might be something else than the actual file being loaded. For example a QQmlFileSelector might modify the URL to be loaded for a specific file. This resulting URL, however, should not be used to resolve further URLs defined in the file loaded that way. As we need to access QQmlTypeLoader::m_url as string more often now, cache it and avoid frequent translations between QUrl and QString. Furthermore, QQmlDataBlob's URLs are changed to follow the same semantics. The finalUrl is the one that should be used to resolve further URLs, the url is the one used to load the content, and subject to any redirects or interceptions. This changes the semantics of URL redirects. Previously a redirected URL was used as the base URL for furher URL resolution. This doesn't work because redirection occurs after interception and interception should not influence the resolution of further URLs. We now use the original URL as base URL for resolution of further URLs and rely on the server to redirect those, too. Task-number: QTBUG-61209 Change-Id: I93822f820bed2515995de3cb118099218b510ca4 Reviewed-by: Michael Brasser <[email protected]>
* | Get rid of internal QQmlPrivate::CachedQmlUnit interface part 1Simon Hausmann2018-01-281-2/+2
| | | | | | | | | | | | | | | | Within QtQml we don't need to use this data structure anymore, we can use its one member directly Change-Id: Id850e12918257c7af3c97bfef41d1e93578842d2 Reviewed-by: Lars Knoll <[email protected]>
* | Remove private API dependency of qmlcachegen generated codeSimon Hausmann2018-01-281-1/+1
| | | | | | | | | | | | | | | | | | Since the compilation unit does not have a backend anymore, we can create it in QtQml itself instead of in generated stub code. That removes the last dependency to private headers in the generated code. Change-Id: I186fc5bd679476b1a4714e4e3ba0ac00b55676cf Reviewed-by: Lars Knoll <[email protected]>
* | Fix compilation unit memory leak when using qml caching from resourcesSimon Hausmann2018-01-261-1/+2
| | | | | | | | | | | | | | | | The unit created via the factory function has a refcount of 1, so we need to adopt it. Change-Id: Ia7aadf02c9fc133919f97ea07fc3f3546a7e2680 Reviewed-by: Lars Knoll <[email protected]>
* | Remove some duplicated codeSimon Hausmann2018-01-251-0/+20
| | | | | | | | | | | | | | | | We can centralize the code that initializes a V4::Script instance used in worker scripts as well as in the Qt.include() function. Change-Id: I9a83f990c694eb4d793ec5ac3b1c917d8c068d06 Reviewed-by: Lars Knoll <[email protected]>
* | Cut out one more C++ layer when doing JS function callsLars Knoll2017-11-131-9/+2
| | | | | | | | | | Change-Id: I0e2ac30b7e6d77fe41deb84a97b0a7f220437c6a Reviewed-by: Simon Hausmann <[email protected]>
* | Finally get rid of the QV4::Function pointer in the contextLars Knoll2017-11-131-3/+0
| | | | | | | | | | Change-Id: Iad6018f67faa956d385087865fca9d73419e363e Reviewed-by: Simon Hausmann <[email protected]>
* | Further cleanup JSCallDataLars Knoll2017-11-071-5/+6
| | | | | | | | | | | | | | Avoid allocations on the JS stack if possible Change-Id: I344cd6dceb6264314f9d22c94db22b22d1d24d14 Reviewed-by: Erik Verbruggen <[email protected]>
* | Simplify JSCallData constructionLars Knoll2017-11-071-2/+2
| | | | | | | | | | Change-Id: Ic53532edae9a209aa7125af6f00a9d993d74f1a3 Reviewed-by: Erik Verbruggen <[email protected]>
* | Get rid of the implicit cast operator to a CallDataLars Knoll2017-11-071-2/+2
| | | | | | | | | | Change-Id: I1c35fbf8f7355bc2393ae931f99e591b800f2f45 Reviewed-by: Erik Verbruggen <[email protected]>
* | Rename JSCall to JSCallDataLars Knoll2017-11-071-2/+2
| | | | | | | | | | | | | | | | As, this is going to change in a simple stack based structure to keep pointers to the data to pass to calls. Change-Id: Ia9aa3f81ee3eeba36affd16aac7b2fe97d59aea9 Reviewed-by: Erik Verbruggen <[email protected]>
* | Fix CallData setup for Script::runErik Verbruggen2017-09-151-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | By calling JSCall with an ExecutionContext as first parameter, the compiler would implicitly create a temporary Scope object in order to be able to do the call. However, the scope would then wipe the stack when it is being destructed. So subsequently retrieving argc would always result in 0 arguments. To prevent accidents like this, all Scope constructors are now explicit, and the QV4::Script's ExecutionContext is renamed from scope to context. Change-Id: Iea7930748a0544382a20b6617fa9818a8a2bea7f Reviewed-by: Lars Knoll <[email protected]>