Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:97692 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 1548 invoked from network); 11 Jan 2017 16:38:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Jan 2017 16:38:07 -0000 Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 104.47.34.130 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 104.47.34.130 mail-by2nam01on0130.outbound.protection.outlook.com Received: from [104.47.34.130] ([104.47.34.130:44000] helo=NAM01-BY2-obe.outbound.protection.outlook.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 52/B2-55699-C6F56785 for ; Wed, 11 Jan 2017 11:38:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=RWSoftware.onmicrosoft.com; s=selector1-zend-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=JL4Sz3okwkkdtcruVEozXhCZ2ObHnS/kDbILuNR7hwg=; b=wrUcWxGI7FVKO2djEfm55k+S3jV4vjWwI/LaFIhPOQ+z24iQzz6APLUffcZntJsTjC9GrKPLm0jJS+lEQW2VxKyjYN+ceS4QvAl/mURH+udX/0Yx3ardQO3k85R+k6G0s5DAH4v4+53VfiFFeJHQwdgfGgwa7WpHDMzJTrDjeFA= Received: from MWHPR02MB2477.namprd02.prod.outlook.com (10.168.204.147) by MWHPR02MB2511.namprd02.prod.outlook.com (10.168.205.13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.829.7; Wed, 11 Jan 2017 16:37:59 +0000 Received: from MWHPR02MB2477.namprd02.prod.outlook.com ([10.168.204.147]) by MWHPR02MB2477.namprd02.prod.outlook.com ([10.168.204.147]) with mapi id 15.01.0829.017; Wed, 11 Jan 2017 16:37:58 +0000 To: Derick Rethans CC: PHP internals list , Bob Weinand , Joe Watkins , Zeev Suraski , "Anatol Belski (ab@php.net)" , Nikita Popov , Xinchen Hui Thread-Topic: [PHP-DEV] Change in type-hint representation Thread-Index: AQHSbAGJJH94e0ZZMkmDI5OUmOzW+6Ezav4AgAAN+yg= Date: Wed, 11 Jan 2017 16:37:57 +0000 Message-ID: References: , In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=dmitry@zend.com; x-originating-ip: [25.173.117.4] x-microsoft-exchange-diagnostics: 1;MWHPR02MB2511;7:SmU0+Ej9vkfTUxaY8ft0ALytAyqOV3fSFUfvEpAXbe+muLeYTLOxbxikVtjRp8NG4xywbs13B15ntK27shVyfdfH01L7pbtdEezqDRANpxnLKOOosTKa5NdPkFIvRZxPAlY8DAaZ7v1ReRD1DqaX9Vu7Uy2JmSnB/zqle9IuMlYuoUmo8lIjRe6xUrqBbR8+8U5WXfI6QkQQ1mrdZzH8UtZWekc/Y8thuGhplyrRfRHBnm9is2BFjxd81UGJhu2AozUe351bDuiKwX3Mj6uLcX5i9qLX+CNy+yA/Xbmyc5pfePq0N0kBsrSmB7ojFMhSedWIjY5Z6Y7ro7n/9hFSA2Dqh/VybP8lbGaf6rjpS3awMpDONd2BOF+KtmaaB8VqPwTXyRT/HGhIT4PTtKYGZTpD/5ntbCmErM9LcIRrZlvcfLw/Nrw4WXwrbRXVNQSncKviYSQyqnl/f0tZGRI5jQ== x-forefront-antispam-report: SFV:SKI;SCL:-1SFV:NSPM;SFS:(10019020)(7916002)(39450400003)(199003)(24454002)(189002)(377454003)(9686003)(86362001)(575784001)(5660300001)(189998001)(7736002)(6916009)(3660700001)(107886002)(7696004)(33656002)(74316002)(8936002)(3280700002)(81156014)(2906002)(8676002)(81166006)(6116002)(110136003)(4326007)(3846002)(102836003)(7906003)(606005)(54356999)(54896002)(6436002)(6306002)(2950100002)(6506006)(76176999)(50986999)(229853002)(92566002)(68736007)(77096006)(122556002)(106356001)(38730400001)(39060400001)(106116001)(101416001)(105586002)(97736004)(54906002)(99286003)(236005)(55016002)(25786008)(2900100001)(4001430100002)(66066001);DIR:OUT;SFP:1102;SCL:1;SRVR:MWHPR02MB2511;H:MWHPR02MB2477.namprd02.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; x-ms-office365-filtering-correlation-id: 4b48cbe9-4221-4d91-72e2-08d43a40335d x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:MWHPR02MB2511; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(158342451672863)(166708455590820)(192278398808882); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6041248)(20161123562025)(20161123555025)(20161123564025)(20161123560025)(6072148);SRVR:MWHPR02MB2511;BCL:0;PCL:0;RULEID:;SRVR:MWHPR02MB2511; x-forefront-prvs: 01842C458A received-spf: None (protection.outlook.com: zend.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: multipart/alternative; boundary="_000_MWHPR02MB24778BAD673E0A28C300EAACBF660MWHPR02MB2477namp_" MIME-Version: 1.0 X-OriginatorOrg: zend.com X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Jan 2017 16:37:57.7150 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 32210298-c08b-4829-8097-6b12c025a892 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR02MB2511 Subject: Re: [PHP-DEV] Change in type-hint representation From: dmitry@zend.com (Dmitry Stogov) --_000_MWHPR02MB24778BAD673E0A28C300EAACBF660MWHPR02MB2477namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable The patch was updated according to feedback: added comments, better names a= nd encapsulation, less magic, better code reuse, keep a free bit in zend_ty= pe for future extension. https://gist.github.com/dstogov/1b25079856afccf0d69f77d499cb0ab1 Thanks. Dmitry. ________________________________ From: Derick Rethans Sent: Wednesday, January 11, 2017 6:43:50 PM To: Dmitry Stogov Cc: PHP internals list; Bob Weinand; Joe Watkins; Zeev Suraski; Anatol Bels= ki (ab@php.net); Nikita Popov; Xinchen Hui Subject: Re: [PHP-DEV] Change in type-hint representation On Wed, 11 Jan 2017, Dmitry Stogov wrote: > Hi, > > > I propose to introduce a unified type representation (zend_type). > > Now it's going to be used for typing of arguments and return values. > > Later we should use it for properties and other things. > > > https://gist.github.com/dstogov/1b25079856afccf0d69f77d499cb0ab1 > > > The main changes are in zend_types.h and zend_compile.h, the rest is just= an adoption for new type representation. > > I don't think we need RFC, because this is just an internal change that d= oesn't change behavior. > > > I got the idea working on typed properties together with Bob and Joe. > > https://github.com/php/php-src/compare/master...bwoebi:typed_ref_properti= es > > I think it would be better to introduce zend_type and then continue work = on typed properties. > > > Any comments? 208 + if (new_arg_info[i].type > 0x3ff) { I wouldn't use a magical constant there, but do a define of what 0x3ff actually is. 209 + /* this is a calss name */ That's spelled "class" (not "calss"). cheers, Derick --_000_MWHPR02MB24778BAD673E0A28C300EAACBF660MWHPR02MB2477namp_--