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

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

Issue 2686063002: [debugger] add precise mode for code coverage. (Closed)
Patch Set: fix flag Created 3 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/debug/debug-coverage.cc ('k') | src/feedback-vector.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_FEEDBACK_VECTOR_H_ 5 #ifndef V8_FEEDBACK_VECTOR_H_
6 #define V8_FEEDBACK_VECTOR_H_ 6 #define V8_FEEDBACK_VECTOR_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "src/base/logging.h" 10 #include "src/base/logging.h"
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 int* vector_ic_count, bool code_is_interpreted); 274 int* vector_ic_count, bool code_is_interpreted);
275 275
276 inline bool is_empty() const; 276 inline bool is_empty() const;
277 277
278 // Returns number of slots in the vector. 278 // Returns number of slots in the vector.
279 inline int slot_count() const; 279 inline int slot_count() const;
280 280
281 inline FeedbackMetadata* metadata() const; 281 inline FeedbackMetadata* metadata() const;
282 inline SharedFunctionInfo* shared_function_info() const; 282 inline SharedFunctionInfo* shared_function_info() const;
283 inline int invocation_count() const; 283 inline int invocation_count() const;
284 inline void clear_invocation_count();
284 285
285 // Conversion from a slot to an integer index to the underlying array. 286 // Conversion from a slot to an integer index to the underlying array.
286 static int GetIndex(FeedbackSlot slot) { 287 static int GetIndex(FeedbackSlot slot) {
287 return kReservedIndexCount + slot.ToInt(); 288 return kReservedIndexCount + slot.ToInt();
288 } 289 }
289 290
290 // Conversion from an integer index to the underlying array to a slot. 291 // Conversion from an integer index to the underlying array to a slot.
291 static inline FeedbackSlot ToSlot(int index); 292 static inline FeedbackSlot ToSlot(int index);
292 inline Object* Get(FeedbackSlot slot) const; 293 inline Object* Get(FeedbackSlot slot) const;
293 inline void Set(FeedbackSlot slot, Object* value, 294 inline void Set(FeedbackSlot slot, Object* value,
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 346
346 // The object that indicates a premonomorphic state. 347 // The object that indicates a premonomorphic state.
347 static inline Handle<Symbol> PremonomorphicSentinel(Isolate* isolate); 348 static inline Handle<Symbol> PremonomorphicSentinel(Isolate* isolate);
348 349
349 // A raw version of the uninitialized sentinel that's safe to read during 350 // A raw version of the uninitialized sentinel that's safe to read during
350 // garbage collection (e.g., for patching the cache). 351 // garbage collection (e.g., for patching the cache).
351 static inline Symbol* RawUninitializedSentinel(Isolate* isolate); 352 static inline Symbol* RawUninitializedSentinel(Isolate* isolate);
352 353
353 private: 354 private:
354 void ClearSlotsImpl(SharedFunctionInfo* shared, bool force_clear); 355 void ClearSlotsImpl(SharedFunctionInfo* shared, bool force_clear);
356 static void AddToCodeCoverageList(Isolate* isolate,
357 Handle<FeedbackVector> vector);
355 358
356 DISALLOW_IMPLICIT_CONSTRUCTORS(FeedbackVector); 359 DISALLOW_IMPLICIT_CONSTRUCTORS(FeedbackVector);
357 }; 360 };
358 361
359 // The following asserts protect an optimization in type feedback vector 362 // The following asserts protect an optimization in type feedback vector
360 // code that looks into the contents of a slot assuming to find a String, 363 // code that looks into the contents of a slot assuming to find a String,
361 // a Symbol, an AllocationSite, a WeakCell, or a FixedArray. 364 // a Symbol, an AllocationSite, a WeakCell, or a FixedArray.
362 STATIC_ASSERT(WeakCell::kSize >= 2 * kPointerSize); 365 STATIC_ASSERT(WeakCell::kSize >= 2 * kPointerSize);
363 STATIC_ASSERT(WeakCell::kValueOffset == AllocationSite::kTransitionInfoOffset); 366 STATIC_ASSERT(WeakCell::kValueOffset == AllocationSite::kTransitionInfoOffset);
364 STATIC_ASSERT(WeakCell::kValueOffset == FixedArray::kLengthOffset); 367 STATIC_ASSERT(WeakCell::kValueOffset == FixedArray::kLengthOffset);
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
732 InlineCacheState StateFromFeedback() const override; 735 InlineCacheState StateFromFeedback() const override;
733 }; 736 };
734 737
735 inline BinaryOperationHint BinaryOperationHintFromFeedback(int type_feedback); 738 inline BinaryOperationHint BinaryOperationHintFromFeedback(int type_feedback);
736 inline CompareOperationHint CompareOperationHintFromFeedback(int type_feedback); 739 inline CompareOperationHint CompareOperationHintFromFeedback(int type_feedback);
737 740
738 } // namespace internal 741 } // namespace internal
739 } // namespace v8 742 } // namespace v8
740 743
741 #endif // V8_FEEDBACK_VECTOR_H_ 744 #endif // V8_FEEDBACK_VECTOR_H_
OLDNEW
« no previous file with comments | « src/debug/debug-coverage.cc ('k') | src/feedback-vector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698