Index: src/messages.js |
diff --git a/src/messages.js b/src/messages.js |
index cc87c20c4fe192dedda6ffb98165108a31f0ba3d..cf4d562b666ddc2d082e91d4ab3455d60ef5d03e 100644 |
--- a/src/messages.js |
+++ b/src/messages.js |
@@ -31,7 +31,7 @@ |
var MakeSyntaxErrorEmbedded; |
var MakeTypeErrorEmbedded; |
-(function(global, utils) { |
+(function(global, shared, exports) { |
%CheckIsBootstrapping(); |
@@ -39,17 +39,7 @@ |
// Imports |
var GlobalObject = global.Object; |
-var InternalArray = utils.InternalArray; |
- |
-var StringCharAt; |
-var StringIndexOf; |
-var StringSubstring; |
- |
-utils.Import(function(from) { |
- StringCharAt = from.StringCharAt; |
- StringIndexOf = from.StringIndexOf; |
- StringSubstring = from.StringSubstring; |
-}); |
+var InternalArray = shared.InternalArray; |
// ------------------------------------------------------------------- |
@@ -255,7 +245,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 && %_CallFunction(this.source, end - 1, StringCharAt) == '\r') { |
+ if (end > 0 && %_CallFunction(this.source, end - 1, $stringCharAt) == '\r') { |
end--; |
} |
var column = position - start; |
@@ -378,7 +368,7 @@ |
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); |
} |
@@ -469,7 +459,7 @@ |
return %_CallFunction(this.script.source, |
this.start, |
this.end, |
- StringSubstring); |
+ $stringSubstring); |
} |
@@ -514,7 +504,7 @@ |
return %_CallFunction(this.script.source, |
this.from_position, |
this.to_position, |
- StringSubstring); |
+ $stringSubstring); |
} |
$setUpLockedPrototype(SourceSlice, |
@@ -689,12 +679,12 @@ |
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 + "]"; |
} |