From patchwork Fri Oct 28 22:06:27 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Lance Taylor X-Patchwork-Id: 122502 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id CE0591007DB for ; Sat, 29 Oct 2011 09:07:00 +1100 (EST) Received: (qmail 13878 invoked by alias); 28 Oct 2011 22:06:55 -0000 Received: (qmail 13867 invoked by uid 22791); 28 Oct 2011 22:06:54 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RP_MATCHES_RCVD, SPF_HELO_PASS, T_TVD_MIME_NO_HEADERS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.44.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 28 Oct 2011 22:06:30 +0000 Received: from wpaz9.hot.corp.google.com (wpaz9.hot.corp.google.com [172.24.198.73]) by smtp-out.google.com with ESMTP id p9SM6TXu003230 for ; Fri, 28 Oct 2011 15:06:29 -0700 Received: from pzk36 (pzk36.prod.google.com [10.243.19.164]) by wpaz9.hot.corp.google.com with ESMTP id p9SM05Z8013865 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Fri, 28 Oct 2011 15:06:28 -0700 Received: by pzk36 with SMTP id 36so14481525pzk.7 for ; Fri, 28 Oct 2011 15:06:28 -0700 (PDT) Received: by 10.68.13.35 with SMTP id e3mr6294096pbc.31.1319839588433; Fri, 28 Oct 2011 15:06:28 -0700 (PDT) Received: by 10.68.13.35 with SMTP id e3mr6294086pbc.31.1319839588341; Fri, 28 Oct 2011 15:06:28 -0700 (PDT) Received: from coign.google.com ([2620:0:1000:2301:f2de:f1ff:fe40:72a8]) by mx.google.com with ESMTPS id km16sm7379840pbb.9.2011.10.28.15.06.27 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 28 Oct 2011 15:06:27 -0700 (PDT) From: Ian Lance Taylor To: gcc-patches@gcc.gnu.org, gofrontend-dev@googlegroups.com Subject: Go patch committed: Add rune type Date: Fri, 28 Oct 2011 15:06:27 -0700 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 X-System-Of-Record: true X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org 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 -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));