zeroc-ice 3.8.2 → 3.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/dist/IceRuby/Communicator.cpp +26 -9
- data/dist/IceRuby/Config.h +0 -12
- data/dist/IceRuby/Connection.cpp +18 -9
- data/dist/IceRuby/DefaultSliceLoader.h +1 -1
- data/dist/IceRuby/Endpoint.cpp +21 -8
- data/dist/IceRuby/Operation.cpp +7 -5
- data/dist/IceRuby/Properties.cpp +3 -4
- data/dist/IceRuby/Proxy.cpp +11 -19
- data/dist/IceRuby/RubySliceLoader.cpp +1 -1
- data/dist/IceRuby/RubySliceLoader.h +6 -0
- data/dist/IceRuby/Types.cpp +162 -138
- data/dist/IceRuby/Types.h +68 -28
- data/dist/IceRuby/Util.cpp +14 -78
- data/dist/IceRuby/Util.h +7 -17
- data/dist/ice/cpp/include/Ice/Communicator.h +31 -8
- data/dist/ice/cpp/include/Ice/Config.h +2 -2
- data/dist/ice/cpp/include/Ice/Connection.h +24 -8
- data/dist/ice/cpp/include/Ice/CtrlCHandler.h +1 -1
- data/dist/ice/cpp/include/Ice/Demangle.h +1 -1
- data/dist/ice/cpp/include/Ice/Endpoint.h +4 -4
- data/dist/ice/cpp/include/Ice/Initialize.h +4 -4
- data/dist/ice/cpp/include/Ice/InputStream.h +5 -5
- data/dist/ice/cpp/include/Ice/Instrumentation.h +13 -7
- data/dist/ice/cpp/include/Ice/LocalExceptions.h +5 -5
- data/dist/ice/cpp/include/Ice/Logger.h +7 -0
- data/dist/ice/cpp/include/Ice/LoggerUtil.h +1 -1
- data/dist/ice/cpp/include/Ice/Object.h +10 -8
- data/dist/ice/cpp/include/Ice/ObjectAdapter.h +1 -1
- data/dist/ice/cpp/include/Ice/OutgoingAsync.h +5 -2
- data/dist/ice/cpp/include/Ice/OutgoingResponse.h +2 -1
- data/dist/ice/cpp/include/Ice/OutputStream.h +7 -6
- data/dist/ice/cpp/include/Ice/PluginFactory.h +1 -1
- data/dist/ice/cpp/include/Ice/Properties.h +3 -3
- data/dist/ice/cpp/include/Ice/Proxy.h +192 -50
- data/dist/ice/cpp/include/Ice/SSL/ClientAuthenticationOptions.h +3 -3
- data/dist/ice/cpp/include/Ice/SSL/EndpointInfo.h +1 -1
- data/dist/ice/cpp/include/Ice/SSL/ServerAuthenticationOptions.h +5 -5
- data/dist/ice/cpp/include/Ice/ServantLocator.h +1 -1
- data/dist/ice/cpp/include/Ice/Service.h +2 -5
- data/dist/ice/cpp/include/Ice/SliceLoader.h +1 -1
- data/dist/ice/cpp/include/Ice/SlicedData.h +5 -3
- data/dist/ice/cpp/include/Ice/StreamHelpers.h +1 -1
- data/dist/ice/cpp/include/Ice/StreamableTraits.h +2 -2
- data/dist/ice/cpp/include/Ice/StringConverter.h +2 -3
- data/dist/ice/cpp/include/Ice/StringUtil.h +2 -7
- data/dist/ice/cpp/include/Ice/UUID.h +1 -0
- data/dist/ice/cpp/include/Ice/Value.h +2 -2
- data/dist/ice/cpp/include/generated/Ice/BuiltinSequences.h +2 -2
- data/dist/ice/cpp/include/generated/Ice/Context.h +2 -2
- data/dist/ice/cpp/include/generated/Ice/EndpointTypes.h +2 -2
- data/dist/ice/cpp/include/generated/Ice/Identity.h +2 -2
- data/dist/ice/cpp/include/generated/Ice/Locator.h +50 -14
- data/dist/ice/cpp/include/generated/Ice/LocatorRegistry.h +38 -11
- data/dist/ice/cpp/include/generated/Ice/Metrics.h +94 -39
- data/dist/ice/cpp/include/generated/Ice/OperationMode.h +2 -2
- data/dist/ice/cpp/include/generated/Ice/Process.h +34 -8
- data/dist/ice/cpp/include/generated/Ice/PropertiesAdmin.h +42 -11
- data/dist/ice/cpp/include/generated/Ice/PropertyDict.h +2 -2
- data/dist/ice/cpp/include/generated/Ice/RemoteLogger.h +93 -40
- data/dist/ice/cpp/include/generated/Ice/ReplyStatus.h +2 -2
- data/dist/ice/cpp/include/generated/Ice/Router.h +50 -14
- data/dist/ice/cpp/include/generated/Ice/SliceChecksumDict.h +2 -2
- data/dist/ice/cpp/include/generated/Ice/Version.h +2 -2
- data/dist/ice/cpp/include/generated/IceDiscovery/Lookup.h +66 -14
- data/dist/ice/cpp/include/generated/IceLocatorDiscovery/Lookup.h +34 -8
- data/dist/ice/cpp/src/Ice/AddDefaultPluginFactories_all.cpp +1 -1
- data/dist/ice/cpp/src/Ice/Base64.cpp +47 -137
- data/dist/ice/cpp/src/Ice/Base64.h +2 -2
- data/dist/ice/cpp/src/Ice/BatchRequestQueue.cpp +28 -13
- data/dist/ice/cpp/src/Ice/BatchRequestQueue.h +5 -1
- data/dist/ice/cpp/src/Ice/Buffer.cpp +1 -1
- data/dist/ice/cpp/src/Ice/CollocatedRequestHandler.cpp +1 -1
- data/dist/ice/cpp/src/Ice/CollocatedRequestHandler.h +1 -1
- data/dist/ice/cpp/src/Ice/Communicator.cpp +4 -3
- data/dist/ice/cpp/src/Ice/CommunicatorFlushBatchAsync.cpp +8 -0
- data/dist/ice/cpp/src/Ice/ConnectRequestHandler.cpp +5 -15
- data/dist/ice/cpp/src/Ice/ConnectRequestHandler.h +1 -1
- data/dist/ice/cpp/src/Ice/ConnectionFactory.cpp +6 -8
- data/dist/ice/cpp/src/Ice/ConnectionFactory.h +0 -3
- data/dist/ice/cpp/src/Ice/ConnectionI.cpp +94 -99
- data/dist/ice/cpp/src/Ice/ConnectionI.h +11 -8
- data/dist/ice/cpp/src/Ice/ConsoleUtil.cpp +1 -1
- data/dist/ice/cpp/src/Ice/DefaultsAndOverrides.cpp +10 -14
- data/dist/ice/cpp/src/Ice/EndpointI.h +1 -1
- data/dist/ice/cpp/src/Ice/FileUtil.cpp +12 -12
- data/dist/ice/cpp/src/Ice/FixedRequestHandler.cpp +1 -1
- data/dist/ice/cpp/src/Ice/FixedRequestHandler.h +1 -1
- data/dist/ice/cpp/src/Ice/HttpParser.h +0 -2
- data/dist/ice/cpp/src/Ice/IdleTimeoutTransceiverDecorator.cpp +6 -3
- data/dist/ice/cpp/src/Ice/IncomingRequest.cpp +1 -3
- data/dist/ice/cpp/src/Ice/InputStream.cpp +23 -19
- data/dist/ice/cpp/src/Ice/Instance.cpp +73 -50
- data/dist/ice/cpp/src/Ice/Instance.h +1 -6
- data/dist/ice/cpp/src/Ice/LocalExceptions.cpp +1 -1
- data/dist/ice/cpp/src/Ice/LocatorInfo.cpp +2 -2
- data/dist/ice/cpp/src/Ice/LoggerAdminI.cpp +13 -18
- data/dist/ice/cpp/src/Ice/LoggerI.cpp +1 -1
- data/dist/ice/cpp/src/Ice/LoggerI.h +2 -2
- data/dist/ice/cpp/src/Ice/MetricsAdminI.h +6 -1
- data/dist/ice/cpp/src/Ice/MetricsObserverI.h +22 -18
- data/dist/ice/cpp/src/Ice/NativePropertiesAdmin.cpp +5 -2
- data/dist/ice/cpp/src/Ice/Network.cpp +168 -103
- data/dist/ice/cpp/src/Ice/Network.h +12 -7
- data/dist/ice/cpp/src/Ice/NetworkProxy.cpp +17 -6
- data/dist/ice/cpp/src/Ice/NetworkProxy.h +2 -1
- data/dist/ice/cpp/src/Ice/Object.cpp +1 -1
- data/dist/ice/cpp/src/Ice/ObjectAdapterI.cpp +56 -19
- data/dist/ice/cpp/src/Ice/OpaqueEndpointI.cpp +10 -10
- data/dist/ice/cpp/src/Ice/Options.cpp +7 -2
- data/dist/ice/cpp/src/Ice/OutgoingAsync.cpp +1 -1
- data/dist/ice/cpp/src/Ice/OutputStream.cpp +4 -4
- data/dist/ice/cpp/src/Ice/PluginManagerI.cpp +7 -1
- data/dist/ice/cpp/src/Ice/Properties.cpp +26 -16
- data/dist/ice/cpp/src/Ice/PropertyUtil.cpp +1 -1
- data/dist/ice/cpp/src/Ice/ProtocolInstance.cpp +0 -11
- data/dist/ice/cpp/src/Ice/ProtocolInstance.h +1 -2
- data/dist/ice/cpp/src/Ice/Proxy.cpp +9 -1
- data/dist/ice/cpp/src/Ice/ProxyAsync.cpp +110 -13
- data/dist/ice/cpp/src/Ice/Random.cpp +68 -7
- data/dist/ice/cpp/src/Ice/Random.h +6 -2
- data/dist/ice/cpp/src/Ice/Reference.cpp +22 -11
- data/dist/ice/cpp/src/Ice/Reference.h +3 -0
- data/dist/ice/cpp/src/Ice/ReferenceFactory.cpp +10 -0
- data/dist/ice/cpp/src/Ice/RequestHandler.h +3 -1
- data/dist/ice/cpp/src/Ice/RequestHandlerCache.cpp +1 -1
- data/dist/ice/cpp/src/Ice/RequestHandlerCache.h +1 -1
- data/dist/ice/cpp/src/Ice/ResourceConfig.h +3 -3
- data/dist/ice/cpp/src/Ice/RetryQueue.cpp +8 -12
- data/dist/ice/cpp/src/Ice/SHA1.cpp +11 -11
- data/dist/ice/cpp/src/Ice/SSL/DistinguishedName.cpp +0 -6
- data/dist/ice/cpp/src/Ice/SSL/DistinguishedName.h +0 -6
- data/dist/ice/cpp/src/Ice/SSL/OpenSSLEngine.cpp +15 -1
- data/dist/ice/cpp/src/Ice/SSL/OpenSSLTransceiverI.cpp +77 -27
- data/dist/ice/cpp/src/Ice/SSL/OpenSSLTransceiverI.h +2 -1
- data/dist/ice/cpp/src/Ice/SSL/RFC2253.cpp +2 -2
- data/dist/ice/cpp/src/Ice/SSL/SSLUtil.cpp +39 -34
- data/dist/ice/cpp/src/Ice/SSL/SchannelEngine.cpp +130 -52
- data/dist/ice/cpp/src/Ice/SSL/SchannelTransceiverI.cpp +64 -33
- data/dist/ice/cpp/src/Ice/SSL/SchannelTransceiverI.h +0 -1
- data/dist/ice/cpp/src/Ice/SSL/SecureTransportEngine.cpp +3 -3
- data/dist/ice/cpp/src/Ice/SSL/SecureTransportTransceiverI.cpp +9 -3
- data/dist/ice/cpp/src/Ice/SSL/SecureTransportUtil.cpp +73 -51
- data/dist/ice/cpp/src/Ice/SSL/SecureTransportUtil.h +0 -8
- data/dist/ice/cpp/src/Ice/Selector.cpp +13 -11
- data/dist/ice/cpp/src/Ice/ServantManager.cpp +3 -3
- data/dist/ice/cpp/src/Ice/Service.cpp +33 -115
- data/dist/ice/cpp/src/Ice/StreamSocket.cpp +33 -40
- data/dist/ice/cpp/src/Ice/StreamSocket.h +4 -4
- data/dist/ice/cpp/src/Ice/StringConverter.cpp +1 -1
- data/dist/ice/cpp/src/Ice/StringUtil.cpp +12 -21
- data/dist/ice/cpp/src/Ice/SysLoggerI.cpp +136 -100
- data/dist/ice/cpp/src/Ice/SysLoggerI.h +7 -3
- data/dist/ice/cpp/src/Ice/SystemdJournalI.cpp +1 -1
- data/dist/ice/cpp/src/Ice/TcpAcceptor.cpp +7 -7
- data/dist/ice/cpp/src/Ice/TcpAcceptor.h +2 -1
- data/dist/ice/cpp/src/Ice/TcpBufSize.h +40 -0
- data/dist/ice/cpp/src/Ice/TcpConnector.cpp +5 -2
- data/dist/ice/cpp/src/Ice/TcpConnector.h +2 -0
- data/dist/ice/cpp/src/Ice/TcpTransceiver.cpp +6 -2
- data/dist/ice/cpp/src/Ice/ThreadPool.cpp +2 -8
- data/dist/ice/cpp/src/Ice/ThreadPool.h +0 -2
- data/dist/ice/cpp/src/Ice/Timer.cpp +7 -3
- data/dist/ice/cpp/src/Ice/UUID.cpp +1 -2
- data/dist/ice/cpp/src/Ice/UdpEndpointI.cpp +4 -1
- data/dist/ice/cpp/src/Ice/UdpTransceiver.cpp +136 -123
- data/dist/ice/cpp/src/Ice/UdpTransceiver.h +3 -4
- data/dist/ice/cpp/src/Ice/WSTransceiver.cpp +96 -27
- data/dist/ice/cpp/src/Ice/WSTransceiver.h +1 -1
- data/dist/ice/cpp/src/Ice/generated/BuiltinSequences.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/Context.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/EndpointTypes.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/Identity.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/Locator.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/LocatorRegistry.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/Metrics.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/OperationMode.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/Process.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/PropertiesAdmin.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/PropertyDict.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/RemoteLogger.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/ReplyStatus.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/Router.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/SliceChecksumDict.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/Version.cpp +2 -2
- data/dist/ice/cpp/src/IceDiscovery/LookupI.cpp +47 -9
- data/dist/ice/cpp/src/IceDiscovery/LookupI.h +8 -3
- data/dist/ice/cpp/src/IceDiscovery/generated/Lookup.cpp +2 -2
- data/dist/ice/cpp/src/IceLocatorDiscovery/PluginI.cpp +43 -14
- data/dist/ice/cpp/src/IceLocatorDiscovery/generated/Lookup.cpp +2 -2
- data/dist/ice/cpp/src/Slice/DocCommentParser.cpp +26 -20
- data/dist/ice/cpp/src/Slice/DocCommentParser.h +2 -2
- data/dist/ice/cpp/src/Slice/FileTracker.cpp +3 -11
- data/dist/ice/cpp/src/Slice/FileTracker.h +0 -2
- data/dist/ice/cpp/src/Slice/Grammar.cpp +211 -210
- data/dist/ice/cpp/src/Slice/MetadataValidation.cpp +10 -9
- data/dist/ice/cpp/src/Slice/Parser.cpp +28 -20
- data/dist/ice/cpp/src/Slice/Parser.h +3 -4
- data/dist/ice/cpp/src/Slice/Preprocessor.cpp +3 -11
- data/dist/ice/cpp/src/Slice/Preprocessor.h +0 -2
- data/dist/ice/cpp/src/Slice/Scanner.cpp +3 -3
- data/dist/ice/cpp/src/Slice/SliceUtil.cpp +197 -114
- data/dist/ice/cpp/src/Slice/StringLiteralUtil.cpp +0 -2
- data/dist/ice/cpp/src/Slice/Util.h +21 -9
- data/dist/ice/cpp/src/slice2rb/Ruby.cpp +7 -3
- data/dist/ice/cpp/src/slice2rb/RubyUtil.cpp +16 -12
- data/dist/ice/cpp/src/slice2rb/RubyUtil.h +3 -3
- data/dist/ice/slice/Glacier2/Router.ice +3 -3
- data/dist/ice/slice/Ice/Metrics.ice +6 -5
- data/dist/ice/slice/Ice/RemoteLogger.ice +5 -5
- data/dist/ice/slice/IceGrid/Admin.ice +9 -9
- data/dist/ice/slice/IceGrid/Descriptor.ice +5 -5
- data/dist/ice/slice/IceStorm/Metrics.ice +1 -1
- data/dist/lib/Glacier2/Metrics.rb +1 -1
- data/dist/lib/Glacier2/PermissionsVerifier.rb +1 -1
- data/dist/lib/Glacier2/Router.rb +2 -2
- data/dist/lib/Glacier2/SSLInfo.rb +1 -1
- data/dist/lib/Glacier2/Session.rb +1 -1
- data/dist/lib/Ice/BuiltinSequences.rb +1 -1
- data/dist/lib/Ice/CompressBatch.rb +1 -2
- data/dist/lib/Ice/Context.rb +1 -1
- data/dist/lib/Ice/EndpointSelectionType.rb +1 -2
- data/dist/lib/Ice/EndpointTypes.rb +1 -1
- data/dist/lib/Ice/Identity.rb +1 -1
- data/dist/lib/Ice/IdentitySpaceship.rb +1 -0
- data/dist/lib/Ice/Locator.rb +1 -1
- data/dist/lib/Ice/LocatorRegistry.rb +1 -1
- data/dist/lib/Ice/Metrics.rb +1 -1
- data/dist/lib/Ice/OperationMode.rb +2 -3
- data/dist/lib/Ice/Process.rb +1 -1
- data/dist/lib/Ice/PropertiesAdmin.rb +1 -1
- data/dist/lib/Ice/PropertyDict.rb +1 -1
- data/dist/lib/Ice/RemoteLogger.rb +2 -3
- data/dist/lib/Ice/ReplyStatus.rb +2 -3
- data/dist/lib/Ice/Router.rb +1 -1
- data/dist/lib/Ice/SliceChecksumDict.rb +1 -1
- data/dist/lib/Ice/SliceUtil.rb +2 -2
- data/dist/lib/Ice/Struct.rb +1 -0
- data/dist/lib/Ice/ToStringMode.rb +1 -2
- data/dist/lib/Ice/Value.rb +2 -2
- data/dist/lib/Ice/Version.rb +1 -1
- data/dist/lib/IceBox/ServiceManager.rb +1 -1
- data/dist/lib/IceGrid/Admin.rb +3 -4
- data/dist/lib/IceGrid/Descriptor.rb +1 -1
- data/dist/lib/IceGrid/Exception.rb +1 -1
- data/dist/lib/IceGrid/FileParser.rb +1 -1
- data/dist/lib/IceGrid/Registry.rb +2 -3
- data/dist/lib/IceGrid/Session.rb +2 -2
- data/dist/lib/IceGrid/UserAccountMapper.rb +1 -1
- data/dist/lib/IceStorm/IceStorm.rb +1 -1
- data/dist/lib/IceStorm/Metrics.rb +1 -1
- data/extconf.rb +1 -1
- data/ice.gemspec +3 -3
- metadata +4 -5
- data/dist/ice/cpp/src/Ice/DLLMain.cpp +0 -40
- data/dist/ice/cpp/src/Ice/UndefSysMacros.h +0 -37
|
@@ -108,7 +108,7 @@ Slice::validateMetadata(const UnitPtr& unit, string_view prefix, map<string, Met
|
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
return nullopt;
|
|
111
|
-
}
|
|
111
|
+
};
|
|
112
112
|
knownMetadata.emplace("deprecate", std::move(deprecatedInfo));
|
|
113
113
|
|
|
114
114
|
// "format"
|
|
@@ -283,18 +283,18 @@ MetadataVisitor::validate(MetadataList metadata, const SyntaxTreeBasePtr& p, boo
|
|
|
283
283
|
for (auto i = metadata.begin(); i != metadata.end();)
|
|
284
284
|
{
|
|
285
285
|
const string& directive = (*i)->directive();
|
|
286
|
+
const auto colonIndex = directive.find(':');
|
|
286
287
|
|
|
287
|
-
//
|
|
288
|
-
|
|
289
|
-
if (directive.find(':') != string::npos && directive.find(_language) != 0)
|
|
288
|
+
// Only check the metadata if it starts with the provided '_language' prefix, or is language agnostic.
|
|
289
|
+
if ((directive.find(_language) == 0 && colonIndex == _language.size()) || colonIndex == string::npos)
|
|
290
290
|
{
|
|
291
|
-
|
|
291
|
+
// Check if the metadata is valid. If it's not, remove it to shield downstream logic from invalid inputs.
|
|
292
|
+
bool isValid = isMetadataValid(*i, p, isTypeContext);
|
|
293
|
+
i = isValid ? std::next(i, 1) : metadata.erase(i);
|
|
292
294
|
}
|
|
293
295
|
else
|
|
294
296
|
{
|
|
295
|
-
|
|
296
|
-
bool isValid = isMetadataValid(*i, p, isTypeContext);
|
|
297
|
-
i = isValid ? std::next(i, 1) : metadata.erase(i);
|
|
297
|
+
i = metadata.erase(i); // This metadata isn't relevant to the target language; remove it.
|
|
298
298
|
}
|
|
299
299
|
}
|
|
300
300
|
|
|
@@ -464,7 +464,8 @@ MetadataVisitor::isMetadataValid(const MetadataPtr& metadata, const SyntaxTreeBa
|
|
|
464
464
|
{
|
|
465
465
|
// We make a special exception to uniqueness for metadata on forward declarations, since there can be
|
|
466
466
|
// multiple forward declarations for the same entity, but they all share a single backing `MetadataList`.
|
|
467
|
-
// So for these types, even 'unique' metadata
|
|
467
|
+
// So for these types, we let even 'unique' metadata appear multiple times, but we require them to be
|
|
468
|
+
// identical.
|
|
468
469
|
if (dynamic_pointer_cast<ClassDecl>(p) || dynamic_pointer_cast<InterfaceDecl>(p))
|
|
469
470
|
{
|
|
470
471
|
const MetadataPtr& previousMetadata = _seenDirectives[directive];
|
|
@@ -79,10 +79,10 @@ namespace
|
|
|
79
79
|
/// Reports any naming conflicts between @p name and @p definitions.
|
|
80
80
|
/// This should only be called for Slice elements that are _not_ defined at module scope.
|
|
81
81
|
/// For example, this is fine to use for operations, enumerators, data members, and parameters.
|
|
82
|
-
/// For elements that are defined
|
|
82
|
+
/// For elements that are defined directly within modules, `findContents` must be used instead.
|
|
83
83
|
/// @param name The name to check for conflicts.
|
|
84
84
|
/// @param kind The kind of element that we're checking (only used for error messages).
|
|
85
|
-
/// @param definitions A list of definitions check @p name against.
|
|
85
|
+
/// @param definitions A list of definitions to check @p name against.
|
|
86
86
|
/// @return @c false if there are no name conflicts, @c true otherwise.
|
|
87
87
|
bool doesNameConflict(string_view name, string_view kind, const ContainedList& definitions)
|
|
88
88
|
{
|
|
@@ -865,8 +865,8 @@ Slice::Contained::Contained(const ContainerPtr& container, string name) : _conta
|
|
|
865
865
|
void
|
|
866
866
|
Slice::Container::destroyContents()
|
|
867
867
|
{
|
|
868
|
-
// Container has pointers to all
|
|
869
|
-
// But each Contained also keeps a pointer to
|
|
868
|
+
// Container has pointers to all its contents (since it logically owns them).
|
|
869
|
+
// But each Contained also keeps a pointer to its parent, creating a cycle.
|
|
870
870
|
// We need to break this cycle.
|
|
871
871
|
for (const auto& i : _contents)
|
|
872
872
|
{
|
|
@@ -999,7 +999,7 @@ Slice::Container::createClassDef(const string& name, int32_t id, const ClassDefP
|
|
|
999
999
|
def->_declaration = decl;
|
|
1000
1000
|
decl->_definition = def;
|
|
1001
1001
|
|
|
1002
|
-
// Patch forward declarations which may
|
|
1002
|
+
// Patch forward declarations which may have been created in other openings of this class' module.
|
|
1003
1003
|
for (const auto& q : matches)
|
|
1004
1004
|
{
|
|
1005
1005
|
dynamic_pointer_cast<ClassDecl>(q)->_definition = def;
|
|
@@ -1135,7 +1135,7 @@ Slice::Container::createInterfaceDef(const string& name, const InterfaceList& ba
|
|
|
1135
1135
|
def->_declaration = decl;
|
|
1136
1136
|
decl->_definition = def;
|
|
1137
1137
|
|
|
1138
|
-
// Patch forward declarations which may
|
|
1138
|
+
// Patch forward declarations which may have been created in other openings of this interface's module.
|
|
1139
1139
|
for (const auto& q : matches)
|
|
1140
1140
|
{
|
|
1141
1141
|
dynamic_pointer_cast<InterfaceDecl>(q)->_definition = def;
|
|
@@ -3436,7 +3436,7 @@ Slice::Exception::createDataMember(
|
|
|
3436
3436
|
if (baseMember->name() == name)
|
|
3437
3437
|
{
|
|
3438
3438
|
ostringstream os;
|
|
3439
|
-
os << "data member '" << name << "' is already defined in a base exception";
|
|
3439
|
+
os << "data member '" << name << "' is already defined as a data member in a base exception";
|
|
3440
3440
|
unit()->error(os.str());
|
|
3441
3441
|
break;
|
|
3442
3442
|
}
|
|
@@ -3993,24 +3993,33 @@ Slice::Enum::createEnumerator(const string& name, optional<int32_t> explicitValu
|
|
|
3993
3993
|
ostringstream os;
|
|
3994
3994
|
os << "value for enumerator '" << name << "' is out of range";
|
|
3995
3995
|
unit()->error(os.str());
|
|
3996
|
+
nextValue = numeric_limits<int32_t>::min(); // Wrap around to the minimum value.
|
|
3997
|
+
}
|
|
3998
|
+
else
|
|
3999
|
+
{
|
|
4000
|
+
// If the enumerator was not assigned an explicit value,
|
|
4001
|
+
// we automatically assign it one more than the previous enumerator.
|
|
4002
|
+
nextValue = _lastValue + 1;
|
|
3996
4003
|
}
|
|
3997
|
-
// If the enumerator was not assigned an explicit value,
|
|
3998
|
-
// we automatically assign it one more than the previous enumerator.
|
|
3999
|
-
nextValue = _lastValue + 1;
|
|
4000
4004
|
}
|
|
4001
4005
|
|
|
4002
|
-
// Check if the enumerator's value is already in use.
|
|
4003
4006
|
bool checkForDuplicates = true;
|
|
4004
|
-
|
|
4005
|
-
|
|
4006
|
-
_maxValue = nextValue;
|
|
4007
|
-
checkForDuplicates = false;
|
|
4008
|
-
}
|
|
4009
|
-
if (nextValue < _minValue)
|
|
4007
|
+
// Negative values indicate this is a bogus enumerator that is only created for error-recovery purposes.
|
|
4008
|
+
if (nextValue >= 0)
|
|
4010
4009
|
{
|
|
4011
|
-
|
|
4012
|
-
|
|
4010
|
+
if (nextValue > _maxValue)
|
|
4011
|
+
{
|
|
4012
|
+
_maxValue = nextValue;
|
|
4013
|
+
checkForDuplicates = false;
|
|
4014
|
+
}
|
|
4015
|
+
if (nextValue < _minValue)
|
|
4016
|
+
{
|
|
4017
|
+
_minValue = nextValue;
|
|
4018
|
+
checkForDuplicates = false;
|
|
4019
|
+
}
|
|
4013
4020
|
}
|
|
4021
|
+
|
|
4022
|
+
// Check if the enumerator's value is already in use.
|
|
4014
4023
|
if (checkForDuplicates)
|
|
4015
4024
|
{
|
|
4016
4025
|
for (const auto& r : enumerators())
|
|
@@ -4458,7 +4467,6 @@ Slice::Unit::setCurrentFile(string currentFile, int lineNumber)
|
|
|
4458
4467
|
if (!IceInternal::fileExists(resolvedFilename))
|
|
4459
4468
|
{
|
|
4460
4469
|
// MCPP may report incorrect absolute paths when files are included using relative paths.
|
|
4461
|
-
// See: https://github.com/zeroc-ice/ice/issues/4253
|
|
4462
4470
|
|
|
4463
4471
|
// If the path is absolute but the file doesn't exist, treat it as relative to the current definition
|
|
4464
4472
|
// context.
|
|
@@ -87,7 +87,6 @@ namespace Slice
|
|
|
87
87
|
|
|
88
88
|
using StringList = std::list<std::string>;
|
|
89
89
|
using MetadataList = std::list<MetadataPtr>;
|
|
90
|
-
using TypeList = std::list<TypePtr>;
|
|
91
90
|
using ContainedList = std::list<ContainedPtr>;
|
|
92
91
|
using ModuleList = std::list<ModulePtr>;
|
|
93
92
|
using ClassList = std::list<ClassDefPtr>;
|
|
@@ -401,7 +400,7 @@ namespace Slice
|
|
|
401
400
|
/// @remark Equivalent to `mappedScope(separator, leading) + mappedName()`.
|
|
402
401
|
[[nodiscard]] std::string mappedScoped(const std::string& separator, bool leading = false) const;
|
|
403
402
|
|
|
404
|
-
/// Returns the mapped scope
|
|
403
|
+
/// Returns the mapped scope in which this element will be generated in the target language.
|
|
405
404
|
/// @param separator This string will be used to separate scope segments.
|
|
406
405
|
/// @param leading If true, the returned string will have a leading `separator` (defaults to false).
|
|
407
406
|
[[nodiscard]] std::string mappedScope(const std::string& separator, bool leading = false) const;
|
|
@@ -510,7 +509,7 @@ namespace Slice
|
|
|
510
509
|
/// The user should disambiguate by qualifying the type-reference as 'Outer::H'.
|
|
511
510
|
void checkHasChangedMeaning(const std::string& name, ContainedPtr namedThing = nullptr);
|
|
512
511
|
|
|
513
|
-
/// Returns `
|
|
512
|
+
/// Returns `false` if this container is the global scope (i.e. it's of type `Unit`), and `true` otherwise.
|
|
514
513
|
/// If false, we emit an error message. So this function should only be called for types which cannot appear at
|
|
515
514
|
/// global scope... so everything except for `Module`s.
|
|
516
515
|
bool checkForGlobalDefinition(const char* definitionKindPlural);
|
|
@@ -733,7 +732,7 @@ namespace Slice
|
|
|
733
732
|
[[nodiscard]] ParameterPtr returnParameter(const std::string& name);
|
|
734
733
|
|
|
735
734
|
/// Returns this operation's out parameters and return type sorted in this order: '(required..., optional...)'.
|
|
736
|
-
/// If
|
|
735
|
+
/// If this operation's return type is non-void and non-optional, it is at the end of the 'required' list.
|
|
737
736
|
/// Otherwise, required parameters are kept in definition order and optional parameters are sorted by tag.
|
|
738
737
|
///
|
|
739
738
|
/// For convenience, non-void return types are represented by a dummy `Parameter` in this list.
|
|
@@ -110,24 +110,16 @@ Slice::Preprocessor::create(const string& path, const string& fileName, const ve
|
|
|
110
110
|
Slice::Preprocessor::Preprocessor(string path, const string& fileName, const vector<string>& args)
|
|
111
111
|
: _path(std::move(path)),
|
|
112
112
|
_fileName(fullPath(fileName)),
|
|
113
|
-
_shortFileName(fileName),
|
|
114
113
|
_args(args)
|
|
115
114
|
{
|
|
116
115
|
}
|
|
117
116
|
|
|
118
117
|
Slice::Preprocessor::~Preprocessor() { close(); }
|
|
119
118
|
|
|
120
|
-
string
|
|
121
|
-
Slice::Preprocessor::getFileName()
|
|
122
|
-
{
|
|
123
|
-
return _fileName;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
119
|
string
|
|
127
120
|
Slice::Preprocessor::getBaseName()
|
|
128
121
|
{
|
|
129
122
|
string base(_fileName);
|
|
130
|
-
string suffix;
|
|
131
123
|
string::size_type pos = base.rfind('.');
|
|
132
124
|
if (pos != string::npos)
|
|
133
125
|
{
|
|
@@ -256,11 +248,11 @@ Slice::Preprocessor::preprocess(const string& languageArg)
|
|
|
256
248
|
char* buf = mcpp_get_mem_buffer(Out);
|
|
257
249
|
|
|
258
250
|
//
|
|
259
|
-
// First try to open
|
|
251
|
+
// First try to open a temporary file in the 'tmp' directory.
|
|
260
252
|
//
|
|
261
253
|
#ifdef _WIN32
|
|
262
254
|
//
|
|
263
|
-
// We use
|
|
255
|
+
// We use a unique id as the tmp file name prefix to avoid problems with this code being called concurrently
|
|
264
256
|
// from several processes, otherwise there is a chance that two processes call _wtempnam before any of them
|
|
265
257
|
// opens the file and they will end up using the same tmp file. We then open the file with O_EXCL to atomically
|
|
266
258
|
// create it -- this closes the TOCTOU window between _wtempnam returning a name and our opening it. The
|
|
@@ -339,7 +331,7 @@ Slice::Preprocessor::checkInputFile()
|
|
|
339
331
|
}
|
|
340
332
|
if (suffix != ".ice")
|
|
341
333
|
{
|
|
342
|
-
throw runtime_error(_path + ": error: input files must end with
|
|
334
|
+
throw runtime_error(_path + ": error: input files must end with '.ice'");
|
|
343
335
|
}
|
|
344
336
|
|
|
345
337
|
ifstream test(IceInternal::streamFilename(_fileName).c_str());
|
|
@@ -24,7 +24,6 @@ namespace Slice
|
|
|
24
24
|
FILE* preprocess(const std::string& languageArg = "");
|
|
25
25
|
void close();
|
|
26
26
|
|
|
27
|
-
std::string getFileName();
|
|
28
27
|
std::string getBaseName();
|
|
29
28
|
|
|
30
29
|
static std::string normalizeIncludePath(const std::string& path);
|
|
@@ -34,7 +33,6 @@ namespace Slice
|
|
|
34
33
|
|
|
35
34
|
const std::string _path;
|
|
36
35
|
const std::string _fileName;
|
|
37
|
-
const std::string _shortFileName;
|
|
38
36
|
const std::vector<std::string> _args;
|
|
39
37
|
FILE* _cppHandle{nullptr};
|
|
40
38
|
};
|
|
@@ -1829,7 +1829,7 @@ YY_RULE_SETUP
|
|
|
1829
1829
|
}
|
|
1830
1830
|
YY_BREAK
|
|
1831
1831
|
/* Matches the end of a double-quoted string literal, but only while scanning a string literal. Flex always prefers
|
|
1832
|
-
* to match the longest string it can, so quotes
|
|
1832
|
+
* to match the longest string it can, so quotes preceded with a literal '\' will match the rules above this one. */
|
|
1833
1833
|
case 18:
|
|
1834
1834
|
YY_RULE_SETUP
|
|
1835
1835
|
#line 261 "src/Slice/Scanner.l"
|
|
@@ -2233,7 +2233,7 @@ YY_RULE_SETUP
|
|
|
2233
2233
|
return BAD_TOKEN;
|
|
2234
2234
|
}
|
|
2235
2235
|
YY_BREAK
|
|
2236
|
-
/* Matches any valid character (except newlines) not matched by another rule and
|
|
2236
|
+
/* Matches any valid character (except newlines) not matched by another rule and forwards it to the parser.
|
|
2237
2237
|
* This is the lowest priority rule in the scanner, and is only active while not in a sub-scanner. */
|
|
2238
2238
|
case 50:
|
|
2239
2239
|
YY_RULE_SETUP
|
|
@@ -3390,7 +3390,7 @@ namespace
|
|
|
3390
3390
|
keywordMap["Value"] = ICE_VALUE;
|
|
3391
3391
|
}
|
|
3392
3392
|
|
|
3393
|
-
// This function is always called directly after a match has been made, but directly before
|
|
3393
|
+
// This function is always called directly after a match has been made, but directly before its action block is run.
|
|
3394
3394
|
void preAction()
|
|
3395
3395
|
{
|
|
3396
3396
|
yycolno += yyleng;
|