[vala] codegen: Reduce the number of temporary variables
- From: Luca Bruno <lucabru src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] codegen: Reduce the number of temporary variables
- Date: Sat, 25 Jan 2014 14:56:03 +0000 (UTC)
commit e9eb1ebb8f4911144628c793707db86af7c2e26c
Author: Luca Bruno <lucabru src gnome org>
Date: Sat Jan 25 15:55:05 2014 +0100
codegen: Reduce the number of temporary variables
If a temporary variable has been generated internally,
do not create another regardless of whether it's floating or not.
codegen/valaccodememberaccessmodule.vala | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/codegen/valaccodememberaccessmodule.vala b/codegen/valaccodememberaccessmodule.vala
index 82f9d06..afe8104 100644
--- a/codegen/valaccodememberaccessmodule.vala
+++ b/codegen/valaccodememberaccessmodule.vala
@@ -724,9 +724,9 @@ public abstract class Vala.CCodeMemberAccessModule : CCodeControlFlowModule {
use_temp = false;
}
var local = variable as LocalVariable;
- if (local != null && local.floating) {
- // floating locals are generated internally and safe to
- // access without temporary variable
+ if (local != null && local.name[0] == '.') {
+ // already a temporary variable generated internally
+ // and safe to access without temporary variable
use_temp = false;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]