Commit f5c632b5 authored by dslomov@chromium.org's avatar dslomov@chromium.org

Ensure that ToPositiveInteger is optimizable.

'throw %NAME(..)' cause hydrogen optimizations to be disabled for
surrounding function. This patch rectifies.

R=yangguo@chromium.org

Review URL: https://codereview.chromium.org/71153004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17832 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 99133912
...@@ -665,7 +665,7 @@ function DefaultString(x) { ...@@ -665,7 +665,7 @@ function DefaultString(x) {
function ToPositiveInteger(x, rangeErrorName) { function ToPositiveInteger(x, rangeErrorName) {
var i = TO_INTEGER(x); var i = TO_INTEGER(x);
if (i < 0) throw %MakeRangeError(rangeErrorName); if (i < 0) throw MakeRangeError(rangeErrorName);
return i; return i;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment