diff mbox

Go patch committed: Add rune type

Message ID mcrr51wzs7w.fsf@dhcp-172-18-216-180.mtv.corp.google.com
State New
Headers show

Commit Message

Ian Lance Taylor Oct. 28, 2011, 10:06 p.m. UTC
The Go language has a new type, rune, which is currently an alias for
int.  In the future it will be an alias for int32.  This type represents
a Unicode character.  Bootstrapped and ran Go testsuite on
x86_64-unknown-linux-gnu.  Committed to mainline.

Ian
diff mbox

Patch

diff -r b1a5c9a0b9ff go/gogo.cc
--- a/go/gogo.cc	Wed Oct 26 21:55:17 2011 -0700
+++ b/go/gogo.cc	Fri Oct 28 15:04:19 2011 -0700
@@ -85,6 +85,10 @@ 
   Named_object* byte_type = this->declare_type("byte", loc);
   byte_type->set_type_value(uint8_type);
 
+  // "rune" is an alias for "int".
+  Named_object* rune_type = this->declare_type("rune", loc);
+  rune_type->set_type_value(int_type);
+
   this->add_named_type(Type::make_integer_type("uintptr", true,
 					       pointer_size,
 					       RUNTIME_TYPE_KIND_UINTPTR));