| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/bootstrapper.h" | 5 #include "src/bootstrapper.h" |
| 6 | 6 |
| 7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
| 8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
| 9 #include "src/extensions/externalize-string-extension.h" | 9 #include "src/extensions/externalize-string-extension.h" |
| 10 #include "src/extensions/free-buffer-extension.h" | 10 #include "src/extensions/free-buffer-extension.h" |
| (...skipping 1942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1953 // Install the call and the apply functions. | 1953 // Install the call and the apply functions. |
| 1954 Handle<JSFunction> call = | 1954 Handle<JSFunction> call = |
| 1955 InstallFunction(proto, "call", JS_OBJECT_TYPE, JSObject::kHeaderSize, | 1955 InstallFunction(proto, "call", JS_OBJECT_TYPE, JSObject::kHeaderSize, |
| 1956 MaybeHandle<JSObject>(), Builtins::kFunctionCall); | 1956 MaybeHandle<JSObject>(), Builtins::kFunctionCall); |
| 1957 Handle<JSFunction> apply = | 1957 Handle<JSFunction> apply = |
| 1958 InstallFunction(proto, "apply", JS_OBJECT_TYPE, JSObject::kHeaderSize, | 1958 InstallFunction(proto, "apply", JS_OBJECT_TYPE, JSObject::kHeaderSize, |
| 1959 MaybeHandle<JSObject>(), Builtins::kFunctionApply); | 1959 MaybeHandle<JSObject>(), Builtins::kFunctionApply); |
| 1960 if (FLAG_vector_ics) { | 1960 if (FLAG_vector_ics) { |
| 1961 // Apply embeds an IC, so we need a type vector of size 1 in the shared | 1961 // Apply embeds an IC, so we need a type vector of size 1 in the shared |
| 1962 // function info. | 1962 // function info. |
| 1963 Handle<FixedArray> feedback_vector = factory()->NewTypeFeedbackVector(1); | 1963 Handle<TypeFeedbackVector> feedback_vector = |
| 1964 factory()->NewTypeFeedbackVector(1); |
| 1964 apply->shared()->set_feedback_vector(*feedback_vector); | 1965 apply->shared()->set_feedback_vector(*feedback_vector); |
| 1965 } | 1966 } |
| 1966 | 1967 |
| 1967 // Make sure that Function.prototype.call appears to be compiled. | 1968 // Make sure that Function.prototype.call appears to be compiled. |
| 1968 // The code will never be called, but inline caching for call will | 1969 // The code will never be called, but inline caching for call will |
| 1969 // only work if it appears to be compiled. | 1970 // only work if it appears to be compiled. |
| 1970 call->shared()->DontAdaptArguments(); | 1971 call->shared()->DontAdaptArguments(); |
| 1971 DCHECK(call->is_compiled()); | 1972 DCHECK(call->is_compiled()); |
| 1972 | 1973 |
| 1973 // Set the expected parameters for apply to 2; required by builtin. | 1974 // Set the expected parameters for apply to 2; required by builtin. |
| (...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2715 return from + sizeof(NestingCounterType); | 2716 return from + sizeof(NestingCounterType); |
| 2716 } | 2717 } |
| 2717 | 2718 |
| 2718 | 2719 |
| 2719 // Called when the top-level V8 mutex is destroyed. | 2720 // Called when the top-level V8 mutex is destroyed. |
| 2720 void Bootstrapper::FreeThreadResources() { | 2721 void Bootstrapper::FreeThreadResources() { |
| 2721 DCHECK(!IsActive()); | 2722 DCHECK(!IsActive()); |
| 2722 } | 2723 } |
| 2723 | 2724 |
| 2724 } } // namespace v8::internal | 2725 } } // namespace v8::internal |
| OLD | NEW |