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

Unified Diff: src/js/messages.js

Issue 1877263002: Revert of [builtins] Migrate String.prototype.charCodeAt and String.prototype.charAt to TurboFan. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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/compiler/code-stub-assembler.cc ('k') | src/js/string.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/js/messages.js
diff --git a/src/js/messages.js b/src/js/messages.js
index 69d3fbb4f50c89cc03b0ee80c9c1abe7a53997ac..f8cb967cdd064238ebbe75bf50edc2be168271f6 100644
--- a/src/js/messages.js
+++ b/src/js/messages.js
@@ -37,6 +37,7 @@
var ObjectToString = utils.ImportNow("object_to_string");
var Script = utils.ImportNow("Script");
var stackTraceSymbol = utils.ImportNow("stack_trace_symbol");
+var StringCharAt;
var StringIndexOf;
var StringSubstring;
var SymbolToString;
@@ -56,6 +57,7 @@
Int8x16ToString = from.Int8x16ToString;
ObjectDefineProperty = from.ObjectDefineProperty;
ObjectHasOwnProperty = from.ObjectHasOwnProperty;
+ StringCharAt = from.StringCharAt;
StringIndexOf = from.StringIndexOf;
StringSubstring = from.StringSubstring;
SymbolToString = from.SymbolToString;
@@ -253,7 +255,6 @@
return -1;
}
-
/**
* Get information on a specific source position.
* @param {number} position The source position
@@ -271,7 +272,7 @@
var line_ends = this.line_ends;
var start = line == 0 ? 0 : line_ends[line - 1] + 1;
var end = line_ends[line];
- if (end > 0 && %_StringCharAt(this.source, end - 1) === '\r') {
+ if (end > 0 && %_Call(StringCharAt, this.source, end - 1) == '\r') {
end--;
}
var column = position - start;
« no previous file with comments | « src/compiler/code-stub-assembler.cc ('k') | src/js/string.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698