summaryrefslogtreecommitdiff
path: root/cpp/src/slice2js/JsUtil.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/slice2js/JsUtil.cpp')
-rw-r--r--cpp/src/slice2js/JsUtil.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/cpp/src/slice2js/JsUtil.cpp b/cpp/src/slice2js/JsUtil.cpp
index ac4cba9ea2f..31648566a64 100644
--- a/cpp/src/slice2js/JsUtil.cpp
+++ b/cpp/src/slice2js/JsUtil.cpp
@@ -192,6 +192,7 @@ Slice::JsGenerator::getOptionalFormat(const TypePtr& type)
return "Ice.OptionalFormat.VSize";
}
case Builtin::KindObject:
+ case Builtin::KindValue:
{
return "Ice.OptionalFormat.Class";
}
@@ -503,6 +504,7 @@ Slice::JsGenerator::writeMarshalUnmarshalCode(Output &out,
return;
}
case Builtin::KindObject:
+ case Builtin::KindValue:
{
// Handle by isClassType below.
break;
@@ -557,11 +559,11 @@ Slice::JsGenerator::writeMarshalUnmarshalCode(Output &out,
{
if(marshal)
{
- out << nl << stream << ".writeObject(" << param << ");";
+ out << nl << stream << ".writeValue(" << param << ");";
}
else
{
- out << nl << stream << ".readObject(function(__o){ " << fixSuffix(param) << " = __o; }, "
+ out << nl << stream << ".readValue(function(__o){ " << fixSuffix(param) << " = __o; }, "
<< typeToString(type) << ");";
}
return;
@@ -596,11 +598,11 @@ Slice::JsGenerator::writeOptionalMarshalUnmarshalCode(Output &out,
{
if(marshal)
{
- out << nl << stream << ".writeOptObject(" << tag << ", " << param << ");";
+ out << nl << stream << ".writeOptionalValue(" << tag << ", " << param << ");";
}
else
{
- out << nl << stream << ".readOptObject(" << tag << ", function(__o){ " << fixSuffix(param)
+ out << nl << stream << ".readOptionalValue(" << tag << ", function(__o){ " << fixSuffix(param)
<< " = __o; }, " << typeToString(type) << ");";
}
return;
@@ -621,11 +623,11 @@ Slice::JsGenerator::writeOptionalMarshalUnmarshalCode(Output &out,
if(marshal)
{
- out << nl << getHelper(type) <<".writeOpt(" << stream << ", " << tag << ", " << param << ");";
+ out << nl << getHelper(type) <<".writeOptional(" << stream << ", " << tag << ", " << param << ");";
}
else
{
- out << nl << param << " = " << getHelper(type) << ".readOpt(" << stream << ", " << tag << ");";
+ out << nl << param << " = " << getHelper(type) << ".readOptional(" << stream << ", " << tag << ");";
}
}
@@ -670,6 +672,7 @@ Slice::JsGenerator::getHelper(const TypePtr& type)
return "Ice.StringHelper";
}
case Builtin::KindObject:
+ case Builtin::KindValue:
{
return "Ice.ObjectHelper";
}