[vala/wip/transform: 68/106] transformer: Clear wrapper cache for every file
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/wip/transform: 68/106] transformer: Clear wrapper cache for every file
- Date: Mon, 4 Feb 2019 09:25:42 +0000 (UTC)
commit 129ff2cbb7128e34954975e7e89a9653b0607f3b
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 8af5ee62e..6f004c46f 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 8ff5b8082..8773d5151 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]