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

Unified Diff: src/runtime.js

Issue 1287203002: [strong] Simplify (and sortof optimize) string addition for strong mode. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Small beautification. 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/hydrogen.cc ('k') | no next file » | 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 a120d9648c494b1d586393a10d053912e09bd2d3..e82d25e3295c745af5ee701e1166f9fdc5935aea 100644
--- a/src/runtime.js
+++ b/src/runtime.js
@@ -23,9 +23,7 @@ var COMPARE_STRONG;
var ADD;
var ADD_STRONG;
var STRING_ADD_LEFT;
-var STRING_ADD_LEFT_STRONG;
var STRING_ADD_RIGHT;
-var STRING_ADD_RIGHT_STRONG;
var SUB;
var SUB_STRONG;
var MUL;
@@ -262,15 +260,6 @@ STRING_ADD_LEFT = function STRING_ADD_LEFT(y) {
}
-// Left operand (this) is already a string.
-STRING_ADD_LEFT_STRONG = function STRING_ADD_LEFT_STRONG(y) {
- if (IS_STRING(y)) {
- return %_StringAdd(this, y);
- }
- throw %MakeTypeError(kStrongImplicitConversion);
-}
-
-
// Right operand (y) is already a string.
STRING_ADD_RIGHT = function STRING_ADD_RIGHT(y) {
var x = this;
@@ -287,15 +276,6 @@ STRING_ADD_RIGHT = function STRING_ADD_RIGHT(y) {
}
-// Right operand (y) is already a string.
-STRING_ADD_RIGHT_STRONG = function STRING_ADD_RIGHT_STRONG(y) {
- if (IS_STRING(this)) {
- return %_StringAdd(this, y);
- }
- throw %MakeTypeError(kStrongImplicitConversion);
-}
-
-
// ECMA-262, section 11.6.2, page 50.
SUB = function SUB(y) {
var x = IS_NUMBER(this) ? this : %$nonNumberToNumber(this);
« no previous file with comments | « src/hydrogen.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698