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

Side by Side Diff: src/type-feedback-vector.cc

Issue 1342013003: Vector ICs: Hook up vectors in platform builtins to their SharedFunctionInfos. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Test and remaining 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 unified diff | Download patch
« no previous file with comments | « src/type-feedback-vector.h ('k') | src/x64/builtins-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/type-feedback-vector.h" 5 #include "src/type-feedback-vector.h"
6 6
7 #include "src/code-stubs.h" 7 #include "src/code-stubs.h"
8 #include "src/ic/ic.h" 8 #include "src/ic/ic.h"
9 #include "src/ic/ic-state.h" 9 #include "src/ic/ic-state.h"
10 #include "src/objects.h" 10 #include "src/objects.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 119
120 Handle<TypeFeedbackVector> vector = Handle<TypeFeedbackVector>::cast(array); 120 Handle<TypeFeedbackVector> vector = Handle<TypeFeedbackVector>::cast(array);
121 for (int i = 0; i < ic_slot_count; i++) { 121 for (int i = 0; i < ic_slot_count; i++) {
122 vector->SetKind(FeedbackVectorICSlot(i), spec->GetKind(i)); 122 vector->SetKind(FeedbackVectorICSlot(i), spec->GetKind(i));
123 } 123 }
124 return vector; 124 return vector;
125 } 125 }
126 126
127 127
128 // static 128 // static
129 int TypeFeedbackVector::PushAppliedArgumentsIndex() {
130 const int index_count = VectorICComputer::word_count(1);
131 return kReservedIndexCount + index_count;
132 }
133
134
135 // static
136 Handle<TypeFeedbackVector> TypeFeedbackVector::CreatePushAppliedArgumentsVector(
137 Isolate* isolate) {
138 Code::Kind kinds[] = {Code::KEYED_LOAD_IC};
139 FeedbackVectorSpec spec(0, 1, kinds);
140 Handle<TypeFeedbackVector> feedback_vector =
141 isolate->factory()->NewTypeFeedbackVector(&spec);
142 DCHECK(PushAppliedArgumentsIndex() ==
143 feedback_vector->GetIndex(FeedbackVectorICSlot(0)));
144 return feedback_vector;
145 }
146
147
148 // static
129 Handle<TypeFeedbackVector> TypeFeedbackVector::Copy( 149 Handle<TypeFeedbackVector> TypeFeedbackVector::Copy(
130 Isolate* isolate, Handle<TypeFeedbackVector> vector) { 150 Isolate* isolate, Handle<TypeFeedbackVector> vector) {
131 Handle<TypeFeedbackVector> result; 151 Handle<TypeFeedbackVector> result;
132 result = Handle<TypeFeedbackVector>::cast( 152 result = Handle<TypeFeedbackVector>::cast(
133 isolate->factory()->CopyFixedArray(Handle<FixedArray>::cast(vector))); 153 isolate->factory()->CopyFixedArray(Handle<FixedArray>::cast(vector)));
134 return result; 154 return result;
135 } 155 }
136 156
137 157
138 bool TypeFeedbackVector::SpecDiffersFrom( 158 bool TypeFeedbackVector::SpecDiffersFrom(
(...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after
787 return mode; 807 return mode;
788 } 808 }
789 809
790 810
791 IcCheckType KeyedStoreICNexus::GetKeyType() const { 811 IcCheckType KeyedStoreICNexus::GetKeyType() const {
792 // The structure of the vector slots tells us the type. 812 // The structure of the vector slots tells us the type.
793 return GetFeedback()->IsName() ? PROPERTY : ELEMENT; 813 return GetFeedback()->IsName() ? PROPERTY : ELEMENT;
794 } 814 }
795 } // namespace internal 815 } // namespace internal
796 } // namespace v8 816 } // namespace v8
OLDNEW
« 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