* fixed compilation of the jvm compiler after r31591 - r31593

git-svn-id: trunk@31665 -
This commit is contained in:
Jonas Maebe 2015-09-13 19:06:19 +00:00
parent cd41bf672c
commit 0ea38852ac
2 changed files with 12 additions and 12 deletions

View File

@ -132,7 +132,7 @@ implementation
while not(topowner.owner.symtabletype in [staticsymtable,globalsymtable]) do while not(topowner.owner.symtabletype in [staticsymtable,globalsymtable]) do
topowner:=topowner.owner.defowner; topowner:=topowner.owner.defowner;
{ create procdef } { create procdef }
pd:=cprocdef.create(topowner.owner.symtablelevel+1); pd:=cprocdef.create(topowner.owner.symtablelevel+1,true);
if df_generic in obj.defoptions then if df_generic in obj.defoptions then
include(pd.defoptions,df_generic); include(pd.defoptions,df_generic);
{ method of this objectdef } { method of this objectdef }
@ -297,7 +297,7 @@ implementation
{ create new class (different internal name than enum to prevent name { create new class (different internal name than enum to prevent name
clash; at unit level because we don't want its methods to be nested clash; at unit level because we don't want its methods to be nested
inside a function in case its a local type) } inside a function in case its a local type) }
enumclass:=cobjectdef.create(odt_javaclass,'$'+current_module.realmodulename^+'$'+name+'$InternEnum$'+tostr(def.defid),java_jlenum); enumclass:=cobjectdef.create(odt_javaclass,'$'+current_module.realmodulename^+'$'+name+'$InternEnum$'+tostr(def.defid),java_jlenum,true);
tcpuenumdef(def).classdef:=enumclass; tcpuenumdef(def).classdef:=enumclass;
include(enumclass.objectoptions,oo_is_enum_class); include(enumclass.objectoptions,oo_is_enum_class);
include(enumclass.objectoptions,oo_is_sealed); include(enumclass.objectoptions,oo_is_sealed);
@ -307,11 +307,11 @@ implementation
name that can be used in generated Pascal code without risking an name that can be used in generated Pascal code without risking an
identifier conflict (since it is local to this class; the global name identifier conflict (since it is local to this class; the global name
is unique because it's an identifier that contains $-signs) } is unique because it's an identifier that contains $-signs) }
enumclass.symtable.insert(ctypesym.create('__FPC_TEnumClassAlias',enumclass)); enumclass.symtable.insert(ctypesym.create('__FPC_TEnumClassAlias',enumclass,true));
{ also create an alias for the enum type so that we can iterate over { also create an alias for the enum type so that we can iterate over
all enum values when creating the body of the class constructor } all enum values when creating the body of the class constructor }
temptypesym:=ctypesym.create('__FPC_TEnumAlias',nil); temptypesym:=ctypesym.create('__FPC_TEnumAlias',nil,true);
{ don't pass def to the ttypesym constructor, because then it { don't pass def to the ttypesym constructor, because then it
will replace the current (real) typesym of that def with the alias } will replace the current (real) typesym of that def with the alias }
temptypesym.typedef:=def; temptypesym.typedef:=def;
@ -359,7 +359,7 @@ implementation
(used internally by the JDK) } (used internally by the JDK) }
arrdef:=carraydef.create(0,tenumdef(def).symtable.symlist.count-1,s32inttype); arrdef:=carraydef.create(0,tenumdef(def).symtable.symlist.count-1,s32inttype);
arrdef.elementdef:=enumclass; arrdef.elementdef:=enumclass;
arrsym:=ctypesym.create('__FPC_TEnumValues',arrdef); arrsym:=ctypesym.create('__FPC_TEnumValues',arrdef,true);
enumclass.symtable.insert(arrsym); enumclass.symtable.insert(arrsym);
{ insert "public static values: array of enumclass" that returns $VALUES.clone() { insert "public static values: array of enumclass" that returns $VALUES.clone()
(rather than a dynamic array and using clone --which we don't support yet for arrays-- (rather than a dynamic array and using clone --which we don't support yet for arrays--
@ -482,13 +482,13 @@ implementation
{ create new class (different internal name than pvar to prevent name { create new class (different internal name than pvar to prevent name
clash; at unit level because we don't want its methods to be nested clash; at unit level because we don't want its methods to be nested
inside a function in case its a local type) } inside a function in case its a local type) }
pvclass:=cobjectdef.create(odt_javaclass,'$'+current_module.realmodulename^+'$'+name+'$InternProcvar$'+tostr(def.defid),java_procvarbase); pvclass:=cobjectdef.create(odt_javaclass,'$'+current_module.realmodulename^+'$'+name+'$InternProcvar$'+tostr(def.defid),java_procvarbase,true);
tcpuprocvardef(def).classdef:=pvclass; tcpuprocvardef(def).classdef:=pvclass;
include(pvclass.objectoptions,oo_is_sealed); include(pvclass.objectoptions,oo_is_sealed);
if df_generic in def.defoptions then if df_generic in def.defoptions then
include(pvclass.defoptions,df_generic); include(pvclass.defoptions,df_generic);
{ associate typesym } { associate typesym }
pvclass.symtable.insert(ctypesym.create('__FPC_TProcVarClassAlias',pvclass)); pvclass.symtable.insert(ctypesym.create('__FPC_TProcVarClassAlias',pvclass,true));
{ set external name to match procvar type name } { set external name to match procvar type name }
if not islocal then if not islocal then
pvclass.objextname:=stringdup(name) pvclass.objextname:=stringdup(name)
@ -511,7 +511,7 @@ implementation
{ add local alias for the procvartype that we can use when implementing { add local alias for the procvartype that we can use when implementing
the invoke method } the invoke method }
temptypesym:=ctypesym.create('__FPC_ProcVarAlias',nil); temptypesym:=ctypesym.create('__FPC_ProcVarAlias',nil,true);
{ don't pass def to the ttypesym constructor, because then it { don't pass def to the ttypesym constructor, because then it
will replace the current (real) typesym of that def with the alias } will replace the current (real) typesym of that def with the alias }
temptypesym.typedef:=def; temptypesym.typedef:=def;
@ -527,12 +527,12 @@ implementation
not islocal and not islocal and
not force_no_callback_intf then not force_no_callback_intf then
begin begin
pvintf:=cobjectdef.create(odt_interfacejava,'Callback',nil); pvintf:=cobjectdef.create(odt_interfacejava,'Callback',nil,true);
pvintf.objextname:=stringdup('Callback'); pvintf.objextname:=stringdup('Callback');
if df_generic in def.defoptions then if df_generic in def.defoptions then
include(pvintf.defoptions,df_generic); include(pvintf.defoptions,df_generic);
{ associate typesym } { associate typesym }
pvclass.symtable.insert(ctypesym.create('Callback',pvintf)); pvclass.symtable.insert(ctypesym.create('Callback',pvintf,true));
{ add a method prototype matching the procvar (like the invoke { add a method prototype matching the procvar (like the invoke
in the procvarclass itself) } in the procvarclass itself) }
@ -643,7 +643,7 @@ implementation
jvm_create_procvar_class_intern('__fpc_virtualclassmethod_pv_t'+tostr(wrapperpd.defid),wrapperpv,true); jvm_create_procvar_class_intern('__fpc_virtualclassmethod_pv_t'+tostr(wrapperpd.defid),wrapperpv,true);
{ create alias for the procvar type so we can use it in generated { create alias for the procvar type so we can use it in generated
Pascal code } Pascal code }
typ:=ctypesym.create('__fpc_virtualclassmethod_pv_t'+tostr(wrapperpd.defid),wrapperpv); typ:=ctypesym.create('__fpc_virtualclassmethod_pv_t'+tostr(wrapperpd.defid),wrapperpv,true);
wrapperpv.classdef.typesym.visibility:=vis_strictprivate; wrapperpv.classdef.typesym.visibility:=vis_strictprivate;
symtablestack.top.insert(typ); symtablestack.top.insert(typ);
symtablestack.pop(pd.owner); symtablestack.pop(pd.owner);

View File

@ -379,7 +379,7 @@ implementation
{ create procdef } { create procdef }
if not assigned(orgaccesspd) then if not assigned(orgaccesspd) then
begin begin
pd:=cprocdef.create(normal_function_level); pd:=cprocdef.create(normal_function_level,true);
if df_generic in obj.defoptions then if df_generic in obj.defoptions then
include(pd.defoptions,df_generic); include(pd.defoptions,df_generic);
{ method of this objectdef } { method of this objectdef }