Chromium Code Reviews| Index: src/bootstrapper.cc |
| diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc |
| index fe813510d50f0070cb4d07c51a5e7a1ff9f1841c..3ab8f9555ee4dbac94555a1571a7e0e4b96a7842 100644 |
| --- a/src/bootstrapper.cc |
| +++ b/src/bootstrapper.cc |
| @@ -1865,11 +1865,8 @@ void Bootstrapper::ExportFromRuntime(Isolate* isolate, |
| Handle<JSFunction> apply = InstallFunction( |
| container, "reflect_apply", JS_OBJECT_TYPE, JSObject::kHeaderSize, |
| MaybeHandle<JSObject>(), Builtins::kReflectApply); |
| - apply->shared()->set_internal_formal_parameter_count(3); |
| + apply->shared()->DontAdaptArguments(); |
| apply->shared()->set_length(3); |
| - Handle<TypeFeedbackVector> feedback_vector = |
| - TypeFeedbackVector::CreatePushAppliedArgumentsVector(isolate); |
| - apply->shared()->set_feedback_vector(*feedback_vector); |
| native_context->set_reflect_apply(*apply); |
|
Yang
2015/12/15 06:06:58
You can move this to InitializeGlobal if you rebas
Benedikt Meurer
2015/12/15 06:08:28
Yes, my plan was to further simplify this stuff la
|
| } |
| @@ -1877,11 +1874,8 @@ void Bootstrapper::ExportFromRuntime(Isolate* isolate, |
| Handle<JSFunction> construct = InstallFunction( |
| container, "reflect_construct", JS_OBJECT_TYPE, JSObject::kHeaderSize, |
| MaybeHandle<JSObject>(), Builtins::kReflectConstruct); |
| - construct->shared()->set_internal_formal_parameter_count(3); |
| + construct->shared()->DontAdaptArguments(); |
| construct->shared()->set_length(2); |
| - Handle<TypeFeedbackVector> feedback_vector = |
| - TypeFeedbackVector::CreatePushAppliedArgumentsVector(isolate); |
| - construct->shared()->set_feedback_vector(*feedback_vector); |
| native_context->set_reflect_construct(*construct); |
| } |
| @@ -2535,22 +2529,17 @@ bool Genesis::InstallNatives(ContextType context_type) { |
| Handle<JSFunction> apply = |
| InstallFunction(proto, "apply", JS_OBJECT_TYPE, JSObject::kHeaderSize, |
| MaybeHandle<JSObject>(), Builtins::kFunctionApply); |
| - Handle<TypeFeedbackVector> feedback_vector = |
| - TypeFeedbackVector::CreatePushAppliedArgumentsVector(isolate()); |
| - apply->shared()->set_feedback_vector(*feedback_vector); |
| // Make sure that Function.prototype.call appears to be compiled. |
| // The code will never be called, but inline caching for call will |
| // only work if it appears to be compiled. |
| + apply->shared()->DontAdaptArguments(); |
| call->shared()->DontAdaptArguments(); |
| DCHECK(call->is_compiled()); |
| - // Set the expected parameters for apply to 2; required by builtin. |
| - apply->shared()->set_internal_formal_parameter_count(2); |
| - |
| // Set the lengths for the functions to satisfy ECMA-262. |
| - call->shared()->set_length(1); |
| apply->shared()->set_length(2); |
| + call->shared()->set_length(1); |
| } |
| // Set up the Promise constructor. |