Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(176)

Unified Diff: src/runtime.js

Issue 1275013004: [runtime] Simplify TO_INT32/TO_UINT32 abstract operations. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/macros.py ('k') | src/runtime/runtime.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime.js
diff --git a/src/runtime.js b/src/runtime.js
index 5e37e26c3c9d7df7bcf802c01bfe0fbc04633c34..21b3da92353eb5cf1a05b5b6700d19dcca5712b7 100644
--- a/src/runtime.js
+++ b/src/runtime.js
@@ -70,7 +70,6 @@ var $nonStringToString;
var $sameValue;
var $sameValueZero;
var $toBoolean;
-var $toInt32;
var $toInteger;
var $toLength;
var $toName;
@@ -78,7 +77,6 @@ var $toNumber;
var $toPositiveInteger;
var $toPrimitive;
var $toString;
-var $toUint32;
(function(global, utils) {
@@ -610,7 +608,7 @@ APPLY_PREPARE = function APPLY_PREPARE(args) {
}
}
- length = (args == null) ? 0 : %$toUint32(args.length);
+ length = (args == null) ? 0 : TO_UINT32(args.length);
// We can handle any number of apply arguments if the stack is
// big enough, but sanity check the value to avoid overflow when
@@ -838,20 +836,6 @@ function ToLength(arg) {
}
-// ECMA-262, section 9.6, page 34.
-function ToUint32(x) {
- if (%_IsSmi(x) && x >= 0) return x;
- return %NumberToJSUint32(ToNumber(x));
-}
-
-
-// ECMA-262, section 9.5, page 34
-function ToInt32(x) {
- if (%_IsSmi(x)) return x;
- return %NumberToJSInt32(ToNumber(x));
-}
-
-
// ES5, section 9.12
function SameValue(x, y) {
if (typeof x != typeof y) return false;
@@ -973,7 +957,6 @@ $nonStringToString = NonStringToString;
$sameValue = SameValue;
$sameValueZero = SameValueZero;
$toBoolean = ToBoolean;
-$toInt32 = ToInt32;
$toInteger = ToInteger;
$toLength = ToLength;
$toName = ToName;
@@ -981,6 +964,5 @@ $toNumber = ToNumber;
$toPositiveInteger = ToPositiveInteger;
$toPrimitive = ToPrimitive;
$toString = ToString;
-$toUint32 = ToUint32;
})
« no previous file with comments | « src/macros.py ('k') | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698