Last Comment Bug 768249 - IonMonkey: Refactor MCallOptimize.cpp
: IonMonkey: Refactor MCallOptimize.cpp
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: unspecified
: x86_64 Linux
: -- normal (vote)
: ---
Assigned To: Sean Stangl [:sstangl]
:
Mentors:
Depends on: 767665
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-25 15:41 PDT by Sean Stangl [:sstangl]
Modified: 2012-07-03 04:17 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Refactor MCallOptimize. (28.71 KB, patch)
2012-06-26 14:57 PDT, Sean Stangl [:sstangl]
dvander: review+
Details | Diff | Review

Description Sean Stangl [:sstangl] 2012-06-25 15:41:46 PDT
File is large and mostly comprised of a single function with oodles of indentation. Should be prettified.
Comment 1 Sean Stangl [:sstangl] 2012-06-26 14:57:59 PDT
Created attachment 636889 [details] [diff] [review]
Refactor MCallOptimize.
Comment 2 David Anderson [:dvander] 2012-06-26 17:04:57 PDT
Comment on attachment 636889 [details] [diff] [review]
Refactor MCallOptimize.

Review of attachment 636889 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks for doing this, it's about a trillion times more readable now.

::: js/src/ion/CodeGenerator.cpp
@@ +990,4 @@
>      types::TypeObject *typeObj = lir->mir()->type();
>      uint32 count = lir->mir()->count();
>  
> +    JS_ASSERT((int32_t)count >= 0);

whoops
Comment 3 Sean Stangl [:sstangl] 2012-06-26 17:26:27 PDT
http://hg.mozilla.org/projects/ionmonkey/rev/54c888b66524
Comment 4 Nicolas B. Pierron [:nbp] 2012-07-03 04:17:51 PDT
Thanks for refactoring MCallOptimize function :)

This was on my todo list but I did not found a good way to split on discardCallArgs such as we can split the original function in 2 pieces only returning boolean values — the first being the ability to split, and the second the ability to compile.

The current method first select base on the native function before extracting any argument info in each specialized function.  This duplication does not seems to be armful as only function calls are duplicated.

Note You need to log in before you can comment on or make changes to this bug.