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

Unified Diff: src/runtime.js

Issue 442024: Perform string add in generated code on IA-32 platforms... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years 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
Index: src/runtime.js
===================================================================
--- src/runtime.js (revision 3397)
+++ src/runtime.js (working copy)
@@ -146,16 +146,16 @@
function ADD(x) {
// Fast case: Check for number operands and do the addition.
if (IS_NUMBER(this) && IS_NUMBER(x)) return %NumberAdd(this, x);
- if (IS_STRING(this) && IS_STRING(x)) return %StringAdd(this, x);
+ if (IS_STRING(this) && IS_STRING(x)) return %_StringAdd(this, x);
// Default implementation.
var a = %ToPrimitive(this, NO_HINT);
var b = %ToPrimitive(x, NO_HINT);
if (IS_STRING(a)) {
- return %StringAdd(a, %ToString(b));
+ return %_StringAdd(a, %ToString(b));
} else if (IS_STRING(b)) {
- return %StringAdd(%ToString(a), b);
+ return %_StringAdd(%ToString(a), b);
} else {
return %NumberAdd(%ToNumber(a), %ToNumber(b));
}
@@ -173,7 +173,7 @@
: %ToString(%ToPrimitive(y, NO_HINT));
}
}
- return %StringAdd(this, y);
+ return %_StringAdd(this, y);
}
@@ -189,7 +189,7 @@
: %ToString(%ToPrimitive(x, NO_HINT));
}
}
- return %StringAdd(x, y);
+ return %_StringAdd(x, y);
}
« src/ia32/codegen-ia32.cc ('K') | « src/runtime.cc ('k') | src/v8-counters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698