Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
13306d4f
Commit
13306d4f
authored
Oct 15, 1994
by
Mike Stump
Committed by
Mike Stump
Oct 15, 1994
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move a few important patches (this offset calculations for vtables).
From-SVN: r8280
parent
13fbb038
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
6 deletions
+25
-6
gcc/cp/ChangeLog
+13
-0
gcc/cp/class.c
+12
-6
No files found.
gcc/cp/ChangeLog
View file @
13306d4f
Fri Oct 14 18:54:48 1994 Mike Stump <mrs@cygnus.com>
* class.c (modify_one_vtable): Since the DECL_CONTEXT of fndecl can
be set just below, use current_fndecl instead.
Thu Oct 13 17:44:55 1994 Jason Merrill (jason@phydeaux.cygnus.com)
* method.c (build_decl_overload): Set numeric_outputed_need_bar to 0.
...
...
@@ -40,6 +45,14 @@ Tue Oct 11 23:48:31 1994 Jason Merrill (jason@phydeaux.cygnus.com)
* various: Cast pointer arguments to bzero and bcopy to char *.
Tue Oct 11 19:34:32 1994 Mike Stump <mrs@cygnus.com>
* class.c (get_derived_offset): Added a type parameter to limit how
far up the CLASSTYPE_VFIELD_PARENT chain we search.
* class.c (modify_one_vtable, fixup_vtable_deltas): When forming the
offset to put into the vtable for the this parameter, make sure we
don't offset from a parent of the DECL_CONTEXT of the function.
Mon Oct 10 00:56:53 1994 Jason Merrill (jason@phydeaux.cygnus.com)
* lex.c (cons_up_default_function): Mark methods in a template class
...
...
gcc/cp/class.c
View file @
13306d4f
...
...
@@ -1119,10 +1119,14 @@ get_vfield_offset (binfo)
BINFO_OFFSET
(
binfo
));
}
/* Get the offset to the start of the original binfo that we derived this
binfo from. */
tree
get_derived_offset
(
binfo
)
tree
binfo
;
/* Get the offset to the start of the original binfo that we derived
this binfo from. If we find TYPE first, return the offset only
that far. The shortened search is useful because the this pointer
on method calling is expected to point to a DECL_CONTEXT (fndecl)
object, and not a baseclass of it. */
static
tree
get_derived_offset
(
binfo
,
type
)
tree
binfo
,
type
;
{
tree
offset1
=
get_vfield_offset
(
TYPE_BINFO
(
BINFO_TYPE
(
binfo
)));
tree
offset2
;
...
...
@@ -1131,6 +1135,8 @@ tree get_derived_offset (binfo)
&&
(
i
=
CLASSTYPE_VFIELD_PARENT
(
BINFO_TYPE
(
binfo
)))
!=
-
1
)
{
tree
binfos
=
BINFO_BASETYPES
(
binfo
);
if
(
BINFO_TYPE
(
binfo
)
==
type
)
break
;
binfo
=
TREE_VEC_ELT
(
binfos
,
i
);
}
offset2
=
get_vfield_offset
(
TYPE_BINFO
(
BINFO_TYPE
(
binfo
)));
...
...
@@ -2261,7 +2267,7 @@ modify_one_vtable (binfo, t, fndecl, pfn)
Also, we want just the delta bewteen the most base class
that we derived this vfield from and us. */
base_offset
=
size_binop
(
PLUS_EXPR
,
get_derived_offset
(
binfo
),
get_derived_offset
(
binfo
,
DECL_CONTEXT
(
current_fndecl
)
),
BINFO_OFFSET
(
binfo
));
this_offset
=
size_binop
(
MINUS_EXPR
,
offset
,
base_offset
);
...
...
@@ -2366,7 +2372,7 @@ fixup_vtable_deltas (binfo, t)
Also, we want just the delta bewteen the most base class
that we derived this vfield from and us. */
base_offset
=
size_binop
(
PLUS_EXPR
,
get_derived_offset
(
binfo
),
get_derived_offset
(
binfo
,
DECL_CONTEXT
(
fndecl
)
),
BINFO_OFFSET
(
binfo
));
this_offset
=
size_binop
(
MINUS_EXPR
,
offset
,
base_offset
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment