V8 Project
v8::internal::ToBooleanIC Class Reference

#include <ic.h>

+ Inheritance diagram for v8::internal::ToBooleanIC:
+ Collaboration diagram for v8::internal::ToBooleanIC:

Public Member Functions

 ToBooleanIC (Isolate *isolate)
 
Handle< ObjectToBoolean (Handle< Object > object)
 
- Public Member Functions inherited from v8::internal::IC
 IC (FrameDepth depth, Isolate *isolate)
 
virtual ~IC ()
 
State state () const
 
Address address () const
 
void UpdateState (Handle< Object > receiver, Handle< Object > name)
 
bool IsNameCompatibleWithPrototypeFailure (Handle< Object > name)
 
void MarkPrototypeFailure (Handle< Object > name)
 

Additional Inherited Members

- Public Types inherited from v8::internal::IC
enum  UtilityId { kUtilityCount }
 
enum  FrameDepth { NO_EXTRA_FRAME = 0 , EXTRA_CALL_FRAME = 1 }
 
typedef InlineCacheState State
 
- Static Public Member Functions inherited from v8::internal::IC
static Address AddressFromUtilityId (UtilityId id)
 
static void RegisterWeakMapDependency (Handle< Code > stub)
 
static void InvalidateMaps (Code *stub)
 
static void Clear (Isolate *isolate, Address address, ConstantPoolArray *constant_pool)
 
template<class TypeClass >
static JSFunctionGetRootConstructor (TypeClass *type, Context *native_context)
 
static Handle< MapGetHandlerCacheHolder (HeapType *type, bool receiver_is_holder, Isolate *isolate, CacheHolderFlag *flag)
 
static Handle< MapGetICCacheHolder (HeapType *type, Isolate *isolate, CacheHolderFlag *flag)
 
static bool IsCleared (Code *code)
 
static Handle< MapTypeToMap (HeapType *type, Isolate *isolate)
 
template<class T >
static T::TypeHandle MapToType (Handle< Map > map, typename T::Region *region)
 
static Handle< HeapTypeCurrentTypeOf (Handle< Object > object, Isolate *isolate)
 
- Protected Member Functions inherited from v8::internal::IC
Handle< Codetarget () const
 
Address fp () const
 
Address pc () const
 
Isolateisolate () const
 
SharedFunctionInfoGetSharedFunctionInfo () const
 
CodeGetCode () const
 
CodeGetOriginalCode () const
 
void set_target (Code *code)
 
bool is_target_set ()
 
char TransitionMarkFromState (IC::State state)
 
void TraceIC (const char *type, Handle< Object > name)
 
void TraceIC (const char *type, Handle< Object > name, State old_state, State new_state)
 
MaybeHandle< ObjectTypeError (const char *type, Handle< Object > object, Handle< Object > key)
 
MaybeHandle< ObjectReferenceError (const char *type, Handle< Name > name)
 
Handle< CodeComputeHandler (LookupIterator *lookup, Handle< Object > value=Handle< Code >::null())
 
virtual Handle< CodeCompileHandler (LookupIterator *lookup, Handle< Object > value, CacheHolderFlag cache_holder)
 
void UpdateMonomorphicIC (Handle< Code > handler, Handle< Name > name)
 
bool UpdatePolymorphicIC (Handle< Name > name, Handle< Code > code)
 
void UpdateMegamorphicCache (HeapType *type, Name *name, Code *code)
 
void CopyICToMegamorphicCache (Handle< Name > name)
 
bool IsTransitionOfMonomorphicTarget (Map *source_map, Map *target_map)
 
void PatchCache (Handle< Name > name, Handle< Code > code)
 
Code::Kind kind () const
 
Code::Kind handler_kind () const
 
virtual Handle< Codemegamorphic_stub ()
 
bool TryRemoveInvalidPrototypeDependentStub (Handle< Object > receiver, Handle< String > name)
 
ExtraICState extra_ic_state () const
 
void set_extra_ic_state (ExtraICState state)
 
Handle< HeapTypereceiver_type ()
 
void update_receiver_type (Handle< Object > receiver)
 
void TargetMaps (MapHandleList *list)
 
void TargetTypes (TypeHandleList *list)
 
MapFirstTargetMap ()
 
void UpdateTarget ()
 
- Static Protected Member Functions inherited from v8::internal::IC
static CodeGetTargetAtAddress (Address address, ConstantPoolArray *constant_pool)
 
static void SetTargetAtAddress (Address address, Code *target, ConstantPoolArray *constant_pool)
 
static void OnTypeFeedbackChanged (Isolate *isolate, Address address, State old_state, State new_state, bool target_remains_ic_stub)
 
static void PostPatching (Address address, Code *target, Code *old_target)
 

Detailed Description

Definition at line 663 of file ic.h.

Constructor & Destructor Documentation

◆ ToBooleanIC()

v8::internal::ToBooleanIC::ToBooleanIC ( Isolate isolate)
inlineexplicit

Definition at line 665 of file ic.h.

Isolate * isolate() const
Definition: ic.h:136
IC(FrameDepth depth, Isolate *isolate)
Definition: ic.cc:141
@ EXTRA_CALL_FRAME
Definition: ic.h:59

Member Function Documentation

◆ ToBoolean()

Handle< Object > v8::internal::ToBooleanIC::ToBoolean ( Handle< Object object)

Definition at line 2495 of file ic.cc.

2495  {
2496  ToBooleanStub stub(isolate(), target()->extra_ic_state());
2497  bool to_boolean_value = stub.UpdateStatus(object);
2498  Handle<Code> code = stub.GetCode();
2499  set_target(*code);
2500  return handle(Smi::FromInt(to_boolean_value ? 1 : 0), isolate());
2501 }
ExtraICState extra_ic_state() const
Definition: ic.h:200
Handle< Code > target() const
Definition: ic.h:132
void set_target(Code *code)
Definition: ic-inl.h:121
static Smi * FromInt(int value)
Definition: objects-inl.h:1321
Handle< T > handle(T *t, Isolate *isolate)
Definition: handles.h:146

References v8::internal::IC::extra_ic_state(), v8::internal::Smi::FromInt(), v8::internal::handle(), v8::internal::IC::isolate(), v8::internal::IC::set_target(), v8::internal::IC::target(), and v8::internal::ToBooleanStub::UpdateStatus().

+ Here is the call graph for this function:

The documentation for this class was generated from the following files: