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

Unified Diff: src/prologue.js

Issue 1293493004: Unify symbols sharing across native scripts and runtime. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 5 years, 4 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/objects.cc ('k') | src/promise.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/prologue.js
diff --git a/src/prologue.js b/src/prologue.js
index 4906d41f3da2ccc5032ff8a697933f99743f2e2a..56f9ed5b38fa576f0a2c563877e37114d1b9ab8e 100644
--- a/src/prologue.js
+++ b/src/prologue.js
@@ -156,6 +156,13 @@ function SetUpLockedPrototype(
%ToFastProperties(prototype);
}
+
+var private_symbols = %ExportPrivateSymbols({});
+
+function GetPrivateSymbol(name) {
+ return private_symbols[name];
+}
+
// -----------------------------------------------------------------------
// To be called by bootstrapper
@@ -236,6 +243,7 @@ function PostExperimentals(utils) {
%ImportExperimentalToRuntime(runtime_container);
exports_container = UNDEFINED;
+ private_symbols = UNDEFINED;
utils.PostExperimentals = UNDEFINED;
utils.PostDebug = UNDEFINED;
@@ -250,6 +258,7 @@ function PostDebug(utils) {
}
exports_container = UNDEFINED;
+ private_symbols = UNDEFINED;
utils.PostDebug = UNDEFINED;
utils.PostExperimentals = UNDEFINED;
@@ -259,13 +268,14 @@ function PostDebug(utils) {
// -----------------------------------------------------------------------
-%OptimizeObjectForAddingMultipleProperties(utils, 14);
+%OptimizeObjectForAddingMultipleProperties(utils, 15);
utils.Import = Import;
utils.ImportNow = ImportNow;
utils.Export = Export;
utils.ExportToRuntime = ExportToRuntime;
utils.ImportFromExperimental = ImportFromExperimental;
+utils.GetPrivateSymbol = GetPrivateSymbol;
utils.SetFunctionName = SetFunctionName;
utils.InstallConstants = InstallConstants;
utils.InstallFunctions = InstallFunctions;
« no previous file with comments | « src/objects.cc ('k') | src/promise.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698