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

Unified Diff: src/v8natives.js

Issue 1143993003: Use shared container to manage imports/exports. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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
« src/bootstrapper.cc ('K') | « src/uri.js ('k') | src/weak-collection.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/v8natives.js
diff --git a/src/v8natives.js b/src/v8natives.js
index 94133bff7fe05dfd496a1e42172bc679aca140aa..5e6516eee07d6249b100097dbe17a31b1e20db44 100644
--- a/src/v8natives.js
+++ b/src/v8natives.js
@@ -32,7 +32,7 @@ var $setUpLockedPrototype;
var $toCompletePropertyDescriptor;
var $toNameArray;
-(function(global, shared, exports) {
+(function(global, utils) {
%CheckIsBootstrapping();
@@ -44,7 +44,15 @@ var GlobalBoolean = global.Boolean;
var GlobalFunction = global.Function;
var GlobalNumber = global.Number;
var GlobalObject = global.Object;
-var InternalArray = shared.InternalArray;
+var InternalArray = utils.InternalArray;
+
+var MathAbs;
+var StringIndexOf;
+
+utils.Import(function(from) {
+ MathAbs = from.MathAbs;
+ StringIndexOf = from.StringIndexOf;
+});
// ----------------------------------------------------------------------------
@@ -1697,7 +1705,7 @@ function NumberIsSafeInteger(number) {
if (NumberIsFinite(number)) {
var integral = TO_INTEGER(number);
if (integral == number) {
- return $abs(integral) <= GlobalNumber.MAX_SAFE_INTEGER;
+ return MathAbs(integral) <= GlobalNumber.MAX_SAFE_INTEGER;
}
}
return false;
@@ -1882,7 +1890,7 @@ function NewFunctionString(args, function_token) {
// If the formal parameters string include ) - an illegal
// character - it may make the combined function expression
// compile. We avoid this problem by checking for this early on.
- if (%_CallFunction(p, ')', $stringIndexOf) != -1) {
+ if (%_CallFunction(p, ')', StringIndexOf) != -1) {
throw MakeSyntaxError(kParenthesisInArgString);
}
// If the formal parameters include an unbalanced block comment, the
« src/bootstrapper.cc ('K') | « src/uri.js ('k') | src/weak-collection.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698