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

Unified Diff: src/contexts.cc

Issue 1316943002: Move (uppercase) JS builtins from js builtins object to native context. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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
Index: src/contexts.cc
diff --git a/src/contexts.cc b/src/contexts.cc
index 0e89821c7f683e63517c5f0d003aac3d3896e1a4..37021ac7f67f789e33bdf6f91d876fc99eb4c551 100644
--- a/src/contexts.cc
+++ b/src/contexts.cc
@@ -554,6 +554,16 @@ int Context::IntrinsicIndexForName(Handle<String> string) {
#undef COMPARE_NAME
+bool Context::IsJSBuiltin(Handle<Context> native_context,
+ Handle<JSFunction> function) {
+#define COMPARE_FUNCTION(index, type, name) \
+ if (*function == native_context->get(index)) return true;
+ NATIVE_CONTEXT_JS_BUILTINS(COMPARE_FUNCTION);
+#undef COMPARE_FUNCTION
+ return false;
+}
+
+
#ifdef DEBUG
bool Context::IsBootstrappingOrValidParentContext(
Object* object, Context* child) {

Powered by Google App Engine
This is Rietveld 408576698