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

Unified Diff: src/factory.cc

Issue 1217943004: Vector ICs: Introduce an InstanceType for the type feedback vector. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Improved printer. Created 5 years, 6 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
« no previous file with comments | « src/factory.h ('k') | src/heap/heap.h » ('j') | src/heap/heap.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/factory.cc
diff --git a/src/factory.cc b/src/factory.cc
index 7df095d19f1e14f93fac1def465748eb2db8093c..090952244feaba65b951d6ab16c1cdd2ec45be0e 100644
--- a/src/factory.cc
+++ b/src/factory.cc
@@ -978,6 +978,14 @@ Handle<FixedArray> Factory::CopyFixedArray(Handle<FixedArray> array) {
}
+Handle<TypeFeedbackVector> Factory::CopyTypeFeedbackVector(
+ Handle<TypeFeedbackVector> vector) {
+ CALL_HEAP_FUNCTION(isolate(),
+ isolate()->heap()->CopyTypeFeedbackVector(*vector),
+ TypeFeedbackVector);
+}
+
+
Handle<FixedArray> Factory::CopyAndTenureFixedCOWArray(
Handle<FixedArray> array) {
DCHECK(isolate()->heap()->InNewSpace(*array));
@@ -2109,9 +2117,12 @@ template Handle<TypeFeedbackVector> Factory::NewTypeFeedbackVector(
template Handle<TypeFeedbackVector> Factory::NewTypeFeedbackVector(
const FeedbackVectorSpec* spec);
+
template <typename Spec>
Handle<TypeFeedbackVector> Factory::NewTypeFeedbackVector(const Spec* spec) {
- return TypeFeedbackVector::Allocate<Spec>(isolate(), spec);
+ CALL_HEAP_FUNCTION(isolate(),
+ isolate()->heap()->AllocateTypeFeedbackVector(spec),
+ TypeFeedbackVector);
}
@@ -2156,6 +2167,9 @@ Handle<SharedFunctionInfo> Factory::NewSharedFunctionInfo(
Handle<String> name,
MaybeHandle<Code> maybe_code) {
Handle<Map> map = shared_function_info_map();
+ FeedbackVectorSpec empty_spec;
+ Handle<TypeFeedbackVector> feedback_vector =
+ NewTypeFeedbackVector(&empty_spec);
Handle<SharedFunctionInfo> share = New<SharedFunctionInfo>(map, OLD_SPACE);
// Set pointer fields.
@@ -2175,9 +2189,6 @@ Handle<SharedFunctionInfo> Factory::NewSharedFunctionInfo(
share->set_script(*undefined_value(), SKIP_WRITE_BARRIER);
share->set_debug_info(*undefined_value(), SKIP_WRITE_BARRIER);
share->set_inferred_name(*empty_string(), SKIP_WRITE_BARRIER);
- FeedbackVectorSpec empty_spec(0);
- Handle<TypeFeedbackVector> feedback_vector =
- NewTypeFeedbackVector(&empty_spec);
share->set_feedback_vector(*feedback_vector, SKIP_WRITE_BARRIER);
#if TRACE_MAPS
share->set_unique_id(isolate()->GetNextUniqueSharedFunctionInfoId());
« no previous file with comments | « src/factory.h ('k') | src/heap/heap.h » ('j') | src/heap/heap.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698