Skip to content

Instantly share code, notes, and snippets.

@hkaiser
Created May 29, 2018 18:17
Show Gist options
  • Save hkaiser/3a40c38c3d6cfa61c612c3c59beb456a to your computer and use it in GitHub Desktop.
Save hkaiser/3a40c38c3d6cfa61c612c3c59beb456a to your computer and use it in GitHub Desktop.
diff --git a/src/execution_tree/compiler/compiler.cpp b/src/execution_tree/compiler/compiler.cpp
index cfc2b639..cc7331f6 100644
--- a/src/execution_tree/compiler/compiler.cpp
+++ b/src/execution_tree/compiler/compiler.cpp
@@ -414,7 +414,11 @@ namespace phylanx { namespace execution_tree { namespace compiler
{
if (id.id >= 0)
{
- name += annotation(id);
+ std::size_t sequence_number =
+ snippets_.sequence_numbers_[name]++;
+
+ name +=
+ "$" + std::to_string(sequence_number) + annotation(id);
}
return (*cf)(std::list<function>{}, name, name_);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment