jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Metacircular Research Platform
  • MRP-14

C to Java JNI entry overhaul

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: New Feature New Feature
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Fixed
  • Affects Version/s: 0.1
  • Fix Version/s: 0.1
  • Component/s: Runtime: JNI
  • Labels:
    None

Description

Currently a call into the runtime from C via JNI can, in the case of a method call or creating a new object, use bespoke architecture and OS dependent stack manipulation code. This code is very problematic to port, in particular if an architecture uses registers for var args, like x86 64. By converting the access to var args into C code we can remove many thousands of lines of bespoke stack manipulation code with a few lines of C. This C code doesn't need porting to new architectures as the var arg semantics on both side will be the same. As a va_list passed by copying and not by reference, the va_copy routine is necessary to establish a va_list that can be worked over by syscalls. This requires memory allocation and freeing, and so this approach may be marginally less optimal. To handle the cases where the var args are specified as ... , C routines should bounce in the appropriate V routine with a va_list.

Activity

  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Ian Rogers added a comment - 06/Jun/09 4:00 PM

Fix in http://git.codehaus.org/gitweb.cgi?p=mrp.git;a=commit;h=007fa19fddd2eaeb31f02a87d512e903a4778c92

Show
Ian Rogers added a comment - 06/Jun/09 4:00 PM Fix in http://git.codehaus.org/gitweb.cgi?p=mrp.git;a=commit;h=007fa19fddd2eaeb31f02a87d512e903a4778c92

People

  • Assignee:
    Ian Rogers
    Reporter:
    Ian Rogers
Vote (0)
Watch (0)

Dates

  • Created:
    06/Jun/09 3:44 PM
    Updated:
    06/Jun/09 4:00 PM
    Resolved:
    06/Jun/09 4:00 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.