[vala] codegen: Get rid of transform_expression
- From: Luca Bruno <lucabru src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] codegen: Get rid of transform_expression
- Date: Sat, 7 May 2011 18:32:19 +0000 (UTC)
commit 9844c5f97c66eb49ef5cc6a8f6b50b4b0dce340b
Author: Luca Bruno <lucabru src gnome org>
Date: Sat May 7 19:53:21 2011 +0200
codegen: Get rid of transform_expression
It was not possible to return any extra temporary variable from
transform_expression for compound types like arrays or delegates,
thus producing subtle bugs.
codegen/valaccodebasemodule.vala | 20 --------------------
1 files changed, 0 insertions(+), 20 deletions(-)
---
diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala
index 6edcc7a..4457374 100644
--- a/codegen/valaccodebasemodule.vala
+++ b/codegen/valaccodebasemodule.vala
@@ -5046,26 +5046,6 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
return result;
}
- // manage memory and implicit casts
- public CCodeExpression transform_expression (CCodeExpression source_cexpr, DataType? expression_type, DataType? target_type, Expression? expr = null) {
- if (expression_type == null) {
- return source_cexpr;
- }
- GLibValue value;
- if (expr != null && expr.target_value != null) {
- value = ((GLibValue) expr.target_value).copy ();
- value.value_type = expression_type;
- value.cvalue = source_cexpr;
- } else {
- value = new GLibValue (expression_type, source_cexpr);
- }
- CodeNode node = expr;
- if (node == null) {
- node = expression_type;
- }
- return get_cvalue_ (transform_value (value, target_type, node));
- }
-
public TargetValue transform_value (TargetValue value, DataType? target_type, CodeNode node) {
var type = value.value_type;
var result = ((GLibValue) value).copy ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]