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
0c6caf5a
Commit
0c6caf5a
authored
Apr 19, 2011
by
Ian Lance Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change general statement method to always use backend interface.
From-SVN: r172740
parent
fee8b6da
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
32 deletions
+33
-32
gcc/go/gofrontend/gogo-tree.cc
+2
-1
gcc/go/gofrontend/gogo.cc
+1
-1
gcc/go/gofrontend/statements.cc
+0
-0
gcc/go/gofrontend/statements.h
+30
-30
No files found.
gcc/go/gofrontend/gogo-tree.cc
View file @
0c6caf5a
...
...
@@ -1481,7 +1481,8 @@ Function::build_tree(Gogo* gogo, Named_object* named_function)
{
Translate_context
dcontext
(
gogo
,
named_function
,
this
->
block_
,
tree_to_block
(
bind
));
defer_init
=
this
->
defer_stack_
->
get_tree
(
&
dcontext
);
Bstatement
*
bdi
=
this
->
defer_stack_
->
get_backend
(
&
dcontext
);
defer_init
=
stat_to_tree
(
bdi
);
}
}
...
...
gcc/go/gofrontend/gogo.cc
View file @
0c6caf5a
...
...
@@ -3320,7 +3320,7 @@ Block::get_backend(Translate_context* context)
for
(
std
::
vector
<
Statement
*>::
const_iterator
p
=
this
->
statements_
.
begin
();
p
!=
this
->
statements_
.
end
();
++
p
)
bstatements
.
push_back
(
tree_to_stat
((
*
p
)
->
get_tree
(
&
subcontext
)
));
bstatements
.
push_back
(
(
*
p
)
->
get_backend
(
&
subcontext
));
context
->
backend
()
->
block_add_statements
(
ret
,
bstatements
);
...
...
gcc/go/gofrontend/statements.cc
View file @
0c6caf5a
This diff is collapsed.
Click to expand it.
gcc/go/gofrontend/statements.h
View file @
0c6caf5a
...
...
@@ -367,9 +367,9 @@ class Statement
may_fall_through
()
const
{
return
this
->
do_may_fall_through
();
}
//
Return the tree for a statement. BLOCK is the enclosing block
.
tree
get_
tree
(
Translate_context
*
);
//
Convert the statement to the backend representation
.
Bstatement
*
get_
backend
(
Translate_context
*
);
protected
:
// Implemented by child class: traverse the tree.
...
...
@@ -407,9 +407,9 @@ class Statement
do_may_fall_through
()
const
{
return
true
;
}
// Implemented by child class:
return a tree
.
virtual
tree
do_get_
tree
(
Translate_context
*
)
=
0
;
// Implemented by child class:
convert to backend representation
.
virtual
Bstatement
*
do_get_
backend
(
Translate_context
*
)
=
0
;
// Traverse an expression in a statement.
int
...
...
@@ -507,8 +507,8 @@ class Temporary_statement : public Statement
void
do_check_types
(
Gogo
*
);
tree
do_get_
tree
(
Translate_context
*
);
Bstatement
*
do_get_
backend
(
Translate_context
*
);
private
:
// The type of the temporary variable.
...
...
@@ -541,8 +541,8 @@ class Variable_declaration_statement : public Statement
bool
do_traverse_assignments
(
Traverse_assignments
*
);
tree
do_get_
tree
(
Translate_context
*
);
Bstatement
*
do_get_
backend
(
Translate_context
*
);
private
:
Named_object
*
var_
;
...
...
@@ -578,8 +578,8 @@ class Return_statement : public Statement
do_may_fall_through
()
const
{
return
false
;
}
tree
do_get_
tree
(
Translate_context
*
);
Bstatement
*
do_get_
backend
(
Translate_context
*
);
private
:
// Return values. This may be NULL.
...
...
@@ -614,8 +614,8 @@ class Send_statement : public Statement
void
do_check_types
(
Gogo
*
);
tree
do_get_
tree
(
Translate_context
*
);
Bstatement
*
do_get_
backend
(
Translate_context
*
);
private
:
// The channel on which to send the value.
...
...
@@ -822,8 +822,8 @@ class Select_statement : public Statement
do_may_fall_through
()
const
{
return
this
->
clauses_
->
may_fall_through
();
}
tree
do_get_
tree
(
Translate_context
*
);
Bstatement
*
do_get_
backend
(
Translate_context
*
);
private
:
// The select clauses.
...
...
@@ -912,8 +912,8 @@ class Go_statement : public Thunk_statement
{
}
protected
:
tree
do_get_
tree
(
Translate_context
*
);
Bstatement
*
do_get_
backend
(
Translate_context
*
);
};
// A defer statement.
...
...
@@ -926,8 +926,8 @@ class Defer_statement : public Thunk_statement
{
}
protected
:
tree
do_get_
tree
(
Translate_context
*
);
Bstatement
*
do_get_
backend
(
Translate_context
*
);
};
// A label statement.
...
...
@@ -949,8 +949,8 @@ class Label_statement : public Statement
int
do_traverse
(
Traverse
*
);
tree
do_get_
tree
(
Translate_context
*
);
Bstatement
*
do_get_
backend
(
Translate_context
*
);
private
:
// The label.
...
...
@@ -1001,8 +1001,8 @@ class For_statement : public Statement
Statement
*
do_lower
(
Gogo
*
,
Named_object
*
,
Block
*
);
tree
do_get_
tree
(
Translate_context
*
)
Bstatement
*
do_get_
backend
(
Translate_context
*
)
{
gcc_unreachable
();
}
private
:
...
...
@@ -1059,8 +1059,8 @@ class For_range_statement : public Statement
Statement
*
do_lower
(
Gogo
*
,
Named_object
*
,
Block
*
);
tree
do_get_
tree
(
Translate_context
*
)
Bstatement
*
do_get_
backend
(
Translate_context
*
)
{
gcc_unreachable
();
}
private
:
...
...
@@ -1288,8 +1288,8 @@ class Switch_statement : public Statement
Statement
*
do_lower
(
Gogo
*
,
Named_object
*
,
Block
*
);
tree
do_get_
tree
(
Translate_context
*
)
Bstatement
*
do_get_
backend
(
Translate_context
*
)
{
gcc_unreachable
();
}
private
:
...
...
@@ -1434,8 +1434,8 @@ class Type_switch_statement : public Statement
Statement
*
do_lower
(
Gogo
*
,
Named_object
*
,
Block
*
);
tree
do_get_
tree
(
Translate_context
*
)
Bstatement
*
do_get_
backend
(
Translate_context
*
)
{
gcc_unreachable
();
}
private
:
...
...
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