aboutsummaryrefslogtreecommitdiff
path: root/gcc/go/gofrontend/expressions.h
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2019-06-21 22:00:57 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2019-06-21 22:00:57 +0000
commit0514cb33749fefd2542e7294a35d0ef0ccae30b3 (patch)
tree7c947df211513d9ca430a41d1980e1b9e624177d /gcc/go/gofrontend/expressions.h
parentfd4e7255b60901581961b62e364ce85baf52d631 (diff)
downloadgcc-0514cb33749fefd2542e7294a35d0ef0ccae30b3.zip
gcc-0514cb33749fefd2542e7294a35d0ef0ccae30b3.tar.gz
gcc-0514cb33749fefd2542e7294a35d0ef0ccae30b3.tar.bz2
compiler: open code some type assertions
Now that type equality is just simple pointer equality, we can open code some type assertions instead of making runtime calls. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/182977 From-SVN: r272577
Diffstat (limited to 'gcc/go/gofrontend/expressions.h')
-rw-r--r--gcc/go/gofrontend/expressions.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/go/gofrontend/expressions.h b/gcc/go/gofrontend/expressions.h
index 2c505a9..2c6a080 100644
--- a/gcc/go/gofrontend/expressions.h
+++ b/gcc/go/gofrontend/expressions.h
@@ -1074,6 +1074,11 @@ class Expression
static Expression*
unpack_direct_iface(Expression*, Location);
+ // Return an expression representing the type descriptor field of an
+ // interface.
+ static Expression*
+ get_interface_type_descriptor(Expression*);
+
// Look through the expression of a Slice_value_expression's valmem to
// find an call to makeslice.
static std::pair<Call_expression*, Temporary_statement*>
@@ -1257,9 +1262,6 @@ class Expression
}
static Expression*
- get_interface_type_descriptor(Expression*);
-
- static Expression*
convert_interface_to_type(Type*, Expression*, Location);
static Expression*