ネームスペース | マクロ定義 | 関数 | 変数

src/objects-inl.h

#include "objects.h"
#include "contexts.h"
#include "conversions-inl.h"
#include "property.h"

ソースコードを見る。

ネームスペース

namespace  v8
namespace  v8::internal

マクロ定義

#define CAST_ACCESSOR(type)
#define INT_ACCESSORS(holder, name, offset)
#define ACCESSORS(holder, name, type, offset)
#define SMI_ACCESSORS(holder, name, offset)
#define BOOL_ACCESSORS(holder, field, name, offset)
#define MAKE_STRUCT_CASE(NAME, Name, name)   case NAME##_TYPE: return true;
#define MAKE_STRUCT_PREDICATE(NAME, Name, name)
#define FIELD_ADDR(p, offset)   (reinterpret_cast<byte*>(p) + offset - kHeapObjectTag)
#define READ_FIELD(p, offset)   (*reinterpret_cast<Object**>(FIELD_ADDR(p, offset)))
#define WRITE_FIELD(p, offset, value)   (*reinterpret_cast<Object**>(FIELD_ADDR(p, offset)) = value)
#define WRITE_BARRIER(object, offset)   Heap::RecordWrite(object->address(), offset);
#define CONDITIONAL_WRITE_BARRIER(object, offset, mode)
#define READ_DOUBLE_FIELD(p, offset)   (*reinterpret_cast<double*>(FIELD_ADDR(p, offset)))
#define WRITE_DOUBLE_FIELD(p, offset, value)   (*reinterpret_cast<double*>(FIELD_ADDR(p, offset)) = value)
#define READ_INT_FIELD(p, offset)   (*reinterpret_cast<int*>(FIELD_ADDR(p, offset)))
#define WRITE_INT_FIELD(p, offset, value)   (*reinterpret_cast<int*>(FIELD_ADDR(p, offset)) = value)
#define READ_UINT32_FIELD(p, offset)   (*reinterpret_cast<uint32_t*>(FIELD_ADDR(p, offset)))
#define WRITE_UINT32_FIELD(p, offset, value)   (*reinterpret_cast<uint32_t*>(FIELD_ADDR(p, offset)) = value)
#define READ_SHORT_FIELD(p, offset)   (*reinterpret_cast<uint16_t*>(FIELD_ADDR(p, offset)))
#define WRITE_SHORT_FIELD(p, offset, value)   (*reinterpret_cast<uint16_t*>(FIELD_ADDR(p, offset)) = value)
#define READ_BYTE_FIELD(p, offset)   (*reinterpret_cast<byte*>(FIELD_ADDR(p, offset)))
#define WRITE_BYTE_FIELD(p, offset, value)   (*reinterpret_cast<byte*>(FIELD_ADDR(p, offset)) = value)
#define MAKE_STRUCT_CAST(NAME, Name, name)   CAST_ACCESSOR(Name)

関数

