5 #ifndef V8_TYPES_INL_H_
6 #define V8_TYPES_INL_H_
19 template<
class Config>
29 template<
class Config>
34 return Of(value, region);
36 return Class(
i::handle(i::HeapObject::cast(value)->
map()), region);
40 template<
class Config>
43 if (this->IsAny())
return true;
44 if (value->IsHeapObject()) {
45 i::Map*
map = i::HeapObject::cast(value)->map();
47 if (*it.Current() ==
map)
return true;
50 return this->Contains(value);
67 return static_cast<T*
>(type);
73 return reinterpret_cast<uintptr_t>(type) & 1;
99 return reinterpret_cast<Struct*
>(type);
112 return reinterpret_cast<Type*
>(
static_cast<uintptr_t>(bitset | 1u));
125 return reinterpret_cast<Type*
>(structure);
138 int tag,
int length,
Zone* zone) {
140 zone->
New(
sizeof(
void*) * (length + 2)));
141 structure[0] =
reinterpret_cast<void*
>(tag);
142 structure[1] =
reinterpret_cast<void*
>(length);
150 structure[1] =
reinterpret_cast<void*
>(length);
156 return static_cast<int>(
reinterpret_cast<intptr_t
>(structure[0]));
162 return static_cast<int>(
reinterpret_cast<intptr_t
>(structure[1]));
169 return static_cast<Type*
>(structure[2 +
i]);
176 structure[2 +
i] = x;
193 structure[2 +
i] = x.location();
203 return i::handle(type, i::HeapObject::cast(type)->GetIsolate());
216 return type->IsSmi();
222 return type->IsMap();
254 return reinterpret_cast<Type*
>(
static_cast<uintptr_t>(bitset));
281 int tag,
int length,
Isolate* isolate) {
290 structure->Shrink(length + 1);
296 return static_cast<i::Smi*
>(structure->get(0))->value();
302 return structure->length() - 1;
309 Type* type =
static_cast<Type*
>(structure->get(
i + 1));
310 return i::handle(type, structure->GetIsolate());
317 structure->set(
i + 1, *type);
325 V* x =
static_cast<V*
>(structure->get(
i + 1));
326 return i::handle(x, structure->GetIsolate());
334 structure->set(
i + 1, *x);
static Handle< T > cast(Handle< S > that)
static Smi * FromInt(int value)
Config::template Handle< TypeImpl >::type TypeHandle
static TypeHandle NowOf(i::Object *value, Region *region)
bool NowContains(i::Object *val)
static TypeImpl * cast(typename Config::Base *object)
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf map
#define DCHECK(condition)
Handle< T > handle(T *t, Isolate *isolate)
Debugger support for the V8 JavaScript engine.
static int struct_length(i::Handle< Struct > structure)
static Type * from_bitset(Type::bitset)
static Type::bitset as_bitset(Type *type)
static i::Handle< Struct > as_struct(Type *type)
static i::Handle< Type > struct_get(i::Handle< Struct > structure, int i)
static bool is_bitset(Type *type)
static i::Handle< Struct > struct_create(int tag, int length, Isolate *isolate)
static int struct_tag(i::Handle< Struct > structure)
static bool is_class(Type *type)
static bool is_struct(Type *type, int tag)
static i::Handle< Type > from_class(i::Handle< i::Map > map, Isolate *isolate)
static i::Handle< i::Map > as_class(Type *type)
static i::Handle< Type > from_struct(i::Handle< Struct > structure)
static void struct_shrink(i::Handle< Struct > structure, int length)
static i::Handle< V > struct_get_value(i::Handle< Struct > structure, int i)
static i::Handle< T > handle(T *type)
static void struct_set_value(i::Handle< Struct > structure, int i, i::Handle< V > x)
static i::Handle< T > cast(i::Handle< Type > type)
static void struct_set(i::Handle< Struct > structure, int i, i::Handle< Type > type)
static Type * from_bitset(Type::bitset)
static void struct_shrink(Struct *structure, int length)
static Type * struct_get(Struct *structure, int i)
static Type::bitset as_bitset(Type *type)
static void struct_set(Struct *structure, int i, Type *type)
static Type * from_class(i::Handle< i::Map > map, Zone *zone)
static bool is_struct(Type *type, int tag)
static i::Handle< i::Map > as_class(Type *type)
static Struct * struct_create(int tag, int length, Zone *zone)
static Type * from_struct(Struct *structured)
static T * cast(Type *type)
static int struct_length(Struct *structure)
static int struct_tag(Struct *structure)
static Struct * as_struct(Type *type)
static T * handle(T *type)
static bool is_class(Type *type)
static bool is_bitset(Type *type)
static i::Handle< V > struct_get_value(Struct *structure, int i)
static void struct_set_value(Struct *structure, int i, i::Handle< V > x)
#define T(name, string, precedence)