[vala/staging: 56/91] transformer: Clear wrapper cache for every file
- From: Luca Bruno <lucabru src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging: 56/91] transformer: Clear wrapper cache for every file
- Date: Mon, 3 Feb 2014 23:18:30 +0000 (UTC)
commit 181d89499e451a87dfc3fcc59137bfd3ef971a89
Author: Luca Bruno <lucabru src gnome org>
Date: Thu Oct 25 20:32:48 2012 +0200
transformer: Clear wrapper cache for every file
codegen/valaccodetransformer.vala | 4 ----
vala/valacodetransformer.vala | 5 +++--
2 files changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/codegen/valaccodetransformer.vala b/codegen/valaccodetransformer.vala
index 6ea689a..be3e61a 100644
--- a/codegen/valaccodetransformer.vala
+++ b/codegen/valaccodetransformer.vala
@@ -28,10 +28,6 @@ public class Vala.CCodeTransformer : CodeTransformer {
source_file.accept_children (this);
}
- public override void visit_namespace (Namespace ns) {
- ns.accept_children (this);
- }
-
public override void visit_class (Class cl) {
cl.accept_children (this);
}
diff --git a/vala/valacodetransformer.vala b/vala/valacodetransformer.vala
index 8ff5b80..8773d51 100644
--- a/vala/valacodetransformer.vala
+++ b/vala/valacodetransformer.vala
@@ -28,7 +28,7 @@ public class Vala.CodeTransformer : CodeVisitor {
public CodeBuilder b;
public ArrayList<CodeBuilder> builder_stack = new ArrayList<CodeBuilder> ();
- public HashMap<string, CodeNode> wrapper_cache = new HashMap<string, CodeNode> (str_hash, str_equal);
+ public HashMap<string, CodeNode> wrapper_cache;
public void push_builder (CodeBuilder builder) {
builder_stack.add (b);
@@ -47,12 +47,13 @@ public class Vala.CodeTransformer : CodeVisitor {
*/
public void transform (CodeContext context) {
this.context = context;
-
/* we're only interested in non-pkg source files */
var source_files = context.get_source_files ();
foreach (SourceFile file in source_files) {
if (file.file_type == SourceFileType.SOURCE ||
(context.header_filename != null && file.file_type == SourceFileType.FAST)) {
+ /* clear wrapper cache for every file */
+ wrapper_cache = new HashMap<string, CodeNode> (str_hash, str_equal);
file.accept (this);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]