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
3375a6c9
Commit
3375a6c9
authored
Feb 02, 2012
by
Ian Lance Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
compiler: Fix parameter references in method expressions.
From-SVN: r183825
parent
4e15881e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
6 deletions
+17
-6
gcc/go/gofrontend/expressions.cc
+17
-6
No files found.
gcc/go/gofrontend/expressions.cc
View file @
3375a6c9
...
...
@@ -11711,10 +11711,21 @@ Selector_expression::lower_method_expression(Gogo* gogo)
const
Typed_identifier_list
*
method_parameters
=
method_type
->
parameters
();
if
(
method_parameters
!=
NULL
)
{
int
i
=
0
;
for
(
Typed_identifier_list
::
const_iterator
p
=
method_parameters
->
begin
();
p
!=
method_parameters
->
end
();
++
p
)
parameters
->
push_back
(
*
p
);
++
p
,
++
i
)
{
if
(
!
p
->
name
().
empty
()
&&
p
->
name
()
!=
Import
::
import_marker
)
parameters
->
push_back
(
*
p
);
else
{
char
buf
[
20
];
snprintf
(
buf
,
sizeof
buf
,
"$param%d"
,
i
);
parameters
->
push_back
(
Typed_identifier
(
buf
,
p
->
type
(),
p
->
location
()));
}
}
}
const
Typed_identifier_list
*
method_results
=
method_type
->
results
();
...
...
@@ -11774,14 +11785,14 @@ Selector_expression::lower_method_expression(Gogo* gogo)
}
Expression_list
*
args
;
if
(
method_parameters
==
NULL
)
if
(
parameters
->
size
()
<=
1
)
args
=
NULL
;
else
{
args
=
new
Expression_list
();
for
(
Typed_identifier_list
::
const_iterator
p
=
method_
parameters
->
begin
();
p
!=
method_parameters
->
end
()
;
++
p
)
Typed_identifier_list
::
const_iterator
p
=
parameters
->
begin
();
++
p
;
for
(;
p
!=
parameters
->
end
();
++
p
)
{
vno
=
gogo
->
lookup
(
p
->
name
(),
NULL
);
go_assert
(
vno
!=
NULL
);
...
...
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