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

Unified Diff: src/runtime.js

Issue 1336273002: [builtins] Remove STRING_ADD_LEFT and STRING_ADD_RIGHT builtins. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 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/objects.h ('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 11f0ab2ea1717d4ee0eb0bb8df681566d7b93d4a..6df7faa719b3dcbccd5b5168bea6789c07330e35 100644
--- a/src/runtime.js
+++ b/src/runtime.js
@@ -150,43 +150,6 @@ function COMPARE_STRONG(x, ncr) {
}
-
-/* -----------------------------------
- - - - A r i t h m e t i c - - -
- -----------------------------------
-*/
-
-// Left operand (this) is already a string.
-function STRING_ADD_LEFT(y) {
- if (!IS_STRING(y)) {
- if (IS_STRING_WRAPPER(y) && %_IsStringWrapperSafeForDefaultValueOf(y)) {
- y = %_ValueOf(y);
- } else {
- y = IS_NUMBER(y)
- ? %_NumberToString(y)
- : %to_string_fun(%to_primitive(y, NO_HINT));
- }
- }
- return %_StringAdd(this, y);
-}
-
-
-// Right operand (y) is already a string.
-function STRING_ADD_RIGHT(y) {
- var x = this;
- if (!IS_STRING(x)) {
- if (IS_STRING_WRAPPER(x) && %_IsStringWrapperSafeForDefaultValueOf(x)) {
- x = %_ValueOf(x);
- } else {
- x = IS_NUMBER(x)
- ? %_NumberToString(x)
- : %to_string_fun(%to_primitive(x, NO_HINT));
- }
- }
- return %_StringAdd(x, y);
-}
-
-
/* -----------------------------
- - - H e l p e r s - - -
-----------------------------
@@ -538,8 +501,6 @@ $toString = ToString;
"equals_builtin", EQUALS,
"reflect_apply_prepare_builtin", REFLECT_APPLY_PREPARE,
"reflect_construct_prepare_builtin", REFLECT_CONSTRUCT_PREPARE,
- "string_add_left_builtin", STRING_ADD_LEFT,
- "string_add_right_builtin", STRING_ADD_RIGHT,
]);
%InstallToContext([
« no previous file with comments | « src/objects.h ('k') | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698