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 1938 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1949 Handle<JSFunction> call = | 1949 Handle<JSFunction> call = |
1950 InstallFunction(proto, "call", JS_OBJECT_TYPE, JSObject::kHeaderSize, | 1950 InstallFunction(proto, "call", JS_OBJECT_TYPE, JSObject::kHeaderSize, |
1951 MaybeHandle<JSObject>(), Builtins::kFunctionCall); | 1951 MaybeHandle<JSObject>(), Builtins::kFunctionCall); |
1952 Handle<JSFunction> apply = | 1952 Handle<JSFunction> apply = |
1953 InstallFunction(proto, "apply", JS_OBJECT_TYPE, JSObject::kHeaderSize, | 1953 InstallFunction(proto, "apply", JS_OBJECT_TYPE, JSObject::kHeaderSize, |
1954 MaybeHandle<JSObject>(), Builtins::kFunctionApply); | 1954 MaybeHandle<JSObject>(), Builtins::kFunctionApply); |
1955 if (FLAG_vector_ics) { | 1955 if (FLAG_vector_ics) { |
1956 // Apply embeds an IC, so we need a type vector of size 1 in the shared | 1956 // Apply embeds an IC, so we need a type vector of size 1 in the shared |
1957 // function info. | 1957 // function info. |
1958 Handle<TypeFeedbackVector> feedback_vector = | 1958 Handle<TypeFeedbackVector> feedback_vector = |
1959 factory()->NewTypeFeedbackVector(1); | 1959 factory()->NewTypeFeedbackVector(0, 1); |
1960 apply->shared()->set_feedback_vector(*feedback_vector); | 1960 apply->shared()->set_feedback_vector(*feedback_vector); |
1961 } | 1961 } |
1962 | 1962 |
1963 // Make sure that Function.prototype.call appears to be compiled. | 1963 // Make sure that Function.prototype.call appears to be compiled. |
1964 // The code will never be called, but inline caching for call will | 1964 // The code will never be called, but inline caching for call will |
1965 // only work if it appears to be compiled. | 1965 // only work if it appears to be compiled. |
1966 call->shared()->DontAdaptArguments(); | 1966 call->shared()->DontAdaptArguments(); |
1967 DCHECK(call->is_compiled()); | 1967 DCHECK(call->is_compiled()); |
1968 | 1968 |
1969 // Set the expected parameters for apply to 2; required by builtin. | 1969 // Set the expected parameters for apply to 2; required by builtin. |
(...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2713 return from + sizeof(NestingCounterType); | 2713 return from + sizeof(NestingCounterType); |
2714 } | 2714 } |
2715 | 2715 |
2716 | 2716 |
2717 // Called when the top-level V8 mutex is destroyed. | 2717 // Called when the top-level V8 mutex is destroyed. |
2718 void Bootstrapper::FreeThreadResources() { | 2718 void Bootstrapper::FreeThreadResources() { |
2719 DCHECK(!IsActive()); | 2719 DCHECK(!IsActive()); |
2720 } | 2720 } |
2721 | 2721 |
2722 } } // namespace v8::internal | 2722 } } // namespace v8::internal |
OLD | NEW |