From harmony-dev-return-14737-apmail-incubator-harmony-dev-archive=incubator.apache.org@incubator.apache.org Mon Oct 02 07:19:08 2006 Return-Path: Delivered-To: apmail-incubator-harmony-dev-archive@www.apache.org Received: (qmail 17132 invoked from network); 2 Oct 2006 07:19:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 2 Oct 2006 07:19:08 -0000 Received: (qmail 9103 invoked by uid 500); 2 Oct 2006 07:19:05 -0000 Delivered-To: apmail-incubator-harmony-dev-archive@incubator.apache.org Received: (qmail 9067 invoked by uid 500); 2 Oct 2006 07:19:05 -0000 Mailing-List: contact harmony-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-dev@incubator.apache.org Received: (qmail 9055 invoked by uid 99); 2 Oct 2006 07:19:05 -0000 Received: from idunn.apache.osuosl.org (HELO idunn.apache.osuosl.org) (140.211.166.84) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Oct 2006 00:19:05 -0700 Authentication-Results: idunn.apache.osuosl.org header.from=maksim.ananjev@gmail.com; domainkeys=good X-ASF-Spam-Status: No, hits=0.5 required=5.0 tests=DNS_FROM_RFC_ABUSE DomainKey-Status: good X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 Received: from [64.233.166.176] ([64.233.166.176:4582] helo=py-out-1112.google.com) by idunn.apache.osuosl.org (ecelerity 2.1.1.8 r(12930)) with ESMTP id CE/02-16031-56DB0254 for ; Mon, 02 Oct 2006 00:19:02 -0700 Received: by py-out-1112.google.com with SMTP id c30so2620283pyc for ; Mon, 02 Oct 2006 00:18:58 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:subject:from:to:content-type:date:message-id:mime-version:x-mailer:content-transfer-encoding; b=I4GCpLVxZDqWpCAhUQeGLJ4AqBqnxTCTBICCN6iSHmfueqITEMwk/vp3pYiJk+goAqpHDEmAQMup+oG7sRNSbQ69U1fBPnrdjBcUiubZnBSn7rvhtCqiq6D/v2s/Z4gbrskkhfOdqaZngiaB1sJgK00Vqkw9g+AtG1sePmyqvp8= Received: by 10.65.237.15 with SMTP id o15mr6673769qbr; Mon, 02 Oct 2006 00:18:58 -0700 (PDT) Received: from host-85-118-231-77.academ.org ( [81.222.113.154]) by mx.gmail.com with ESMTP id e18sm5465025qba.2006.10.02.00.18.56; Mon, 02 Oct 2006 00:18:58 -0700 (PDT) Subject: [drlvm][jitrino]getting field descriptor in translator From: Maksim Ananjev To: harmony-dev@incubator.apache.org Content-Type: text/plain Date: Mon, 02 Oct 2006 14:19:25 +0700 Message-Id: <1159773565.9323.39.camel@gaus-desktop> Mime-Version: 1.0 X-Mailer: Evolution 2.6.1 Content-Transfer-Encoding: 7bit X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi! I'm developing package of multidimensional arrays according to JSR-83 and I want it to be optimized in JIT-compiler. The idea is to eliminate redundant boundchecks in a sort of way already implemented ABCD algorithm eliminates redundant boundchecks in one-dimensional arrays. So I need to implement a special instruction in translator/IRBuilder for multiarray boundcheck. But there's a problem: I need some field descriptors of my class "DoubleMultiArray3D" to generate operands for the instruction (exactly, the capacities of array). There is a method "resolveField" in CompilationInterface, but it takes index in constant pool as operand - and I don't know index at that moment. I know just string name of the field. I tried the following: to get pointer to struct Class by "methodGetClass" function of JavaByteCodeTranslator - Struct Class has pointer to array of fields as member - and then find proper field in array of fields. But this last "field" pointer turned out to point to uninitialized memory. Such behavior is strange because almost the same code written in Class.cpp file allows working with fields (the same memory is initialized in a proper way). Something fatal happens while returning Class pointer to translator. I'll appreciate any suggestions on how to get field descriptor in translator, if I know the name of field and have pointer to Class. ------ Maksim --------------------------------------------------------------------- Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org For additional commands, e-mail: harmony-dev-help@incubator.apache.org