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

Unified Diff: src/js/messages.js

Issue 1868963002: [builtins] Migrate String.prototype.charCodeAt and String.prototype.charAt to TurboFan. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix typo 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
Index: src/js/messages.js
diff --git a/src/js/messages.js b/src/js/messages.js
index f8cb967cdd064238ebbe75bf50edc2be168271f6..69d3fbb4f50c89cc03b0ee80c9c1abe7a53997ac 100644
--- a/src/js/messages.js
+++ b/src/js/messages.js
@@ -37,7 +37,6 @@ var ObjectHasOwnProperty;
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;
@@ -57,7 +56,6 @@ utils.Import(function(from) {
Int8x16ToString = from.Int8x16ToString;
ObjectDefineProperty = from.ObjectDefineProperty;
ObjectHasOwnProperty = from.ObjectHasOwnProperty;
- StringCharAt = from.StringCharAt;
StringIndexOf = from.StringIndexOf;
StringSubstring = from.StringSubstring;
SymbolToString = from.SymbolToString;
@@ -255,6 +253,7 @@ function ScriptLineFromPosition(position) {
return -1;
}
+
/**
* Get information on a specific source position.
* @param {number} position The source position
@@ -272,7 +271,7 @@ function ScriptLocationFromPosition(position,
var line_ends = this.line_ends;
var start = line == 0 ? 0 : line_ends[line - 1] + 1;
var end = line_ends[line];
- if (end > 0 && %_Call(StringCharAt, this.source, end - 1) == '\r') {
+ if (end > 0 && %_StringCharAt(this.source, end - 1) === '\r') {
end--;
}
var column = position - start;

Powered by Google App Engine
This is Rietveld 408576698