Inline builtin Math functions functions in more cases.
authorfschneider@chromium.org <fschneider@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 8 Feb 2012 12:08:46 +0000 (12:08 +0000)
committerfschneider@chromium.org <fschneider@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 8 Feb 2012 12:08:46 +0000 (12:08 +0000)
commitb8b50400d25397bbba30f3d1b623920f306b0551
tree4558dd298f47a5c64760f581e9547c2227a3d233
parent8e1399c761a9bfdefdf6231bee14d8f9a2285792
Inline builtin Math functions functions in more cases.

Until now we only could inline as specialized HIR instructions when called
as a method (e.g. Math.abs)

It is very common practice to abbreviate calls to those functions by defining
a global or local variable like:

var a = Math.abs;
var x = a(123);

This change allows inlining them when called as a function (global or local).
Review URL: https://chromiumcodereview.appspot.com/9365013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10640 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/hydrogen.cc
src/hydrogen.h
test/mjsunit/compiler/math-floor-global.js [new file with mode: 0644]
test/mjsunit/compiler/math-floor-local.js [new file with mode: 0644]