aboutsummaryrefslogtreecommitdiffstats
path: root/qv4codegen.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2012-10-30 07:29:14 +0100
committerSimon Hausmann <simon.hausmann@digia.com>2012-10-31 17:00:03 +0100
commit29f8677ac27d628937cc3b6548c302a9d628630c (patch)
treec3a26236d8ef397499d4e832520270a50c5b301f /qv4codegen.cpp
parent477ea45b0b7d7b9dcc60d4cba4a4036359a969b6 (diff)
Implement initial support for the delete operator
And don't dump the assemply unless SHOW_CODE is set. Change-Id: I17ad36f002404b57c65f910048e5c82d42307976 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'qv4codegen.cpp')
-rw-r--r--qv4codegen.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/qv4codegen.cpp b/qv4codegen.cpp
index 225b43cb3a..976ab05fa5 100644
--- a/qv4codegen.cpp
+++ b/qv4codegen.cpp
@@ -1051,9 +1051,12 @@ bool Codegen::visit(ConditionalExpression *ast)
return false;
}
-bool Codegen::visit(DeleteExpression *)
+bool Codegen::visit(DeleteExpression *ast)
{
- assert(!"not implemented");
+ Result expr = expression(ast->expression);
+ IR::ExprList *args = _function->New<IR::ExprList>();
+ args->init(*expr);
+ _expr.code = call(_block->NAME(IR::Name::builtin_delete, ast->deleteToken.startLine, ast->deleteToken.startColumn), args);
return false;
}