template<>
bool v8::internal::Is< JSFunction > (Object *obj)
template<>
bool v8::internal::Is< JSArray > (Object *obj)
 v8::internal::ACCESSORS (Map, instance_descriptors, DescriptorArray, kInstanceDescriptorsOffset) ACCESSORS(FunctionTemplateInfo
kPropertyAccessorsOffset v8::internal::ACCESSORS (FunctionTemplateInfo, prototype_template, Object, kPrototypeTemplateOffset) ACCESSORS(FunctionTemplateInfo
kPropertyAccessorsOffset
kNamedPropertyHandlerOffset 
v8::internal::ACCESSORS (FunctionTemplateInfo, indexed_property_handler, Object, kIndexedPropertyHandlerOffset) ACCESSORS(FunctionTemplateInfo
kPropertyAccessorsOffset
kNamedPropertyHandlerOffset
kInstanceTemplateOffset 
v8::internal::ACCESSORS (FunctionTemplateInfo, instance_call_handler, Object, kInstanceCallHandlerOffset) ACCESSORS(FunctionTemplateInfo
kPropertyAccessorsOffset
kNamedPropertyHandlerOffset
kInstanceTemplateOffset
kAccessCheckInfoOffset 
v8::internal::ACCESSORS (ObjectTemplateInfo, internal_field_count, Object, kInternalFieldCountOffset) ACCESSORS(SharedFunctionInfo
kPropertyAccessorsOffset
kNamedPropertyHandlerOffset
kInstanceTemplateOffset
kAccessCheckInfoOffset
kInstanceClassNameOffset 
v8::internal::ACCESSORS (SharedFunctionInfo, function_data, Object, kExternalReferenceDataOffset) BOOL_ACCESSORS(FunctionTemplateInfo
kPropertyAccessorsOffset
kNamedPropertyHandlerOffset
kInstanceTemplateOffset
kAccessCheckInfoOffset
kInstanceClassNameOffset
kHiddenPrototypeBit 
v8::internal::BOOL_ACCESSORS (FunctionTemplateInfo, flag, needs_access_check, kNeedsAccessCheckBit) BOOL_ACCESSORS(SharedFunctionInfo
kPropertyAccessorsOffset
kNamedPropertyHandlerOffset
kInstanceTemplateOffset
kAccessCheckInfoOffset
kInstanceClassNameOffset
kHiddenPrototypeBit
kIsExpressionBit 
v8::internal::BOOL_ACCESSORS (SharedFunctionInfo, start_position_and_type, is_toplevel, kIsTopLevelBit) INT_ACCESSORS(SharedFunctionInfo
kPropertyAccessorsOffset
kNamedPropertyHandlerOffset
kInstanceTemplateOffset
kAccessCheckInfoOffset
kInstanceClassNameOffset
kHiddenPrototypeBit
kIsExpressionBit
kFormalParameterCountOffset 
v8::internal::INT_ACCESSORS (SharedFunctionInfo, expected_nof_properties, kExpectedNofPropertiesOffset) INT_ACCESSORS(SharedFunctionInfo
kPropertyAccessorsOffset
kNamedPropertyHandlerOffset
kInstanceTemplateOffset
kAccessCheckInfoOffset
kInstanceClassNameOffset
kHiddenPrototypeBit
kIsExpressionBit
kFormalParameterCountOffset
kStartPositionAndTypeOffset 
v8::internal::INT_ACCESSORS (SharedFunctionInfo, function_token_position, kFunctionTokenPositionOffset) void SharedFunctionInfo
 v8::internal::ACCESSORS (JSFunction, prototype_or_initial_map, Object, kPrototypeOrInitialMapOffset) Map *JSFunction

変数

 v8::internal::property_accessors
 v8::internal::Object
kPropertyAccessorsOffset v8::internal::named_property_handler
kPropertyAccessorsOffset
kNamedPropertyHandlerOffset 
v8::internal::instance_template
kPropertyAccessorsOffset
kNamedPropertyHandlerOffset
kInstanceTemplateOffset 
v8::internal::access_check_info
kPropertyAccessorsOffset
kNamedPropertyHandlerOffset
kInstanceTemplateOffset
kAccessCheckInfoOffset 
v8::internal::instance_class_name
kPropertyAccessorsOffset
kNamedPropertyHandlerOffset
kInstanceTemplateOffset
kAccessCheckInfoOffset
kInstanceClassNameOffset 
v8::internal::flag
kPropertyAccessorsOffset
kNamedPropertyHandlerOffset
kInstanceTemplateOffset
kAccessCheckInfoOffset
kInstanceClassNameOffset 
v8::internal::hidden_prototype
kPropertyAccessorsOffset
kNamedPropertyHandlerOffset
kInstanceTemplateOffset
kAccessCheckInfoOffset
kInstanceClassNameOffset
kHiddenPrototypeBit 
v8::internal::start_position_and_type
kPropertyAccessorsOffset
kNamedPropertyHandlerOffset
kInstanceTemplateOffset
kAccessCheckInfoOffset
kInstanceClassNameOffset
kHiddenPrototypeBit 
v8::internal::is_expression
kPropertyAccessorsOffset
kNamedPropertyHandlerOffset
kInstanceTemplateOffset
kAccessCheckInfoOffset
kInstanceClassNameOffset
kHiddenPrototypeBit
kIsExpressionBit 
v8::internal::formal_parameter_count

マクロ定義

#define ACCESSORS (   holder,
  name,
  type,
  offset 
)
値:
type* holder::name() { return type::cast(READ_FIELD(this, offset)); } \
  void holder::set_##name(type* value, WriteBarrierMode mode) {         \
    WRITE_FIELD(this, offset, value);                                   \
    CONDITIONAL_WRITE_BARRIER(this, offset, mode);                      \
  }

objects-inl.h67 行で定義されています。

#define BOOL_ACCESSORS (   holder,
  field,
  name,
  offset 
)
値:
bool holder::name() {                                    \
    return BooleanBit::get(field(), offset);               \
  }                                                        \
  void holder::set_##name(bool value) {                    \
    set_##field(BooleanBit::set(field(), offset, value));  \
  }

objects-inl.h86 行で定義されています。

#define CAST_ACCESSOR (   type  ) 
値:
type* type::cast(Object* object) {            \
    ASSERT(object->Is##type());                 \
    return reinterpret_cast<type*>(object);     \
  }

objects-inl.h55 行で定義されています。

#define CONDITIONAL_WRITE_BARRIER (   object,
  offset,
  mode 
)
値:
if (mode == UPDATE_WRITE_BARRIER) { \
    Heap::RecordWrite(object->address(), offset); \
  } else { \
    ASSERT(mode == SKIP_WRITE_BARRIER); \
    ASSERT(Heap::InNewSpace(object) || \
           !Heap::InNewSpace(READ_FIELD(object, offset))); \
  }

objects-inl.h520 行で定義されています。

参照元 v8::internal::JSObject::InObjectPropertyAtPut(), v8::internal::FixedArray::set(), v8::internal::ConsString::set_first(), と v8::internal::ConsString::set_second().

#define FIELD_ADDR (   p,
  offset 
)    (reinterpret_cast<byte*>(p) + offset - kHeapObjectTag)
#define INT_ACCESSORS (   holder,
  name,
  offset 
)
値:
int holder::name() { return READ_INT_FIELD(this, offset); }           \
  void holder::set_##name(int value) { WRITE_INT_FIELD(this, offset, value); }

objects-inl.h62 行で定義されています。

#define MAKE_STRUCT_CASE (   NAME,
  Name,
  name 
)    case NAME##_TYPE: return true;
#define MAKE_STRUCT_CAST (   NAME,
  Name,
  name 
)    CAST_ACCESSOR(Name)

objects-inl.h1254 行で定義されています。

#define MAKE_STRUCT_PREDICATE (   NAME,
  Name,
  name 
)
値:
bool Object::Is##Name() {                                      \
    return Object::IsHeapObject()                                \
      && HeapObject::cast(this)->map()->instance_type() == NAME##_TYPE; \
  }

