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

Unified Diff: src/messages.js

Issue 1143993003: Use shared container to manage imports/exports. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fixed test for no-snap Created 5 years, 7 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/math.js ('k') | src/object-observe.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/messages.js
diff --git a/src/messages.js b/src/messages.js
index cf4d562b666ddc2d082e91d4ab3455d60ef5d03e..cc87c20c4fe192dedda6ffb98165108a31f0ba3d 100644
--- a/src/messages.js
+++ b/src/messages.js
@@ -31,7 +31,7 @@ var MakeReferenceErrorEmbedded;
var MakeSyntaxErrorEmbedded;
var MakeTypeErrorEmbedded;
-(function(global, shared, exports) {
+(function(global, utils) {
%CheckIsBootstrapping();
@@ -39,7 +39,17 @@ var MakeTypeErrorEmbedded;
// Imports
var GlobalObject = global.Object;
-var InternalArray = shared.InternalArray;
+var InternalArray = utils.InternalArray;
+
+var StringCharAt;
+var StringIndexOf;
+var StringSubstring;
+
+utils.Import(function(from) {
+ StringCharAt = from.StringCharAt;
+ StringIndexOf = from.StringIndexOf;
+ StringSubstring = from.StringSubstring;
+});
// -------------------------------------------------------------------
@@ -245,7 +255,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 && %_CallFunction(this.source, end - 1, $stringCharAt) == '\r') {
+ if (end > 0 && %_CallFunction(this.source, end - 1, StringCharAt) == '\r') {
end--;
}
var column = position - start;
@@ -368,7 +378,7 @@ function ScriptSourceLine(opt_line) {
var line_ends = this.line_ends;
var start = line == 0 ? 0 : line_ends[line - 1] + 1;
var end = line_ends[line];
- return %_CallFunction(this.source, start, end, $stringSubstring);
+ return %_CallFunction(this.source, start, end, StringSubstring);
}
@@ -459,7 +469,7 @@ function SourceLocationSourceText() {
return %_CallFunction(this.script.source,
this.start,
this.end,
- $stringSubstring);
+ StringSubstring);
}
@@ -504,7 +514,7 @@ function SourceSliceSourceText() {
return %_CallFunction(this.script.source,
this.from_position,
this.to_position,
- $stringSubstring);
+ StringSubstring);
}
$setUpLockedPrototype(SourceSlice,
@@ -679,12 +689,12 @@ function CallSiteToString() {
var methodName = this.getMethodName();
if (functionName) {
if (typeName &&
- %_CallFunction(functionName, typeName, $stringIndexOf) != 0) {
+ %_CallFunction(functionName, typeName, StringIndexOf) != 0) {
line += typeName + ".";
}
line += functionName;
if (methodName &&
- (%_CallFunction(functionName, "." + methodName, $stringIndexOf) !=
+ (%_CallFunction(functionName, "." + methodName, StringIndexOf) !=
functionName.length - methodName.length - 1)) {
line += " [as " + methodName + "]";
}
« no previous file with comments | « src/math.js ('k') | src/object-observe.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698