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

Unified Diff: src/bootstrapper.cc

Issue 1692713005: ES6: Desugaring of instanceof to support @@hasInstance (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@blah
Patch Set: Fixed todos. Created 4 years, 10 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/bootstrapper.cc
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
index 16b0e1faf4ac76710f5362dd75335d2bca066b3d..b5944857bf6231ec610db3b87cd404441a0e1c1a 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -1161,6 +1161,9 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
// Set the length for the function to satisfy ECMA-262.
has_instance->shared()->set_length(1);
+ // Install in the native context
+ native_context()->set_ordinary_has_instance(*has_instance);
+
// Install the "constructor" property on the %FunctionPrototype%.
JSObject::AddProperty(prototype, factory->constructor_string(),
function_fun, DONT_ENUM);
@@ -2489,6 +2492,10 @@ void Genesis::InitializeGlobal_harmony_object_own_property_descriptors() {
Builtins::kObjectGetOwnPropertyDescriptors, 1, false);
}
+void Genesis::InitializeGlobal_harmony_instanceof() {
rossberg 2016/02/12 14:11:31 Use the EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE macro,
mvstanton 2016/02/18 02:12:17 Done.
+ if (!FLAG_harmony_instanceof) return;
+}
+
void Genesis::InstallJSProxyMaps() {
// Allocate the different maps for all Proxy types.
// Next to the default proxy, we need maps indicating callable and
@@ -2976,6 +2983,7 @@ bool Genesis::InstallExperimentalNatives() {
static const char* harmony_do_expressions_natives[] = {nullptr};
static const char* harmony_regexp_subclass_natives[] = {nullptr};
static const char* harmony_regexp_lookbehind_natives[] = {nullptr};
+ static const char* harmony_instanceof_natives[] = {nullptr};
static const char* harmony_regexp_property_natives[] = {nullptr};
static const char* harmony_function_name_natives[] = {nullptr};
static const char* harmony_function_sent_natives[] = {nullptr};
« no previous file with comments | « src/ast/ast-value-factory.cc ('k') | src/contexts.h » ('j') | src/parsing/parser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698