summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2014-09-23 13:54:11 +0200
committerJose <jose@zeroc.com>2014-09-23 13:54:11 +0200
commitcea20d4e830af3b4cba398b5cc63eaea7e5d4769 (patch)
treed73ff3a6be166628cc71091743a1a8b0ae9c7f71 /cpp/src
parentICE-3267 add filter to chat demo (diff)
downloadice-cea20d4e830af3b4cba398b5cc63eaea7e5d4769.tar.bz2
ice-cea20d4e830af3b4cba398b5cc63eaea7e5d4769.tar.xz
ice-cea20d4e830af3b4cba398b5cc63eaea7e5d4769.zip
JS module mapping updates
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/slice2js/Gen.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/cpp/src/slice2js/Gen.cpp b/cpp/src/slice2js/Gen.cpp
index a740ec83841..1fede6f5833 100644
--- a/cpp/src/slice2js/Gen.cpp
+++ b/cpp/src/slice2js/Gen.cpp
@@ -612,13 +612,6 @@ Slice::Gen::~Gen()
void
Slice::Gen::generate(const UnitPtr& p)
{
- if(p->hasOnlyClassDecls())
- {
- // Don't generate any code if the Slice file only contains
- // forward declarations.
- return;
- }
-
if(_icejs)
{
_out.zeroIndent();
@@ -905,7 +898,7 @@ Slice::Gen::RequireVisitor::writeRequires(const UnitPtr& p)
}
else
{
- _out << nl << "var " << i->first << " = __M.require(module, \"" << i->first << "\", ";
+ _out << nl << "var " << i->first << " = __M.require(module, ";
_out << nl << "[";
_out.inc();
for(vector<string>::const_iterator j = i->second.begin(); j != i->second.end();)
@@ -922,7 +915,7 @@ Slice::Gen::RequireVisitor::writeRequires(const UnitPtr& p)
}
}
_out.dec();
- _out << nl << "]);";
+ _out << nl << "])." << i->first << ";";
_out << nl;
}
seenModules.push_back(i->first);