objects-inl.h428 行で定義されています。

#define READ_BYTE_FIELD (   p,
  offset 
)    (*reinterpret_cast<byte*>(FIELD_ADDR(p, offset)))
#define READ_DOUBLE_FIELD (   p,
  offset 
)    (*reinterpret_cast<double*>(FIELD_ADDR(p, offset)))

objects-inl.h529 行で定義されています。

参照元 v8::internal::HeapNumber::value().

#define READ_FIELD (   p,
  offset 
)    (*reinterpret_cast<Object**>(FIELD_ADDR(p, offset)))
#define READ_INT_FIELD (   p,
  offset 
)    (*reinterpret_cast<int*>(FIELD_ADDR(p, offset)))
#define READ_SHORT_FIELD (   p,
  offset 
)    (*reinterpret_cast<uint16_t*>(FIELD_ADDR(p, offset)))

objects-inl.h547 行で定義されています。

参照元 v8::internal::SeqTwoByteString::SeqTwoByteStringGet().

#define READ_UINT32_FIELD (   p,
  offset 
)    (*reinterpret_cast<uint32_t*>(FIELD_ADDR(p, offset)))

objects-inl.h541 行で定義されています。

参照元 v8::internal::String::length_field().

#define SMI_ACCESSORS (   holder,
  name,
  offset 
)
値:
int holder::name() {                                  \
    Object* value = READ_FIELD(this, offset);           \
    return Smi::cast(value)->value();                   \
  }                                                     \
  void holder::set_##name(int value) {                  \
    WRITE_FIELD(this, offset, Smi::FromInt(value));     \
  }

objects-inl.h76 行で定義されています。

#define WRITE_BARRIER (   object,
  offset 
)    Heap::RecordWrite(object->address(), offset);
#define WRITE_BYTE_FIELD (   p,
  offset,
  value 
)    (*reinterpret_cast<byte*>(FIELD_ADDR(p, offset)) = value)
#define WRITE_DOUBLE_FIELD (   p,
  offset,
  value 
)    (*reinterpret_cast<double*>(FIELD_ADDR(p, offset)) = value)

objects-inl.h532 行で定義されています。

参照元 v8::internal::HeapNumber::set_value().

#define WRITE_FIELD (   p,
  offset,
  value 
)    (*reinterpret_cast<Object**>(FIELD_ADDR(p, offset)) = value)
#define WRITE_INT_FIELD (   p,
  offset,
  value 
)    (*reinterpret_cast<int*>(FIELD_ADDR(p, offset)) = value)
#define WRITE_SHORT_FIELD (   p,
  offset,
  value 
)    (*reinterpret_cast<uint16_t*>(FIELD_ADDR(p, offset)) = value)

objects-inl.h550 行で定義されています。

参照元 v8::internal::SeqTwoByteString::SeqTwoByteStringSet().

#define WRITE_UINT32_FIELD (   p,
  offset,
  value 
)    (*reinterpret_cast<uint32_t*>(FIELD_ADDR(p, offset)) = value)

objects-inl.h544 行で定義されています。

参照元 v8::internal::String::set_length_field().

 全て クラス ネームスペース ファイル 関数 変数 型定義 列挙型 列挙型の値 フレンド マクロ定義