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

Unified Diff: src/runtime/runtime-internal.cc

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/runtime/runtime-debug.cc ('k') | src/runtime/runtime-symbol.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-internal.cc
diff --git a/src/runtime/runtime-internal.cc b/src/runtime/runtime-internal.cc
index 01e3e913afdd297695dad3aaa29f4a13da048fd2..0e098fd1f0f9a12d81b227b7c4c1a0380c9bead6 100644
--- a/src/runtime/runtime-internal.cc
+++ b/src/runtime/runtime-internal.cc
@@ -24,6 +24,19 @@ RUNTIME_FUNCTION(Runtime_CheckIsBootstrapping) {
}
+RUNTIME_FUNCTION(Runtime_ExportPrivateSymbols) {
+ HandleScope scope(isolate);
+ DCHECK(args.length() == 1);
+ CONVERT_ARG_HANDLE_CHECKED(JSObject, container, 0);
+ RUNTIME_ASSERT(isolate->bootstrapper()->IsActive());
+ JSObject::NormalizeProperties(container, KEEP_INOBJECT_PROPERTIES, 10,
+ "ExportPrivateSymbols");
+ Bootstrapper::ExportPrivateSymbols(isolate, container);
+ JSObject::MigrateSlowToFast(container, 0, "ExportPrivateSymbols");
+ return *container;
+}
+
+
RUNTIME_FUNCTION(Runtime_ImportToRuntime) {
HandleScope scope(isolate);
DCHECK(args.length() == 1);
@@ -172,12 +185,6 @@ RUNTIME_FUNCTION(Runtime_PromiseRevokeReject) {
}
-RUNTIME_FUNCTION(Runtime_PromiseHasHandlerSymbol) {
- DCHECK(args.length() == 0);
- return isolate->heap()->promise_has_handler_symbol();
-}
-
-
RUNTIME_FUNCTION(Runtime_StackGuard) {
SealHandleScope shs(isolate);
DCHECK(args.length() == 0);
@@ -311,16 +318,14 @@ RUNTIME_FUNCTION(Runtime_FormatMessageString) {
}
-#define CALLSITE_GET(NAME, RETURN) \
- RUNTIME_FUNCTION(Runtime_CallSite##NAME##RT) { \
- HandleScope scope(isolate); \
- DCHECK(args.length() == 3); \
- CONVERT_ARG_HANDLE_CHECKED(Object, receiver, 0); \
- CONVERT_ARG_HANDLE_CHECKED(JSFunction, fun, 1); \
- CONVERT_INT32_ARG_CHECKED(pos, 2); \
- Handle<String> result; \
- CallSite call_site(receiver, fun, pos); \
- return RETURN(call_site.NAME(isolate), isolate); \
+#define CALLSITE_GET(NAME, RETURN) \
+ RUNTIME_FUNCTION(Runtime_CallSite##NAME##RT) { \
+ HandleScope scope(isolate); \
+ DCHECK(args.length() == 1); \
+ CONVERT_ARG_HANDLE_CHECKED(JSObject, call_site_obj, 0); \
+ Handle<String> result; \
+ CallSite call_site(isolate, call_site_obj); \
+ return RETURN(call_site.NAME(), isolate); \
}
static inline Object* ReturnDereferencedHandle(Handle<Object> obj,
« no previous file with comments | « src/runtime/runtime-debug.cc ('k') | src/runtime/runtime-symbol.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698