From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=51686 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ODvSa-0005V9-6Y for qemu-devel@nongnu.org; Mon, 17 May 2010 04:14:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1ODvSZ-0004hO-0f for qemu-devel@nongnu.org; Mon, 17 May 2010 04:14:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:6879) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ODvSY-0004hD-Pk for qemu-devel@nongnu.org; Mon, 17 May 2010 04:13:58 -0400 Message-ID: <4BF0FAC1.5090401@redhat.com> Date: Mon, 17 May 2010 11:13:53 +0300 From: Avi Kivity MIME-Version: 1.0 References: <6e14cbfe3764b46d9bd6d2db61d41fd9c85dd54e.1273843151.git.jan.kiszka@siemens.com> <4BED9358.1000106@codemonkey.ws> <20100516173809.GA29814@shareable.org> <4BF0E6CD.7090909@redhat.com> <4BF0F2FD.90408@siemens.com> <4BF0F437.6040302@redhat.com> <4BF0F6D3.8020803@siemens.com> <4BF0FA13.10808@redhat.com> In-Reply-To: <4BF0FA13.10808@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 3/8] Add QBuffer List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: Anthony Liguori , Juan Quintela , "qemu-devel@nongnu.org" , Markus Armbruster , Luiz Capitulino On 05/17/2010 11:10 AM, Avi Kivity wrote: > > Another way of looking at it: if the client sees { __class__: foo, f1: > 10, f2: 9 }, it cannot derive any information from __class__ unless it > was aware of foo beforehand. If that's the case, let's make it part > of the schema so it is available at compile time instead of runtime. > Or both. That's similar to a non-object field's type being described both in the schema at during runtime. A static parser can verify __class__ matches the expectations, a dynamic parser can look up __class__ and call the appropriate constructor. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic.