Prevent V8 "assignment to parameter in arguments object" deoptimizations.

Some getter-like functions still need fixing, but this might require a fix in Straps.js first.
This commit is contained in:
Jürg Lehni 2013-12-17 23:28:55 +01:00
parent 3dbad9c477
commit 81651a7379
14 changed files with 139 additions and 133 deletions
src/basic

View file

@ -231,11 +231,11 @@ var Matrix = Base.extend(/** @lends Matrix# */{
* @param {Number} y the y coordinate of the anchor point
* @return {Matrix} this affine transform
*/
rotate: function(angle, center) {
center = Point.read(arguments, 1);
rotate: function(angle /*, center */) {
angle *= Math.PI / 180;
// Concatenate rotation matrix into this one
var x = center.x,
var center = Point.read(arguments, 1),
// Concatenate rotation matrix into this one
x = center.x,
y = center.y,
cos = Math.cos(angle),
sin = Math.sin(angle),