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

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

Issue 1533803002: Revert of [es6] Correct Function.prototype.apply, Reflect.construct and Reflect.apply. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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/builtins-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 698f2a6d17380d6e0771c5194e2259819b864542..857db854d15eb7d6467689511367c0e63cbcd396 100644
--- a/src/type-feedback-vector.cc
+++ b/src/type-feedback-vector.cc
@@ -156,6 +156,28 @@
int TypeFeedbackVector::GetIndexFromSpec(const FeedbackVectorSpec* spec,
FeedbackVectorSlot slot) {
return kReservedIndexCount + slot.ToInt();
+}
+
+
+// static
+int TypeFeedbackVector::PushAppliedArgumentsIndex() {
+ return kReservedIndexCount;
+}
+
+
+// static
+Handle<TypeFeedbackVector> TypeFeedbackVector::CreatePushAppliedArgumentsVector(
+ Isolate* isolate) {
+ StaticFeedbackVectorSpec spec;
+ FeedbackVectorSlot slot = spec.AddKeyedLoadICSlot();
+ // TODO(ishell): allocate this metadata only once.
+ Handle<TypeFeedbackMetadata> feedback_metadata =
+ TypeFeedbackMetadata::New(isolate, &spec);
+ Handle<TypeFeedbackVector> feedback_vector =
+ TypeFeedbackVector::New(isolate, feedback_metadata);
+ DCHECK_EQ(PushAppliedArgumentsIndex(), feedback_vector->GetIndex(slot));
+ USE(slot);
+ return feedback_vector;
}
« no previous file with comments | « src/type-feedback-vector.h ('k') | src/x64/builtins-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698