V8 Project
type-feedback-vector.h
Go to the documentation of this file.
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
3 // found in the LICENSE file.
4 
5 #ifndef V8_TYPE_FEEDBACK_VECTOR_H_
6 #define V8_TYPE_FEEDBACK_VECTOR_H_
7 
8 #include "src/checks.h"
9 #include "src/elements-kind.h"
10 #include "src/heap/heap.h"
11 #include "src/isolate.h"
12 #include "src/objects.h"
13 
14 namespace v8 {
15 namespace internal {
16 
18  public:
19  // Casting.
20  static TypeFeedbackVector* cast(Object* obj) {
21  DCHECK(obj->IsTypeFeedbackVector());
22  return reinterpret_cast<TypeFeedbackVector*>(obj);
23  }
24 
25  static Handle<TypeFeedbackVector> Copy(Isolate* isolate,
27 
28  // The object that indicates an uninitialized cache.
29  static inline Handle<Object> UninitializedSentinel(Isolate* isolate);
30 
31  // The object that indicates a megamorphic state.
32  static inline Handle<Object> MegamorphicSentinel(Isolate* isolate);
33 
34  // The object that indicates a premonomorphic state.
35  static inline Handle<Object> PremonomorphicSentinel(Isolate* isolate);
36 
37  // The object that indicates a generic state.
38  static inline Handle<Object> GenericSentinel(Isolate* isolate);
39 
40  // The object that indicates a monomorphic state of Array with
41  // ElementsKind
43  Isolate* isolate, ElementsKind elements_kind);
44 
45  // A raw version of the uninitialized sentinel that's safe to read during
46  // garbage collection (e.g., for patching the cache).
47  static inline Object* RawUninitializedSentinel(Heap* heap);
48 
49  private:
51 };
52 }
53 } // namespace v8::internal
54 
55 #endif // V8_TRANSITIONS_H_
static Handle< Object > UninitializedSentinel(Isolate *isolate)
static Handle< Object > PremonomorphicSentinel(Isolate *isolate)
static Handle< Object > MegamorphicSentinel(Isolate *isolate)
static Handle< Object > MonomorphicArraySentinel(Isolate *isolate, ElementsKind elements_kind)
static TypeFeedbackVector * cast(Object *obj)
DISALLOW_IMPLICIT_CONSTRUCTORS(TypeFeedbackVector)
static Handle< Object > GenericSentinel(Isolate *isolate)
static Object * RawUninitializedSentinel(Heap *heap)
static Handle< TypeFeedbackVector > Copy(Isolate *isolate, Handle< TypeFeedbackVector > vector)
#define DCHECK(condition)
Definition: logging.h:205
Debugger support for the V8 JavaScript engine.
Definition: accessors.cc:20