| Index: src/bootstrapper.cc
|
| diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
|
| index 496e648f9a09a87ff022e3e9528f61f869fb7884..987c9689a6c996aeda1fdac801d1e3adb0b13f69 100644
|
| --- a/src/bootstrapper.cc
|
| +++ b/src/bootstrapper.cc
|
| @@ -1891,6 +1891,16 @@ void Genesis::InitializeGlobal_harmony_tolength() {
|
| }
|
|
|
|
|
| +static void SimpleInstallFunction(
|
| + Handle<JSObject>& base, const char* name, Builtins::Name call, int len) {
|
| + Handle<JSFunction> fun =
|
| + InstallFunction(base, name, JS_OBJECT_TYPE, JSObject::kHeaderSize,
|
| + MaybeHandle<JSObject>(), call);
|
| + fun->shared()->set_internal_formal_parameter_count(len);
|
| + fun->shared()->set_length(len);
|
| +}
|
| +
|
| +
|
| void Genesis::InitializeGlobal_harmony_reflect() {
|
| if (!FLAG_harmony_reflect) return;
|
|
|
| @@ -1898,11 +1908,19 @@ void Genesis::InitializeGlobal_harmony_reflect() {
|
| native_context()->global_object()));
|
| Handle<String> reflect_string =
|
| factory()->NewStringFromStaticChars("Reflect");
|
| - Handle<Object> reflect =
|
| + Handle<JSObject> reflect =
|
| factory()->NewJSObject(isolate()->object_function(), TENURED);
|
| JSObject::AddProperty(global, reflect_string, reflect, DONT_ENUM);
|
| -}
|
|
|
| + SimpleInstallFunction(reflect, "deleteProperty",
|
| + Builtins::kReflectDeleteProperty, 2);
|
| + SimpleInstallFunction(reflect, "get",
|
| + Builtins::kReflectGet, 3);
|
| + SimpleInstallFunction(reflect, "has",
|
| + Builtins::kReflectHas, 2);
|
| + SimpleInstallFunction(reflect, "isExtensible",
|
| + Builtins::kReflectIsExtensible, 1);
|
| +}
|
|
|
|
|
| void Genesis::InitializeGlobal_harmony_sharedarraybuffer() {
|
|
|