aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4codegen.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2013-08-20 16:54:29 +0200
committerSimon Hausmann <simon.hausmann@digia.com>2013-08-20 16:54:29 +0200
commit461892e492e0bef399714557498380703b3e029b (patch)
treead82e1ae8286bbe650b2ee19ad393a4ab8996bb1 /src/qml/compiler/qv4codegen.cpp
parenta71e35a95c9f352db91fb82d8a564d01ba961341 (diff)
parent90aaff37be419ca1f1da40df64424c0d88bfaf19 (diff)
Merge branch 'wip/v4' of ssh://codereview.qt-project.org/qt/qtdeclarative 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
Diffstat (limited to 'src/qml/compiler/qv4codegen.cpp')
-rw-r--r--src/qml/compiler/qv4codegen.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/qml/compiler/qv4codegen.cpp b/src/qml/compiler/qv4codegen.cpp
index b91e3ccd26..6c913a6dc4 100644
--- a/src/qml/compiler/qv4codegen.cpp
+++ b/src/qml/compiler/qv4codegen.cpp
@@ -470,10 +470,11 @@ V4IR::Function *Codegen::operator()(const QString &fileName,
{
assert(node);
- _fileName = fileName;
_module = module;
_env = 0;
+ _module->setFileName(fileName);
+
ScanFunctions scan(this, sourceCode);
scan(node);
@@ -490,8 +491,8 @@ V4IR::Function *Codegen::operator()(const QString &fileName,
AST::FunctionExpression *ast,
V4IR::Module *module)
{
- _fileName = fileName;
_module = module;
+ _module->setFileName(fileName);
_env = 0;
ScanFunctions scan(this, sourceCode);
@@ -1794,7 +1795,6 @@ V4IR::Function *Codegen::defineFunction(const QString &name, AST::Node *ast,
enterEnvironment(ast);
V4IR::Function *function = _module->newFunction(name, _function);
- function->sourceFile = _fileName;
V4IR::BasicBlock *entryBlock = function->newBasicBlock(groupStartBlock());
V4IR::BasicBlock *exitBlock = function->newBasicBlock(groupStartBlock(), V4IR::Function::DontInsertBlock);
@@ -2575,7 +2575,7 @@ void Codegen::throwSyntaxErrorOnEvalOrArgumentsInStrictMode(V4IR::Expr *expr, co
void Codegen::throwSyntaxError(const SourceLocation &loc, const QString &detail)
{
QQmlError error;
- error.setUrl(QUrl::fromLocalFile(_fileName));
+ error.setUrl(QUrl::fromLocalFile(_module->fileName));
error.setDescription(detail);
error.setLine(loc.startLine);
error.setColumn(loc.startColumn);
@@ -2585,7 +2585,7 @@ void Codegen::throwSyntaxError(const SourceLocation &loc, const QString &detail)
void Codegen::throwReferenceError(const SourceLocation &loc, const QString &detail)
{
QQmlError error;
- error.setUrl(QUrl::fromLocalFile(_fileName));
+ error.setUrl(QUrl::fromLocalFile(_module->fileName));
error.setDescription(detail);
error.setLine(loc.startLine);
error.setColumn(loc.startColumn);
@@ -2594,10 +2594,10 @@ void Codegen::throwReferenceError(const SourceLocation &loc, const QString &deta
void RuntimeCodegen::throwSyntaxError(const AST::SourceLocation &loc, const QString &detail)
{
- context->throwSyntaxError(detail, _fileName, loc.startLine, loc.startColumn);
+ context->throwSyntaxError(detail, _module->fileName, loc.startLine, loc.startColumn);
}
void RuntimeCodegen::throwReferenceError(const AST::SourceLocation &loc, const QString &detail)
{
- context->throwReferenceError(detail, _fileName, loc.startLine, loc.startColumn);
+ context->throwReferenceError(detail, _module->fileName, loc.startLine, loc.startColumn);
}