mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 20:09:25 +02:00
* for all managed VM targets, reject ord->ptr typecasts (except for 0),
typeof(), typeinfo(), seg(), ofs(), settextbuf(), slice(), resourcestring, new(), dispose() git-svn-id: branches/jvmbackend@18747 -
This commit is contained in:
parent
8a95a04e16
commit
d48fa1d7e2
@ -375,7 +375,7 @@ scanner_e_illegal_alignment_directive=02088_E_Illegal alignment directive
|
||||
#
|
||||
# Parser
|
||||
#
|
||||
# 03318 is the last used one
|
||||
# 03319 is the last used one
|
||||
#
|
||||
% \section{Parser messages}
|
||||
% This section lists all parser messages. The parser takes care of the
|
||||
@ -1420,6 +1420,8 @@ parser_d_internal_parser_string=03318_D_Parsing internally generated code: $1
|
||||
% The compiler sometimes internally constructs Pascal code that is subsequently
|
||||
% injected into the program. These messages display such code, in order to help
|
||||
% with debugging errors in them.
|
||||
parser_e_feature_unsupported_for_vm=03319_E_This language feature is not supported on managed VM targets
|
||||
% Certain language features are not supported on targets that are managed virtual machines.
|
||||
% \end{description}
|
||||
# Type Checking
|
||||
#
|
||||
|
@ -410,6 +410,7 @@ const
|
||||
parser_e_no_typed_const=03316;
|
||||
parser_e_java_no_inherited_constructor=03317;
|
||||
parser_d_internal_parser_string=03318;
|
||||
parser_e_feature_unsupported_for_vm=03319;
|
||||
type_e_mismatch=04000;
|
||||
type_e_incompatible_types=04001;
|
||||
type_e_not_equal_types=04002;
|
||||
@ -911,9 +912,9 @@ const
|
||||
option_info=11024;
|
||||
option_help_pages=11025;
|
||||
|
||||
MsgTxtSize = 61956;
|
||||
MsgTxtSize = 62025;
|
||||
|
||||
MsgIdxMax : array[1..20] of longint=(
|
||||
26,89,319,107,87,54,111,23,202,63,
|
||||
26,89,320,107,87,54,111,23,202,63,
|
||||
49,20,1,1,1,1,1,1,1,1
|
||||
);
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -2490,6 +2490,9 @@ implementation
|
||||
if (resultdef.typ=pointerdef) and
|
||||
(convtype<>tc_cchar_2_pchar) then
|
||||
begin
|
||||
if (target_info.system in systems_managed_vm) and
|
||||
(tordconstnode(left).value<>0) then
|
||||
message(parser_e_feature_unsupported_for_vm);
|
||||
hp:=cpointerconstnode.create(TConstPtrUInt(tordconstnode(left).value.uvalue),resultdef);
|
||||
if ([nf_explicit,nf_internal] * flags <> []) then
|
||||
include(hp.flags, nf_explicit);
|
||||
|
@ -2371,6 +2371,8 @@ implementation
|
||||
|
||||
in_typeof_x:
|
||||
begin
|
||||
if target_info.system in systems_managed_vm then
|
||||
message(parser_e_feature_unsupported_for_vm);
|
||||
set_varstate(left,vs_read,[]);
|
||||
resultdef:=voidpointertype;
|
||||
end;
|
||||
@ -2499,6 +2501,8 @@ implementation
|
||||
|
||||
in_typeinfo_x:
|
||||
begin
|
||||
if target_info.system in systems_managed_vm then
|
||||
message(parser_e_feature_unsupported_for_vm);
|
||||
if (left.resultdef.typ=enumdef) and
|
||||
(tenumdef(left.resultdef).has_jumps) then
|
||||
CGMessage(type_e_no_type_info);
|
||||
@ -2531,6 +2535,8 @@ implementation
|
||||
|
||||
in_seg_x :
|
||||
begin
|
||||
if target_info.system in systems_managed_vm then
|
||||
message(parser_e_feature_unsupported_for_vm);
|
||||
set_varstate(left,vs_read,[]);
|
||||
result:=cordconstnode.create(0,s32inttype,false);
|
||||
end;
|
||||
@ -2642,6 +2648,8 @@ implementation
|
||||
|
||||
in_settextbuf_file_x :
|
||||
begin
|
||||
if target_info.system in systems_managed_vm then
|
||||
message(parser_e_feature_unsupported_for_vm);
|
||||
resultdef:=voidtype;
|
||||
{ now we know the type of buffer }
|
||||
hp:=ccallparanode.create(cordconstnode.create(
|
||||
@ -2696,6 +2704,8 @@ implementation
|
||||
|
||||
in_slice_x:
|
||||
begin
|
||||
if target_info.system in systems_managed_vm then
|
||||
message(parser_e_feature_unsupported_for_vm);
|
||||
result:=nil;
|
||||
resultdef:=tcallparanode(left).left.resultdef;
|
||||
if (resultdef.typ <> arraydef) then
|
||||
|
@ -746,6 +746,8 @@ implementation
|
||||
sp : pchar;
|
||||
sym : tsym;
|
||||
begin
|
||||
if target_info.system in systems_managed_vm then
|
||||
message(parser_e_feature_unsupported_for_vm);
|
||||
consume(_RESOURCESTRING);
|
||||
if not(symtablestack.top.symtabletype in [staticsymtable,globalsymtable]) then
|
||||
message(parser_e_resourcestring_only_sg);
|
||||
|
@ -553,6 +553,8 @@ implementation
|
||||
|
||||
in_ofs_x :
|
||||
begin
|
||||
if target_info.system in systems_managed_vm then
|
||||
message(parser_e_feature_unsupported_for_vm);
|
||||
consume(_LKLAMMER);
|
||||
in_args:=true;
|
||||
p1:=comp_expr(true,false);
|
||||
|
@ -75,6 +75,8 @@ implementation
|
||||
destructorpos,
|
||||
storepos : tfileposinfo;
|
||||
begin
|
||||
if target_info.system in systems_managed_vm then
|
||||
message(parser_e_feature_unsupported_for_vm);
|
||||
consume(_LKLAMMER);
|
||||
p:=comp_expr(true,false);
|
||||
{ calc return type }
|
||||
@ -352,6 +354,8 @@ implementation
|
||||
srsymtable : TSymtable;
|
||||
again : boolean; { dummy for do_proc_call }
|
||||
begin
|
||||
if target_info.system in systems_managed_vm then
|
||||
message(parser_e_feature_unsupported_for_vm);
|
||||
consume(_LKLAMMER);
|
||||
p1:=factor(false,false);
|
||||
if p1.nodetype<>typen then
|
||||
|
Loading…
Reference in New Issue
Block a user