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

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

Issue 892113002: Super Constructor Calls need to use a vector slot, not an ic slot. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE. Created 5 years, 10 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/mips/full-codegen-mips.cc ('k') | src/typing.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 #ifndef V8_TYPE_FEEDBACK_VECTOR_H_ 5 #ifndef V8_TYPE_FEEDBACK_VECTOR_H_
6 #define V8_TYPE_FEEDBACK_VECTOR_H_ 6 #define V8_TYPE_FEEDBACK_VECTOR_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "src/checks.h" 10 #include "src/checks.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 } 113 }
114 114
115 int ICSlots() const { 115 int ICSlots() const {
116 if (length() == 0) return 0; 116 if (length() == 0) return 0;
117 return length() - first_ic_slot_index(); 117 return length() - first_ic_slot_index();
118 } 118 }
119 119
120 // Conversion from a slot or ic slot to an integer index to the underlying 120 // Conversion from a slot or ic slot to an integer index to the underlying
121 // array. 121 // array.
122 int GetIndex(FeedbackVectorSlot slot) const { 122 int GetIndex(FeedbackVectorSlot slot) const {
123 DCHECK(slot.ToInt() < first_ic_slot_index());
123 return kReservedIndexCount + ic_metadata_length() + slot.ToInt(); 124 return kReservedIndexCount + ic_metadata_length() + slot.ToInt();
124 } 125 }
125 126
126 int GetIndex(FeedbackVectorICSlot slot) const { 127 int GetIndex(FeedbackVectorICSlot slot) const {
127 int first_ic_slot = first_ic_slot_index(); 128 int first_ic_slot = first_ic_slot_index();
128 DCHECK(slot.ToInt() < ICSlots()); 129 DCHECK(slot.ToInt() < ICSlots());
129 return first_ic_slot + slot.ToInt(); 130 return first_ic_slot + slot.ToInt();
130 } 131 }
131 132
132 // Conversion from an integer index to either a slot or an ic slot. The caller 133 // Conversion from an integer index to either a slot or an ic slot. The caller
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 int ExtractMaps(MapHandleList* maps) const OVERRIDE; 359 int ExtractMaps(MapHandleList* maps) const OVERRIDE;
359 MaybeHandle<Code> FindHandlerForMap(Handle<Map> map) const OVERRIDE; 360 MaybeHandle<Code> FindHandlerForMap(Handle<Map> map) const OVERRIDE;
360 virtual bool FindHandlers(CodeHandleList* code_list, 361 virtual bool FindHandlers(CodeHandleList* code_list,
361 int length = -1) const OVERRIDE; 362 int length = -1) const OVERRIDE;
362 Name* FindFirstName() const OVERRIDE; 363 Name* FindFirstName() const OVERRIDE;
363 }; 364 };
364 } 365 }
365 } // namespace v8::internal 366 } // namespace v8::internal
366 367
367 #endif // V8_TRANSITIONS_H_ 368 #endif // V8_TRANSITIONS_H_
OLDNEW
« no previous file with comments | « src/mips/full-codegen-mips.cc ('k') | src/typing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698