Fix function calls in lirasm

RESOLVED FIXED

Status

()

Core
JavaScript Engine
--
enhancement
RESOLVED FIXED
9 years ago
9 years ago

People

(Reporter: Paritosh Aggarwal, Assigned: Paritosh Aggarwal)

Tracking

({student-project})

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 3 obsolete attachments)

(Assignee)

Description

9 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.10) Gecko/2009042523 Ubuntu/9.04 (jaunty) Firefox/3.0.10
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.10) Gecko/2009042523 Ubuntu/9.04 (jaunty) Firefox/3.0.10

Refer to - lirasm<https://bugzilla.mozilla.org/show_bug.cgi?id=484142>
Enhancement lirasm - feature of function calls needs to be supported.

Reproducible: Always
(Assignee)

Updated

9 years ago
Keywords: student-project
(Assignee)

Updated

9 years ago
Component: General → JavaScript Engine
Product: Firefox → Core
Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee: nobody → general
QA Contact: general → general
(Assignee)

Comment 1

9 years ago
Created attachment 383301 [details] [diff] [review]
add execute option. Implement c library function call support

Adds support to execute the given LIR fragment using --execute option. Implements the basic framework to call C library functions, and adds support to a few functions for demonstration.
Attachment #383301 - Flags: review?(jorendorff)
Comment on attachment 383301 [details] [diff] [review]
add execute option. Implement c library function call support

Since I wrote some of the code in this patch, forwarding to graydon for review.

There are a few places where this patch is against the js/src style rules, which are here:  https://wiki.mozilla.org/JavaScript:SpiderMonkey:C_Coding_Style

(Of course a lot of code in js/src breaks the style rules, but new code should try to comply.)

>+		opcode = LIR_jt;

Use spaces, not tabs.

>+        }
>+        // Select return type from opcode.

You deleted a blank line here.  The style rules call for a blank line before a comment line.

>+    }
>+    else {

Style rules call for "} else {" all on one line.

>         assert(ins);
>-
>         // Save label and do any back-patching of deferred forward-jumps.

Another blank line was deleted here.
Attachment #383301 - Flags: review?(jorendorff)
Er, I didn't actually forward that review request to graydon, since I think paritosh is working on a new version of this patch.
Paritosh, I don't see anything about the --execute flag in this patch.
Assignee: general → contactparitosh
Status: NEW → ASSIGNED
(Assignee)

Comment 5

9 years ago
Created attachment 383721 [details]
LIRAsm - Provide provision for executing functions which return float

I added two execution functions for use with '--execute', so floating point returns can be handled.
Hopefully the whitespace formatting was fine this time.
Attachment #383301 - Attachment is obsolete: true
Attachment #383721 - Flags: review?(jorendorff)
(Assignee)

Updated

9 years ago
Attachment #383721 - Attachment is patch: false
Attachment #383721 - Flags: review?(jorendorff)
(Assignee)

Comment 6

9 years ago
Created attachment 383725 [details] [diff] [review]
LIRAsm - Provide provision for executing functions which return float.
Attachment #383721 - Attachment is obsolete: true
Attachment #383725 - Flags: review?(jorendorff)
(Assignee)

Comment 7

9 years ago
Created attachment 383776 [details] [diff] [review]
lirasm - Add support for calling selected C library functions.
Attachment #383725 - Attachment is obsolete: true
Attachment #383776 - Flags: review?(jorendorff)
Attachment #383725 - Flags: review?(jorendorff)
Attachment #383776 - Flags: review?(jorendorff)
Attachment #383776 - Flags: review?(graydon)
Attachment #383776 - Flags: review+
Comment on attachment 383776 [details] [diff] [review]
lirasm - Add support for calling selected C library functions. 

Forwarding to graydon for additional review, since I wrote some of that code.

Updated

9 years ago
Attachment #383776 - Flags: review?(graydon) → review+
Comment on attachment 383776 [details] [diff] [review]
lirasm - Add support for calling selected C library functions. 

Looks good. Nice work!
(Assignee)

Updated

9 years ago
Blocks: 499016

Comment 10

9 years ago
http://hg.mozilla.org/mozilla-central/rev/62697fa05531
Status: ASSIGNED → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.