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

Unified Diff: src/type-feedback-vector.cc

Issue 1364373003: Full code shouldn't embed the type feedback vector. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Ports. Created 5 years, 3 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/type-feedback-vector.h ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/type-feedback-vector.cc
diff --git a/src/type-feedback-vector.cc b/src/type-feedback-vector.cc
index e8993dd44e6b646608828882a8bcab68c37ef2dc..f2f5596d9fa1031bb7396d1ac28fe13fb4879d7f 100644
--- a/src/type-feedback-vector.cc
+++ b/src/type-feedback-vector.cc
@@ -125,6 +125,34 @@ Handle<TypeFeedbackVector> TypeFeedbackVector::Allocate(Isolate* isolate,
}
+template int TypeFeedbackVector::GetIndexFromSpec(const ZoneFeedbackVectorSpec*,
+ FeedbackVectorICSlot);
+template int TypeFeedbackVector::GetIndexFromSpec(const ZoneFeedbackVectorSpec*,
+ FeedbackVectorSlot);
+
+
+// static
+template <typename Spec>
+int TypeFeedbackVector::GetIndexFromSpec(const Spec* spec,
Jakob Kummerow 2015/09/25 13:08:05 As discussed, I'd advocate to combine this with th
+ FeedbackVectorSlot slot) {
+ const int ic_slot_count = spec->ic_slots();
+ const int index_count = VectorICComputer::word_count(ic_slot_count);
+ return kReservedIndexCount + index_count + slot.ToInt();
+}
+
+
+// static
+template <typename Spec>
+int TypeFeedbackVector::GetIndexFromSpec(const Spec* spec,
+ FeedbackVectorICSlot slot) {
+ const int slot_count = spec->slots();
+ const int ic_slot_count = spec->ic_slots();
+ const int index_count = VectorICComputer::word_count(ic_slot_count);
+ return kReservedIndexCount + index_count + slot_count +
+ slot.ToInt() * elements_per_ic_slot();
+}
+
+
// static
int TypeFeedbackVector::PushAppliedArgumentsIndex() {
const int index_count = VectorICComputer::word_count(1);
« no previous file with comments | « src/type-feedback-vector.h ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698