├── .gitignore ├── LICENSE ├── README.md ├── README_CN.md ├── backage.proto ├── doc ├── IL3.md ├── il_select3.md ├── root_set_trace.md └── tutorial.md ├── ebc ├── AST.cs ├── Backage.cs ├── Logger.cs ├── Program.cs ├── analyzer │ ├── Semantic.cs │ ├── Symbol.cs │ └── pass │ │ ├── FstPass.cs │ │ ├── SndPass.cs │ │ └── TrdPass.cs ├── codegen │ ├── Assembly.cs │ ├── Bytecode.cs │ └── ILGen.cs ├── draft.md ├── ebc.csproj ├── evoBasic.g4 ├── parser │ ├── evoBasic.interp │ ├── evoBasic.tokens │ ├── evoBasicBaseListener.cs │ ├── evoBasicBaseVisitor.cs │ ├── evoBasicLexer.cs │ ├── evoBasicLexer.interp │ ├── evoBasicLexer.tokens │ ├── evoBasicListener.cs │ ├── evoBasicParser.cs │ └── evoBasicVisitor.cs └── utils │ ├── ASCIITree.cs │ ├── Dump.cs │ ├── Source.cs │ └── Utils.cs ├── evm ├── CMakeLists.txt ├── CMakeSettings.json ├── asciitree.h ├── backage.pb.cc ├── backage.pb.h ├── bytecode.h ├── dependencies.h ├── deps │ ├── bin │ │ └── windows_x64 │ │ │ ├── icudt70.dll │ │ │ ├── icuin70.dll │ │ │ ├── icuio70.dll │ │ │ ├── icutu70.dll │ │ │ ├── icuuc70.dll │ │ │ ├── libffi.dll │ │ │ └── protoc.exe │ └── include │ │ ├── ffi.h │ │ ├── ffitarget.h │ │ ├── google │ │ └── protobuf │ │ │ ├── any.cc │ │ │ ├── any.h │ │ │ ├── any.pb.cc │ │ │ ├── any.pb.h │ │ │ ├── any.proto │ │ │ ├── any_lite.cc │ │ │ ├── any_test.cc │ │ │ ├── any_test.proto │ │ │ ├── api.pb.cc │ │ │ ├── api.pb.h │ │ │ ├── api.proto │ │ │ ├── arena.cc │ │ │ ├── arena.h │ │ │ ├── arena_impl.h │ │ │ ├── arena_test_util.cc │ │ │ ├── arena_test_util.h │ │ │ ├── arena_unittest.cc │ │ │ ├── arenastring.cc │ │ │ ├── arenastring.h │ │ │ ├── arenastring_unittest.cc │ │ │ ├── arenaz_sampler.cc │ │ │ ├── arenaz_sampler.h │ │ │ ├── arenaz_sampler_test.cc │ │ │ ├── compiler │ │ │ ├── annotation_test_util.cc │ │ │ ├── annotation_test_util.h │ │ │ ├── code_generator.cc │ │ │ ├── code_generator.h │ │ │ ├── command_line_interface.cc │ │ │ ├── command_line_interface.h │ │ │ ├── command_line_interface_unittest.cc │ │ │ ├── cpp │ │ │ │ ├── bootstrap_unittest.cc │ │ │ │ ├── cpp_generator.h │ │ │ │ ├── enum.cc │ │ │ │ ├── enum.h │ │ │ │ ├── enum_field.cc │ │ │ │ ├── enum_field.h │ │ │ │ ├── extension.cc │ │ │ │ ├── extension.h │ │ │ │ ├── field.cc │ │ │ │ ├── field.h │ │ │ │ ├── file.cc │ │ │ │ ├── file.h │ │ │ │ ├── generator.cc │ │ │ │ ├── generator.h │ │ │ │ ├── helpers.cc │ │ │ │ ├── helpers.h │ │ │ │ ├── map_field.cc │ │ │ │ ├── map_field.h │ │ │ │ ├── message.cc │ │ │ │ ├── message.h │ │ │ │ ├── message_field.cc │ │ │ │ ├── message_field.h │ │ │ │ ├── message_layout_helper.h │ │ │ │ ├── message_size_unittest.cc │ │ │ │ ├── metadata_test.cc │ │ │ │ ├── move_unittest.cc │ │ │ │ ├── names.h │ │ │ │ ├── options.h │ │ │ │ ├── padding_optimizer.cc │ │ │ │ ├── padding_optimizer.h │ │ │ │ ├── parse_function_generator.cc │ │ │ │ ├── parse_function_generator.h │ │ │ │ ├── plugin_unittest.cc │ │ │ │ ├── primitive_field.cc │ │ │ │ ├── primitive_field.h │ │ │ │ ├── service.cc │ │ │ │ ├── service.h │ │ │ │ ├── string_field.cc │ │ │ │ ├── string_field.h │ │ │ │ ├── test_bad_identifiers.proto │ │ │ │ ├── test_large_enum_value.proto │ │ │ │ ├── unittest.cc │ │ │ │ ├── unittest.h │ │ │ │ └── unittest.inc │ │ │ ├── csharp │ │ │ │ ├── csharp_bootstrap_unittest.cc │ │ │ │ ├── csharp_doc_comment.cc │ │ │ │ ├── csharp_doc_comment.h │ │ │ │ ├── csharp_enum.cc │ │ │ │ ├── csharp_enum.h │ │ │ │ ├── csharp_enum_field.cc │ │ │ │ ├── csharp_enum_field.h │ │ │ │ ├── csharp_field_base.cc │ │ │ │ ├── csharp_field_base.h │ │ │ │ ├── csharp_generator.cc │ │ │ │ ├── csharp_generator.h │ │ │ │ ├── csharp_generator_unittest.cc │ │ │ │ ├── csharp_helpers.cc │ │ │ │ ├── csharp_helpers.h │ │ │ │ ├── csharp_map_field.cc │ │ │ │ ├── csharp_map_field.h │ │ │ │ ├── csharp_message.cc │ │ │ │ ├── csharp_message.h │ │ │ │ ├── csharp_message_field.cc │ │ │ │ ├── csharp_message_field.h │ │ │ │ ├── csharp_names.h │ │ │ │ ├── csharp_options.h │ │ │ │ ├── csharp_primitive_field.cc │ │ │ │ ├── csharp_primitive_field.h │ │ │ │ ├── csharp_reflection_class.cc │ │ │ │ ├── csharp_reflection_class.h │ │ │ │ ├── csharp_repeated_enum_field.cc │ │ │ │ ├── csharp_repeated_enum_field.h │ │ │ │ ├── csharp_repeated_message_field.cc │ │ │ │ ├── csharp_repeated_message_field.h │ │ │ │ ├── csharp_repeated_primitive_field.cc │ │ │ │ ├── csharp_repeated_primitive_field.h │ │ │ │ ├── csharp_source_generator_base.cc │ │ │ │ ├── csharp_source_generator_base.h │ │ │ │ ├── csharp_wrapper_field.cc │ │ │ │ └── csharp_wrapper_field.h │ │ │ ├── importer.cc │ │ │ ├── importer.h │ │ │ ├── importer_unittest.cc │ │ │ ├── java │ │ │ │ ├── context.cc │ │ │ │ ├── context.h │ │ │ │ ├── doc_comment.cc │ │ │ │ ├── doc_comment.h │ │ │ │ ├── doc_comment_unittest.cc │ │ │ │ ├── enum.cc │ │ │ │ ├── enum.h │ │ │ │ ├── enum_field.cc │ │ │ │ ├── enum_field.h │ │ │ │ ├── enum_field_lite.cc │ │ │ │ ├── enum_field_lite.h │ │ │ │ ├── enum_lite.cc │ │ │ │ ├── enum_lite.h │ │ │ │ ├── extension.cc │ │ │ │ ├── extension.h │ │ │ │ ├── extension_lite.cc │ │ │ │ ├── extension_lite.h │ │ │ │ ├── field.cc │ │ │ │ ├── field.h │ │ │ │ ├── file.cc │ │ │ │ ├── file.h │ │ │ │ ├── generator.cc │ │ │ │ ├── generator.h │ │ │ │ ├── generator_factory.cc │ │ │ │ ├── generator_factory.h │ │ │ │ ├── helpers.cc │ │ │ │ ├── helpers.h │ │ │ │ ├── java_generator.h │ │ │ │ ├── kotlin_generator.cc │ │ │ │ ├── kotlin_generator.h │ │ │ │ ├── map_field.cc │ │ │ │ ├── map_field.h │ │ │ │ ├── map_field_lite.cc │ │ │ │ ├── map_field_lite.h │ │ │ │ ├── message.cc │ │ │ │ ├── message.h │ │ │ │ ├── message_builder.cc │ │ │ │ ├── message_builder.h │ │ │ │ ├── message_builder_lite.cc │ │ │ │ ├── message_builder_lite.h │ │ │ │ ├── message_field.cc │ │ │ │ ├── message_field.h │ │ │ │ ├── message_field_lite.cc │ │ │ │ ├── message_field_lite.h │ │ │ │ ├── message_lite.cc │ │ │ │ ├── message_lite.h │ │ │ │ ├── name_resolver.cc │ │ │ │ ├── name_resolver.h │ │ │ │ ├── names.h │ │ │ │ ├── options.h │ │ │ │ ├── plugin_unittest.cc │ │ │ │ ├── primitive_field.cc │ │ │ │ ├── primitive_field.h │ │ │ │ ├── primitive_field_lite.cc │ │ │ │ ├── primitive_field_lite.h │ │ │ │ ├── service.cc │ │ │ │ ├── service.h │ │ │ │ ├── shared_code_generator.cc │ │ │ │ ├── shared_code_generator.h │ │ │ │ ├── string_field.cc │ │ │ │ ├── string_field.h │ │ │ │ ├── string_field_lite.cc │ │ │ │ └── string_field_lite.h │ │ │ ├── main.cc │ │ │ ├── mock_code_generator.cc │ │ │ ├── mock_code_generator.h │ │ │ ├── objectivec │ │ │ │ ├── objectivec_enum.cc │ │ │ │ ├── objectivec_enum.h │ │ │ │ ├── objectivec_enum_field.cc │ │ │ │ ├── objectivec_enum_field.h │ │ │ │ ├── objectivec_extension.cc │ │ │ │ ├── objectivec_extension.h │ │ │ │ ├── objectivec_field.cc │ │ │ │ ├── objectivec_field.h │ │ │ │ ├── objectivec_file.cc │ │ │ │ ├── objectivec_file.h │ │ │ │ ├── objectivec_generator.cc │ │ │ │ ├── objectivec_generator.h │ │ │ │ ├── objectivec_helpers.cc │ │ │ │ ├── objectivec_helpers.h │ │ │ │ ├── objectivec_helpers_unittest.cc │ │ │ │ ├── objectivec_map_field.cc │ │ │ │ ├── objectivec_map_field.h │ │ │ │ ├── objectivec_message.cc │ │ │ │ ├── objectivec_message.h │ │ │ │ ├── objectivec_message_field.cc │ │ │ │ ├── objectivec_message_field.h │ │ │ │ ├── objectivec_nsobject_methods.h │ │ │ │ ├── objectivec_oneof.cc │ │ │ │ ├── objectivec_oneof.h │ │ │ │ ├── objectivec_primitive_field.cc │ │ │ │ └── objectivec_primitive_field.h │ │ │ ├── package_info.h │ │ │ ├── parser.cc │ │ │ ├── parser.h │ │ │ ├── parser_unittest.cc │ │ │ ├── php │ │ │ │ ├── php_generator.cc │ │ │ │ └── php_generator.h │ │ │ ├── plugin.cc │ │ │ ├── plugin.h │ │ │ ├── plugin.pb.cc │ │ │ ├── plugin.pb.h │ │ │ ├── plugin.proto │ │ │ ├── python │ │ │ │ ├── generator.cc │ │ │ │ ├── generator.h │ │ │ │ ├── helpers.cc │ │ │ │ ├── helpers.h │ │ │ │ ├── plugin_unittest.cc │ │ │ │ ├── pyi_generator.cc │ │ │ │ ├── pyi_generator.h │ │ │ │ └── python_generator.h │ │ │ ├── ruby │ │ │ │ ├── ruby_generated_code.proto │ │ │ │ ├── ruby_generated_code_pb.rb │ │ │ │ ├── ruby_generated_code_proto2.proto │ │ │ │ ├── ruby_generated_code_proto2_import.proto │ │ │ │ ├── ruby_generated_code_proto2_pb.rb │ │ │ │ ├── ruby_generated_pkg_explicit.proto │ │ │ │ ├── ruby_generated_pkg_explicit_legacy.proto │ │ │ │ ├── ruby_generated_pkg_explicit_legacy_pb.rb │ │ │ │ ├── ruby_generated_pkg_explicit_pb.rb │ │ │ │ ├── ruby_generated_pkg_implicit.proto │ │ │ │ ├── ruby_generated_pkg_implicit_pb.rb │ │ │ │ ├── ruby_generator.cc │ │ │ │ ├── ruby_generator.h │ │ │ │ └── ruby_generator_unittest.cc │ │ │ ├── scc.h │ │ │ ├── subprocess.cc │ │ │ ├── subprocess.h │ │ │ ├── test_plugin.cc │ │ │ ├── zip_output_unittest.sh │ │ │ ├── zip_writer.cc │ │ │ └── zip_writer.h │ │ │ ├── descriptor.cc │ │ │ ├── descriptor.h │ │ │ ├── descriptor.pb.cc │ │ │ ├── descriptor.pb.h │ │ │ ├── descriptor.proto │ │ │ ├── descriptor_database.cc │ │ │ ├── descriptor_database.h │ │ │ ├── descriptor_database_unittest.cc │ │ │ ├── descriptor_unittest.cc │ │ │ ├── drop_unknown_fields_test.cc │ │ │ ├── duration.pb.cc │ │ │ ├── duration.pb.h │ │ │ ├── duration.proto │ │ │ ├── dynamic_message.cc │ │ │ ├── dynamic_message.h │ │ │ ├── dynamic_message_unittest.cc │ │ │ ├── empty.pb.cc │ │ │ ├── empty.pb.h │ │ │ ├── empty.proto │ │ │ ├── endian.h │ │ │ ├── explicitly_constructed.h │ │ │ ├── extension_set.cc │ │ │ ├── extension_set.h │ │ │ ├── extension_set_heavy.cc │ │ │ ├── extension_set_inl.h │ │ │ ├── extension_set_unittest.cc │ │ │ ├── field_access_listener.h │ │ │ ├── field_mask.pb.cc │ │ │ ├── field_mask.pb.h │ │ │ ├── field_mask.proto │ │ │ ├── generated_enum_reflection.h │ │ │ ├── generated_enum_util.cc │ │ │ ├── generated_enum_util.h │ │ │ ├── generated_message_bases.cc │ │ │ ├── generated_message_bases.h │ │ │ ├── generated_message_reflection.cc │ │ │ ├── generated_message_reflection.h │ │ │ ├── generated_message_reflection_unittest.cc │ │ │ ├── generated_message_tctable_decl.h │ │ │ ├── generated_message_tctable_full.cc │ │ │ ├── generated_message_tctable_impl.h │ │ │ ├── generated_message_tctable_lite.cc │ │ │ ├── generated_message_tctable_lite_test.cc │ │ │ ├── generated_message_util.cc │ │ │ ├── generated_message_util.h │ │ │ ├── has_bits.h │ │ │ ├── implicit_weak_message.cc │ │ │ ├── implicit_weak_message.h │ │ │ ├── inlined_string_field.cc │ │ │ ├── inlined_string_field.h │ │ │ ├── inlined_string_field_unittest.cc │ │ │ ├── io │ │ │ ├── coded_stream.cc │ │ │ ├── coded_stream.h │ │ │ ├── coded_stream_unittest.cc │ │ │ ├── gzip_stream.cc │ │ │ ├── gzip_stream.h │ │ │ ├── gzip_stream_unittest.sh │ │ │ ├── io_win32.cc │ │ │ ├── io_win32.h │ │ │ ├── io_win32_unittest.cc │ │ │ ├── package_info.h │ │ │ ├── printer.cc │ │ │ ├── printer.h │ │ │ ├── printer_unittest.cc │ │ │ ├── strtod.cc │ │ │ ├── strtod.h │ │ │ ├── tokenizer.cc │ │ │ ├── tokenizer.h │ │ │ ├── tokenizer_unittest.cc │ │ │ ├── zero_copy_stream.cc │ │ │ ├── zero_copy_stream.h │ │ │ ├── zero_copy_stream_impl.cc │ │ │ ├── zero_copy_stream_impl.h │ │ │ ├── zero_copy_stream_impl_lite.cc │ │ │ ├── zero_copy_stream_impl_lite.h │ │ │ └── zero_copy_stream_unittest.cc │ │ │ ├── lite_arena_unittest.cc │ │ │ ├── lite_unittest.cc │ │ │ ├── map.cc │ │ │ ├── map.h │ │ │ ├── map_entry.h │ │ │ ├── map_entry_lite.h │ │ │ ├── map_field.cc │ │ │ ├── map_field.h │ │ │ ├── map_field_inl.h │ │ │ ├── map_field_lite.h │ │ │ ├── map_field_test.cc │ │ │ ├── map_lite_test_util.cc │ │ │ ├── map_lite_test_util.h │ │ │ ├── map_lite_unittest.proto │ │ │ ├── map_proto2_unittest.proto │ │ │ ├── map_test.cc │ │ │ ├── map_test.inc │ │ │ ├── map_test_util.h │ │ │ ├── map_test_util.inc │ │ │ ├── map_test_util_impl.h │ │ │ ├── map_type_handler.h │ │ │ ├── map_unittest.proto │ │ │ ├── message.cc │ │ │ ├── message.h │ │ │ ├── message_lite.cc │ │ │ ├── message_lite.h │ │ │ ├── message_unittest.cc │ │ │ ├── message_unittest.inc │ │ │ ├── metadata.h │ │ │ ├── metadata_lite.h │ │ │ ├── no_field_presence_test.cc │ │ │ ├── package_info.h │ │ │ ├── parse_context.cc │ │ │ ├── parse_context.h │ │ │ ├── port.h │ │ │ ├── port_def.inc │ │ │ ├── port_undef.inc │ │ │ ├── preserve_unknown_enum_test.cc │ │ │ ├── proto3_arena_lite_unittest.cc │ │ │ ├── proto3_arena_unittest.cc │ │ │ ├── proto3_lite_unittest.cc │ │ │ ├── proto3_lite_unittest.inc │ │ │ ├── reflection.h │ │ │ ├── reflection_internal.h │ │ │ ├── reflection_ops.cc │ │ │ ├── reflection_ops.h │ │ │ ├── reflection_ops_unittest.cc │ │ │ ├── reflection_tester.cc │ │ │ ├── reflection_tester.h │ │ │ ├── repeated_field.cc │ │ │ ├── repeated_field.h │ │ │ ├── repeated_field_reflection_unittest.cc │ │ │ ├── repeated_field_unittest.cc │ │ │ ├── repeated_ptr_field.cc │ │ │ ├── repeated_ptr_field.h │ │ │ ├── service.cc │ │ │ ├── service.h │ │ │ ├── source_context.pb.cc │ │ │ ├── source_context.pb.h │ │ │ ├── source_context.proto │ │ │ ├── string_member_robber.h │ │ │ ├── struct.pb.cc │ │ │ ├── struct.pb.h │ │ │ ├── struct.proto │ │ │ ├── stubs │ │ │ ├── bytestream.cc │ │ │ ├── bytestream.h │ │ │ ├── bytestream_unittest.cc │ │ │ ├── callback.h │ │ │ ├── casts.h │ │ │ ├── common.cc │ │ │ ├── common.h │ │ │ ├── common_unittest.cc │ │ │ ├── hash.h │ │ │ ├── int128.cc │ │ │ ├── int128.h │ │ │ ├── int128_unittest.cc │ │ │ ├── logging.h │ │ │ ├── macros.h │ │ │ ├── map_util.h │ │ │ ├── mathutil.h │ │ │ ├── mutex.h │ │ │ ├── once.h │ │ │ ├── platform_macros.h │ │ │ ├── port.h │ │ │ ├── status.cc │ │ │ ├── status.h │ │ │ ├── status_macros.h │ │ │ ├── status_test.cc │ │ │ ├── statusor.cc │ │ │ ├── statusor.h │ │ │ ├── statusor_test.cc │ │ │ ├── stl_util.h │ │ │ ├── stringpiece.cc │ │ │ ├── stringpiece.h │ │ │ ├── stringpiece_unittest.cc │ │ │ ├── stringprintf.cc │ │ │ ├── stringprintf.h │ │ │ ├── stringprintf_unittest.cc │ │ │ ├── structurally_valid.cc │ │ │ ├── structurally_valid_unittest.cc │ │ │ ├── strutil.cc │ │ │ ├── strutil.h │ │ │ ├── strutil_unittest.cc │ │ │ ├── substitute.cc │ │ │ ├── substitute.h │ │ │ ├── template_util.h │ │ │ ├── template_util_unittest.cc │ │ │ ├── time.cc │ │ │ ├── time.h │ │ │ └── time_test.cc │ │ │ ├── test_messages_proto2.proto │ │ │ ├── test_messages_proto3.proto │ │ │ ├── test_util.cc │ │ │ ├── test_util.h │ │ │ ├── test_util.inc │ │ │ ├── test_util2.h │ │ │ ├── test_util_lite.cc │ │ │ ├── test_util_lite.h │ │ │ ├── testdata │ │ │ ├── bad_utf8_string │ │ │ ├── golden_message │ │ │ ├── golden_message_maps │ │ │ ├── golden_message_oneof_implemented │ │ │ ├── golden_message_proto3 │ │ │ ├── golden_packed_fields_message │ │ │ ├── map_test_data.txt │ │ │ ├── text_format_unittest_data.txt │ │ │ ├── text_format_unittest_data_oneof_implemented.txt │ │ │ ├── text_format_unittest_data_pointy.txt │ │ │ ├── text_format_unittest_data_pointy_oneof.txt │ │ │ ├── text_format_unittest_extensions_data.txt │ │ │ └── text_format_unittest_extensions_data_pointy.txt │ │ │ ├── testing │ │ │ ├── file.cc │ │ │ ├── file.h │ │ │ ├── googletest.cc │ │ │ ├── googletest.h │ │ │ ├── zcgunzip.cc │ │ │ └── zcgzip.cc │ │ │ ├── text_format.cc │ │ │ ├── text_format.h │ │ │ ├── text_format_unittest.cc │ │ │ ├── timestamp.pb.cc │ │ │ ├── timestamp.pb.h │ │ │ ├── timestamp.proto │ │ │ ├── type.pb.cc │ │ │ ├── type.pb.h │ │ │ ├── type.proto │ │ │ ├── unittest.proto │ │ │ ├── unittest_arena.proto │ │ │ ├── unittest_custom_options.proto │ │ │ ├── unittest_drop_unknown_fields.proto │ │ │ ├── unittest_embed_optimize_for.proto │ │ │ ├── unittest_empty.proto │ │ │ ├── unittest_enormous_descriptor.proto │ │ │ ├── unittest_import.proto │ │ │ ├── unittest_import_lite.proto │ │ │ ├── unittest_import_public.proto │ │ │ ├── unittest_import_public_lite.proto │ │ │ ├── unittest_lazy_dependencies.proto │ │ │ ├── unittest_lazy_dependencies_custom_option.proto │ │ │ ├── unittest_lazy_dependencies_enum.proto │ │ │ ├── unittest_lite.proto │ │ │ ├── unittest_lite_imports_nonlite.proto │ │ │ ├── unittest_mset.proto │ │ │ ├── unittest_mset_wire_format.proto │ │ │ ├── unittest_no_field_presence.proto │ │ │ ├── unittest_no_generic_services.proto │ │ │ ├── unittest_optimize_for.proto │ │ │ ├── unittest_preserve_unknown_enum.proto │ │ │ ├── unittest_preserve_unknown_enum2.proto │ │ │ ├── unittest_proto3.proto │ │ │ ├── unittest_proto3_arena.proto │ │ │ ├── unittest_proto3_arena_lite.proto │ │ │ ├── unittest_proto3_lite.proto │ │ │ ├── unittest_proto3_optional.proto │ │ │ ├── unittest_well_known_types.proto │ │ │ ├── unknown_field_set.cc │ │ │ ├── unknown_field_set.h │ │ │ ├── unknown_field_set_unittest.cc │ │ │ ├── util │ │ │ ├── delimited_message_util.cc │ │ │ ├── delimited_message_util.h │ │ │ ├── delimited_message_util_test.cc │ │ │ ├── field_comparator.cc │ │ │ ├── field_comparator.h │ │ │ ├── field_comparator_test.cc │ │ │ ├── field_mask_util.cc │ │ │ ├── field_mask_util.h │ │ │ ├── field_mask_util_test.cc │ │ │ ├── internal │ │ │ │ ├── constants.h │ │ │ │ ├── datapiece.cc │ │ │ │ ├── datapiece.h │ │ │ │ ├── default_value_objectwriter.cc │ │ │ │ ├── default_value_objectwriter.h │ │ │ │ ├── default_value_objectwriter_test.cc │ │ │ │ ├── error_listener.cc │ │ │ │ ├── error_listener.h │ │ │ │ ├── expecting_objectwriter.h │ │ │ │ ├── field_mask_utility.cc │ │ │ │ ├── field_mask_utility.h │ │ │ │ ├── json_escaping.cc │ │ │ │ ├── json_escaping.h │ │ │ │ ├── json_objectwriter.cc │ │ │ │ ├── json_objectwriter.h │ │ │ │ ├── json_objectwriter_test.cc │ │ │ │ ├── json_stream_parser.cc │ │ │ │ ├── json_stream_parser.h │ │ │ │ ├── json_stream_parser_test.cc │ │ │ │ ├── location_tracker.h │ │ │ │ ├── mock_error_listener.h │ │ │ │ ├── object_location_tracker.h │ │ │ │ ├── object_source.h │ │ │ │ ├── object_writer.cc │ │ │ │ ├── object_writer.h │ │ │ │ ├── proto_writer.cc │ │ │ │ ├── proto_writer.h │ │ │ │ ├── protostream_objectsource.cc │ │ │ │ ├── protostream_objectsource.h │ │ │ │ ├── protostream_objectsource_test.cc │ │ │ │ ├── protostream_objectwriter.cc │ │ │ │ ├── protostream_objectwriter.h │ │ │ │ ├── protostream_objectwriter_test.cc │ │ │ │ ├── structured_objectwriter.h │ │ │ │ ├── testdata │ │ │ │ │ ├── anys.proto │ │ │ │ │ ├── books.proto │ │ │ │ │ ├── default_value.proto │ │ │ │ │ ├── default_value_test.proto │ │ │ │ │ ├── field_mask.proto │ │ │ │ │ ├── maps.proto │ │ │ │ │ ├── oneofs.proto │ │ │ │ │ ├── proto3.proto │ │ │ │ │ ├── struct.proto │ │ │ │ │ ├── timestamp_duration.proto │ │ │ │ │ └── wrappers.proto │ │ │ │ ├── type_info.cc │ │ │ │ ├── type_info.h │ │ │ │ ├── type_info_test_helper.cc │ │ │ │ ├── type_info_test_helper.h │ │ │ │ ├── utility.cc │ │ │ │ └── utility.h │ │ │ ├── json_format.proto │ │ │ ├── json_format_proto3.proto │ │ │ ├── json_util.cc │ │ │ ├── json_util.h │ │ │ ├── json_util_test.cc │ │ │ ├── message_differencer.cc │ │ │ ├── message_differencer.h │ │ │ ├── message_differencer_unittest.cc │ │ │ ├── message_differencer_unittest.proto │ │ │ ├── package_info.h │ │ │ ├── time_util.cc │ │ │ ├── time_util.h │ │ │ ├── time_util_test.cc │ │ │ ├── type_resolver.h │ │ │ ├── type_resolver_util.cc │ │ │ ├── type_resolver_util.h │ │ │ └── type_resolver_util_test.cc │ │ │ ├── well_known_types_unittest.cc │ │ │ ├── wire_format.cc │ │ │ ├── wire_format.h │ │ │ ├── wire_format_lite.cc │ │ │ ├── wire_format_lite.h │ │ │ ├── wire_format_unittest.cc │ │ │ ├── wire_format_unittest.inc │ │ │ ├── wrappers.pb.cc │ │ │ ├── wrappers.pb.h │ │ │ └── wrappers.proto │ │ └── unicode │ │ ├── alphaindex.h │ │ ├── appendable.h │ │ ├── basictz.h │ │ ├── brkiter.h │ │ ├── bytestream.h │ │ ├── bytestrie.h │ │ ├── bytestriebuilder.h │ │ ├── calendar.h │ │ ├── caniter.h │ │ ├── casemap.h │ │ ├── char16ptr.h │ │ ├── chariter.h │ │ ├── choicfmt.h │ │ ├── coleitr.h │ │ ├── coll.h │ │ ├── compactdecimalformat.h │ │ ├── curramt.h │ │ ├── currpinf.h │ │ ├── currunit.h │ │ ├── datefmt.h │ │ ├── dbbi.h │ │ ├── dcfmtsym.h │ │ ├── decimfmt.h │ │ ├── docmain.h │ │ ├── dtfmtsym.h │ │ ├── dtintrv.h │ │ ├── dtitvfmt.h │ │ ├── dtitvinf.h │ │ ├── dtptngen.h │ │ ├── dtrule.h │ │ ├── edits.h │ │ ├── enumset.h │ │ ├── errorcode.h │ │ ├── fieldpos.h │ │ ├── filteredbrk.h │ │ ├── fmtable.h │ │ ├── format.h │ │ ├── formattedvalue.h │ │ ├── fpositer.h │ │ ├── gender.h │ │ ├── gregocal.h │ │ ├── icudataver.h │ │ ├── icuplug.h │ │ ├── idna.h │ │ ├── listformatter.h │ │ ├── localebuilder.h │ │ ├── localematcher.h │ │ ├── localpointer.h │ │ ├── locdspnm.h │ │ ├── locid.h │ │ ├── measfmt.h │ │ ├── measunit.h │ │ ├── measure.h │ │ ├── messagepattern.h │ │ ├── msgfmt.h │ │ ├── normalizer2.h │ │ ├── normlzr.h │ │ ├── nounit.h │ │ ├── numberformatter.h │ │ ├── numberrangeformatter.h │ │ ├── numfmt.h │ │ ├── numsys.h │ │ ├── parseerr.h │ │ ├── parsepos.h │ │ ├── platform.h │ │ ├── plurfmt.h │ │ ├── plurrule.h │ │ ├── ptypes.h │ │ ├── putil.h │ │ ├── rbbi.h │ │ ├── rbnf.h │ │ ├── rbtz.h │ │ ├── regex.h │ │ ├── region.h │ │ ├── reldatefmt.h │ │ ├── rep.h │ │ ├── resbund.h │ │ ├── schriter.h │ │ ├── scientificnumberformatter.h │ │ ├── search.h │ │ ├── selfmt.h │ │ ├── simpleformatter.h │ │ ├── simpletz.h │ │ ├── smpdtfmt.h │ │ ├── sortkey.h │ │ ├── std_string.h │ │ ├── strenum.h │ │ ├── stringoptions.h │ │ ├── stringpiece.h │ │ ├── stringtriebuilder.h │ │ ├── stsearch.h │ │ ├── symtable.h │ │ ├── tblcoll.h │ │ ├── timezone.h │ │ ├── tmunit.h │ │ ├── tmutamt.h │ │ ├── tmutfmt.h │ │ ├── translit.h │ │ ├── tzfmt.h │ │ ├── tznames.h │ │ ├── tzrule.h │ │ ├── tztrans.h │ │ ├── ubidi.h │ │ ├── ubiditransform.h │ │ ├── ubrk.h │ │ ├── ucal.h │ │ ├── ucasemap.h │ │ ├── ucat.h │ │ ├── uchar.h │ │ ├── ucharstrie.h │ │ ├── ucharstriebuilder.h │ │ ├── uchriter.h │ │ ├── uclean.h │ │ ├── ucnv.h │ │ ├── ucnv_cb.h │ │ ├── ucnv_err.h │ │ ├── ucnvsel.h │ │ ├── ucol.h │ │ ├── ucoleitr.h │ │ ├── uconfig.h │ │ ├── ucpmap.h │ │ ├── ucptrie.h │ │ ├── ucsdet.h │ │ ├── ucurr.h │ │ ├── udat.h │ │ ├── udata.h │ │ ├── udateintervalformat.h │ │ ├── udatpg.h │ │ ├── udisplaycontext.h │ │ ├── uenum.h │ │ ├── ufieldpositer.h │ │ ├── uformattable.h │ │ ├── uformattedvalue.h │ │ ├── ugender.h │ │ ├── uidna.h │ │ ├── uiter.h │ │ ├── uldnames.h │ │ ├── ulistformatter.h │ │ ├── uloc.h │ │ ├── ulocdata.h │ │ ├── umachine.h │ │ ├── umisc.h │ │ ├── umsg.h │ │ ├── umutablecptrie.h │ │ ├── unifilt.h │ │ ├── unifunct.h │ │ ├── unimatch.h │ │ ├── unirepl.h │ │ ├── uniset.h │ │ ├── unistr.h │ │ ├── unorm.h │ │ ├── unorm2.h │ │ ├── unum.h │ │ ├── unumberformatter.h │ │ ├── unumberrangeformatter.h │ │ ├── unumsys.h │ │ ├── uobject.h │ │ ├── upluralrules.h │ │ ├── uregex.h │ │ ├── uregion.h │ │ ├── ureldatefmt.h │ │ ├── urename.h │ │ ├── urep.h │ │ ├── ures.h │ │ ├── uscript.h │ │ ├── usearch.h │ │ ├── uset.h │ │ ├── usetiter.h │ │ ├── ushape.h │ │ ├── uspoof.h │ │ ├── usprep.h │ │ ├── ustdio.h │ │ ├── ustream.h │ │ ├── ustring.h │ │ ├── ustringtrie.h │ │ ├── utext.h │ │ ├── utf.h │ │ ├── utf16.h │ │ ├── utf32.h │ │ ├── utf8.h │ │ ├── utf_old.h │ │ ├── utmscale.h │ │ ├── utrace.h │ │ ├── utrans.h │ │ ├── utypes.h │ │ ├── uvernum.h │ │ ├── uversion.h │ │ └── vtzone.h ├── ebffi.cpp ├── ebffi.h ├── gc.h ├── interop.cpp ├── interop.h ├── loader.cpp ├── loader.h ├── main.cpp ├── processor.cpp ├── processor.h ├── runtime.cpp ├── runtime.h ├── unicode.cpp ├── unicode.h └── utils.h ├── langlibs ├── core │ ├── Array.eb │ ├── Box.eb │ ├── Exception.eb │ ├── LinkedList.eb │ ├── List.eb │ ├── Log.eb │ ├── Object.eb │ ├── Stack.eb │ ├── String.eb │ └── Text.eb ├── intrinsic.eb ├── math │ └── random.eb ├── test.eb └── test2.eb ├── testsuite ├── material │ ├── 10_pass_optional_args.eb │ ├── 11_pass_paramarray.eb │ ├── 12_recursive_func.eb │ ├── 13_enum.eb │ ├── 14_userdefine_type.eb │ ├── 15_class.eb │ ├── 1_hello_world.eb │ ├── 2_oneline_if.eb │ ├── 3_if_then_elseif_else.eb │ ├── 4_dim_special_types.eb │ ├── 5_ops.eb │ ├── 6_dim_assign.eb │ ├── 7_loop.eb │ ├── 8_array.eb │ └── 9_pass_normal_args.eb └── test.py └── tool ├── debug.txt └── log_analyzer.py /.gitignore: -------------------------------------------------------------------------------- 1 | cmake-build-debug 2 | test/cmake-build-debug 3 | .idea 4 | .vscode 5 | doxygen.config 6 | latex 7 | html 8 | build 9 | .cache 10 | .vs 11 | out 12 | Debug 13 | tags 14 | .ycm_extra_conf.py -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Yorkin 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # What is evoBasic 2 | ENG / [中文](/README_CN.md) 3 | 4 | EvoBasic is a "evolution version" of classic visual basic,which aims to offer simple syntax and modern features. 5 | 6 | It is an cross-platforms,object-oriented,strongly typed programming language, compiled to bytecode and run on evoBasic virtual machine. 7 | 8 | [Language manual](/doc/tutorial.md) 9 | 10 | # Features 11 | 12 | - Data encapsulation 13 | 14 | - Polymorphism 15 | 16 | - Inheritance 17 | 18 | - First-class functions 19 | 20 | # Syntax example 21 | 22 | ```vb 23 | Function Fibonacci(Byval x as Integer) As Integer 24 | If x == 0 Then 25 | Return 0 26 | ElseIf x == 1 Then 27 | Return 1 28 | Else 29 | Return Fibonacci(x - 1) + Fibonacci(x - 2) 30 | End if 31 | End Function 32 | ``` 33 | 34 | ```vb 35 | Public Module UI 36 | Public Enum Message 37 | Update = 1 38 | Resize 39 | Hide 40 | End Enum 41 | 42 | Public Interface MessageReciver 43 | Function OnMessage(Byval msg as Message,Optional ByRef sender as UIObject) As Boolean 44 | End Interface 45 | 46 | Private Type Position 47 | x As Integer 48 | Y as Integer 49 | End Type 50 | 51 | Public Class Button Impl MessageReciver 52 | Private pos As Position 53 | Public Override Function OnMessage(Byval msg as Message,Optional ByRef sender as UIObject) As Boolean 54 | // process message... 55 | End Function 56 | End Class 57 | End Module 58 | 59 | Sub Main() 60 | Dim btn As UI.Button, msg As UI.Message 61 | btn = New UI.Button 62 | msg = UI.Message.Update 63 | btn.OnMessage(msg) 64 | End Sub 65 | ``` 66 | For a complete definition about syntax, see [grammar.bnf](/doc/grammar.bnf). 67 | 68 | 69 | # Project status 70 | 71 | - [x] lexer and parser: generate parse tree 72 | - [x] semantic check: type check,generate symbol table and translate parse tree to abstract tree 73 | - [x] IL generator: translate abstract tree to intermediate language 74 | - [x] package file (.bkg) generator and loader 75 | - [ ] package manager 76 | - [x] evoBasic vm 77 | 78 | 79 | -------------------------------------------------------------------------------- /README_CN.md: -------------------------------------------------------------------------------- 1 | # 啥是 evoBasic 2 | 3 | [ENG](/README.md) / 中文 4 | 5 | EvoBasic,即“基于VB6的进化”。它是跨平台、面向对象以及强类型的玩具编程语言,目标是拥有简单的语法和现代语言的特性。 6 | EvoBasic的代码被编译成字节码(.bkg文件),然后运行在自制的简单虚拟机上。 7 | 8 | [语言手册](/doc/tutorial.md) 9 | 10 | # 主要特性 11 | 12 | - 封装 13 | 14 | - 多态 15 | 16 | - 继承 17 | 18 | - 函数是第一公民 19 | 20 | # 语法示例 21 | 22 | ```vb 23 | Function Fibonacci(Byval x as Integer) As Integer 24 | If x == 0 Then 25 | Return 0 26 | ElseIf x == 1 Then 27 | Return 1 28 | Else 29 | Return Fibonacci(x - 1) + Fibonacci(x - 2) 30 | End if 31 | End Function 32 | ``` 33 | 34 | ```vb 35 | Public Module UI 36 | Public Enum Message 37 | Update = 1 38 | Resize 39 | Hide 40 | End Enum 41 | 42 | Public Interface MessageReciver 43 | Function OnMessage(Byval msg as Message,Optional ByRef sender as UIObject) As Boolean 44 | End Interface 45 | 46 | Private Type Position 47 | x As Integer 48 | Y as Integer 49 | End Type 50 | 51 | Public Class Button Impl MessageReciver 52 | Private pos As Position 53 | Public Override Function OnMessage(Byval msg as Message,Optional ByRef sender as UIObject) As Boolean 54 | // process message... 55 | End Function 56 | End Class 57 | End Module 58 | 59 | Sub Main() 60 | Dim btn As UI.Button, msg As UI.Message 61 | btn = New UI.Button 62 | msg = UI.Message.Update 63 | btn.OnMessage(msg) 64 | End Sub 65 | ``` 66 | 所有的语法定义,见 [grammar.bnf](/doc/grammar.bnf)。 67 | 68 | 69 | # 项目进展 70 | 71 | - [x] 词法分析和语法分析器 72 | - [x] 语义检查 73 | - [x] 中间代码生成 74 | - [x] 包文件 (.bkg) 生成和加载 75 | - [x] evoBasic 虚拟机 76 | 77 | -------------------------------------------------------------------------------- /doc/root_set_trace.md: -------------------------------------------------------------------------------- 1 | # GC根集追踪 2 | 3 | - √ 表示该操作需要追踪 4 | - x 表示该操作不需要追踪 5 | - 留空表示该操作不存在 6 | 7 | |操作 |向操作栈写入引用|擦除操作栈中的引用|向变量写入引用|擦除变量中的引用| 8 | |-|-|-|-|-| 9 | |starg.ref | |√|√|√| 10 | |ldarg.ref |√| | | | 11 | |stloc.ref | |√|√|√| 12 | |ldloc.ref |√| | | | 13 | |stfld.ref | |√|x|x| 14 | |ldfld.ref |√| | | | 15 | |stsfld.ref | |√|√|√| 16 | |ldsfld.ref |√| | | | 17 | |stelemr.ref | |√|x|x| 18 | |stelem.ref | |√|x|x| 19 | |ldelem.ref |√| | | | 20 | |newarray |√| | | | 21 | |dup.ref |√| | | | 22 | |pop.ref | |√| | | 23 | |store.ref | |√|?|?| 24 | |load.ref |√| | | | 25 | |instanceof | |√| | | 26 | |ldstr |√| | | | 27 | |newobj |√| | | | 28 | |throw | |√| | | 29 | |压入函数栈 | |√|√| | 30 | |弹出函数栈 | | | |√| 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /ebc/draft.md: -------------------------------------------------------------------------------- 1 | ModName 2 | ClsName 3 | VarName 4 | FtnName 5 | ItfName 6 | EnumName 7 | EmConstName 8 | 9 | Mod Cls Var Ftn Itf Enum EnumConst Record 10 | 11 | Mod . Mod -> find snd mod in fst mod 12 | Mod . Cls -> find cls in mod 13 | Mod . Var -> find var in mod 14 | Mod . Ftn -> find ftn in mod 15 | Mod . Enum -> find enum in mod 16 | Mod . EmConst -> ERROR 17 | 18 | Cls . Mod -> ERROR 19 | Cls . Cls -> ERROR 20 | Cls . Var(Non-static) -> ERROR 21 | Cls . Var(Static) -> find static var in cls 22 | Cls . Ftn(Non-static) -> ERROR 23 | Cls . Ftn(Static) -> find static ftn in cls 24 | Cls . Enum -> find enum in cls 25 | Cls . EmConst -> ERROR 26 | 27 | Var . Mod -> ERROR 28 | Var . Cls -> ERROR 29 | Var . Var -> find snd var in fst var type 30 | Var . Ftn -> find ftn in var type 31 | Var . Enum -> ERROR 32 | Var . EmConst -> ERROR 33 | 34 | Ftn . Mod 35 | Ftn . Cls 36 | Ftn . Var 37 | Ftn . Enum 38 | Ftn . EmConst -> ERROR 39 | 40 | Enum . EmConst -> find EmConst in enum 41 | 42 | Record . Var -> find variable in record 43 | 44 | 45 | -------------------------------------------------------------------------------- /ebc/ebc.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | net6.0 6 | enable 7 | enable 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /ebc/parser/evoBasic.tokens: -------------------------------------------------------------------------------- 1 | T__0=1 2 | T__1=2 3 | T__2=3 4 | T__3=4 5 | T__4=5 6 | T__5=6 7 | T__6=7 8 | T__7=8 9 | T__8=9 10 | T__9=10 11 | T__10=11 12 | T__11=12 13 | T__12=13 14 | T__13=14 15 | T__14=15 16 | T__15=16 17 | T__16=17 18 | T__17=18 19 | StringLiteral=19 20 | CharLiteral=20 21 | Digit=21 22 | FloatingPoint=22 23 | Comment=23 24 | BlockComment=24 25 | WS=25 26 | Impl=26 27 | Mod=27 28 | Const=28 29 | Continue=29 30 | Nothing=30 31 | Throw=31 32 | Extend=32 33 | Module=33 34 | True=34 35 | False=35 36 | New=36 37 | Xor=37 38 | Not=38 39 | And=39 40 | Or=40 41 | Try=41 42 | Catch=42 43 | Virtual=43 44 | Override=44 45 | Operator=45 46 | Factory=46 47 | Implements=47 48 | Import=48 49 | Class=49 50 | Preserve=50 51 | Redim=51 52 | ParamArray=52 53 | Declare=53 54 | Lib=54 55 | Enum=55 56 | If=56 57 | Super=57 58 | Wend=58 59 | From=59 60 | Namespace=60 61 | Implement=61 62 | Type=62 63 | Alias=63 64 | Self=64 65 | Static=65 66 | ModuleInfo=66 67 | Public=67 68 | Private=68 69 | Protected=69 70 | Get=70 71 | Set=71 72 | Property=72 73 | Var=73 74 | Dim=74 75 | Let=75 76 | Return=76 77 | Function=77 78 | Difference=78 79 | Union=79 80 | Case=80 81 | Select=81 82 | End=82 83 | Until=83 84 | Loop=84 85 | Exit=85 86 | While=86 87 | Do=87 88 | Each=88 89 | To=89 90 | Step=90 91 | Next=91 92 | In=92 93 | For=93 94 | Optional=94 95 | Byval=95 96 | Byref=96 97 | Then=97 98 | Else=98 99 | ElseIf=99 100 | Call=100 101 | Sub=101 102 | As=102 103 | Is=103 104 | ID=104 105 | ','=1 106 | '='=2 107 | '('=3 108 | ')'=4 109 | '+'=5 110 | '-'=6 111 | '*'=7 112 | '/'=8 113 | '.'=9 114 | '['=10 115 | ']'=11 116 | '<'=12 117 | '>'=13 118 | '\\'=14 119 | ':'=15 120 | '\n\r'=16 121 | '\n'=17 122 | '\r'=18 123 | -------------------------------------------------------------------------------- /ebc/parser/evoBasicLexer.tokens: -------------------------------------------------------------------------------- 1 | T__0=1 2 | T__1=2 3 | T__2=3 4 | T__3=4 5 | T__4=5 6 | T__5=6 7 | T__6=7 8 | T__7=8 9 | T__8=9 10 | T__9=10 11 | T__10=11 12 | T__11=12 13 | T__12=13 14 | T__13=14 15 | T__14=15 16 | T__15=16 17 | T__16=17 18 | T__17=18 19 | StringLiteral=19 20 | CharLiteral=20 21 | Digit=21 22 | FloatingPoint=22 23 | Comment=23 24 | BlockComment=24 25 | WS=25 26 | Impl=26 27 | Mod=27 28 | Const=28 29 | Continue=29 30 | Nothing=30 31 | Throw=31 32 | Extend=32 33 | Module=33 34 | True=34 35 | False=35 36 | New=36 37 | Xor=37 38 | Not=38 39 | And=39 40 | Or=40 41 | Try=41 42 | Catch=42 43 | Virtual=43 44 | Override=44 45 | Operator=45 46 | Factory=46 47 | Implements=47 48 | Import=48 49 | Class=49 50 | Preserve=50 51 | Redim=51 52 | ParamArray=52 53 | Declare=53 54 | Lib=54 55 | Enum=55 56 | If=56 57 | Super=57 58 | Wend=58 59 | From=59 60 | Namespace=60 61 | Implement=61 62 | Type=62 63 | Alias=63 64 | Self=64 65 | Static=65 66 | ModuleInfo=66 67 | Public=67 68 | Private=68 69 | Protected=69 70 | Get=70 71 | Set=71 72 | Property=72 73 | Var=73 74 | Dim=74 75 | Let=75 76 | Return=76 77 | Function=77 78 | Difference=78 79 | Union=79 80 | Case=80 81 | Select=81 82 | End=82 83 | Until=83 84 | Loop=84 85 | Exit=85 86 | While=86 87 | Do=87 88 | Each=88 89 | To=89 90 | Step=90 91 | Next=91 92 | In=92 93 | For=93 94 | Optional=94 95 | Byval=95 96 | Byref=96 97 | Then=97 98 | Else=98 99 | ElseIf=99 100 | Call=100 101 | Sub=101 102 | As=102 103 | Is=103 104 | ID=104 105 | ','=1 106 | '='=2 107 | '('=3 108 | ')'=4 109 | '+'=5 110 | '-'=6 111 | '*'=7 112 | '/'=8 113 | '.'=9 114 | '['=10 115 | ']'=11 116 | '<'=12 117 | '>'=13 118 | '\\'=14 119 | ':'=15 120 | '\n\r'=16 121 | '\n'=17 122 | '\r'=18 123 | -------------------------------------------------------------------------------- /ebc/utils/ASCIITree.cs: -------------------------------------------------------------------------------- 1 | public class Node{ 2 | public Object value = null; 3 | public IEnumerable childs = new List(); 4 | public override string ToString(){ 5 | return Print("\n",true); 6 | } 7 | private string Print(string indent, bool isLast){ 8 | string ret = indent; 9 | if(isLast){ 10 | ret += " └─"; 11 | indent += " "; 12 | } 13 | else{ 14 | ret += " ├─"; 15 | indent += " │ "; 16 | } 17 | 18 | if(value!=null){ 19 | var content = value.ToString(); 20 | if(content.Contains('\n')){ 21 | var tmp = '╖' + content.Replace("\n",indent + "║"); 22 | var index = tmp.LastIndexOf('║'); 23 | ret += tmp.Remove(index,1).Insert(index,"╚"); 24 | } 25 | else{ 26 | ret += content; 27 | } 28 | } 29 | 30 | if(childs != null){ 31 | int i = 0; 32 | foreach(var child in childs){ 33 | ret += child.Print(indent,i==childs.Count()-1); 34 | i++; 35 | } 36 | } 37 | 38 | return ret; 39 | } 40 | } 41 | 42 | -------------------------------------------------------------------------------- /ebc/utils/Dump.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yoorkin/evoBasic-lang/e3bf66a397d6d8c9db2345e2e1c291c91c3c5a2e/ebc/utils/Dump.cs -------------------------------------------------------------------------------- /evm/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.15) 2 | 3 | project(evm) 4 | 5 | set(CMAKE_CXX_STANDARD 20) 6 | 7 | 8 | if(WIN32) 9 | add_compile_options("$<$:/source-charset:utf-8>") 10 | add_compile_options("$<$:/source-charset:utf-8>") 11 | set(DEPS_BIN_DIR "${CMAKE_SOURCE_DIR}/deps/bin/windows_x64") 12 | elseif(LINUX) 13 | add_compile_options("$<$:-g>") 14 | add_compile_options("$<$:-O0>") 15 | set(DEPS_BIN_DIR "${CMAKE_SOURCE_DIR}/deps/bin/linux_64") 16 | endif() 17 | 18 | add_executable(evm 19 | main.cpp 20 | runtime.cpp 21 | loader.cpp 22 | unicode.cpp 23 | processor.cpp 24 | interop.cpp 25 | backage.pb.cc 26 | ebffi.cpp 27 | ) 28 | 29 | if(WIN32) 30 | set_property(TARGET evm PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded") 31 | endif() 32 | 33 | target_include_directories(evm PRIVATE "${CMAKE_SOURCE_DIR}/deps/include") 34 | 35 | file(COPY "${DEPS_BIN_DIR}/" DESTINATION ${CMAKE_BINARY_DIR}) 36 | 37 | target_link_directories(evm PRIVATE ${DEPS_BIN_DIR}) 38 | 39 | target_link_libraries(evm PRIVATE protobuf icuuc libffi) 40 | 41 | -------------------------------------------------------------------------------- /evm/CMakeSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "x64-Debug", 5 | "generator": "Ninja", 6 | "configurationType": "Debug", 7 | "inheritEnvironments": [ "msvc_x64_x64" ], 8 | "buildRoot": "${projectDir}\\out\\build\\${name}", 9 | "installRoot": "${projectDir}\\out\\install\\${name}", 10 | "cmakeCommandArgs": "", 11 | "ctestCommandArgs": "" 12 | } 13 | ] 14 | } -------------------------------------------------------------------------------- /evm/asciitree.h: -------------------------------------------------------------------------------- 1 | #ifndef ASCII_TREE 2 | #define ASCII_TREE 3 | #include 4 | #include 5 | 6 | class Node{ 7 | std::string Print(std::string indent, bool isLast){ 8 | std::string ret = indent; 9 | if(isLast){ 10 | ret += " └─"; 11 | indent += " "; 12 | } 13 | else{ 14 | ret += " ├─"; 15 | indent += " │ "; 16 | } 17 | 18 | 19 | ret += value; 20 | 21 | if(!childs.empty()){ 22 | int i = 0; 23 | for(auto child : childs){ 24 | ret += child.Print(indent,i==childs.size()-1); 25 | i++; 26 | } 27 | } 28 | 29 | return ret; 30 | } 31 | public: 32 | std::string value; 33 | std::list childs; 34 | std::string ToString(){ 35 | return Print("\n",true); 36 | } 37 | } 38 | 39 | #endif -------------------------------------------------------------------------------- /evm/bytecode.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yoorkin/evoBasic-lang/e3bf66a397d6d8c9db2345e2e1c291c91c3c5a2e/evm/bytecode.h -------------------------------------------------------------------------------- /evm/dependencies.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by yorkin on 11/11/21. 3 | // 4 | 5 | #ifndef EVOBASIC2_DEPENDENCIES_H 6 | #define EVOBASIC2_DEPENDENCIES_H 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | 13 | template 14 | class TopologicalSort{ 15 | struct Vex{ 16 | T obj; 17 | bool visited = false; 18 | int in_degree = 0; 19 | std::set dst,src; 20 | Vex(T t) : obj(t){} 21 | }; 22 | 23 | std::map vexs; 24 | std::list order; 25 | 26 | public: 27 | 28 | Vex *addVex(T t){ 29 | auto target = vexs.find(t); 30 | if(target == vexs.end() ){ 31 | auto v = new Vex(t); 32 | vexs.insert({t,v}); 33 | return v; 34 | } 35 | return target->second; 36 | } 37 | 38 | void addEdge(T src, T dst){ 39 | auto a = addVex(src); 40 | auto b = addVex(dst); 41 | a->dst.insert(b); 42 | 43 | b->in_degree++; 44 | b->src.insert(a); 45 | } 46 | 47 | 48 | const std::list &getOrder(){ 49 | return order; 50 | } 51 | 52 | 53 | bool solve(){ 54 | std::queue q; 55 | for(auto [_,v] : vexs){ 56 | if(v->in_degree==0)q.push(v); 57 | } 58 | 59 | while(!q.empty()){ 60 | auto v = q.front(); 61 | q.pop(); 62 | order.push_back(v->obj); 63 | for(auto dst : v->dst){ 64 | if(dst->visited)continue; 65 | dst->in_degree--; 66 | if(dst->in_degree==0){ 67 | q.push(dst); 68 | dst->visited = true; 69 | } 70 | } 71 | } 72 | 73 | return order.size()==vexs.size(); 74 | } 75 | 76 | ~TopologicalSort(){ 77 | for(auto [_,v] : vexs) delete v; 78 | } 79 | }; 80 | 81 | 82 | #endif //EVOBASIC2_DEPENDENCIES_H -------------------------------------------------------------------------------- /evm/deps/bin/windows_x64/icudt70.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yoorkin/evoBasic-lang/e3bf66a397d6d8c9db2345e2e1c291c91c3c5a2e/evm/deps/bin/windows_x64/icudt70.dll -------------------------------------------------------------------------------- /evm/deps/bin/windows_x64/icuin70.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yoorkin/evoBasic-lang/e3bf66a397d6d8c9db2345e2e1c291c91c3c5a2e/evm/deps/bin/windows_x64/icuin70.dll -------------------------------------------------------------------------------- /evm/deps/bin/windows_x64/icuio70.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yoorkin/evoBasic-lang/e3bf66a397d6d8c9db2345e2e1c291c91c3c5a2e/evm/deps/bin/windows_x64/icuio70.dll -------------------------------------------------------------------------------- /evm/deps/bin/windows_x64/icutu70.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yoorkin/evoBasic-lang/e3bf66a397d6d8c9db2345e2e1c291c91c3c5a2e/evm/deps/bin/windows_x64/icutu70.dll -------------------------------------------------------------------------------- /evm/deps/bin/windows_x64/icuuc70.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yoorkin/evoBasic-lang/e3bf66a397d6d8c9db2345e2e1c291c91c3c5a2e/evm/deps/bin/windows_x64/icuuc70.dll -------------------------------------------------------------------------------- /evm/deps/bin/windows_x64/libffi.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yoorkin/evoBasic-lang/e3bf66a397d6d8c9db2345e2e1c291c91c3c5a2e/evm/deps/bin/windows_x64/libffi.dll -------------------------------------------------------------------------------- /evm/deps/bin/windows_x64/protoc.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yoorkin/evoBasic-lang/e3bf66a397d6d8c9db2345e2e1c291c91c3c5a2e/evm/deps/bin/windows_x64/protoc.exe -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/any_test.proto: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | syntax = "proto3"; 32 | 33 | package protobuf_unittest; 34 | 35 | import "google/protobuf/any.proto"; 36 | 37 | option java_outer_classname = "TestAnyProto"; 38 | 39 | message TestAny { 40 | int32 int32_value = 1; 41 | google.protobuf.Any any_value = 2; 42 | repeated google.protobuf.Any repeated_any_value = 3; 43 | string text = 4; 44 | } 45 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/arena_test_util.cc: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #include 32 | 33 | #include 34 | #include 35 | 36 | 37 | #define EXPECT_EQ GOOGLE_CHECK_EQ 38 | 39 | namespace google { 40 | namespace protobuf { 41 | namespace internal { 42 | 43 | NoHeapChecker::~NoHeapChecker() { 44 | capture_alloc.Unhook(); 45 | EXPECT_EQ(0, capture_alloc.alloc_count()); 46 | EXPECT_EQ(0, capture_alloc.free_count()); 47 | } 48 | 49 | } // namespace internal 50 | } // namespace protobuf 51 | } // namespace google 52 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/compiler/cpp/cpp_generator.h: -------------------------------------------------------------------------------- 1 | #ifndef GOOGLE_PROTOBUF_COMPILER_CPP_CPP_GENERATOR_H_ 2 | #define GOOGLE_PROTOBUF_COMPILER_CPP_CPP_GENERATOR_H_ 3 | 4 | #include 5 | 6 | #endif // GOOGLE_PROTOBUF_COMPILER_CPP_CPP_GENERATOR_H_ 7 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/compiler/cpp/message_layout_helper.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | // Author: seongkim@google.com (Seong Beom Kim) 32 | // Based on original Protocol Buffers design by 33 | // Sanjay Ghemawat, Jeff Dean, and others. 34 | 35 | #ifndef GOOGLE_PROTOBUF_COMPILER_CPP_MESSAGE_LAYOUT_HELPER_H__ 36 | #define GOOGLE_PROTOBUF_COMPILER_CPP_MESSAGE_LAYOUT_HELPER_H__ 37 | 38 | #include 39 | #include 40 | 41 | namespace google { 42 | namespace protobuf { 43 | namespace compiler { 44 | namespace cpp { 45 | 46 | class MessageSCCAnalyzer; 47 | 48 | // Provides an abstract interface to optimize message layout 49 | // by rearranging the fields of a message. 50 | class MessageLayoutHelper { 51 | public: 52 | virtual ~MessageLayoutHelper() {} 53 | 54 | virtual void OptimizeLayout(std::vector* fields, 55 | const Options& options, 56 | MessageSCCAnalyzer* scc_analyzer) = 0; 57 | }; 58 | 59 | } // namespace cpp 60 | } // namespace compiler 61 | } // namespace protobuf 62 | } // namespace google 63 | 64 | #endif // GOOGLE_PROTOBUF_COMPILER_CPP_MESSAGE_LAYOUT_HELPER_H__ 65 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/compiler/cpp/padding_optimizer.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | // Author: seongkim@google.com (Seong Beom Kim) 32 | // Based on original Protocol Buffers design by 33 | // Sanjay Ghemawat, Jeff Dean, and others. 34 | 35 | #ifndef GOOGLE_PROTOBUF_COMPILER_CPP_PADDING_OPTIMIZER_H__ 36 | #define GOOGLE_PROTOBUF_COMPILER_CPP_PADDING_OPTIMIZER_H__ 37 | 38 | #include 39 | 40 | namespace google { 41 | namespace protobuf { 42 | namespace compiler { 43 | namespace cpp { 44 | 45 | // Rearranges the fields of a message to minimize padding. 46 | // Fields are grouped by the type and the size. 47 | // For example, grouping four boolean fields and one int32 48 | // field results in zero padding overhead. See OptimizeLayout's 49 | // comment for details. 50 | class PaddingOptimizer : public MessageLayoutHelper { 51 | public: 52 | PaddingOptimizer() {} 53 | ~PaddingOptimizer() override {} 54 | 55 | void OptimizeLayout(std::vector* fields, 56 | const Options& options, 57 | MessageSCCAnalyzer* scc_analyzer) override; 58 | }; 59 | 60 | } // namespace cpp 61 | } // namespace compiler 62 | } // namespace protobuf 63 | } // namespace google 64 | 65 | #endif // GOOGLE_PROTOBUF_COMPILER_CPP_PADDING_OPTIMIZER_H__ 66 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/compiler/cpp/test_large_enum_value.proto: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | // Test that proto2 compiler can generate valid code when the enum value 32 | // is INT_MAX. Note that this is a compile-only test and this proto is not 33 | // referenced in any C++ code. 34 | syntax = "proto2"; 35 | 36 | package protobuf_unittest; 37 | 38 | message TestLargeEnumValue { 39 | enum EnumWithLargeValue { 40 | VALUE_1 = 1; 41 | VALUE_MAX = 0x7fffffff; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/compiler/cpp/unittest.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | // This header declares the namespace google::protobuf::protobuf_unittest in order to expose 32 | // any problems with the generated class names. We use this header to ensure 33 | // unittest.cc will declare the namespace prior to other includes, while obeying 34 | // normal include ordering. 35 | // 36 | // When generating a class name of "foo.Bar" we must ensure we prefix the class 37 | // name with "::", in case the namespace google::protobuf::foo exists. We intentionally 38 | // trigger that case here by declaring google::protobuf::protobuf_unittest. 39 | // 40 | // See ClassName in helpers.h for more details. 41 | 42 | #ifndef GOOGLE_PROTOBUF_COMPILER_CPP_UNITTEST_H__ 43 | #define GOOGLE_PROTOBUF_COMPILER_CPP_UNITTEST_H__ 44 | 45 | namespace google { 46 | namespace protobuf { 47 | namespace protobuf_unittest {} 48 | } // namespace protobuf 49 | } // namespace google 50 | 51 | #endif // GOOGLE_PROTOBUF_COMPILER_CPP_UNITTEST_H__ 52 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/compiler/csharp/csharp_doc_comment.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | 32 | #ifndef GOOGLE_PROTOBUF_COMPILER_CSHARP_DOC_COMMENT_H__ 33 | #define GOOGLE_PROTOBUF_COMPILER_CSHARP_DOC_COMMENT_H__ 34 | 35 | #include 36 | #include 37 | 38 | namespace google { 39 | namespace protobuf { 40 | namespace compiler { 41 | namespace csharp { 42 | void WriteMessageDocComment(io::Printer* printer, const Descriptor* message); 43 | void WritePropertyDocComment(io::Printer* printer, const FieldDescriptor* field); 44 | void WriteEnumDocComment(io::Printer* printer, const EnumDescriptor* enumDescriptor); 45 | void WriteEnumValueDocComment(io::Printer* printer, const EnumValueDescriptor* value); 46 | void WriteMethodDocComment(io::Printer* printer, const MethodDescriptor* method); 47 | } // namespace csharp 48 | } // namespace compiler 49 | } // namespace protobuf 50 | } // namespace google 51 | #endif // GOOGLE_PROTOBUF_COMPILER_CSHARP_DOC_COMMENT_H__ 52 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/compiler/csharp/csharp_enum.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #ifndef GOOGLE_PROTOBUF_COMPILER_CSHARP_ENUM_H__ 32 | #define GOOGLE_PROTOBUF_COMPILER_CSHARP_ENUM_H__ 33 | 34 | #include 35 | 36 | #include 37 | #include 38 | #include 39 | #include 40 | 41 | namespace google { 42 | namespace protobuf { 43 | namespace compiler { 44 | namespace csharp { 45 | 46 | class EnumGenerator : public SourceGeneratorBase { 47 | public: 48 | EnumGenerator(const EnumDescriptor* descriptor, const Options* options); 49 | ~EnumGenerator(); 50 | 51 | EnumGenerator(const EnumGenerator&) = delete; 52 | EnumGenerator& operator=(const EnumGenerator&) = delete; 53 | 54 | void Generate(io::Printer* printer); 55 | 56 | private: 57 | const EnumDescriptor* descriptor_; 58 | }; 59 | 60 | } // namespace csharp 61 | } // namespace compiler 62 | } // namespace protobuf 63 | } // namespace google 64 | 65 | #endif // GOOGLE_PROTOBUF_COMPILER_CSHARP_ENUM_H__ 66 | 67 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/compiler/csharp/csharp_source_generator_base.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #ifndef GOOGLE_PROTOBUF_COMPILER_CSHARP_SOURCE_GENERATOR_BASE_H__ 32 | #define GOOGLE_PROTOBUF_COMPILER_CSHARP_SOURCE_GENERATOR_BASE_H__ 33 | 34 | #include 35 | 36 | #include 37 | #include 38 | 39 | namespace google { 40 | namespace protobuf { 41 | namespace compiler { 42 | namespace csharp { 43 | 44 | struct Options; 45 | 46 | class SourceGeneratorBase { 47 | protected: 48 | SourceGeneratorBase(const Options* options); 49 | virtual ~SourceGeneratorBase(); 50 | 51 | SourceGeneratorBase(const SourceGeneratorBase&) = delete; 52 | SourceGeneratorBase& operator=(const SourceGeneratorBase&) = delete; 53 | 54 | std::string class_access_level(); 55 | const Options* options(); 56 | 57 | // Write any attributes used to decorate generated function members (methods and properties). 58 | // Should not be used to decorate types. 59 | void WriteGeneratedCodeAttributes(io::Printer* printer); 60 | 61 | private: 62 | const Options *options_; 63 | }; 64 | 65 | } // namespace csharp 66 | } // namespace compiler 67 | } // namespace protobuf 68 | } // namespace google 69 | 70 | #endif // GOOGLE_PROTOBUF_COMPILER_CSHARP_SOURCE_GENERATOR_BASE_H__ 71 | 72 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/compiler/java/doc_comment_unittest.cc: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | // Author: kenton@google.com (Kenton Varda) 32 | 33 | #include 34 | 35 | #include 36 | 37 | namespace google { 38 | namespace protobuf { 39 | namespace compiler { 40 | namespace java { 41 | namespace { 42 | 43 | TEST(JavaDocCommentTest, Escaping) { 44 | EXPECT_EQ("foo /* bar */ baz", EscapeJavadoc("foo /* bar */ baz")); 45 | EXPECT_EQ("foo /*/ baz", EscapeJavadoc("foo /*/ baz")); 46 | EXPECT_EQ("{@foo}", EscapeJavadoc("{@foo}")); 47 | EXPECT_EQ("<i>&</i>", EscapeJavadoc("&")); 48 | EXPECT_EQ("foo\u1234bar", EscapeJavadoc("foo\\u1234bar")); 49 | EXPECT_EQ("@deprecated", EscapeJavadoc("@deprecated")); 50 | } 51 | 52 | } // namespace 53 | } // namespace java 54 | } // namespace compiler 55 | } // namespace protobuf 56 | } // namespace google 57 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/compiler/java/java_generator.h: -------------------------------------------------------------------------------- 1 | #ifndef GOOGLE_PROTOBUF_COMPILER_JAVA_JAVA_GENERATOR_H_ 2 | #define GOOGLE_PROTOBUF_COMPILER_JAVA_JAVA_GENERATOR_H_ 3 | 4 | #include 5 | 6 | #endif // GOOGLE_PROTOBUF_COMPILER_JAVA_JAVA_GENERATOR_H_ 7 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/compiler/python/helpers.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #ifndef GOOGLE_PROTOBUF_COMPILER_PYTHON_HELPERS_H__ 32 | #define GOOGLE_PROTOBUF_COMPILER_PYTHON_HELPERS_H__ 33 | 34 | #include 35 | 36 | #include 37 | 38 | namespace google { 39 | namespace protobuf { 40 | namespace compiler { 41 | namespace python { 42 | 43 | 44 | std::string ModuleName(const std::string& filename); 45 | std::string StrippedModuleName(const std::string& filename); 46 | bool ContainsPythonKeyword(const std::string& module_name); 47 | bool IsPythonKeyword(const std::string& name); 48 | std::string ResolveKeyword(const std::string& name); 49 | std::string GetFileName(const FileDescriptor* file_des, 50 | const std::string& suffix); 51 | bool HasGenericServices(const FileDescriptor* file); 52 | 53 | template 54 | std::string NamePrefixedWithNestedTypes(const DescriptorT& descriptor, 55 | const std::string& separator); 56 | 57 | } // namespace python 58 | } // namespace compiler 59 | } // namespace protobuf 60 | } // namespace google 61 | 62 | #endif // GOOGLE_PROTOBUF_COMPILER_PYTHON_HELPERS_H__ 63 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/compiler/python/python_generator.h: -------------------------------------------------------------------------------- 1 | #ifndef GOOGLE_PROTOBUF_COMPILER_PYTHON_PYTHON_GENERATOR_H_ 2 | #define GOOGLE_PROTOBUF_COMPILER_PYTHON_PYTHON_GENERATOR_H_ 3 | 4 | #include 5 | 6 | #endif // GOOGLE_PROTOBUF_COMPILER_PYTHON_PYTHON_GENERATOR_H_ 7 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/compiler/ruby/ruby_generated_code.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package A.B.C; 4 | 5 | import "ruby_generated_code_proto2_import.proto"; 6 | 7 | message TestMessage { 8 | int32 optional_int32 = 1; 9 | int64 optional_int64 = 2; 10 | uint32 optional_uint32 = 3; 11 | uint64 optional_uint64 = 4; 12 | bool optional_bool = 5; 13 | double optional_double = 6; 14 | float optional_float = 7; 15 | string optional_string = 8; 16 | bytes optional_bytes = 9; 17 | TestEnum optional_enum = 10; 18 | TestMessage optional_msg = 11; 19 | TestImportedMessage optional_proto2_submessage = 12; 20 | 21 | repeated int32 repeated_int32 = 21; 22 | repeated int64 repeated_int64 = 22; 23 | repeated uint32 repeated_uint32 = 23; 24 | repeated uint64 repeated_uint64 = 24; 25 | repeated bool repeated_bool = 25; 26 | repeated double repeated_double = 26; 27 | repeated float repeated_float = 27; 28 | repeated string repeated_string = 28; 29 | repeated bytes repeated_bytes = 29; 30 | repeated TestEnum repeated_enum = 30; 31 | repeated TestMessage repeated_msg = 31; 32 | 33 | oneof my_oneof { 34 | int32 oneof_int32 = 41; 35 | int64 oneof_int64 = 42; 36 | uint32 oneof_uint32 = 43; 37 | uint64 oneof_uint64 = 44; 38 | bool oneof_bool = 45; 39 | double oneof_double = 46; 40 | float oneof_float = 47; 41 | string oneof_string = 48; 42 | bytes oneof_bytes = 49; 43 | TestEnum oneof_enum = 50; 44 | TestMessage oneof_msg = 51; 45 | } 46 | 47 | map map_int32_string = 61; 48 | map map_int64_string = 62; 49 | map map_uint32_string = 63; 50 | map map_uint64_string = 64; 51 | map map_bool_string = 65; 52 | map map_string_string = 66; 53 | map map_string_msg = 67; 54 | map map_string_enum = 68; 55 | map map_string_int32 = 69; 56 | map map_string_bool = 70; 57 | 58 | message NestedMessage { 59 | int32 foo = 1; 60 | } 61 | 62 | NestedMessage nested_message = 80; 63 | } 64 | 65 | enum TestEnum { 66 | Default = 0; 67 | A = 1; 68 | B = 2; 69 | C = 3; 70 | } 71 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/compiler/ruby/ruby_generated_code_proto2.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto2"; 2 | 3 | package A.B.C; 4 | 5 | import "ruby_generated_code_proto2_import.proto"; 6 | 7 | message TestMessage { 8 | optional int32 optional_int32 = 1 [default = 1]; 9 | optional int64 optional_int64 = 2 [default = 2]; 10 | optional uint32 optional_uint32 = 3 [default = 3]; 11 | optional uint64 optional_uint64 = 4 [default = 4]; 12 | optional bool optional_bool = 5 [default = true]; 13 | optional double optional_double = 6 [default = 6.0]; 14 | optional float optional_float = 7 [default = 7.0]; 15 | optional string optional_string = 8 [default = "default str"]; 16 | optional bytes optional_bytes = 9 [default = "\0\1\2\100fubar"]; 17 | optional TestEnum optional_enum = 10 [default = A]; 18 | optional TestMessage optional_msg = 11; 19 | optional TestImportedMessage optional_proto2_submessage = 12; 20 | 21 | repeated int32 repeated_int32 = 21; 22 | repeated int64 repeated_int64 = 22; 23 | repeated uint32 repeated_uint32 = 23; 24 | repeated uint64 repeated_uint64 = 24; 25 | repeated bool repeated_bool = 25; 26 | repeated double repeated_double = 26; 27 | repeated float repeated_float = 27; 28 | repeated string repeated_string = 28; 29 | repeated bytes repeated_bytes = 29; 30 | repeated TestEnum repeated_enum = 30; 31 | repeated TestMessage repeated_msg = 31; 32 | 33 | required int32 required_int32 = 41; 34 | required int64 required_int64 = 42; 35 | required uint32 required_uint32 = 43; 36 | required uint64 required_uint64 = 44; 37 | required bool required_bool = 45; 38 | required double required_double = 46; 39 | required float required_float = 47; 40 | required string required_string = 48; 41 | required bytes required_bytes = 49; 42 | required TestEnum required_enum = 50; 43 | required TestMessage required_msg = 51; 44 | 45 | oneof my_oneof { 46 | int32 oneof_int32 = 61; 47 | int64 oneof_int64 = 62; 48 | uint32 oneof_uint32 = 63; 49 | uint64 oneof_uint64 = 64; 50 | bool oneof_bool = 65; 51 | double oneof_double = 66; 52 | float oneof_float = 67; 53 | string oneof_string = 68; 54 | bytes oneof_bytes = 69; 55 | TestEnum oneof_enum = 70; 56 | TestMessage oneof_msg = 71; 57 | } 58 | 59 | message NestedMessage { 60 | optional int32 foo = 1; 61 | } 62 | 63 | optional NestedMessage nested_message = 80; 64 | } 65 | 66 | enum TestEnum { 67 | Default = 0; 68 | A = 1; 69 | B = 2; 70 | C = 3; 71 | } 72 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/compiler/ruby/ruby_generated_code_proto2_import.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto2"; 2 | 3 | package A.B.C; 4 | 5 | message TestImportedMessage {} 6 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/compiler/ruby/ruby_generated_pkg_explicit.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package one.two.a_three; 4 | 5 | option ruby_package = "A::B::C"; 6 | 7 | message Four { 8 | string a_string = 1; 9 | } 10 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/compiler/ruby/ruby_generated_pkg_explicit_legacy.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package one.two.a_three.and; 4 | 5 | option ruby_package = "AA.BB.CC"; 6 | 7 | message Four { 8 | string another_string = 1; 9 | } 10 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/compiler/ruby/ruby_generated_pkg_explicit_legacy_pb.rb: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # source: ruby_generated_pkg_explicit_legacy.proto 3 | 4 | require 'google/protobuf' 5 | 6 | Google::Protobuf::DescriptorPool.generated_pool.build do 7 | add_file("ruby_generated_pkg_explicit_legacy.proto", :syntax => :proto3) do 8 | add_message "one.two.a_three.and.Four" do 9 | optional :another_string, :string, 1 10 | end 11 | end 12 | end 13 | 14 | module AA 15 | module BB 16 | module CC 17 | Four = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("one.two.a_three.and.Four").msgclass 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/compiler/ruby/ruby_generated_pkg_explicit_pb.rb: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # source: ruby_generated_pkg_explicit.proto 3 | 4 | require 'google/protobuf' 5 | 6 | Google::Protobuf::DescriptorPool.generated_pool.build do 7 | add_file("ruby_generated_pkg_explicit.proto", :syntax => :proto3) do 8 | add_message "one.two.a_three.Four" do 9 | optional :a_string, :string, 1 10 | end 11 | end 12 | end 13 | 14 | module A 15 | module B 16 | module C 17 | Four = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("one.two.a_three.Four").msgclass 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/compiler/ruby/ruby_generated_pkg_implicit.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package one.two.a_three; 4 | 5 | message Four { 6 | string a_string = 1; 7 | } 8 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/compiler/ruby/ruby_generated_pkg_implicit_pb.rb: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # source: ruby_generated_pkg_implicit.proto 3 | 4 | require 'google/protobuf' 5 | 6 | Google::Protobuf::DescriptorPool.generated_pool.build do 7 | add_file("ruby_generated_pkg_implicit.proto", :syntax => :proto3) do 8 | add_message "one.two.a_three.Four" do 9 | optional :a_string, :string, 1 10 | end 11 | end 12 | end 13 | 14 | module One 15 | module Two 16 | module AThree 17 | Four = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("one.two.a_three.Four").msgclass 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/compiler/test_plugin.cc: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | // Author: kenton@google.com (Kenton Varda) 32 | // 33 | // This is a dummy code generator plugin used by 34 | // command_line_interface_unittest. 35 | 36 | #include 37 | 38 | #include 39 | 40 | #include 41 | #include 42 | 43 | namespace google { 44 | namespace protobuf { 45 | namespace compiler { 46 | 47 | int ProtobufMain(int argc, char* argv[]) { 48 | MockCodeGenerator generator("test_plugin"); 49 | return PluginMain(argc, argv, &generator); 50 | } 51 | 52 | } // namespace compiler 53 | } // namespace protobuf 54 | } // namespace google 55 | 56 | int main(int argc, char* argv[]) { 57 | #ifdef _MSC_VER 58 | // Don't print a silly message or stick a modal dialog box in my face, 59 | // please. 60 | _set_abort_behavior(0, ~0); 61 | #endif // !_MSC_VER 62 | return google::protobuf::compiler::ProtobufMain(argc, argv); 63 | } 64 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/compiler/zip_writer.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | // Author: kenton@google.com (Kenton Varda) 32 | #ifndef GOOGLE_PROTOBUF_COMPILER_ZIP_WRITER_H__ 33 | #define GOOGLE_PROTOBUF_COMPILER_ZIP_WRITER_H__ 34 | 35 | #include 36 | #include 37 | 38 | #include 39 | #include 40 | 41 | namespace google { 42 | namespace protobuf { 43 | namespace compiler { 44 | 45 | class ZipWriter { 46 | public: 47 | ZipWriter(io::ZeroCopyOutputStream* raw_output); 48 | ~ZipWriter(); 49 | 50 | bool Write(const std::string& filename, const std::string& contents); 51 | bool WriteDirectory(); 52 | 53 | private: 54 | struct FileInfo { 55 | std::string name; 56 | uint32_t offset; 57 | uint32_t size; 58 | uint32_t crc32; 59 | }; 60 | 61 | io::ZeroCopyOutputStream* raw_output_; 62 | std::vector files_; 63 | }; 64 | 65 | } // namespace compiler 66 | } // namespace protobuf 67 | } // namespace google 68 | 69 | #endif // GOOGLE_PROTOBUF_COMPILER_ZIP_WRITER_H__ 70 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/empty.proto: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | syntax = "proto3"; 32 | 33 | package google.protobuf; 34 | 35 | option csharp_namespace = "Google.Protobuf.WellKnownTypes"; 36 | option go_package = "google.golang.org/protobuf/types/known/emptypb"; 37 | option java_package = "com.google.protobuf"; 38 | option java_outer_classname = "EmptyProto"; 39 | option java_multiple_files = true; 40 | option objc_class_prefix = "GPB"; 41 | option cc_enable_arenas = true; 42 | 43 | // A generic empty message that you can re-use to avoid defining duplicated 44 | // empty messages in your APIs. A typical example is to use it as the request 45 | // or the response type of an API method. For instance: 46 | // 47 | // service Foo { 48 | // rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); 49 | // } 50 | // 51 | message Empty {} 52 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/generated_message_tctable_full.cc: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #include 32 | 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | 39 | // clang-format off 40 | #include 41 | // clang-format on 42 | 43 | namespace google { 44 | namespace protobuf { 45 | namespace internal { 46 | 47 | const char* TcParser::GenericFallback(PROTOBUF_TC_PARAM_DECL) { 48 | return GenericFallbackImpl(PROTOBUF_TC_PARAM_PASS); 49 | } 50 | 51 | } // namespace internal 52 | } // namespace protobuf 53 | } // namespace google 54 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/inlined_string_field_unittest.cc: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #include 32 | 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include 39 | #include 40 | 41 | #include 42 | #include 43 | #include 44 | #include 45 | #include 46 | #include 47 | #include 48 | 49 | 50 | namespace google { 51 | namespace protobuf { 52 | 53 | using internal::ArenaStringPtr; 54 | using internal::InlinedStringField; 55 | 56 | namespace { 57 | } // namespace 58 | } // namespace protobuf 59 | } // namespace google 60 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/io/gzip_stream_unittest.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh -x 2 | # 3 | # Protocol Buffers - Google's data interchange format 4 | # Copyright 2009 Google Inc. All rights reserved. 5 | # https://developers.google.com/protocol-buffers/ 6 | # 7 | # Redistribution and use in source and binary forms, with or without 8 | # modification, are permitted provided that the following conditions are 9 | # met: 10 | # 11 | # * Redistributions of source code must retain the above copyright 12 | # notice, this list of conditions and the following disclaimer. 13 | # * Redistributions in binary form must reproduce the above 14 | # copyright notice, this list of conditions and the following disclaimer 15 | # in the documentation and/or other materials provided with the 16 | # distribution. 17 | # * Neither the name of Google Inc. nor the names of its 18 | # contributors may be used to endorse or promote products derived from 19 | # this software without specific prior written permission. 20 | # 21 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 24 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 25 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 27 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 28 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 29 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 31 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 | # 33 | # Author: brianolson@google.com (Brian Olson) 34 | # 35 | # Test compatibility between command line gzip/gunzip binaries and 36 | # ZeroCopyStream versions. 37 | 38 | TESTFILE=Makefile 39 | 40 | (./zcgzip < ${TESTFILE} | gunzip | cmp - ${TESTFILE}) && \ 41 | (gzip < ${TESTFILE} | ./zcgunzip | cmp - ${TESTFILE}) 42 | 43 | # Result of "(cmd) && (cmd)" implicitly becomes result of this script 44 | # and thus the test. 45 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/io/package_info.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | // Author: kenton@google.com (Kenton Varda) 32 | // Based on original Protocol Buffers design by 33 | // Sanjay Ghemawat, Jeff Dean, and others. 34 | // 35 | // This file exists solely to document the google::protobuf::io namespace. 36 | // It is not compiled into anything, but it may be read by an automated 37 | // documentation generator. 38 | 39 | namespace google { 40 | namespace protobuf { 41 | 42 | // Auxiliary classes used for I/O. 43 | // 44 | // The Protocol Buffer library uses the classes in this package to deal with 45 | // I/O and encoding/decoding raw bytes. Most users will not need to 46 | // deal with this package. However, users who want to adapt the system to 47 | // work with their own I/O abstractions -- e.g., to allow Protocol Buffers 48 | // to be read from a different kind of input stream without the need for a 49 | // temporary buffer -- should take a closer look. 50 | namespace io {} 51 | 52 | } // namespace protobuf 53 | } // namespace google 54 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/io/strtod.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | // A locale-independent version of strtod(), used to parse floating 32 | // point default values in .proto files, where the decimal separator 33 | // is always a dot. 34 | 35 | #ifndef GOOGLE_PROTOBUF_IO_STRTOD_H__ 36 | #define GOOGLE_PROTOBUF_IO_STRTOD_H__ 37 | 38 | namespace google { 39 | namespace protobuf { 40 | namespace io { 41 | 42 | // A locale-independent version of the standard strtod(), which always 43 | // uses a dot as the decimal separator. 44 | double NoLocaleStrtod(const char* str, char** endptr); 45 | 46 | // Casts a double value to a float value. If the value is outside of the 47 | // representable range of float, it will be converted to positive or negative 48 | // infinity. 49 | float SafeDoubleToFloat(double value); 50 | 51 | } // namespace io 52 | } // namespace protobuf 53 | } // namespace google 54 | 55 | #endif // GOOGLE_PROTOBUF_IO_STRTOD_H__ 56 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/io/zero_copy_stream.cc: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | // Author: kenton@google.com (Kenton Varda) 32 | // Based on original Protocol Buffers design by 33 | // Sanjay Ghemawat, Jeff Dean, and others. 34 | 35 | #include 36 | 37 | #include 38 | #include 39 | 40 | namespace google { 41 | namespace protobuf { 42 | namespace io { 43 | 44 | 45 | bool ZeroCopyOutputStream::WriteAliasedRaw(const void* /* data */, 46 | int /* size */) { 47 | GOOGLE_LOG(FATAL) << "This ZeroCopyOutputStream doesn't support aliasing. " 48 | "Reaching here usually means a ZeroCopyOutputStream " 49 | "implementation bug."; 50 | return false; 51 | } 52 | 53 | } // namespace io 54 | } // namespace protobuf 55 | } // namespace google 56 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/map.cc: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #include 32 | 33 | namespace google { 34 | namespace protobuf { 35 | namespace internal { 36 | 37 | void* const kGlobalEmptyTable[kGlobalEmptyTableSize] = {nullptr}; 38 | 39 | } // namespace internal 40 | } // namespace protobuf 41 | } // namespace google 42 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/map_test_util.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #ifndef GOOGLE_PROTOBUF_MAP_TEST_UTIL_H__ 32 | #define GOOGLE_PROTOBUF_MAP_TEST_UTIL_H__ 33 | 34 | #include 35 | #include 36 | 37 | #define UNITTEST ::protobuf_unittest 38 | #define BRIDGE_UNITTEST ::google::protobuf::bridge_unittest 39 | 40 | // Must be included after defining UNITTEST, etc. 41 | #include 42 | 43 | #undef UNITTEST 44 | #undef BRIDGE_UNITTEST 45 | 46 | #endif // GOOGLE_PROTOBUF_MAP_TEST_UTIL_H__ 47 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/message_unittest.cc: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | // Author: kenton@google.com (Kenton Varda) 32 | // Based on original Protocol Buffers design by 33 | // Sanjay Ghemawat, Jeff Dean, and others. 34 | 35 | #include 36 | 37 | #define MESSAGE_TEST_NAME MessageTest 38 | #define MESSAGE_FACTORY_TEST_NAME MessageFactoryTest 39 | #define UNITTEST_PACKAGE_NAME "protobuf_unittest" 40 | #define UNITTEST ::protobuf_unittest 41 | #define UNITTEST_IMPORT ::protobuf_unittest_import 42 | 43 | // Must include after the above macros. 44 | // clang-format off 45 | #include 46 | #include 47 | #include 48 | // clang-format on 49 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/metadata.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #ifndef GOOGLE_PROTOBUF_METADATA_H__ 32 | #define GOOGLE_PROTOBUF_METADATA_H__ 33 | 34 | // TODO(b/151117630): Remove this file and all instances where it gets imported. 35 | 36 | #endif // GOOGLE_PROTOBUF_METADATA_H__ 37 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/proto3_lite_unittest.cc: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #include 32 | 33 | #define LITE_TEST_NAME Proto3LiteTest 34 | #define UNITTEST ::proto3_unittest 35 | 36 | // Must include after the above macros. 37 | #include 38 | 39 | // Make extract script happy. 40 | namespace google { 41 | namespace protobuf { 42 | } // namespace protobuf 43 | } // namespace google 44 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/service.cc: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | // Author: kenton@google.com (Kenton Varda) 32 | // Based on original Protocol Buffers design by 33 | // Sanjay Ghemawat, Jeff Dean, and others. 34 | 35 | #include 36 | 37 | namespace google { 38 | namespace protobuf { 39 | 40 | Service::~Service() {} 41 | RpcChannel::~RpcChannel() {} 42 | RpcController::~RpcController() {} 43 | 44 | } // namespace protobuf 45 | } // namespace google 46 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/source_context.proto: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | syntax = "proto3"; 32 | 33 | package google.protobuf; 34 | 35 | option csharp_namespace = "Google.Protobuf.WellKnownTypes"; 36 | option java_package = "com.google.protobuf"; 37 | option java_outer_classname = "SourceContextProto"; 38 | option java_multiple_files = true; 39 | option objc_class_prefix = "GPB"; 40 | option go_package = "google.golang.org/protobuf/types/known/sourcecontextpb"; 41 | 42 | // `SourceContext` represents information about the source of a 43 | // protobuf element, like the file in which it is defined. 44 | message SourceContext { 45 | // The path-qualified name of the .proto file that contained the associated 46 | // protobuf element. For example: `"google/protobuf/source_context.proto"`. 47 | string file_name = 1; 48 | } 49 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/string_member_robber.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #ifndef GOOGLE_PROTOBUF_STRING_MEMBER_ROBBER_H__ 32 | #define GOOGLE_PROTOBUF_STRING_MEMBER_ROBBER_H__ 33 | 34 | #include 35 | #include 36 | 37 | 38 | #endif // GOOGLE_PROTOBUF_STRING_MEMBER_ROBBER_H__ 39 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/stubs/once.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #ifndef GOOGLE_PROTOBUF_STUBS_ONCE_H__ 32 | #define GOOGLE_PROTOBUF_STUBS_ONCE_H__ 33 | 34 | #include 35 | #include 36 | 37 | #include 38 | 39 | namespace google { 40 | namespace protobuf { 41 | namespace internal { 42 | 43 | using once_flag = std::once_flag; 44 | template 45 | void call_once(Args&&... args ) { 46 | std::call_once(std::forward(args)...); 47 | } 48 | 49 | } // namespace internal 50 | } // namespace protobuf 51 | } // namespace google 52 | 53 | #include 54 | 55 | #endif // GOOGLE_PROTOBUF_STUBS_ONCE_H__ 56 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/stubs/statusor.cc: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #include 32 | 33 | #include 34 | 35 | namespace google { 36 | namespace protobuf { 37 | namespace util { 38 | namespace statusor_internal { 39 | 40 | void StatusOrHelper::Crash(const Status& status) { 41 | GOOGLE_LOG(FATAL) << "Attempting to fetch value instead of handling error " 42 | << status.ToString(); 43 | } 44 | 45 | } // namespace statusor_internal 46 | } // namespace util 47 | } // namespace protobuf 48 | } // namespace google 49 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/test_util.cc: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | // Author: kenton@google.com (Kenton Varda) 32 | // Based on original Protocol Buffers design by 33 | // Sanjay Ghemawat, Jeff Dean, and others. 34 | 35 | #ifdef _WIN32 36 | // Verify that #including windows.h does not break anything (e.g. because 37 | // windows.h #defines GetMessage() as a macro). 38 | #include 39 | #endif 40 | 41 | #include 42 | 43 | namespace google { 44 | namespace protobuf { 45 | 46 | } // namespace protobuf 47 | } // namespace google 48 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/testdata/bad_utf8_string: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yoorkin/evoBasic-lang/e3bf66a397d6d8c9db2345e2e1c291c91c3c5a2e/evm/deps/include/google/protobuf/testdata/bad_utf8_string -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/testdata/golden_message: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yoorkin/evoBasic-lang/e3bf66a397d6d8c9db2345e2e1c291c91c3c5a2e/evm/deps/include/google/protobuf/testdata/golden_message -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/testdata/golden_message_maps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yoorkin/evoBasic-lang/e3bf66a397d6d8c9db2345e2e1c291c91c3c5a2e/evm/deps/include/google/protobuf/testdata/golden_message_maps -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/testdata/golden_message_oneof_implemented: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yoorkin/evoBasic-lang/e3bf66a397d6d8c9db2345e2e1c291c91c3c5a2e/evm/deps/include/google/protobuf/testdata/golden_message_oneof_implemented -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/testdata/golden_message_proto3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yoorkin/evoBasic-lang/e3bf66a397d6d8c9db2345e2e1c291c91c3c5a2e/evm/deps/include/google/protobuf/testdata/golden_message_proto3 -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/testdata/golden_packed_fields_message: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yoorkin/evoBasic-lang/e3bf66a397d6d8c9db2345e2e1c291c91c3c5a2e/evm/deps/include/google/protobuf/testdata/golden_packed_fields_message -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/testdata/map_test_data.txt: -------------------------------------------------------------------------------- 1 | map_int32_int32 { 2 | key: 0 3 | value: 0 4 | } 5 | map_int32_int32 { 6 | key: 1 7 | value: 1 8 | } 9 | map_int64_int64 { 10 | key: 0 11 | value: 0 12 | } 13 | map_int64_int64 { 14 | key: 1 15 | value: 1 16 | } 17 | map_uint32_uint32 { 18 | key: 0 19 | value: 0 20 | } 21 | map_uint32_uint32 { 22 | key: 1 23 | value: 1 24 | } 25 | map_uint64_uint64 { 26 | key: 0 27 | value: 0 28 | } 29 | map_uint64_uint64 { 30 | key: 1 31 | value: 1 32 | } 33 | map_sint32_sint32 { 34 | key: 0 35 | value: 0 36 | } 37 | map_sint32_sint32 { 38 | key: 1 39 | value: 1 40 | } 41 | map_sint64_sint64 { 42 | key: 0 43 | value: 0 44 | } 45 | map_sint64_sint64 { 46 | key: 1 47 | value: 1 48 | } 49 | map_fixed32_fixed32 { 50 | key: 0 51 | value: 0 52 | } 53 | map_fixed32_fixed32 { 54 | key: 1 55 | value: 1 56 | } 57 | map_fixed64_fixed64 { 58 | key: 0 59 | value: 0 60 | } 61 | map_fixed64_fixed64 { 62 | key: 1 63 | value: 1 64 | } 65 | map_sfixed32_sfixed32 { 66 | key: 0 67 | value: 0 68 | } 69 | map_sfixed32_sfixed32 { 70 | key: 1 71 | value: 1 72 | } 73 | map_sfixed64_sfixed64 { 74 | key: 0 75 | value: 0 76 | } 77 | map_sfixed64_sfixed64 { 78 | key: 1 79 | value: 1 80 | } 81 | map_int32_float { 82 | key: 0 83 | value: 0 84 | } 85 | map_int32_float { 86 | key: 1 87 | value: 1 88 | } 89 | map_int32_double { 90 | key: 0 91 | value: 0 92 | } 93 | map_int32_double { 94 | key: 1 95 | value: 1 96 | } 97 | map_bool_bool { 98 | key: false 99 | value: false 100 | } 101 | map_bool_bool { 102 | key: true 103 | value: true 104 | } 105 | map_string_string { 106 | key: "0" 107 | value: "0" 108 | } 109 | map_string_string { 110 | key: "1" 111 | value: "1" 112 | } 113 | map_int32_bytes { 114 | key: 0 115 | value: "0" 116 | } 117 | map_int32_bytes { 118 | key: 1 119 | value: "1" 120 | } 121 | map_int32_enum { 122 | key: 0 123 | value: MAP_ENUM_BAR 124 | } 125 | map_int32_enum { 126 | key: 1 127 | value: MAP_ENUM_BAZ 128 | } 129 | map_int32_foreign_message { 130 | key: 0 131 | value { 132 | c: 0 133 | } 134 | } 135 | map_int32_foreign_message { 136 | key: 1 137 | value { 138 | c: 1 139 | } 140 | } 141 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/unittest_arena.proto: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | syntax = "proto2"; 32 | 33 | package proto2_arena_unittest; 34 | 35 | option cc_enable_arenas = true; 36 | 37 | message NestedMessage { 38 | optional int32 d = 1; 39 | } 40 | 41 | message ArenaMessage { 42 | repeated NestedMessage repeated_nested_message = 1; 43 | } 44 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/unittest_drop_unknown_fields.proto: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | syntax = "proto3"; 32 | 33 | package unittest_drop_unknown_fields; 34 | 35 | option objc_class_prefix = "DropUnknowns"; 36 | option csharp_namespace = "Google.Protobuf.TestProtos"; 37 | 38 | message Foo { 39 | enum NestedEnum { 40 | FOO = 0; 41 | BAR = 1; 42 | BAZ = 2; 43 | } 44 | int32 int32_value = 1; 45 | NestedEnum enum_value = 2; 46 | } 47 | 48 | message FooWithExtraFields { 49 | enum NestedEnum { 50 | FOO = 0; 51 | BAR = 1; 52 | BAZ = 2; 53 | MOO = 3; 54 | } 55 | int32 int32_value = 1; 56 | NestedEnum enum_value = 2; 57 | int32 extra_int32_value = 3; 58 | } 59 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/unittest_embed_optimize_for.proto: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | // Author: kenton@google.com (Kenton Varda) 32 | // Based on original Protocol Buffers design by 33 | // Sanjay Ghemawat, Jeff Dean, and others. 34 | // 35 | // A proto file which imports a proto file that uses optimize_for = CODE_SIZE. 36 | 37 | syntax = "proto2"; 38 | import "google/protobuf/unittest_optimize_for.proto"; 39 | 40 | package protobuf_unittest; 41 | 42 | // We optimize for speed here, but we are importing a proto that is optimized 43 | // for code size. 44 | option optimize_for = SPEED; 45 | 46 | message TestEmbedOptimizedForSize { 47 | // Test that embedding a message which has optimize_for = CODE_SIZE into 48 | // one optimized for speed works. 49 | optional TestOptimizedForSize optional_message = 1; 50 | repeated TestOptimizedForSize repeated_message = 2; 51 | } 52 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/unittest_empty.proto: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | // Author: kenton@google.com (Kenton Varda) 32 | // Based on original Protocol Buffers design by 33 | // Sanjay Ghemawat, Jeff Dean, and others. 34 | // 35 | // This file intentionally left blank. (At one point this wouldn't compile 36 | // correctly.) 37 | 38 | syntax = "proto2"; 39 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/unittest_import.proto: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | // Author: kenton@google.com (Kenton Varda) 32 | // Based on original Protocol Buffers design by 33 | // Sanjay Ghemawat, Jeff Dean, and others. 34 | // 35 | // A proto file which is imported by unittest.proto to test importing. 36 | 37 | syntax = "proto2"; 38 | 39 | // We don't put this in a package within proto2 because we need to make sure 40 | // that the generated code doesn't depend on being in the proto2 namespace. 41 | // In test_util.h we do 42 | // "using namespace unittest_import = protobuf_unittest_import". 43 | package protobuf_unittest_import; 44 | 45 | option optimize_for = SPEED; 46 | option cc_enable_arenas = true; 47 | 48 | // Exercise the java_package option. 49 | option java_package = "com.google.protobuf.test"; 50 | 51 | // Do not set a java_outer_classname here to verify that Proto2 works without 52 | // one. 53 | 54 | // Test public import 55 | import public "google/protobuf/unittest_import_public.proto"; 56 | 57 | message ImportMessage { 58 | optional int32 d = 1; 59 | } 60 | 61 | enum ImportEnum { 62 | IMPORT_FOO = 7; 63 | IMPORT_BAR = 8; 64 | IMPORT_BAZ = 9; 65 | } 66 | 67 | 68 | // To use an enum in a map, it must has the first value as 0. 69 | enum ImportEnumForMap { 70 | UNKNOWN = 0; 71 | FOO = 1; 72 | BAR = 2; 73 | } 74 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/unittest_import_lite.proto: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | // Author: kenton@google.com (Kenton Varda) 32 | // 33 | // This is like unittest_import.proto but with optimize_for = LITE_RUNTIME. 34 | 35 | syntax = "proto2"; 36 | package protobuf_unittest_import; 37 | 38 | option optimize_for = LITE_RUNTIME; 39 | 40 | option java_package = "com.google.protobuf"; 41 | 42 | import public "google/protobuf/unittest_import_public_lite.proto"; 43 | 44 | message ImportMessageLite { 45 | optional int32 d = 1; 46 | } 47 | 48 | enum ImportEnumLite { 49 | IMPORT_LITE_FOO = 7; 50 | IMPORT_LITE_BAR = 8; 51 | IMPORT_LITE_BAZ = 9; 52 | } 53 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/unittest_import_public.proto: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | // Author: liujisi@google.com (Pherl Liu) 32 | 33 | syntax = "proto2"; 34 | 35 | package protobuf_unittest_import; 36 | 37 | option java_package = "com.google.protobuf.test"; 38 | 39 | message PublicImportMessage { 40 | optional int32 e = 1; 41 | } 42 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/unittest_import_public_lite.proto: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | // Author: liujisi@google.com (Pherl Liu) 32 | 33 | syntax = "proto2"; 34 | 35 | package protobuf_unittest_import; 36 | 37 | option optimize_for = LITE_RUNTIME; 38 | 39 | option java_package = "com.google.protobuf"; 40 | 41 | message PublicImportMessageLite { 42 | optional int32 e = 1; 43 | } 44 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/unittest_lite_imports_nonlite.proto: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | // Author: kenton@google.com (Kenton Varda) 32 | // 33 | // Tests that a "lite" message can import a regular message. 34 | 35 | syntax = "proto2"; 36 | package protobuf_unittest; 37 | 38 | import "google/protobuf/unittest.proto"; 39 | 40 | option optimize_for = LITE_RUNTIME; 41 | 42 | message TestLiteImportsNonlite { 43 | optional TestAllTypes message = 1; 44 | 45 | // Verifies that transitive required fields generates valid code. 46 | optional TestRequired message_with_required = 2; 47 | } 48 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/unittest_mset_wire_format.proto: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | // Author: kenton@google.com (Kenton Varda) 32 | // Based on original Protocol Buffers design by 33 | // Sanjay Ghemawat, Jeff Dean, and others. 34 | // 35 | // This file contains messages for testing message_set_wire_format. 36 | 37 | syntax = "proto2"; 38 | package proto2_wireformat_unittest; 39 | 40 | option cc_enable_arenas = true; 41 | option optimize_for = SPEED; 42 | option csharp_namespace = "Google.ProtocolBuffers.TestProtos"; 43 | 44 | // A message with message_set_wire_format. 45 | message TestMessageSet { 46 | option message_set_wire_format = true; 47 | extensions 4 to max; 48 | } 49 | 50 | message TestMessageSetWireFormatContainer { 51 | optional TestMessageSet message_set = 1; 52 | } 53 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/unittest_no_generic_services.proto: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | // Author: kenton@google.com (Kenton Varda) 32 | 33 | syntax = "proto2"; 34 | 35 | package protobuf_unittest.no_generic_services_test; 36 | 37 | 38 | // *_generic_services are false by default. 39 | 40 | message TestMessage { 41 | optional int32 a = 1; 42 | extensions 1000 to max; 43 | } 44 | 45 | enum TestEnum { FOO = 1; } 46 | 47 | extend TestMessage { 48 | optional int32 test_extension = 1000; 49 | } 50 | 51 | service TestService { 52 | rpc Foo(TestMessage) returns (TestMessage); 53 | } 54 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/unittest_optimize_for.proto: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | // Author: kenton@google.com (Kenton Varda) 32 | // Based on original Protocol Buffers design by 33 | // Sanjay Ghemawat, Jeff Dean, and others. 34 | // 35 | // A proto file which uses optimize_for = CODE_SIZE. 36 | 37 | syntax = "proto2"; 38 | import "google/protobuf/unittest.proto"; 39 | 40 | package protobuf_unittest; 41 | 42 | option optimize_for = CODE_SIZE; 43 | 44 | message TestOptimizedForSize { 45 | optional int32 i = 1; 46 | optional ForeignMessage msg = 19; 47 | 48 | extensions 1000 to max; 49 | 50 | extend TestOptimizedForSize { 51 | optional int32 test_extension = 1234; 52 | optional TestRequiredOptimizedForSize test_extension2 = 1235; 53 | } 54 | 55 | oneof foo { 56 | int32 integer_field = 2; 57 | string string_field = 3; 58 | } 59 | } 60 | 61 | message TestRequiredOptimizedForSize { 62 | required int32 x = 1; 63 | } 64 | 65 | message TestOptionalOptimizedForSize { 66 | optional TestRequiredOptimizedForSize o = 1; 67 | } 68 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/unittest_preserve_unknown_enum.proto: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | syntax = "proto3"; 32 | 33 | package proto3_preserve_unknown_enum_unittest; 34 | option objc_class_prefix = "UnknownEnums"; 35 | 36 | option csharp_namespace = "Google.Protobuf.TestProtos"; 37 | 38 | enum MyEnum { 39 | FOO = 0; 40 | BAR = 1; 41 | BAZ = 2; 42 | } 43 | 44 | enum MyEnumPlusExtra { 45 | E_FOO = 0; 46 | E_BAR = 1; 47 | E_BAZ = 2; 48 | E_EXTRA = 3; 49 | } 50 | 51 | message MyMessage { 52 | MyEnum e = 1; 53 | repeated MyEnum repeated_e = 2; 54 | repeated MyEnum repeated_packed_e = 3 [packed=true]; 55 | repeated MyEnumPlusExtra repeated_packed_unexpected_e = 4; // not packed 56 | oneof o { 57 | MyEnum oneof_e_1 = 5; 58 | MyEnum oneof_e_2 = 6; 59 | } 60 | } 61 | 62 | message MyMessagePlusExtra { 63 | MyEnumPlusExtra e = 1; 64 | repeated MyEnumPlusExtra repeated_e = 2; 65 | repeated MyEnumPlusExtra repeated_packed_e = 3 [packed=true]; 66 | repeated MyEnumPlusExtra repeated_packed_unexpected_e = 4 [packed=true]; 67 | oneof o { 68 | MyEnumPlusExtra oneof_e_1 = 5; 69 | MyEnumPlusExtra oneof_e_2 = 6; 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/unittest_preserve_unknown_enum2.proto: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | syntax = "proto2"; 32 | 33 | package proto2_preserve_unknown_enum_unittest; 34 | 35 | enum MyEnum { 36 | FOO = 0; 37 | BAR = 1; 38 | BAZ = 2; 39 | } 40 | 41 | message MyMessage { 42 | optional MyEnum e = 1; 43 | repeated MyEnum repeated_e = 2; 44 | repeated MyEnum repeated_packed_e = 3 [packed=true]; 45 | repeated MyEnum repeated_packed_unexpected_e = 4; // not packed 46 | oneof o { 47 | MyEnum oneof_e_1 = 5; 48 | MyEnum oneof_e_2 = 6; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/util/internal/error_listener.cc: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #include 32 | 33 | namespace google { 34 | namespace protobuf { 35 | namespace util { 36 | namespace converter { 37 | 38 | 39 | } // namespace converter 40 | } // namespace util 41 | } // namespace protobuf 42 | } // namespace google 43 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/util/internal/location_tracker.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #ifndef GOOGLE_PROTOBUF_UTIL_INTERNAL_LOCATION_TRACKER_H__ 32 | #define GOOGLE_PROTOBUF_UTIL_INTERNAL_LOCATION_TRACKER_H__ 33 | 34 | #include 35 | 36 | #include 37 | 38 | // Must be included last. 39 | #include 40 | 41 | namespace google { 42 | namespace protobuf { 43 | namespace util { 44 | namespace converter { 45 | 46 | // LocationTrackerInterface is an interface for classes that track 47 | // the location information for the purpose of error reporting. 48 | class PROTOBUF_EXPORT LocationTrackerInterface { 49 | public: 50 | virtual ~LocationTrackerInterface() {} 51 | 52 | // Returns the object location as human readable string. 53 | virtual std::string ToString() const = 0; 54 | 55 | protected: 56 | LocationTrackerInterface() {} 57 | 58 | private: 59 | // Please do not add any data members to this class. 60 | GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(LocationTrackerInterface); 61 | }; 62 | 63 | } // namespace converter 64 | } // namespace util 65 | } // namespace protobuf 66 | } // namespace google 67 | 68 | #include 69 | 70 | #endif // GOOGLE_PROTOBUF_UTIL_INTERNAL_LOCATION_TRACKER_H__ 71 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/util/internal/object_location_tracker.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #ifndef GOOGLE_PROTOBUF_UTIL_INTERNAL_OBJECT_LOCATION_TRACKER_H__ 32 | #define GOOGLE_PROTOBUF_UTIL_INTERNAL_OBJECT_LOCATION_TRACKER_H__ 33 | 34 | #include 35 | 36 | #include 37 | #include 38 | 39 | namespace google { 40 | namespace protobuf { 41 | namespace util { 42 | namespace converter { 43 | 44 | // An empty concrete implementation of LocationTrackerInterface. 45 | class ObjectLocationTracker : public LocationTrackerInterface { 46 | public: 47 | // Creates an empty location tracker. 48 | ObjectLocationTracker() {} 49 | 50 | ~ObjectLocationTracker() override {} 51 | 52 | // Returns empty because nothing is tracked. 53 | std::string ToString() const override { return ""; } 54 | 55 | private: 56 | GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ObjectLocationTracker); 57 | }; 58 | 59 | } // namespace converter 60 | } // namespace util 61 | } // namespace protobuf 62 | } // namespace google 63 | 64 | #endif // GOOGLE_PROTOBUF_UTIL_INTERNAL_OBJECT_LOCATION_TRACKER_H__ 65 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/util/internal/testdata/default_value_test.proto: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | syntax = "proto3"; 32 | 33 | package proto_util_converter.testing; 34 | 35 | message DefaultValueTest { 36 | double double_value = 1; 37 | repeated double repeated_double = 2; 38 | float float_value = 3; 39 | int64 int64_value = 5; 40 | uint64 uint64_value = 7; 41 | int32 int32_value = 9; 42 | uint32 uint32_value = 11; 43 | bool bool_value = 13; 44 | string string_value = 15; 45 | bytes bytes_value = 17 [ctype = CORD]; 46 | 47 | enum EnumDefault { 48 | ENUM_FIRST = 0; 49 | ENUM_SECOND = 1; 50 | ENUM_THIRD = 2; 51 | } 52 | EnumDefault enum_value = 18; 53 | } 54 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/util/internal/testdata/field_mask.proto: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | syntax = "proto3"; 32 | 33 | package proto_util_converter.testing; 34 | 35 | import "google/protobuf/field_mask.proto"; 36 | 37 | message NestedFieldMask { 38 | string data = 1; 39 | google.protobuf.FieldMask single_mask = 2; 40 | repeated google.protobuf.FieldMask repeated_mask = 3; 41 | } 42 | 43 | message FieldMaskTest { 44 | string id = 1; 45 | google.protobuf.FieldMask single_mask = 2; 46 | repeated google.protobuf.FieldMask repeated_mask = 3; 47 | repeated NestedFieldMask nested_mask = 4; 48 | } 49 | 50 | message FieldMaskTestCases { 51 | FieldMaskWrapper single_mask = 1; 52 | FieldMaskWrapper multiple_mask = 2; 53 | FieldMaskWrapper snake_camel = 3; 54 | FieldMaskWrapper empty_field = 4; 55 | FieldMaskWrapper apiary_format1 = 5; 56 | FieldMaskWrapper apiary_format2 = 6; 57 | FieldMaskWrapper apiary_format3 = 7; 58 | FieldMaskWrapper map_key1 = 8; 59 | FieldMaskWrapper map_key2 = 9; 60 | FieldMaskWrapper map_key3 = 10; 61 | FieldMaskWrapper map_key4 = 11; 62 | FieldMaskWrapper map_key5 = 12; 63 | } 64 | 65 | message FieldMaskWrapper { 66 | google.protobuf.FieldMask mask = 1; 67 | } 68 | 69 | service FieldMaskTestService { 70 | rpc Call(FieldMaskTestCases) returns (FieldMaskTestCases); 71 | } 72 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/util/internal/testdata/oneofs.proto: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | // Proto to test proto3 oneofs. 32 | syntax = "proto3"; 33 | 34 | package proto_util_converter.testing.oneofs; 35 | 36 | import "google/protobuf/any.proto"; 37 | import "google/protobuf/struct.proto"; 38 | import "google/protobuf/timestamp.proto"; 39 | 40 | message OneOfsRequest { 41 | string value = 1; 42 | oneof data { 43 | string str_data = 2; 44 | int32 int_data = 3; 45 | // Simple message 46 | Data message_data = 4; 47 | MoreData more_data = 5; 48 | // Well known types 49 | google.protobuf.Struct struct_data = 6; 50 | google.protobuf.Value value_data = 7; 51 | google.protobuf.ListValue list_value_data = 8; 52 | google.protobuf.Timestamp ts_data = 9; 53 | } 54 | google.protobuf.Any any_data = 19; 55 | } 56 | 57 | message RequestWithSimpleOneof { 58 | string value = 1; 59 | oneof data { 60 | string str_data = 2; 61 | int32 int_data = 3; 62 | Data message_data = 4; 63 | MoreData more_data = 5; 64 | } 65 | } 66 | 67 | message Data { 68 | int32 data_value = 1; 69 | } 70 | 71 | message MoreData { 72 | string str_value = 1; 73 | } 74 | 75 | message Response { 76 | string value = 1; 77 | } 78 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/util/internal/testdata/proto3.proto: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | syntax = "proto3"; 32 | 33 | package proto_util_converter.testing; 34 | 35 | message Proto3Message { 36 | enum NestedEnum { 37 | FOO = 0; 38 | BAR = 1; 39 | BAZ = 2; 40 | } 41 | NestedEnum enum_value = 1; 42 | } 43 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/util/package_info.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | // This file exists solely to document the google::protobuf::util namespace. 32 | // It is not compiled into anything, but it may be read by an automated 33 | // documentation generator. 34 | 35 | namespace google { 36 | 37 | namespace protobuf { 38 | 39 | // Utility classes. 40 | // 41 | // This package contains various utilities for message comparison, JSON 42 | // conversion, well known types, etc. 43 | namespace util {} 44 | 45 | } // namespace protobuf 46 | } // namespace google 47 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/util/type_resolver_util.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | // Defines utilities for the TypeResolver. 32 | 33 | #ifndef GOOGLE_PROTOBUF_UTIL_TYPE_RESOLVER_UTIL_H__ 34 | #define GOOGLE_PROTOBUF_UTIL_TYPE_RESOLVER_UTIL_H__ 35 | 36 | #include 37 | 38 | namespace google { 39 | namespace protobuf { 40 | class DescriptorPool; 41 | namespace util { 42 | class TypeResolver; 43 | 44 | // Must be included last. 45 | #include 46 | 47 | // Creates a TypeResolver that serves type information in the given descriptor 48 | // pool. Caller takes ownership of the returned TypeResolver. 49 | PROTOBUF_EXPORT TypeResolver* NewTypeResolverForDescriptorPool( 50 | const std::string& url_prefix, const DescriptorPool* pool); 51 | 52 | } // namespace util 53 | } // namespace protobuf 54 | } // namespace google 55 | 56 | #include 57 | 58 | #endif // GOOGLE_PROTOBUF_UTIL_TYPE_RESOLVER_UTIL_H__ 59 | -------------------------------------------------------------------------------- /evm/deps/include/google/protobuf/well_known_types_unittest.cc: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | #include 31 | 32 | #include 33 | #include 34 | #include 35 | #include 36 | 37 | namespace google { 38 | namespace protobuf { 39 | namespace { 40 | 41 | // This test only checks whether well-known types are included in protobuf 42 | // runtime library. The test passes if it compiles. 43 | TEST(WellKnownTypesTest, AllKnownTypesAreIncluded) { 44 | protobuf_unittest::TestWellKnownTypes message; 45 | EXPECT_EQ(0, message.any_field().ByteSize()); 46 | EXPECT_EQ(0, message.api_field().ByteSize()); 47 | EXPECT_EQ(0, message.duration_field().ByteSize()); 48 | EXPECT_EQ(0, message.empty_field().ByteSize()); 49 | EXPECT_EQ(0, message.field_mask_field().ByteSize()); 50 | EXPECT_EQ(0, message.source_context_field().ByteSize()); 51 | EXPECT_EQ(0, message.struct_field().ByteSize()); 52 | EXPECT_EQ(0, message.timestamp_field().ByteSize()); 53 | EXPECT_EQ(0, message.type_field().ByteSize()); 54 | EXPECT_EQ(0, message.int32_field().ByteSize()); 55 | } 56 | 57 | } // namespace 58 | 59 | } // namespace protobuf 60 | } // namespace google 61 | -------------------------------------------------------------------------------- /evm/deps/include/unicode/dbbi.h: -------------------------------------------------------------------------------- 1 | // © 2016 and later: Unicode, Inc. and others. 2 | // License & terms of use: http://www.unicode.org/copyright.html 3 | /* 4 | ********************************************************************** 5 | * Copyright (C) 1999-2006,2013 IBM Corp. All rights reserved. 6 | ********************************************************************** 7 | * Date Name Description 8 | * 12/1/99 rgillam Complete port from Java. 9 | * 01/13/2000 helena Added UErrorCode to ctors. 10 | ********************************************************************** 11 | */ 12 | 13 | #ifndef DBBI_H 14 | #define DBBI_H 15 | 16 | #include "unicode/utypes.h" 17 | 18 | #if U_SHOW_CPLUSPLUS_API 19 | 20 | #include "unicode/rbbi.h" 21 | 22 | #if !UCONFIG_NO_BREAK_ITERATION 23 | 24 | /** 25 | * \file 26 | * \brief C++ API: Dictionary Based Break Iterator 27 | */ 28 | 29 | U_NAMESPACE_BEGIN 30 | 31 | #ifndef U_HIDE_DEPRECATED_API 32 | /** 33 | * An obsolete subclass of RuleBasedBreakIterator. Handling of dictionary- 34 | * based break iteration has been folded into the base class. This class 35 | * is deprecated as of ICU 3.6. 36 | * @deprecated ICU 3.6 37 | */ 38 | typedef RuleBasedBreakIterator DictionaryBasedBreakIterator; 39 | 40 | #endif /* U_HIDE_DEPRECATED_API */ 41 | 42 | U_NAMESPACE_END 43 | 44 | #endif /* #if !UCONFIG_NO_BREAK_ITERATION */ 45 | 46 | #endif /* U_SHOW_CPLUSPLUS_API */ 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /evm/deps/include/unicode/enumset.h: -------------------------------------------------------------------------------- 1 | // © 2016 and later: Unicode, Inc. and others. 2 | // License & terms of use: http://www.unicode.org/copyright.html 3 | /* 4 | ****************************************************************************** 5 | * 6 | * Copyright (C) 2012,2014 International Business Machines 7 | * Corporation and others. All Rights Reserved. 8 | * 9 | ****************************************************************************** 10 | */ 11 | 12 | /** 13 | * \file 14 | * \brief C++: internal template EnumSet<> 15 | */ 16 | 17 | #ifndef ENUMSET_H 18 | #define ENUMSET_H 19 | 20 | #include "unicode/utypes.h" 21 | 22 | #if U_SHOW_CPLUSPLUS_API 23 | 24 | U_NAMESPACE_BEGIN 25 | 26 | /* Can't use #ifndef U_HIDE_INTERNAL_API for the entire EnumSet class, needed in .h file declarations */ 27 | /** 28 | * enum bitset for boolean fields. Similar to Java EnumSet<>. 29 | * Needs to range check. Used for private instance variables. 30 | * @internal 31 | * \cond 32 | */ 33 | template 34 | class EnumSet { 35 | public: 36 | inline EnumSet() : fBools(0) {} 37 | inline EnumSet(const EnumSet& other) : fBools(other.fBools) {} 38 | inline ~EnumSet() {} 39 | #ifndef U_HIDE_INTERNAL_API 40 | inline void clear() { fBools=0; } 41 | inline void add(T toAdd) { set(toAdd, 1); } 42 | inline void remove(T toRemove) { set(toRemove, 0); } 43 | inline int32_t contains(T toCheck) const { return get(toCheck); } 44 | inline void set(T toSet, int32_t v) { fBools=(fBools&(~flag(toSet)))|(v?(flag(toSet)):0); } 45 | inline int32_t get(T toCheck) const { return (fBools & flag(toCheck))?1:0; } 46 | inline UBool isValidEnum(T toCheck) const { return (toCheck>=minValue&&toCheck& operator=(const EnumSet& other) { 49 | fBools = other.fBools; 50 | return *this; 51 | } 52 | 53 | inline uint32_t getAll() const { 54 | return fBools; 55 | } 56 | #endif /* U_HIDE_INTERNAL_API */ 57 | 58 | private: 59 | inline uint32_t flag(T toCheck) const { return (1<<(toCheck-minValue)); } 60 | private: 61 | uint32_t fBools; 62 | }; 63 | 64 | /** \endcond */ 65 | 66 | U_NAMESPACE_END 67 | 68 | #endif /* U_SHOW_CPLUSPLUS_API */ 69 | #endif /* ENUMSET_H */ 70 | -------------------------------------------------------------------------------- /evm/deps/include/unicode/icudataver.h: -------------------------------------------------------------------------------- 1 | // © 2016 and later: Unicode, Inc. and others. 2 | // License & terms of use: http://www.unicode.org/copyright.html 3 | /* 4 | ****************************************************************************** 5 | * 6 | * Copyright (C) 2009-2013, International Business Machines 7 | * Corporation and others. All Rights Reserved. 8 | * 9 | ****************************************************************************** 10 | */ 11 | 12 | 13 | /** 14 | * \file 15 | * \brief C API: access to ICU Data Version number 16 | */ 17 | 18 | #ifndef __ICU_DATA_VER_H__ 19 | #define __ICU_DATA_VER_H__ 20 | 21 | #include "unicode/utypes.h" 22 | 23 | /** 24 | * @stable ICU 49 25 | */ 26 | #define U_ICU_VERSION_BUNDLE "icuver" 27 | 28 | /** 29 | * @stable ICU 49 30 | */ 31 | #define U_ICU_DATA_KEY "DataVersion" 32 | 33 | /** 34 | * Retrieves the data version from icuver and stores it in dataVersionFillin. 35 | * 36 | * @param dataVersionFillin icuver data version information to be filled in if not-null 37 | * @param status stores the error code from the calls to resource bundle 38 | * 39 | * @stable ICU 49 40 | */ 41 | U_CAPI void U_EXPORT2 u_getDataVersion(UVersionInfo dataVersionFillin, UErrorCode *status); 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /evm/deps/include/unicode/nounit.h: -------------------------------------------------------------------------------- 1 | // © 2017 and later: Unicode, Inc. and others. 2 | // License & terms of use: http://www.unicode.org/copyright.html 3 | /* 4 | ******************************************************************************* 5 | * Copyright (C) 2009-2017, International Business Machines Corporation, * 6 | * Google, and others. All Rights Reserved. * 7 | ******************************************************************************* 8 | */ 9 | 10 | #ifndef __NOUNIT_H__ 11 | #define __NOUNIT_H__ 12 | 13 | #include "unicode/utypes.h" 14 | 15 | #if U_SHOW_CPLUSPLUS_API 16 | 17 | #if !UCONFIG_NO_FORMATTING 18 | 19 | #include "unicode/measunit.h" 20 | 21 | /** 22 | * \file 23 | * \brief C++ API: units for percent and permille 24 | */ 25 | 26 | U_NAMESPACE_BEGIN 27 | 28 | /** 29 | * Dimensionless unit for percent and permille. 30 | * Prior to ICU 68, this namespace was a class with the same name. 31 | * @see NumberFormatter 32 | * @stable ICU 68 33 | */ 34 | namespace NoUnit { 35 | /** 36 | * Returns an instance for the base unit (dimensionless and no scaling). 37 | * 38 | * Prior to ICU 68, this function returned a NoUnit by value. 39 | * 40 | * Since ICU 68, this function returns the same value as the default MeasureUnit constructor. 41 | * 42 | * @return a MeasureUnit instance 43 | * @stable ICU 68 44 | */ 45 | static inline MeasureUnit U_EXPORT2 base() { 46 | return MeasureUnit(); 47 | } 48 | 49 | /** 50 | * Returns an instance for percent, or 1/100 of a base unit. 51 | * 52 | * Prior to ICU 68, this function returned a NoUnit by value. 53 | * 54 | * Since ICU 68, this function returns the same value as MeasureUnit::getPercent(). 55 | * 56 | * @return a MeasureUnit instance 57 | * @stable ICU 68 58 | */ 59 | static inline MeasureUnit U_EXPORT2 percent() { 60 | return MeasureUnit::getPercent(); 61 | } 62 | 63 | /** 64 | * Returns an instance for permille, or 1/1000 of a base unit. 65 | * 66 | * Prior to ICU 68, this function returned a NoUnit by value. 67 | * 68 | * Since ICU 68, this function returns the same value as MeasureUnit::getPermille(). 69 | * 70 | * @return a MeasureUnit instance 71 | * @stable ICU 68 72 | */ 73 | static inline MeasureUnit U_EXPORT2 permille() { 74 | return MeasureUnit::getPermille(); 75 | } 76 | } 77 | 78 | U_NAMESPACE_END 79 | 80 | #endif /* #if !UCONFIG_NO_FORMATTING */ 81 | 82 | #endif /* U_SHOW_CPLUSPLUS_API */ 83 | 84 | #endif // __NOUNIT_H__ 85 | //eof 86 | // 87 | -------------------------------------------------------------------------------- /evm/deps/include/unicode/std_string.h: -------------------------------------------------------------------------------- 1 | // © 2016 and later: Unicode, Inc. and others. 2 | // License & terms of use: http://www.unicode.org/copyright.html 3 | /* 4 | ******************************************************************************* 5 | * 6 | * Copyright (C) 2009-2014, International Business Machines 7 | * Corporation and others. All Rights Reserved. 8 | * 9 | ******************************************************************************* 10 | * file name: std_string.h 11 | * encoding: UTF-8 12 | * tab size: 8 (not used) 13 | * indentation:4 14 | * 15 | * created on: 2009feb19 16 | * created by: Markus W. Scherer 17 | */ 18 | 19 | #ifndef __STD_STRING_H__ 20 | #define __STD_STRING_H__ 21 | 22 | /** 23 | * \file 24 | * \brief C++ API: Central ICU header for including the C++ standard <string> 25 | * header and for related definitions. 26 | */ 27 | 28 | #include "unicode/utypes.h" 29 | 30 | #if U_SHOW_CPLUSPLUS_API 31 | 32 | // Workaround for a libstdc++ bug before libstdc++4.6 (2011). 33 | // https://bugs.llvm.org/show_bug.cgi?id=13364 34 | #if defined(__GLIBCXX__) 35 | namespace std { class type_info; } 36 | #endif 37 | #include 38 | 39 | #endif /* U_SHOW_CPLUSPLUS_API */ 40 | 41 | #endif // __STD_STRING_H__ 42 | -------------------------------------------------------------------------------- /evm/deps/include/unicode/ugender.h: -------------------------------------------------------------------------------- 1 | // © 2016 and later: Unicode, Inc. and others. 2 | // License & terms of use: http://www.unicode.org/copyright.html 3 | /* 4 | ***************************************************************************************** 5 | * Copyright (C) 2010-2013, International Business Machines 6 | * Corporation and others. All Rights Reserved. 7 | ***************************************************************************************** 8 | */ 9 | 10 | #ifndef UGENDER_H 11 | #define UGENDER_H 12 | 13 | #include "unicode/utypes.h" 14 | 15 | #if !UCONFIG_NO_FORMATTING 16 | 17 | #if U_SHOW_CPLUSPLUS_API 18 | #include "unicode/localpointer.h" 19 | #endif // U_SHOW_CPLUSPLUS_API 20 | 21 | /** 22 | * \file 23 | * \brief C API: The purpose of this API is to compute the gender of a list as a 24 | * whole given the gender of each element. 25 | * 26 | */ 27 | 28 | /** 29 | * Genders 30 | * @stable ICU 50 31 | */ 32 | enum UGender { 33 | /** 34 | * Male gender. 35 | * @stable ICU 50 36 | */ 37 | UGENDER_MALE, 38 | /** 39 | * Female gender. 40 | * @stable ICU 50 41 | */ 42 | UGENDER_FEMALE, 43 | /** 44 | * Neutral gender. 45 | * @stable ICU 50 46 | */ 47 | UGENDER_OTHER 48 | }; 49 | /** 50 | * @stable ICU 50 51 | */ 52 | typedef enum UGender UGender; 53 | 54 | struct UGenderInfo; 55 | /** 56 | * Opaque UGenderInfo object for use in C programs. 57 | * @stable ICU 50 58 | */ 59 | typedef struct UGenderInfo UGenderInfo; 60 | 61 | /** 62 | * Opens a new UGenderInfo object given locale. 63 | * @param locale The locale for which the rules are desired. 64 | * @param status UErrorCode pointer 65 | * @return A UGenderInfo for the specified locale, or NULL if an error occurred. 66 | * @stable ICU 50 67 | */ 68 | U_CAPI const UGenderInfo* U_EXPORT2 69 | ugender_getInstance(const char *locale, UErrorCode *status); 70 | 71 | 72 | /** 73 | * Given a list, returns the gender of the list as a whole. 74 | * @param genderInfo pointer that ugender_getInstance returns. 75 | * @param genders the gender of each element in the list. 76 | * @param size the size of the list. 77 | * @param status A pointer to a UErrorCode to receive any errors. 78 | * @return The gender of the list. 79 | * @stable ICU 50 80 | */ 81 | U_CAPI UGender U_EXPORT2 82 | ugender_getListGender(const UGenderInfo* genderInfo, const UGender *genders, int32_t size, UErrorCode *status); 83 | 84 | #endif /* #if !UCONFIG_NO_FORMATTING */ 85 | 86 | #endif 87 | -------------------------------------------------------------------------------- /evm/deps/include/unicode/umisc.h: -------------------------------------------------------------------------------- 1 | // © 2016 and later: Unicode, Inc. and others. 2 | // License & terms of use: http://www.unicode.org/copyright.html 3 | /* 4 | ********************************************************************** 5 | * Copyright (C) 1999-2006, International Business Machines 6 | * Corporation and others. All Rights Reserved. 7 | ********************************************************************** 8 | * file name: umisc.h 9 | * encoding: UTF-8 10 | * tab size: 8 (not used) 11 | * indentation:4 12 | * 13 | * created on: 1999oct15 14 | * created by: Markus W. Scherer 15 | */ 16 | 17 | #ifndef UMISC_H 18 | #define UMISC_H 19 | 20 | #include "unicode/utypes.h" 21 | 22 | /** 23 | * \file 24 | * \brief C API:misc definitions 25 | * 26 | * This file contains miscellaneous definitions for the C APIs. 27 | */ 28 | 29 | U_CDECL_BEGIN 30 | 31 | /** A struct representing a range of text containing a specific field 32 | * @stable ICU 2.0 33 | */ 34 | typedef struct UFieldPosition { 35 | /** 36 | * The field 37 | * @stable ICU 2.0 38 | */ 39 | int32_t field; 40 | /** 41 | * The start of the text range containing field 42 | * @stable ICU 2.0 43 | */ 44 | int32_t beginIndex; 45 | /** 46 | * The limit of the text range containing field 47 | * @stable ICU 2.0 48 | */ 49 | int32_t endIndex; 50 | } UFieldPosition; 51 | 52 | #if !UCONFIG_NO_SERVICE 53 | /** 54 | * Opaque type returned by registerInstance, registerFactory and unregister for service registration. 55 | * @stable ICU 2.6 56 | */ 57 | typedef const void* URegistryKey; 58 | #endif 59 | 60 | U_CDECL_END 61 | 62 | #endif 63 | -------------------------------------------------------------------------------- /evm/deps/include/unicode/ustream.h: -------------------------------------------------------------------------------- 1 | // © 2016 and later: Unicode, Inc. and others. 2 | // License & terms of use: http://www.unicode.org/copyright.html 3 | /* 4 | ********************************************************************** 5 | * Copyright (C) 2001-2014 International Business Machines 6 | * Corporation and others. All Rights Reserved. 7 | ********************************************************************** 8 | * FILE NAME : ustream.h 9 | * 10 | * Modification History: 11 | * 12 | * Date Name Description 13 | * 06/25/2001 grhoten Move iostream from unistr.h 14 | ****************************************************************************** 15 | */ 16 | 17 | #ifndef USTREAM_H 18 | #define USTREAM_H 19 | 20 | #include "unicode/utypes.h" 21 | 22 | #if U_SHOW_CPLUSPLUS_API 23 | 24 | #include "unicode/unistr.h" 25 | 26 | #if !UCONFIG_NO_CONVERSION // not available without conversion 27 | 28 | /** 29 | * \file 30 | * \brief C++ API: Unicode iostream like API 31 | * 32 | * At this time, this API is very limited. It contains 33 | * operator<< and operator>> for UnicodeString manipulation with the 34 | * C++ I/O stream API. 35 | */ 36 | 37 | #if defined(__GLIBCXX__) 38 | namespace std { class type_info; } // WORKAROUND: http://llvm.org/bugs/show_bug.cgi?id=13364 39 | #endif 40 | 41 | #include 42 | 43 | U_NAMESPACE_BEGIN 44 | 45 | /** 46 | * Write the contents of a UnicodeString to a C++ ostream. This functions writes 47 | * the characters in a UnicodeString to an ostream. The UChars in the 48 | * UnicodeString are converted to the char based ostream with the default 49 | * converter. 50 | * @stable 3.0 51 | */ 52 | U_IO_API std::ostream & U_EXPORT2 operator<<(std::ostream& stream, const UnicodeString& s); 53 | 54 | /** 55 | * Write the contents from a C++ istream to a UnicodeString. The UChars in the 56 | * UnicodeString are converted from the char based istream with the default 57 | * converter. 58 | * @stable 3.0 59 | */ 60 | U_IO_API std::istream & U_EXPORT2 operator>>(std::istream& stream, UnicodeString& s); 61 | U_NAMESPACE_END 62 | 63 | #endif 64 | 65 | /* No operator for UChar because it can conflict with wchar_t */ 66 | 67 | #endif /* U_SHOW_CPLUSPLUS_API */ 68 | 69 | #endif 70 | -------------------------------------------------------------------------------- /evm/deps/include/unicode/utf32.h: -------------------------------------------------------------------------------- 1 | // © 2016 and later: Unicode, Inc. and others. 2 | // License & terms of use: http://www.unicode.org/copyright.html 3 | /* 4 | ******************************************************************************* 5 | * 6 | * Copyright (C) 1999-2001, International Business Machines 7 | * Corporation and others. All Rights Reserved. 8 | * 9 | ******************************************************************************* 10 | * file name: utf32.h 11 | * encoding: UTF-8 12 | * tab size: 8 (not used) 13 | * indentation:4 14 | * 15 | * created on: 1999sep20 16 | * created by: Markus W. Scherer 17 | */ 18 | /** 19 | * \file 20 | * \brief C API: UTF-32 macros 21 | * 22 | * This file is obsolete and its contents moved to utf_old.h. 23 | * See utf_old.h and Jitterbug 2150 and its discussion on the ICU mailing list 24 | * in September 2002. 25 | */ 26 | -------------------------------------------------------------------------------- /evm/unicode.h: -------------------------------------------------------------------------------- 1 | #ifndef EVO_UNICODE 2 | #define EVO_UNICODE 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | namespace unicode { 10 | 11 | using codepoint = uint32_t; 12 | using string = std::basic_string; 13 | 14 | string fromPlatform(const std::string str); 15 | string fromCodePoint(const codepoint value); 16 | string fromUTF8(const std::string str); 17 | string fromUTF16LE(const std::string str); 18 | string fromUTF32LE(const std::string str); 19 | 20 | std::string toPlatform(const string str); 21 | std::string toUTF8(const string str); 22 | std::string toUTF16LE(const string str); 23 | std::string toUTF32LE(const string str); 24 | 25 | 26 | void readString(std::istream &is,string &str); 27 | 28 | inline string to_string(int value){ 29 | return fromPlatform(std::to_string(value)); 30 | } 31 | 32 | inline string to_string(long value){ 33 | return fromPlatform(std::to_string(value)); 34 | } 35 | 36 | inline string to_string(long long value){ 37 | return fromPlatform(std::to_string(value)); 38 | } 39 | 40 | inline string to_string(unsigned value){ 41 | return fromPlatform(std::to_string(value)); 42 | } 43 | 44 | inline string to_string(unsigned long value){ 45 | return fromPlatform(std::to_string(value)); 46 | } 47 | 48 | inline string to_string(unsigned long long value){ 49 | return fromPlatform(std::to_string(value)); 50 | } 51 | 52 | inline string to_string(float value){ 53 | return fromPlatform(std::to_string(value)); 54 | } 55 | 56 | inline string to_string(double value){ 57 | return fromPlatform(std::to_string(value)); 58 | } 59 | 60 | inline string to_string(long double value){ 61 | return fromPlatform(std::to_string(value)); 62 | } 63 | 64 | codepoint toLower(codepoint value); 65 | 66 | string toLower(const string &str); 67 | } 68 | 69 | unicode::codepoint operator""_codepoint(const char *c_str,std::size_t len); 70 | 71 | unicode::string operator""_utf32(const char *c_str,std::size_t len); 72 | 73 | inline std::ostream &operator<<(std::ostream &os,const unicode::string& str){ 74 | return os<>(std::istream &is,unicode::string& str){ 78 | unicode::readString(is,str); 79 | return is; 80 | } 81 | 82 | #endif -------------------------------------------------------------------------------- /langlibs/core/Array.eb: -------------------------------------------------------------------------------- 1 | Function Len(Byval Target As Array) As Integer 2 | Return Target.Length() 3 | End Function -------------------------------------------------------------------------------- /langlibs/core/Exception.eb: -------------------------------------------------------------------------------- 1 | Private Declare Sub Trap(Byval c As Integer, Byval x as Object) 2 | 3 | Public Class Exception Extend Object 4 | Dim Message As String, Name As String, Trace As String 5 | 6 | Public New(Byval Msg As String) 7 | Self.Message = Msg 8 | End New 9 | 10 | Public Function GetMessage() As String 11 | Return Message 12 | End Function 13 | 14 | Public Override Function ToString() As String 15 | Return Name.Concat(": ").Concat(Message).Concat("\n").Concat(Trace) 16 | End Function 17 | 18 | Public Function PrintTrace() As String 19 | Println(ToString()) 20 | End Function 21 | 22 | End Class 23 | 24 | 25 | Public Class NullPointerException Extend Exception 26 | Public New(Byval Pointer As String) 27 | Extend(Pointer.Concat(" is null.")) 28 | End New 29 | End Class 30 | 31 | 32 | Public Class ConversionException Extend Exception 33 | Public New(Byval src As String, Byval dst As String) 34 | Extend("invalid conversion from ".Concat(src).Concat(" to ").Concat(dst)) 35 | End New 36 | End Class 37 | 38 | 39 | Public Class OutOfRangeException Extend Exception 40 | Public New(Byval index As Integer, Byval length As Integer) 41 | Extend(Text.Format("Index was out of range. Length of array is {}, but try to accees index {}.",length,index)) 42 | End New 43 | End Class 44 | 45 | Public Class OptionMissingException Extend Exception 46 | Public New(Byval optionName As String) 47 | Extend(Text.Format("cannot access missing option '{}'.", optionName)) 48 | End New 49 | End Class 50 | 51 | Public Class DivideByZeroException Extend Exception 52 | Public New() Extend("") 53 | End New 54 | End Class 55 | 56 | Public Class NotImplementedException Extend Exception 57 | Public New(Byval FunctionDescription As String) 58 | Extend(Text.Format("{} is not implemented.", FunctionDescription)) 59 | End New 60 | End Class 61 | 62 | Public Class EvmInternalException Extend Exception 63 | Public New(Byval Msg As String) 64 | Extend(Msg) 65 | End New 66 | End Class 67 | 68 | Public Class FFIModuleNotFoundException Extend Exception 69 | Public New(Library As String) 70 | Extend(Text.Format("ffi module '{}' not found",Library)) 71 | End New 72 | End Class 73 | 74 | Public Class FFIEntryNotFoundException Extend Exception 75 | Public New(Library As String, EntryName As String) 76 | Extend(Text.Format("ffi entry '{}' not found in module '{}'",EntryName,Library)) 77 | End New 78 | End Class 79 | -------------------------------------------------------------------------------- /langlibs/core/LinkedList.eb: -------------------------------------------------------------------------------- 1 | 2 | Public Class LinkedNode 3 | Public Dim Previous As LinkedNode, Succeed As LinkedNode 4 | Public Dim Value As Object 5 | 6 | Public New() 7 | Previous = Nothing 8 | Succeed = Nothing 9 | Value = Nothing 10 | End New 11 | End Class 12 | 13 | 14 | Public Class LinkedList 15 | Dim Head As LinkedNode, Tail As LinkedNode 16 | Dim Count As Integer 17 | 18 | Public New() 19 | Head = Nothing 20 | Tail = Nothing 21 | Count = 0 22 | End New 23 | 24 | Public Function Length() As Integer 25 | Return Count 26 | End Function 27 | 28 | Public Sub Add(Byval Value As Object) 29 | PushBack(value) 30 | End Sub 31 | 32 | Public Sub PushBack(Byval Value As Object) 33 | Dim a As LinkedNode 34 | a = new LinkedNode() 35 | a.Value = Value 36 | If Head==Nothing Then 37 | Head = a 38 | Tail = a 39 | Else 40 | a.Previous = Tail 41 | Tail.Succeed = a 42 | Tail = a 43 | End If 44 | Count = Count + 1 45 | End Sub 46 | 47 | Public Sub PushFront(Byval Value As Object) 48 | Dim a As LinkedNode 49 | a = new LinkedNode() 50 | a.Value = Value 51 | If Head==Nothing Then 52 | Head = a 53 | Tail = a 54 | Else 55 | a.Succeed = Head 56 | Head.Previous = a 57 | Head = a 58 | End If 59 | Count = Count + 1 60 | End Sub 61 | 62 | Public Sub RemoveBack() 63 | Tail = Tail.Previous 64 | Tail.Succeed = Nothing 65 | Count = Count - 1 66 | End Sub 67 | 68 | Public Sub RemoveFront() 69 | Head = Head.Succeed 70 | Head.Previous = Nothing 71 | Count = Count - 1 72 | End Sub 73 | 74 | Public Function Back() As Object 75 | Return Tail.Value 76 | End Function 77 | 78 | Public Function Front() As Object 79 | Return Head.Value 80 | End Function 81 | 82 | Public Function FrontNode() As LinkedNode 83 | Return Head 84 | End Function 85 | 86 | Public Function BackNode() As LinkedNode 87 | Return Tail 88 | End Function 89 | 90 | End Class 91 | -------------------------------------------------------------------------------- /langlibs/core/List.eb: -------------------------------------------------------------------------------- 1 | 2 | Public Class List 3 | Dim Elements As Object[], Used As Integer 4 | 5 | Public New(ParamArray Byval xs As Object[]) 6 | Elements = xs 7 | Used = Len(xs) 8 | End New 9 | 10 | Public Function IndexGet(Byval i As Integer) As Object 11 | Return Elements[i] 12 | End Function 13 | 14 | Public Sub IndexSet(Byval i As Integer,Byval value As Object) 15 | Elements[i] = value 16 | End Sub 17 | 18 | Public Function Length() As Integer 19 | Return Used 20 | End Function 21 | 22 | Public Function Capacity() As Integer 23 | Return Len(Elements) 24 | End Function 25 | 26 | Public Sub Add(Byval Value As Object) 27 | If Used==Capacity() Then 28 | Expand() 29 | End If 30 | Elements[Used] = Value 31 | Used = Used + 1 32 | End Sub 33 | 34 | Public Sub Expand() 35 | Dim newAry As Object[] 36 | newAry = new Object[Capacity() * 2] 37 | For Dim i = 0 To Len(Elements)-1 38 | newAry[i] = Elements[i] 39 | Next 40 | Elements = newAry 41 | End Sub 42 | 43 | Public Override Function ToString() As String 44 | Dim tmp As String[] 45 | tmp = New String[Elements.Length()] 46 | 47 | For Dim i = 0 To Elements.Length()-1 48 | tmp[i] = Elements[i].ToString() 49 | Next 50 | 51 | Return Text.Format("[{}]", String.Fold(tmp, Separator: ',')) 52 | End Function 53 | 54 | End Class 55 | -------------------------------------------------------------------------------- /langlibs/core/Log.eb: -------------------------------------------------------------------------------- 1 | 2 | Private Declare Sub PutRune(Byval x as Rune) 3 | 4 | Public Sub Print(ParamArray Byval xs As Object[]) 5 | For Dim i = 0 To Len(xs)-1 6 | Dim x As Object 7 | x = xs[i] 8 | Dim str As String 9 | if x is String then 10 | str = x As String 11 | elseif x is Rune then 12 | str = new String([x as Rune]) 13 | else 14 | str = x.ToString() 15 | end if 16 | 17 | For Dim i = 0 To str.Length()-1 18 | PutRune(str.IndexGet(i)) 19 | Next 20 | 21 | If i <> Len(xs)-1 Then 22 | PutRune(' ') 23 | End If 24 | Next 25 | End Sub 26 | 27 | 28 | Public Sub Println(ParamArray Byval xs As Object[]) 29 | Print(xs) 30 | Print('\n') 31 | End Sub 32 | 33 | 34 | Public Sub PrintFmt(Byval fmt As String, ParamArray Byval args As Object[]) 35 | Print(Text.Format(fmt,args)) 36 | End Sub 37 | 38 | 39 | -------------------------------------------------------------------------------- /langlibs/core/Object.eb: -------------------------------------------------------------------------------- 1 | Declare Sub PinIntrinsic(x As Object) 2 | Declare Sub UnpinIntrinsic(x As Object) 3 | 4 | Public Class Object 5 | Dim Klass As Long 6 | Dim forward As Long 7 | Dim pined As Byte 8 | Dim age As Byte 9 | 10 | Public Virtual Function ToString() As String 11 | Throw New NotImplementedException("IndexGet") 12 | End Function 13 | 14 | Public Function IsPined() As Boolean 15 | Return pined==1 16 | End Function 17 | 18 | Public Sub Pin() 19 | PinIntrinsic(Self) 20 | End Sub 21 | 22 | Public Sub Unpin() 23 | UnpinIntrinsic(Self) 24 | End Sub 25 | 26 | End Class 27 | 28 | Public Class Array Extend Object 29 | Dim ArrayLength As Integer 30 | 31 | Public Function Length() As Integer 32 | Return ArrayLength 33 | End Function 34 | 35 | Public Override Function ToString() As String 36 | Return "Array" 37 | End Function 38 | End Class 39 | 40 | -------------------------------------------------------------------------------- /langlibs/core/Stack.eb: -------------------------------------------------------------------------------- 1 | 2 | Public Class Stack 3 | Dim Data As List, Top As Integer 4 | 5 | Public New() 6 | Data = New List() 7 | Top = 0 8 | End New 9 | 10 | Public Function Pop() As Object 11 | Top = Top - 1 12 | Return Data.IndexGet(Top) 13 | End Function 14 | 15 | Public Sub Push(Byval Value As Object) 16 | If Top == Data.Capacity() Then 17 | Data.Expand() 18 | End If 19 | Data.IndexSet(Top, Value) 20 | End Sub 21 | 22 | Public Function Empty() As Boolean 23 | Return Top==0 24 | End Function 25 | 26 | End Class 27 | -------------------------------------------------------------------------------- /langlibs/core/String.eb: -------------------------------------------------------------------------------- 1 | Public Class String 2 | Dim Sequence As Rune[] 3 | 4 | Public New(Byval Sequence As Rune[]) 5 | Self.Sequence = Sequence 6 | End New 7 | 8 | Public Function Length() As Integer 9 | Return Len(Sequence) 10 | End Function 11 | 12 | Public Function IndexGet(Byval i As Integer) As Rune 13 | Return Sequence[i] 14 | End Function 15 | 16 | Public Override Function ToString() As String 17 | Return Self 18 | End Function 19 | 20 | Public Function Concat(Byval str As String) As String 21 | Dim nl As Integer 22 | nl = Length() + str.Length() 23 | Dim ns As Rune[] 24 | ns = New Rune[nl] 25 | 26 | For Dim i = 0 To Length()-1 27 | ns[i] = IndexGet(i) 28 | Next 29 | 30 | For Dim i = 0 To str.Length()-1 31 | ns[i+Length()] = str.IndexGet(i) 32 | Next 33 | 34 | Return New String(ns) 35 | End Function 36 | 37 | Public Function Append(Byval r As Rune) As String 38 | Dim nl As Integer 39 | nl = Length() + 1 40 | Dim ns As Rune[] 41 | ns = New Rune[nl] 42 | 43 | For Dim i = 0 To Length()-1 44 | ns[i] = IndexGet(i) 45 | Next 46 | 47 | ns[Length()] = r 48 | Return New String(ns) 49 | End Function 50 | 51 | Public Static Function Fold(Byval ls As String[], Optional Byval Separator As Rune) As String 52 | Dim nl As Integer 53 | nl = 0 54 | For Dim i = 0 To Len(ls)-1 55 | nl = nl + ls[i].Length() 56 | Next 57 | 58 | If Optional Separator Then nl = nl + ls.Length() - 1 59 | 60 | Dim ns As Rune[] 61 | ns = New Rune[nl] 62 | 63 | Dim dst As Integer 64 | dst = 0 65 | For Dim i = 0 To Len(ls)-1 66 | For Dim j = 0 To ls[i].Length()-1 67 | ns[dst] = ls[i].IndexGet(j) 68 | dst = dst + 1 69 | Next 70 | If Optional Separator And i <> ls.Length()-1 Then 71 | ns[dst] = Separator 72 | dst = dst + 1 73 | End If 74 | Next 75 | 76 | Return New String(ns) 77 | End Function 78 | End Class 79 | -------------------------------------------------------------------------------- /langlibs/core/Text.eb: -------------------------------------------------------------------------------- 1 | Public Module Text 2 | 3 | Public Function Format(Byval fmt As String,ParamArray Byval args As Object[]) As String 4 | 5 | Dim size As Integer,argCount As Integer 6 | size = fmt.Length() 7 | argCount = 0 8 | For Dim i = 0 To fmt.Length()-1 9 | if fmt.IndexGet(i)=='{' then 10 | size = size - 2 11 | argCount = argCount + 1 12 | end if 13 | Next 14 | 15 | For Dim i = 0 To argCount-1 16 | size = size + args[i].ToString().Length() 17 | Next 18 | 19 | Dim seq As Rune[] 20 | seq = new Rune[size] 21 | 22 | Dim src As Integer,dst As Integer 23 | src = 0 24 | dst = 0 25 | For Dim a = 0 To argCount-1 26 | While fmt.IndexGet(src)<>'{' 27 | seq[dst] = fmt.IndexGet(src) 28 | dst = dst + 1 29 | src = src + 1 30 | Wend 31 | src = src + 2 32 | Dim argStr As String 33 | argStr = args[a].ToString() 34 | For Dim j = 0 To argStr.Length()-1 35 | seq[dst] = argStr.IndexGet(j) 36 | dst = dst + 1 37 | Next 38 | Next 39 | 40 | For Dim rest = src To fmt.Length()-1 41 | seq[dst] = fmt.IndexGet(rest) 42 | dst = dst + 1 43 | Next 44 | 45 | Return New String(seq) 46 | End Function 47 | 48 | End Module 49 | -------------------------------------------------------------------------------- /langlibs/intrinsic.eb: -------------------------------------------------------------------------------- 1 | /*Boolean Byte Short Rune Integer Long Single Double Object*/ 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /langlibs/math/random.eb: -------------------------------------------------------------------------------- 1 | //https://en.wikipedia.org/wiki/Linear_congruential_generator 2 | 3 | Public Class Random 4 | Private Dim max As UInteger 5 | Private Dim num As UInteger,lbound As Integer,range As Integer 6 | Public New(lbound As Integer, ubound As Integer, seed As UInteger) 7 | max = 0 As UInteger 8 | max = max - 1 As UInteger 9 | Self.num = seed 10 | Self.lbound = lbound 11 | Self.range = ubound - lbound + 1 12 | End New 13 | 14 | Public Function GetNext() As Integer 15 | num = num * 65539 as UInteger 16 | return ((num As Double)/max as Double) * range + lbound 17 | End Function 18 | End Class 19 | 20 | 21 | -------------------------------------------------------------------------------- /langlibs/test.eb: -------------------------------------------------------------------------------- 1 | 2 | Function ToString(Byval arr As Rune[]) As String 3 | Dim ret As String 4 | ret = "" 5 | For Dim i = 0 To arr.Length()-1 6 | ret = ret.Append(arr[i]) 7 | Next 8 | Return ret 9 | End Function 10 | 11 | Class Shop 12 | Public Virtual Sub Buy() 13 | Println("这里啥也不卖!") 14 | End Sub 15 | End Class 16 | 17 | Class MyShop Extend Shop 18 | Public Override Sub Buy() 19 | Println("吐血大甩卖!") 20 | End Sub 21 | End Class 22 | 23 | Sub Main() 24 | Dim mShop As Shop 25 | mShop = New MyShop() 26 | mShop.Buy() 27 | End Sub 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /langlibs/test2.eb: -------------------------------------------------------------------------------- 1 | Import "math" 2 | 3 | Sub Swap(Byref a As Integer,Byref b As Integer) 4 | Dim t As Integer 5 | t = a 6 | a = b 7 | b = t 8 | End Sub 9 | 10 | Sub SelectionSort(Byval arr As Integer[]) 11 | Dim A As Integer 12 | For Dim i = 0 To arr.Length()-1 13 | Dim m As Integer 14 | m = i 15 | For Dim j = i+1 To arr.Length()-1 16 | If arr[m] > arr[j] then m = j 17 | Next 18 | Swap(arr[i], arr[m]) 19 | //PrintArray(arr) 20 | Next 21 | End Sub 22 | 23 | Sub PrintArray(Byval ls As Integer[]) 24 | For Dim i = 0 To ls.length()-1 25 | Print(ls[i],",") 26 | Next 27 | Println(";") 28 | End Sub 29 | 30 | /* 31 | Sub Main() 32 | Dim gen As Random = New Random(0,100,5 As UInteger) 33 | For Dim t = 0 To 10000 34 | Println("time:",t) 35 | Dim arr As Integer[] = New Integer[10] 36 | For Dim i = 0 To 9 37 | arr[i] = gen.GetNext() 38 | Next 39 | Print("Generate: ") 40 | PrintArray(arr) 41 | SelectionSort(arr) 42 | Print("Sorted: ") 43 | PrintArray(arr) 44 | Next 45 | End Sub 46 | */ 47 | 48 | Sub Main() 49 | Dim gen As Random = New Random(10,20,5 As UInteger) 50 | Dim sum As Integer[] = New Integer[100] 51 | For Dim i = 0 To 10000 52 | Dim number As Integer = gen.GetNext() 53 | sum[number] = sum[number] + 1 54 | Next 55 | For Dim i = 0 To 99 56 | Print(Text.Format("({},{})",i,sum[i])) 57 | if i mod 10 == 0 then Print("\n") 58 | Next 59 | End Sub 60 | 61 | 62 | 63 | 64 | evobasic 1.1更新内容 65 | - 支持声明立即赋值(Dim gen As Random = New Random(10,20,5 As UInteger)) 66 | - 重新实现异常处理 67 | - 添加UShort,UInteger,ULong无符号内建类型 68 | - 增加除零异常检测 69 | - 移除整型溢出异常 70 | - 修改Import语义 71 | - 完善标记清扫GC 72 | - 加入math.bkg语言库(Random随机数类) 73 | 74 | 75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /testsuite/material/10_pass_optional_args.eb: -------------------------------------------------------------------------------- 1 | Sub Expect1(optional a As Integer) 2 | if optional a then 3 | if a<>1 then Println("failed, expect a==1") 4 | a = 100 5 | else 6 | Println("failed, optional a missing") 7 | end if 8 | End Sub 9 | 10 | Sub Expect1AndChangeTo100(optional byref a as integer) 11 | if optional a then 12 | if a<>1 then Println("failed, expect a==1") 13 | a = 100 14 | else 15 | Println("failed, optional a missing") 16 | end if 17 | end sub 18 | 19 | Dim gv as Integer 20 | 21 | Sub Main() 22 | // pass local variable 23 | dim lv as integer = 1 24 | Expect1(a = lv) 25 | if lv<>1 then println("failed, expect lv==1") 26 | lv = 1 27 | Expect1AndChangeTo100(a = lv) 28 | if lv<>100 then println("failed, expect lv==100") 29 | 30 | // pass global variable 31 | gv = 1 32 | Expect1(a = gv) 33 | if gv<>1 then println("failed, expect gv==1") 34 | gv = 1 35 | Expect1AndChangeTo100(a = gv) 36 | if gv<>100 then println("failed, expect gv==100") 37 | 38 | // pass argument variable 39 | ArgumentVariableTest(1, lv) 40 | 41 | // pass class field 42 | dim cls as MyClass = New MyClass() 43 | Expect1(a = cls.field) 44 | if cls.field<>1 then println("failed, expect cls.field==1") 45 | cls.field = 1 46 | Expect1AndChangeTo100(a = cls.field) 47 | if cls.field<>100 then println("failed, expect cls.field==100") 48 | 49 | // pass static field 50 | Expect1(a = MyClass.sfld) 51 | if MyClass.sfld<>1 then println("failed, expect MyClass.sfld==1") 52 | MyClass.sfld = 1 53 | Expect1AndChangeTo100(a = MyClass.sfld) 54 | if MyClass.sfld<>100 then println("failed, expect MyClass.sfld==100") 55 | 56 | Println("") 57 | End Sub 58 | 59 | Sub ArgumentVariableTest(byval av as integer, byref rv as integer) 60 | Expect1(a = av) 61 | if av<>1 then println("failed, expect av==1") 62 | av = 1 63 | Expect1AndChangeTo100(a = av) 64 | if av<>100 then println("failed, expect av==100") 65 | 66 | Expect1(a = rv) 67 | if rv<>1 then println("failed, expect rv==1") 68 | rv = 1 69 | Expect1AndChangeTo100(a = rv) 70 | if rv<>100 then println("failed, expect rv==100") 71 | End Sub 72 | 73 | Class MyClass 74 | Public New() 75 | field = 1 76 | MyClass.sfld = 1 77 | End New 78 | 79 | Public Dim field As Integer 80 | 81 | Public Static Dim sfld As Integer 82 | 83 | End Class -------------------------------------------------------------------------------- /testsuite/material/11_pass_paramarray.eb: -------------------------------------------------------------------------------- 1 | sub expect321(ParamArray a as object[]) 2 | if a.length()<>3 then Println("failed, expect a.length()==3") 3 | if a[0] as integer <> 3 or a[1] as integer <> 2 or a[2] as integer <> 3 then Println("failed, expect [3,2,1]") 4 | end sub 5 | 6 | sub forwardParamArray(ParamArray a as object[]) 7 | expect321(a) 8 | end sub 9 | 10 | sub main() 11 | expect321([3,2,1]) 12 | forwardParamArray([3,2,1]) 13 | Println("") 14 | end sub -------------------------------------------------------------------------------- /testsuite/material/12_recursive_func.eb: -------------------------------------------------------------------------------- 1 | function f(x as integer) as integer 2 | if x == 0 or x == 1 then return x else return f(x-1) + f(x-2) 3 | end function 4 | 5 | sub main() 6 | if f(0) <> 0 or f(1)<>1 or f(2)<>1 or f(3)<>2 or f(11)<>89 then Println("failed") 7 | Println("") 8 | end sub -------------------------------------------------------------------------------- /testsuite/material/13_enum.eb: -------------------------------------------------------------------------------- 1 | Enum Message 2 | Open 3 | Close = 10 4 | Restart 5 | Error 6 | None 7 | End Enum 8 | 9 | Function ExpectRestartAndReturnNone(msg as Message)As Message 10 | if msg<>Message.Restart then Println("failed,expect msg==Message.Restart") 11 | return Message.None 12 | End Function 13 | 14 | Sub Main() 15 | Dim a as Message 16 | a = ExpectRestartAndReturnNone(Message.Restart) 17 | if a<>Message.None then Println("failed,expect a==Message.None") 18 | Println("") 19 | End Sub -------------------------------------------------------------------------------- /testsuite/material/14_userdefine_type.eb: -------------------------------------------------------------------------------- 1 | Enum MessageType 2 | Open 3 | Close = 10 4 | Restart 5 | Error 6 | None 7 | End Enum 8 | 9 | Type Message 10 | id As Integer 11 | msg as MessageType 12 | number as Long 13 | valid as Boolean 14 | End Type 15 | 16 | 17 | Sub Test(msg as Message) 18 | if msg.id<>123 or msg.msg<>MessageType.Close or msg.number<>114514 or msg.valid<>True then 19 | Println("failed,19") 20 | end if 21 | End Sub 22 | 23 | Sub TestRef(byref msg as Message) 24 | if msg.id<>123 or msg.msg<>MessageType.Close or msg.number<>114514 or msg.valid<>True then 25 | Println("failed,25") 26 | end if 27 | msg.id = 321 28 | msg.number = 1919180 29 | msg.msg = MessageType.None 30 | msg.valid = false 31 | End Sub 32 | 33 | Sub Main() 34 | dim m as Message 35 | m.id = 123 36 | m.msg = MessageType.Close 37 | m.number = 114514 38 | m.valid = True 39 | Test(m) 40 | TestRef(m) 41 | if msg.id<>321 or msg.msg<>MessageType.None or msg.number<>1919180 or msg.valid<>False then 42 | Println("failed,42") 43 | end if 44 | Println("") 45 | End Sub 46 | 47 | -------------------------------------------------------------------------------- /testsuite/material/15_class.eb: -------------------------------------------------------------------------------- 1 | Class Base 2 | Public Dim number As Integer 3 | Public New(x as Integer) 4 | Self.number = x 5 | End New 6 | 7 | Public Virtual Function Sum() As Integer 8 | Return number 9 | End Function 10 | End Class 11 | 12 | Class Derived Extend Base 13 | Public Dim number2 As Integer 14 | Public New(a as integer, b as integer) Extend(a) 15 | self.number2 = b 16 | End New 17 | 18 | Public Override Function Sum() As Integer 19 | Return number2 20 | End Function 21 | End Class 22 | 23 | Sub main() 24 | Dim a as Base = New Base(100), b as Base = New Derived(100,101) 25 | if a.Sum()<>100 then Println("failed, expect a.sum()==100") 26 | if b.Sum()<>101 then Println("failed, expect b.sum()==101") 27 | Dim c as Derived = b as Derived 28 | if c.number2<>101 then Println("failed, expect c.number2==101") 29 | Println("") 30 | End Sub 31 | 32 | 33 | -------------------------------------------------------------------------------- /testsuite/material/1_hello_world.eb: -------------------------------------------------------------------------------- 1 | Sub Main() 2 | Println("hello world") 3 | Println("") 4 | End Sub -------------------------------------------------------------------------------- /testsuite/material/2_oneline_if.eb: -------------------------------------------------------------------------------- 1 | Sub Main() 2 | If True Then Println("pass") Else Println("failed") 3 | Println("") 4 | End Sub -------------------------------------------------------------------------------- /testsuite/material/3_if_then_elseif_else.eb: -------------------------------------------------------------------------------- 1 | Sub Main() 2 | If False Then 3 | Println("failed") 4 | ElseIf True Then 5 | Println("pass") 6 | Else 7 | Println("failed") 8 | End If 9 | Println("") 10 | End Sub -------------------------------------------------------------------------------- /testsuite/material/4_dim_special_types.eb: -------------------------------------------------------------------------------- 1 | Sub Main() 2 | Dim a As Byte,b As Short,c As Integer,d As Long,e As Single,f As Double,g As Boolean,h As Rune 3 | Dim i As UShort,j As UInteger,k As ULong 4 | Dim l As Object,m As Array,n As Exception 5 | Println("") 6 | End Sub -------------------------------------------------------------------------------- /testsuite/material/5_ops.eb: -------------------------------------------------------------------------------- 1 | Sub Main() 2 | if 1==1 then Println("pass") else Println("failed") 3 | if 1<>2 then Println("pass") else Println("failed") 4 | if 1<2 then Println("pass") else Println("failed") 5 | if 1<=1 then Println("pass") else Println("failed") 6 | if 2>1 then Println("pass") else Println("failed") 7 | if 1>=1 then Println("pass") else Println("failed") 8 | 9 | if 1+1 == 2 then Println("pass") else Println("failed") 10 | if 1-1 == 2 then Println("pass") else Println("failed") 11 | if 2*10 == 10 then Println("pass") else Println("failed") 12 | if 100/5 == 20 then Println("pass") else Println("failed") 13 | if 8 mod 5 == 3 then Println("pass") else Println("failed") 14 | 15 | if True And True then Println("pass") else Println("failed") 16 | if False And True then Println("failed") else Println("pass") 17 | if False Or True then Println("pass") else Println("failed") 18 | if False Or False then Println("failed") else Println("pass") 19 | if False xor True then Println("pass") else Println("failed") 20 | if Not False then Println("pass") else Println("failed") 21 | 22 | if (True And True) Or Not False then Println("pass") else Println("failed") 23 | 24 | Println("") 25 | End Sub -------------------------------------------------------------------------------- /testsuite/material/6_dim_assign.eb: -------------------------------------------------------------------------------- 1 | Sub Main() 2 | Dim b As Byte = 100 3 | Dim a As Integer = 114514 4 | if a == 114514 And Byte == 100 then Println("pass") 5 | Println("") 6 | End Sub -------------------------------------------------------------------------------- /testsuite/material/7_loop.eb: -------------------------------------------------------------------------------- 1 | Sub Main() 2 | Dim i As Integer = 0 3 | Dim c As Integer = 0 4 | While i < 10 5 | i = i + 1 6 | c = c + 1 7 | Wend 8 | 9 | if c == 10 then Println("pass") else Println("failed") 10 | 11 | Dim c2 As Integer = 0 12 | // 0 + 2 + 4 + 6 + 8 + 10 = 30 13 | for dim i = 0 to 10 step 2 14 | c2 = c2 + i 15 | next 16 | 17 | if i==0 then Println("pass") else Println("failed") 18 | 19 | if c2==30 then Println("pass") else Println("failed") 20 | 21 | Println("") 22 | End Sub -------------------------------------------------------------------------------- /testsuite/material/8_array.eb: -------------------------------------------------------------------------------- 1 | Sub Main() 2 | Dim a As Integer[] = [1,2,3,4,5,6] 3 | Dim b As Array = a, c As Object = a 4 | 5 | if b is Integer[] then Println("pass") else Println("failed") 6 | if c is Integer[] then Println("pass") else Println("failed") 7 | if a.length() == 6 then Println("pass") else Println("failed") 8 | 9 | if a[0]==1 then Println("pass") else Println("failed") 10 | if a[1]==2 then Println("pass") else Println("failed") 11 | if a[2]==3 then Println("pass") else Println("failed") 12 | if a[3]==4 then Println("pass") else Println("failed") 13 | if a[4]==5 then Println("pass") else Println("failed") 14 | if a[5]==6 then Println("pass") else Println("failed") 15 | 16 | Println("") 17 | End Sub -------------------------------------------------------------------------------- /testsuite/material/9_pass_normal_args.eb: -------------------------------------------------------------------------------- 1 | Function Expect110(A As Byte, b As Integer) As Integer 2 | if a + b <> 110 then println("failed") 3 | return 220 4 | End Function 5 | 6 | Sub PassByValExpect1(a As Integer) 7 | if a<>1 then println("failed,arg 'a' in PassByValExpect1 should be 1.") 8 | a = 100 9 | End Sub 10 | 11 | Sub PassByRefExpect1AndChangeTo100(Byref a As Integer) 12 | if a<>1 then println("failed,arg 'a' in PassByRefExpect1AndChangeTo100 should be 1.") 13 | a = 100 14 | End Sub 15 | 16 | dim gv As Integer 17 | 18 | Sub Main() 19 | 20 | if test(100, 10) <> 220 then println("failed, test(100,10) should be 220") 21 | 22 | // pass local variable 23 | dim v As Integer = 1 24 | PassByValExpect1(v) 25 | if v<>1 then println("failed,v should not be changed by PassByValExpect1") 26 | v = 1 27 | PassByRefExpect1AndChangeTo100(v) 28 | if v<>100 then println("failed,v should be 100") 29 | 30 | // pass global variable 31 | gv = 111 32 | PassByValExpect1(gv) 33 | if gv<>1 then println("failed, gv should not be changed by PassByValExpect1") 34 | gv = 1 35 | PassByRefExpect1AndChangeTo100(gv) 36 | if gv<>100 then println("failed, expect gv==100") 37 | 38 | // pass argument variable 39 | ArgumentVariableTest(1,v) 40 | 41 | // pass class field 42 | Dim cls As MyClass = new MyClass() 43 | PassByValExpect1(cls.field) 44 | if cls.field<>1 then println("failed, expect cls.field==1") 45 | cls.field = 1 46 | PassByRefExpect1AndChangeTo100(cls.field) 47 | if cls.field<>100 then println("failed, expect cls.field==100") 48 | 49 | // pass static field 50 | PassByValExpect1(MyClass.sfld) 51 | if MyClass.sfld<>1 then println("failed, expect MyClass.sfld==1") 52 | MyClass.sfld = 1 53 | PassByRefExpect1AndChangeTo100(MyClass.sfld) 54 | if MyClass.sfld<>100 then println("failed. expect MyClass.sfld==100") 55 | 56 | Println("") 57 | End Sub 58 | 59 | Sub ArgumentVariableTest(byval a As Integer, byref b as integer) 60 | PassByValExpect1(a) 61 | if a<>1 then println("failed, expect a==1") 62 | a = 1 63 | PassByRefExpect1AndChangeTo100(a) 64 | if a<>100 then println("failed, expect a==100") 65 | 66 | PassByValExpect1(b) 67 | if b<>1 then println("failed, expect b==1") 68 | b = 1 69 | PassByRefExpect1AndChangeTo100(a) 70 | if b<>100 then println("failed, expect b==100") 71 | End Sub 72 | 73 | Class MyClass 74 | Public New() 75 | field = 1 76 | MyClass.sfld = 1 77 | End New 78 | 79 | Public Dim field As Integer 80 | 81 | Public Static Dim sfld As Integer 82 | 83 | End Class -------------------------------------------------------------------------------- /testsuite/test.py: -------------------------------------------------------------------------------- 1 | from asyncio import subprocess 2 | import os 3 | import sys 4 | 5 | ebc_path = "" 6 | evm_path = "" 7 | core_folder = "" 8 | build_path = "" 9 | 10 | def compile(target,build_path): 11 | return False 12 | 13 | 14 | def run(target_path): 15 | subprocess.run([evm_path,target_path,"-p",core_folder]) 16 | -------------------------------------------------------------------------------- /tool/debug.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yoorkin/evoBasic-lang/e3bf66a397d6d8c9db2345e2e1c291c91c3c5a2e/tool/debug.txt -------------------------------------------------------------------------------- /tool/log_analyzer.py: -------------------------------------------------------------------------------- 1 | from os.path import expanduser 2 | from PyQt6.QtWidgets import * 3 | from PyQt6.QtGui import QStandardItemModel, QStandardItem 4 | import re 5 | 6 | log = [] 7 | 8 | with open('debug.txt') as f: 9 | for line in f: 10 | tag_match = re.search('\[.+?\]',line) 11 | if tag_match != None: 12 | tag = tag_match.group()[1:-1] 13 | content = line[tag_match.span()[1]:].replace('\n','') 14 | log.append({"tag": tag, "content": content}) 15 | 16 | app = QApplication([]) 17 | view = QTreeView() 18 | #设置表头信息 19 | model = QStandardItemModel() 20 | model.setHorizontalHeaderLabels(['Tag', 'Content']) 21 | 22 | 23 | itemProject = QStandardItem('项目') 24 | model.appendRow(itemProject) 25 | model.setItem(0, 1, QStandardItem('项目信息说明')) 26 | 27 | 28 | parent = [itemProject] 29 | for l in log: 30 | item = QStandardItem(l["tag"]) 31 | parent[-1].appendRow(item) 32 | parent[-1].setChild(parent[-1].rowCount()-1,1,QStandardItem(l["content"])) 33 | if l["tag"]=="CallEnv": 34 | if re.search('enter',l['content'])!=None: 35 | print("parent") 36 | parent.append(item) 37 | elif re.search('exit',l['content'])!=None: 38 | parent.pop() 39 | 40 | view.setModel(model) 41 | view.show() 42 | view.header().resizeSection(0, 160) 43 | view.setStyle(QStyleFactory.create('windows')) 44 | #完全展开 45 | # view.expandAll() 46 | 47 | app.exec() --------------------------------------------------------------------------------