From 4bc6de9a881ea2f31f8f5ee302f78e1b101fa68f Mon Sep 17 00:00:00 2001 From: Wouter van Oortmerssen Date: Mon, 5 Mar 2018 16:37:04 -0800 Subject: [PATCH] Fix broken Java/C# codegen --- src/idl_gen_general.cpp | 40 +++++++++++------- tests/MyGame/Example/Monster.cs | 13 +++--- tests/MyGame/Example/Monster.java | 2 +- tests/MyGame/Example/Referrable.cs | 4 +- tests/MyGame/Example/Referrable.java | 2 +- tests/generate_code.bat | 2 +- tests/monster_test.bfbs | Bin 6104 -> 6184 bytes .../namespace_test2_generated.ts | 20 ++++----- 8 files changed, 44 insertions(+), 39 deletions(-) diff --git a/src/idl_gen_general.cpp b/src/idl_gen_general.cpp index 749159245..9c23c5dd3 100644 --- a/src/idl_gen_general.cpp +++ b/src/idl_gen_general.cpp @@ -1026,20 +1026,23 @@ class GeneralGenerator : public BaseGenerator { code += MakeCamel(field.name, lang_.first_camel_upper) + "ByKey("; code += GenTypeNameDest(key_field.value.type) + " key)"; code += offset_prefix; - code += qualified_name + ".__lookup_by_key(null, "; - code += lang_.accessor_prefix + "__vector(o), key, "; - code += lang_.accessor_prefix + "bb) : null; "; - code += "}\n"; - - code += " public " + qualified_name + lang_.optional_suffix + " "; - code += MakeCamel(field.name, lang_.first_camel_upper) + "ByKey("; - code += qualified_name + lang_.optional_suffix + " obj, "; - code += GenTypeNameDest(key_field.value.type) + " key)"; - code += offset_prefix; - code += qualified_name + ".__lookup_by_key(obj, "; + code += qualified_name + ".__lookup_by_key("; + if (lang_.language == IDLOptions::kJava) + code += "null, "; code += lang_.accessor_prefix + "__vector(o), key, "; code += lang_.accessor_prefix + "bb) : null; "; code += "}\n"; + if (lang_.language == IDLOptions::kJava) { + code += " public " + qualified_name + lang_.optional_suffix + " "; + code += MakeCamel(field.name, lang_.first_camel_upper) + "ByKey("; + code += qualified_name + lang_.optional_suffix + " obj, "; + code += GenTypeNameDest(key_field.value.type) + " key)"; + code += offset_prefix; + code += qualified_name + ".__lookup_by_key(obj, "; + code += lang_.accessor_prefix + "__vector(o), key, "; + code += lang_.accessor_prefix + "bb) : null; "; + code += "}\n"; + } break; } } @@ -1363,8 +1366,10 @@ class GeneralGenerator : public BaseGenerator { } code += "\n public static " + struct_def.name + lang_.optional_suffix; - code += " __lookup_by_key(" + struct_def.name; - code += " obj, int vectorLocation, "; + code += " __lookup_by_key("; + if (lang_.language == IDLOptions::kJava) + code += struct_def.name + " obj, "; + code += "int vectorLocation, "; code += GenTypeNameDest(key_field->value.type); code += " key, ByteBuffer bb) {\n"; if (key_field->value.type.base_type == BASE_TYPE_STRING) { @@ -1387,9 +1392,12 @@ class GeneralGenerator : public BaseGenerator { code += " start += middle;\n"; code += " span -= middle;\n"; code += " } else {\n"; - code += " return (obj == null ? "; - code += "new " + struct_def.name; - code += "(), obj).__assign(tableOffset, bb);\n"; + code += " return "; + if (lang_.language == IDLOptions::kJava) + code += "(obj == null ? new " + struct_def.name + "() : obj)"; + else + code += "new " + struct_def.name + "()"; + code += ".__assign(tableOffset, bb);\n"; code += " }\n }\n"; code += " return null;\n"; code += " }\n"; diff --git a/tests/MyGame/Example/Monster.cs b/tests/MyGame/Example/Monster.cs index a845ddadb..c554c3cd1 100644 --- a/tests/MyGame/Example/Monster.cs +++ b/tests/MyGame/Example/Monster.cs @@ -43,8 +43,7 @@ public struct Monster : IFlatbufferObject /// multiline too public Monster? Testarrayoftables(int j) { int o = __p.__offset(26); return o != 0 ? (Monster?)(new Monster()).__assign(__p.__indirect(__p.__vector(o) + j * 4), __p.bb) : null; } public int TestarrayoftablesLength { get { int o = __p.__offset(26); return o != 0 ? __p.__vector_len(o) : 0; } } - public Monster? TestarrayoftablesByKey(string key) { int o = __p.__offset(26); return o != 0 ? Monster.__lookup_by_key(null, __p.__vector(o), key, __p.bb) : null; } - public Monster? TestarrayoftablesByKey(Monster? obj, string key) { int o = __p.__offset(26); return o != 0 ? Monster.__lookup_by_key(obj, __p.__vector(o), key, __p.bb) : null; } + public Monster? TestarrayoftablesByKey(string key) { int o = __p.__offset(26); return o != 0 ? Monster.__lookup_by_key(__p.__vector(o), key, __p.bb) : null; } public Monster? Enemy { get { int o = __p.__offset(28); return o != 0 ? (Monster?)(new Monster()).__assign(__p.__indirect(o + __p.bb_pos), __p.bb) : null; } } public byte Testnestedflatbuffer(int j) { int o = __p.__offset(30); return o != 0 ? __p.bb.Get(__p.__vector(o) + j * 1) : (byte)0; } public int TestnestedflatbufferLength { get { int o = __p.__offset(30); return o != 0 ? __p.__vector_len(o) : 0; } } @@ -101,8 +100,7 @@ public struct Monster : IFlatbufferObject public MyGame.InParentNamespace? ParentNamespaceTest { get { int o = __p.__offset(72); return o != 0 ? (MyGame.InParentNamespace?)(new MyGame.InParentNamespace()).__assign(__p.__indirect(o + __p.bb_pos), __p.bb) : null; } } public Referrable? VectorOfReferrables(int j) { int o = __p.__offset(74); return o != 0 ? (Referrable?)(new Referrable()).__assign(__p.__indirect(__p.__vector(o) + j * 4), __p.bb) : null; } public int VectorOfReferrablesLength { get { int o = __p.__offset(74); return o != 0 ? __p.__vector_len(o) : 0; } } - public Referrable? VectorOfReferrablesByKey(ulong key) { int o = __p.__offset(74); return o != 0 ? Referrable.__lookup_by_key(null, __p.__vector(o), key, __p.bb) : null; } - public Referrable? VectorOfReferrablesByKey(Referrable? obj, ulong key) { int o = __p.__offset(74); return o != 0 ? Referrable.__lookup_by_key(obj, __p.__vector(o), key, __p.bb) : null; } + public Referrable? VectorOfReferrablesByKey(ulong key) { int o = __p.__offset(74); return o != 0 ? Referrable.__lookup_by_key(__p.__vector(o), key, __p.bb) : null; } public ulong SingleWeakReference { get { int o = __p.__offset(76); return o != 0 ? __p.bb.GetUlong(o + __p.bb_pos) : (ulong)0; } } public bool MutateSingleWeakReference(ulong single_weak_reference) { int o = __p.__offset(76); if (o != 0) { __p.bb.PutUlong(o + __p.bb_pos, single_weak_reference); return true; } else { return false; } } public ulong VectorOfWeakReferences(int j) { int o = __p.__offset(78); return o != 0 ? __p.bb.GetUlong(__p.__vector(o) + j * 8) : (ulong)0; } @@ -111,8 +109,7 @@ public struct Monster : IFlatbufferObject public bool MutateVectorOfWeakReferences(int j, ulong vector_of_weak_references) { int o = __p.__offset(78); if (o != 0) { __p.bb.PutUlong(__p.__vector(o) + j * 8, vector_of_weak_references); return true; } else { return false; } } public Referrable? VectorOfStrongReferrables(int j) { int o = __p.__offset(80); return o != 0 ? (Referrable?)(new Referrable()).__assign(__p.__indirect(__p.__vector(o) + j * 4), __p.bb) : null; } public int VectorOfStrongReferrablesLength { get { int o = __p.__offset(80); return o != 0 ? __p.__vector_len(o) : 0; } } - public Referrable? VectorOfStrongReferrablesByKey(ulong key) { int o = __p.__offset(80); return o != 0 ? Referrable.__lookup_by_key(null, __p.__vector(o), key, __p.bb) : null; } - public Referrable? VectorOfStrongReferrablesByKey(Referrable? obj, ulong key) { int o = __p.__offset(80); return o != 0 ? Referrable.__lookup_by_key(obj, __p.__vector(o), key, __p.bb) : null; } + public Referrable? VectorOfStrongReferrablesByKey(ulong key) { int o = __p.__offset(80); return o != 0 ? Referrable.__lookup_by_key(__p.__vector(o), key, __p.bb) : null; } public ulong CoOwningReference { get { int o = __p.__offset(82); return o != 0 ? __p.bb.GetUlong(o + __p.bb_pos) : (ulong)0; } } public bool MutateCoOwningReference(ulong co_owning_reference) { int o = __p.__offset(82); if (o != 0) { __p.bb.PutUlong(o + __p.bb_pos, co_owning_reference); return true; } else { return false; } } public ulong VectorOfCoOwningReferences(int j) { int o = __p.__offset(84); return o != 0 ? __p.bb.GetUlong(__p.__vector(o) + j * 8) : (ulong)0; } @@ -212,7 +209,7 @@ public struct Monster : IFlatbufferObject return builder.CreateVectorOfTables(offsets); } - public static Monster? __lookup_by_key(Monster obj, int vectorLocation, string key, ByteBuffer bb) { + public static Monster? __lookup_by_key(int vectorLocation, string key, ByteBuffer bb) { byte[] byteKey = System.Text.Encoding.UTF8.GetBytes(key); int span = bb.GetInt(vectorLocation - 4); int start = 0; @@ -227,7 +224,7 @@ public struct Monster : IFlatbufferObject start += middle; span -= middle; } else { - return (obj == null ? new Monster(), obj).__assign(tableOffset, bb); + return new Monster().__assign(tableOffset, bb); } } return null; diff --git a/tests/MyGame/Example/Monster.java b/tests/MyGame/Example/Monster.java index b5a1c9300..6048dc7b4 100644 --- a/tests/MyGame/Example/Monster.java +++ b/tests/MyGame/Example/Monster.java @@ -247,7 +247,7 @@ public final class Monster extends Table { start += middle; span -= middle; } else { - return (obj == null ? new Monster(), obj).__assign(tableOffset, bb); + return (obj == null ? new Monster() : obj).__assign(tableOffset, bb); } } return null; diff --git a/tests/MyGame/Example/Referrable.cs b/tests/MyGame/Example/Referrable.cs index 1367f3aa6..ce0680876 100644 --- a/tests/MyGame/Example/Referrable.cs +++ b/tests/MyGame/Example/Referrable.cs @@ -39,7 +39,7 @@ public struct Referrable : IFlatbufferObject return builder.CreateVectorOfTables(offsets); } - public static Referrable? __lookup_by_key(Referrable obj, int vectorLocation, ulong key, ByteBuffer bb) { + public static Referrable? __lookup_by_key(int vectorLocation, ulong key, ByteBuffer bb) { int span = bb.GetInt(vectorLocation - 4); int start = 0; while (span != 0) { @@ -53,7 +53,7 @@ public struct Referrable : IFlatbufferObject start += middle; span -= middle; } else { - return (obj == null ? new Referrable(), obj).__assign(tableOffset, bb); + return new Referrable().__assign(tableOffset, bb); } } return null; diff --git a/tests/MyGame/Example/Referrable.java b/tests/MyGame/Example/Referrable.java index 5d66d2a58..9398597e9 100644 --- a/tests/MyGame/Example/Referrable.java +++ b/tests/MyGame/Example/Referrable.java @@ -53,7 +53,7 @@ public final class Referrable extends Table { start += middle; span -= middle; } else { - return (obj == null ? new Referrable(), obj).__assign(tableOffset, bb); + return (obj == null ? new Referrable() : obj).__assign(tableOffset, bb); } } return null; diff --git a/tests/generate_code.bat b/tests/generate_code.bat index 1437c7c25..041257698 100644 --- a/tests/generate_code.bat +++ b/tests/generate_code.bat @@ -21,7 +21,7 @@ if "%1"=="-b" set buildtype=%2 ..\%buildtype%\flatc.exe -b --schema --bfbs-comments -I include_test monster_test.fbs ..\%buildtype%\flatc.exe --jsonschema --schema -I include_test monster_test.fbs cd ../samples -..\%buildtype%\flatc.exe --cpp --gen-mutable --gen-object-api --cpp-ptr-type flatbuffers::unique_ptr monster.fbs +..\%buildtype%\flatc.exe --cpp --gen-mutable --reflect-names --gen-object-api --cpp-ptr-type flatbuffers::unique_ptr monster.fbs cd ../reflection cd ../tests \ No newline at end of file diff --git a/tests/monster_test.bfbs b/tests/monster_test.bfbs index 422c36feebb3a4ddfa30d75cd90b474b889ed2ca..0093defa39236196ec7a5b46b46b6c25ac81c770 100644 GIT binary patch literal 6184 zcmai&ZHQIJ8OLYWefRFJS&dnZHAic$wX*oKl^{jb>Lw9gMYlFcaJ{>GZuYi!&$--} zRZEZ{MI@9`q)3o{43ZC_NGT;0krGNjNC=@HN(~10@(?{c|S_>=YvXeL52hFWUqcKWbT4~HSTHH!O zGN!_6?PO8*P331w;dhF)`9o2C!Q4q?5JIB8j#xD9kvs)w9ZhO9{a(=9FmTWMG_3hI z9yJ=WMKMxLCyz}YqA@>Zd>i&@T)z3($=|lveJd`-6^5<RwHbcY?? zfavOpiSIDh!wP2UDvqvSbj5`30b|`{q%7TaN7rZNC3@HYwb9T%%F?~%=z6WZgl+=5 zWvphF?w+ITvGR88mK!F5u9GNd=|&i1s@uv-=&mu=VR~BV_BgsO#krou`Kr~?)j~Jp z=nMaAgF=}K4# zD`7ON!v`Ej#@EcLREA>x@qN3t1CqNGr}zYy;oZWmnALwX(Z8PgrvBOZ3)GuC$oQ%` zk;>QvU&I*A0N06Gf|F5l=qHWFW+FODpJlRnujfVtIO$@n1trhdC{Eynl!z0uf6W#VHX{`D?)!)#+C{&Jqhu1!az{;E>{bdAfH zalr)q8_Yy%yJBB<`g4>s8QpVnJrlHx@CD{z$`?TUy5s8~Zs98tbr`m$mL%$dsEqp!^pp#Y|X0% zk?ee>lD`las&So@UNqy@@uF#oOikgRbyp&YZVsMrFU}~z9-F|lutHp zwfBly&e6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e87..61cf63123 100644 --- a/tests/namespace_test/namespace_test2_generated.ts +++ b/tests/namespace_test/namespace_test2_generated.ts @@ -1,6 +1,6 @@ // automatically generated by the FlatBuffers compiler, do not modify -import * as NS9459827973991502386 from "./namespace_test1_generated"; +import * as NS39599748 from "./namespace_test1_generated"; /** * @constructor */ @@ -39,24 +39,24 @@ static getRootAsTableInFirstNS(bb:flatbuffers.ByteBuffer, obj?:TableInFirstNS):T * @param {NamespaceA.NamespaceB.TableInNestedNS=} obj * @returns {NamespaceA.NamespaceB.TableInNestedNS|null} */ -fooTable(obj?:NS9459827973991502386.NamespaceA.NamespaceB.TableInNestedNS):NS9459827973991502386.NamespaceA.NamespaceB.TableInNestedNS|null { +fooTable(obj?:NS39599748.NamespaceA.NamespaceB.TableInNestedNS):NS39599748.NamespaceA.NamespaceB.TableInNestedNS|null { var offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? (obj || new NS9459827973991502386.NamespaceA.NamespaceB.TableInNestedNS).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; + return offset ? (obj || new NS39599748.NamespaceA.NamespaceB.TableInNestedNS).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; }; /** * @returns {NamespaceA.NamespaceB.EnumInNestedNS} */ -fooEnum():NS9459827973991502386.NamespaceA.NamespaceB.EnumInNestedNS { +fooEnum():NS39599748.NamespaceA.NamespaceB.EnumInNestedNS { var offset = this.bb!.__offset(this.bb_pos, 6); - return offset ? /** @type {NamespaceA.NamespaceB.EnumInNestedNS} */ (this.bb!.readInt8(this.bb_pos + offset)) : NS9459827973991502386.NamespaceA.NamespaceB.EnumInNestedNS.A; + return offset ? /** @type {NamespaceA.NamespaceB.EnumInNestedNS} */ (this.bb!.readInt8(this.bb_pos + offset)) : NS39599748.NamespaceA.NamespaceB.EnumInNestedNS.A; }; /** * @param {NamespaceA.NamespaceB.EnumInNestedNS} value * @returns {boolean} */ -mutate_foo_enum(value:NS9459827973991502386.NamespaceA.NamespaceB.EnumInNestedNS):boolean { +mutate_foo_enum(value:NS39599748.NamespaceA.NamespaceB.EnumInNestedNS):boolean { var offset = this.bb!.__offset(this.bb_pos, 6); if (offset === 0) { @@ -71,9 +71,9 @@ mutate_foo_enum(value:NS9459827973991502386.NamespaceA.NamespaceB.EnumInNestedNS * @param {NamespaceA.NamespaceB.StructInNestedNS=} obj * @returns {NamespaceA.NamespaceB.StructInNestedNS|null} */ -fooStruct(obj?:NS9459827973991502386.NamespaceA.NamespaceB.StructInNestedNS):NS9459827973991502386.NamespaceA.NamespaceB.StructInNestedNS|null { +fooStruct(obj?:NS39599748.NamespaceA.NamespaceB.StructInNestedNS):NS39599748.NamespaceA.NamespaceB.StructInNestedNS|null { var offset = this.bb!.__offset(this.bb_pos, 8); - return offset ? (obj || new NS9459827973991502386.NamespaceA.NamespaceB.StructInNestedNS).__init(this.bb_pos + offset, this.bb!) : null; + return offset ? (obj || new NS39599748.NamespaceA.NamespaceB.StructInNestedNS).__init(this.bb_pos + offset, this.bb!) : null; }; /** @@ -95,8 +95,8 @@ static addFooTable(builder:flatbuffers.Builder, fooTableOffset:flatbuffers.Offse * @param {flatbuffers.Builder} builder * @param {NamespaceA.NamespaceB.EnumInNestedNS} fooEnum */ -static addFooEnum(builder:flatbuffers.Builder, fooEnum:NS9459827973991502386.NamespaceA.NamespaceB.EnumInNestedNS) { - builder.addFieldInt8(1, fooEnum, NS9459827973991502386.NamespaceA.NamespaceB.EnumInNestedNS.A); +static addFooEnum(builder:flatbuffers.Builder, fooEnum:NS39599748.NamespaceA.NamespaceB.EnumInNestedNS) { + builder.addFieldInt8(1, fooEnum, NS39599748.NamespaceA.NamespaceB.EnumInNestedNS.A); }; /**