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
967d49d1
Commit
967d49d1
authored
Jan 14, 2014
by
Ian Lance Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
compiler: Add Backend Function type.
From-SVN: r206611
parent
d126a4ae
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
0 deletions
+35
-0
gcc/go/gofrontend/types.cc
+11
-0
gcc/go/gofrontend/types.h
+24
-0
No files found.
gcc/go/gofrontend/types.cc
View file @
967d49d1
...
...
@@ -4066,6 +4066,17 @@ Type::make_function_type(Typed_identifier* receiver,
return
new
Function_type
(
receiver
,
parameters
,
results
,
location
);
}
// Make a backend function type.
Backend_function_type
*
Type
::
make_backend_function_type
(
Typed_identifier
*
receiver
,
Typed_identifier_list
*
parameters
,
Typed_identifier_list
*
results
,
Location
location
)
{
return
new
Backend_function_type
(
receiver
,
parameters
,
results
,
location
);
}
// Class Pointer_type.
// Traversal.
...
...
gcc/go/gofrontend/types.h
View file @
967d49d1
...
...
@@ -19,6 +19,7 @@ class Float_type;
class
Complex_type
;
class
String_type
;
class
Function_type
;
class
Backend_function_type
;
class
Struct_field
;
class
Struct_field_list
;
class
Struct_type
;
...
...
@@ -484,6 +485,12 @@ class Type
Typed_identifier_list
*
results
,
Location
);
static
Backend_function_type
*
make_backend_function_type
(
Typed_identifier
*
receiver
,
Typed_identifier_list
*
parameters
,
Typed_identifier_list
*
results
,
Location
);
static
Pointer_type
*
make_pointer_type
(
Type
*
);
...
...
@@ -1896,6 +1903,23 @@ class Function_type : public Type
Btype
*
fnbtype_
;
};
// The type of a function's backend representation.
class
Backend_function_type
:
public
Function_type
{
public
:
Backend_function_type
(
Typed_identifier
*
receiver
,
Typed_identifier_list
*
parameters
,
Typed_identifier_list
*
results
,
Location
location
)
:
Function_type
(
receiver
,
parameters
,
results
,
location
)
{
}
protected
:
Btype
*
do_get_backend
(
Gogo
*
gogo
)
{
return
this
->
get_backend_fntype
(
gogo
);
}
};
// The type of a pointer.
class
Pointer_type
:
public
Type
...
...
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