38 #if V8_TARGET_ARCH_ARM
40 #elif V8_TARGET_ARCH_MIPS
208 #define INSTANCE_TYPE_LIST_ALL(V) \
210 V(ASCII_SYMBOL_TYPE) \
211 V(CONS_SYMBOL_TYPE) \
212 V(CONS_ASCII_SYMBOL_TYPE) \
213 V(EXTERNAL_SYMBOL_TYPE) \
214 V(EXTERNAL_SYMBOL_WITH_ASCII_DATA_TYPE) \
215 V(EXTERNAL_ASCII_SYMBOL_TYPE) \
216 V(SHORT_EXTERNAL_SYMBOL_TYPE) \
217 V(SHORT_EXTERNAL_SYMBOL_WITH_ASCII_DATA_TYPE) \
218 V(SHORT_EXTERNAL_ASCII_SYMBOL_TYPE) \
220 V(ASCII_STRING_TYPE) \
221 V(CONS_STRING_TYPE) \
222 V(CONS_ASCII_STRING_TYPE) \
223 V(SLICED_STRING_TYPE) \
224 V(EXTERNAL_STRING_TYPE) \
225 V(EXTERNAL_STRING_WITH_ASCII_DATA_TYPE) \
226 V(EXTERNAL_ASCII_STRING_TYPE) \
227 V(SHORT_EXTERNAL_STRING_TYPE) \
228 V(SHORT_EXTERNAL_STRING_WITH_ASCII_DATA_TYPE) \
229 V(SHORT_EXTERNAL_ASCII_STRING_TYPE) \
230 V(PRIVATE_EXTERNAL_ASCII_STRING_TYPE) \
235 V(JS_GLOBAL_PROPERTY_CELL_TYPE) \
237 V(HEAP_NUMBER_TYPE) \
244 V(EXTERNAL_BYTE_ARRAY_TYPE) \
245 V(EXTERNAL_UNSIGNED_BYTE_ARRAY_TYPE) \
246 V(EXTERNAL_SHORT_ARRAY_TYPE) \
247 V(EXTERNAL_UNSIGNED_SHORT_ARRAY_TYPE) \
248 V(EXTERNAL_INT_ARRAY_TYPE) \
249 V(EXTERNAL_UNSIGNED_INT_ARRAY_TYPE) \
250 V(EXTERNAL_FLOAT_ARRAY_TYPE) \
251 V(EXTERNAL_PIXEL_ARRAY_TYPE) \
254 V(ACCESSOR_INFO_TYPE) \
255 V(ACCESSOR_PAIR_TYPE) \
256 V(ACCESS_CHECK_INFO_TYPE) \
257 V(INTERCEPTOR_INFO_TYPE) \
258 V(CALL_HANDLER_INFO_TYPE) \
259 V(FUNCTION_TEMPLATE_INFO_TYPE) \
260 V(OBJECT_TEMPLATE_INFO_TYPE) \
261 V(SIGNATURE_INFO_TYPE) \
262 V(TYPE_SWITCH_INFO_TYPE) \
265 V(POLYMORPHIC_CODE_CACHE_TYPE) \
266 V(TYPE_FEEDBACK_INFO_TYPE) \
267 V(ALIASED_ARGUMENTS_ENTRY_TYPE) \
269 V(FIXED_ARRAY_TYPE) \
270 V(FIXED_DOUBLE_ARRAY_TYPE) \
271 V(SHARED_FUNCTION_INFO_TYPE) \
273 V(JS_MESSAGE_OBJECT_TYPE) \
278 V(JS_CONTEXT_EXTENSION_OBJECT_TYPE) \
280 V(JS_GLOBAL_OBJECT_TYPE) \
281 V(JS_BUILTINS_OBJECT_TYPE) \
282 V(JS_GLOBAL_PROXY_TYPE) \
285 V(JS_WEAK_MAP_TYPE) \
288 V(JS_FUNCTION_TYPE) \
289 V(JS_FUNCTION_PROXY_TYPE) \
291 #ifdef ENABLE_DEBUGGER_SUPPORT
292 #define INSTANCE_TYPE_LIST_DEBUGGER(V) \
294 V(BREAK_POINT_INFO_TYPE)
296 #define INSTANCE_TYPE_LIST_DEBUGGER(V)
299 #define INSTANCE_TYPE_LIST(V) \
300 INSTANCE_TYPE_LIST_ALL(V) \
301 INSTANCE_TYPE_LIST_DEBUGGER(V)
306 #define STRING_TYPE_LIST(V) \
308 kVariableSizeSentinel, \
311 V(ASCII_SYMBOL_TYPE, \
312 kVariableSizeSentinel, \
315 V(CONS_SYMBOL_TYPE, \
319 V(CONS_ASCII_SYMBOL_TYPE, \
323 V(EXTERNAL_SYMBOL_TYPE, \
324 ExternalTwoByteString::kSize, \
327 V(EXTERNAL_SYMBOL_WITH_ASCII_DATA_TYPE, \
328 ExternalTwoByteString::kSize, \
329 external_symbol_with_ascii_data, \
330 ExternalSymbolWithAsciiData) \
331 V(EXTERNAL_ASCII_SYMBOL_TYPE, \
332 ExternalAsciiString::kSize, \
333 external_ascii_symbol, \
334 ExternalAsciiSymbol) \
335 V(SHORT_EXTERNAL_SYMBOL_TYPE, \
336 ExternalTwoByteString::kShortSize, \
337 short_external_symbol, \
338 ShortExternalSymbol) \
339 V(SHORT_EXTERNAL_SYMBOL_WITH_ASCII_DATA_TYPE, \
340 ExternalTwoByteString::kShortSize, \
341 short_external_symbol_with_ascii_data, \
342 ShortExternalSymbolWithAsciiData) \
343 V(SHORT_EXTERNAL_ASCII_SYMBOL_TYPE, \
344 ExternalAsciiString::kShortSize, \
345 short_external_ascii_symbol, \
346 ShortExternalAsciiSymbol) \
348 kVariableSizeSentinel, \
351 V(ASCII_STRING_TYPE, \
352 kVariableSizeSentinel, \
355 V(CONS_STRING_TYPE, \
359 V(CONS_ASCII_STRING_TYPE, \
363 V(SLICED_STRING_TYPE, \
364 SlicedString::kSize, \
367 V(SLICED_ASCII_STRING_TYPE, \
368 SlicedString::kSize, \
369 sliced_ascii_string, \
371 V(EXTERNAL_STRING_TYPE, \
372 ExternalTwoByteString::kSize, \
375 V(EXTERNAL_STRING_WITH_ASCII_DATA_TYPE, \
376 ExternalTwoByteString::kSize, \
377 external_string_with_ascii_data, \
378 ExternalStringWithAsciiData) \
379 V(EXTERNAL_ASCII_STRING_TYPE, \
380 ExternalAsciiString::kSize, \
381 external_ascii_string, \
382 ExternalAsciiString) \
383 V(SHORT_EXTERNAL_STRING_TYPE, \
384 ExternalTwoByteString::kShortSize, \
385 short_external_string, \
386 ShortExternalString) \
387 V(SHORT_EXTERNAL_STRING_WITH_ASCII_DATA_TYPE, \
388 ExternalTwoByteString::kShortSize, \
389 short_external_string_with_ascii_data, \
390 ShortExternalStringWithAsciiData) \
391 V(SHORT_EXTERNAL_ASCII_STRING_TYPE, \
392 ExternalAsciiString::kShortSize, \
393 short_external_ascii_string, \
394 ShortExternalAsciiString)
405 #define STRUCT_LIST_ALL(V) \
406 V(ACCESSOR_INFO, AccessorInfo, accessor_info) \
407 V(ACCESSOR_PAIR, AccessorPair, accessor_pair) \
408 V(ACCESS_CHECK_INFO, AccessCheckInfo, access_check_info) \
409 V(INTERCEPTOR_INFO, InterceptorInfo, interceptor_info) \
410 V(CALL_HANDLER_INFO, CallHandlerInfo, call_handler_info) \
411 V(FUNCTION_TEMPLATE_INFO, FunctionTemplateInfo, function_template_info) \
412 V(OBJECT_TEMPLATE_INFO, ObjectTemplateInfo, object_template_info) \
413 V(SIGNATURE_INFO, SignatureInfo, signature_info) \
414 V(TYPE_SWITCH_INFO, TypeSwitchInfo, type_switch_info) \
415 V(SCRIPT, Script, script) \
416 V(CODE_CACHE, CodeCache, code_cache) \
417 V(POLYMORPHIC_CODE_CACHE, PolymorphicCodeCache, polymorphic_code_cache) \
418 V(TYPE_FEEDBACK_INFO, TypeFeedbackInfo, type_feedback_info) \
419 V(ALIASED_ARGUMENTS_ENTRY, AliasedArgumentsEntry, aliased_arguments_entry)
421 #ifdef ENABLE_DEBUGGER_SUPPORT
422 #define STRUCT_LIST_DEBUGGER(V) \
423 V(DEBUG_INFO, DebugInfo, debug_info) \
424 V(BREAK_POINT_INFO, BreakPointInfo, break_point_info)
426 #define STRUCT_LIST_DEBUGGER(V)
429 #define STRUCT_LIST(V) \
431 STRUCT_LIST_DEBUGGER(V)
665 #define DECL_BOOLEAN_ACCESSORS(name) \
666 inline bool name(); \
667 inline void set_##name(bool value); \
670 #define DECL_ACCESSORS(name, type) \
671 inline type* name(); \
672 inline void set_##name(type* value, \
673 WriteBarrierMode mode = UPDATE_WRITE_BARRIER); \
677 class DictionaryElementsAccessor;
678 class ElementsAccessor;
680 class FixedArrayBase;
694 template <
class C>
static inline bool Is(
Object* obj);
699 inline bool IsFailure();
700 inline bool IsRetryAfterGC();
701 inline bool IsOutOfMemory();
702 inline bool IsException();
705 if (IsFailure())
return false;
706 *obj =
reinterpret_cast<Object*
>(
this);
711 return reinterpret_cast<Failure*
>(
this);
715 return reinterpret_cast<Object*
>(
this);
719 return reinterpret_cast<Object*
>(
this);
724 if (IsFailure())
return false;
725 *obj = T::cast(reinterpret_cast<Object*>(
this));
731 inline void Print() {
734 inline void PrintLn() {
737 void Print(FILE* out);
738 void PrintLn(FILE* out);
747 #define OBJECT_TYPE_LIST(V) \
752 #define HEAP_OBJECT_TYPE_LIST(V) \
760 V(ExternalTwoByteString) \
761 V(ExternalAsciiString) \
762 V(SeqTwoByteString) \
766 V(ExternalByteArray) \
767 V(ExternalUnsignedByteArray) \
768 V(ExternalShortArray) \
769 V(ExternalUnsignedShortArray) \
770 V(ExternalIntArray) \
771 V(ExternalUnsignedIntArray) \
772 V(ExternalFloatArray) \
773 V(ExternalDoubleArray) \
774 V(ExternalPixelArray) \
779 V(JSContextExtensionObject) \
783 V(DeoptimizationInputData) \
784 V(DeoptimizationOutputData) \
785 V(TypeFeedbackCells) \
787 V(FixedDoubleArray) \
795 V(SharedFunctionInfo) \
812 V(JSFunctionResultCache) \
813 V(NormalizedMapCache) \
814 V(CompilationCacheTable) \
815 V(CodeCacheHashTable) \
816 V(PolymorphicCodeCacheHashTable) \
821 V(JSBuiltinsObject) \
823 V(UndetectableObject) \
824 V(AccessCheckNeeded) \
825 V(JSGlobalPropertyCell) \
841 #define IS_TYPE_FUNCTION_DECL(type_) inline bool Is##type_();
844 #undef IS_TYPE_FUNCTION_DECL
853 #define DECLARE_STRUCT_PREDICATE(NAME, Name, name) inline bool Is##Name();
855 #undef DECLARE_STRUCT_PREDICATE
857 INLINE(
bool IsSpecObject());
858 INLINE(
bool IsSpecFunction());
861 INLINE(
bool IsUndefined());
893 void Lookup(String*
name, LookupResult* result);
905 static Handle<Object>
GetProperty(Handle<Object>
object,
906 Handle<Object> receiver,
907 LookupResult* result,
912 LookupResult* result,
919 static Handle<Object>
GetElement(Handle<Object>
object, uint32_t index);
949 static void VerifyPointer(
Object* p);
968 DISALLOW_IMPLICIT_CONSTRUCTORS(
Object);
989 static inline bool IsValid(intptr_t value);
1009 DISALLOW_IMPLICIT_CONSTRUCTORS(
Smi);
1074 void FailureVerify();
1078 inline intptr_t value()
const;
1081 DISALLOW_IMPLICIT_CONSTRUCTORS(
Failure);
1094 static inline MapWord FromMap(Map* map);
1097 inline Map* ToMap();
1106 inline bool IsForwardingAddress();
1109 static inline MapWord FromForwardingAddress(HeapObject*
object);
1112 inline HeapObject* ToForwardingAddress();
1115 return MapWord(value);
1126 explicit MapWord(uintptr_t value) : value_(value) {}
1165 void Iterate(ObjectVisitor* v);
1200 inline void HeapObjectPrint() {
1201 HeapObjectPrint(stdout);
1203 void HeapObjectPrint(FILE* out);
1204 void PrintHeader(FILE* out,
const char*
id);
1208 void HeapObjectVerify();
1209 inline void VerifyObjectField(
int offset);
1210 inline void VerifySmiField(
int offset);
1214 static void VerifyHeapPointer(
Object* p);
1236 #define SLOT_ADDR(obj, offset) \
1237 reinterpret_cast<Object**>((obj)->address() + offset)
1242 template<
int start_offset,
int end_offset,
int size>
1251 template<
typename StaticVisitor>
1253 StaticVisitor::VisitPointers(
SLOT_ADDR(obj, start_offset),
1262 template<
int start_offset>
1271 template<
typename StaticVisitor>
1273 StaticVisitor::VisitPointers(
SLOT_ADDR(obj, start_offset),
1286 inline double value();
1300 void HeapNumberVerify();
1388 LookupResult* result,
1406 bool check_prototype);
1433 bool skip_hidden_prototypes);
1449 LookupResult* result,
1451 bool continue_search);
1466 inline void initialize_properties();
1550 LookupResult* result,
1553 bool check_prototype,
1597 PropertyDetails details);
1601 PropertyDetails details);
1616 bool continue_search);
1619 bool continue_search);
1622 LookupResult* result,
1624 bool continue_search);
1650 LookupResult* result,
1750 return old_capacity + (old_capacity >> 1) + 16;
1778 bool check_prototype);
1785 bool check_prototype,
1792 bool check_prototype =
true);
1814 bool check_prototype =
true,
1970 int expected_additional_properties);
1974 int expected_additional_properties);
1992 int unused_property_fields);
1995 int unused_property_fields);
2015 Object* pre_allocated_value,
2032 inline void JSObjectPrint() {
2033 JSObjectPrint(stdout);
2035 void JSObjectPrint(FILE* out);
2038 void JSObjectVerify();
2041 inline void PrintProperties() {
2042 PrintProperties(stdout);
2044 void PrintProperties(FILE* out);
2046 inline void PrintElements() {
2047 PrintElements(stdout);
2049 void PrintElements(FILE* out);
2053 FILE* file,
ElementsKind from_kind, FixedArrayBase* from_elements,
2058 class SpillInformation {
2062 int number_of_objects_;
2063 int number_of_objects_with_fast_properties_;
2064 int number_of_objects_with_fast_elements_;
2065 int number_of_fast_used_fields_;
2066 int number_of_fast_unused_fields_;
2067 int number_of_slow_used_properties_;
2068 int number_of_slow_unused_properties_;
2069 int number_of_fast_used_elements_;
2070 int number_of_fast_unused_elements_;
2071 int number_of_slow_used_elements_;
2072 int number_of_slow_unused_elements_;
2075 void IncrementSpillStatistics(SpillInformation* info);
2142 bool check_prototype,
2149 bool check_prototype,
2167 MUST_USE_RESULT MaybeObject* DeleteElementWithInterceptor(uint32_t index);
2173 bool ReferencesObjectFromElements(
FixedArray* elements,
2178 bool HasDenseElements();
2181 void GetElementsCapacityAndUsage(
int* capacity,
int* used);
2183 bool CanSetCallback(
String* name);
2203 void LookupInDescriptor(
String* name, LookupResult* result);
2211 bool create_if_absent);
2243 inline Object*
get(
int index);
2245 inline void set(
int index,
Object* value);
2249 inline void set(
int index,
Smi* value);
2305 inline void FixedArrayPrint() {
2306 FixedArrayPrint(stdout);
2308 void FixedArrayPrint(FILE* out);
2311 void FixedArrayVerify();
2329 return SizeFor(reinterpret_cast<FixedArray*>(
object)->
length());
2359 inline void set(
int index,
double value);
2392 inline void FixedDoubleArrayPrint() {
2393 FixedDoubleArrayPrint(stdout);
2395 void FixedDoubleArrayPrint(FILE* out);
2399 void FixedDoubleArrayVerify();
2407 class IncrementalMarking;
2443 if (
IsEmpty())
return PropertyDetails::kInitialIndex;
2491 Object* new_index_cache);
2499 inline PropertyDetails
GetDetails(
int descriptor_number);
2506 inline bool IsProperty(
int descriptor_number);
2528 inline void Get(
int descriptor_number, Descriptor* desc);
2529 inline void Set(
int descriptor_number,
2574 void Sort(
const WhitenessWitness&);
2638 inline void PrintDescriptors() {
2639 PrintDescriptors(stdout);
2641 void PrintDescriptors(FILE* out);
2646 bool IsSortedNoDuplicates();
2649 bool IsConsistentWithBackPointers(
Map* current_map);
2664 descs_(descs), index_(index) { }
2667 inline Object* GetCallbackObject() {
return descs_->GetValue(index_); }
2675 static int ToKeyIndex(
int descriptor_number) {
2681 static int ToDetailsIndex(
int descriptor_number) {
2687 static int ToValueIndex(
int descriptor_number) {
2694 static inline void NoIncrementalWriteBarrierSwap(
2695 FixedArray* array,
int first,
int second);
2698 inline void NoIncrementalWriteBarrierSwapDescriptors(
2699 int first,
int second);
2701 DISALLOW_IMPLICIT_CONSTRUCTORS(DescriptorArray);
2738 template<
typename Key>
2742 static uint32_t
Hash(Key key) {
return 0; }
2754 template<
typename Shape,
typename Key>
2759 if (Shape::UsesSeed) {
2760 return Shape::SeededHash(key,
2763 return Shape::Hash(key);
2768 if (Shape::UsesSeed) {
2769 return Shape::SeededHashForObject(key,
2770 GetHeap()->HashSeed(),
object);
2772 return Shape::HashForObject(key,
object);
2808 int at_least_space_for,
2821 return !k->IsTheHole() && !k->IsUndefined();
2832 INLINE(
static uint32_t GetProbeOffset(uint32_t n)) {
2833 return (n + n * n) >> 1;
2893 static uint32_t
GetProbe(uint32_t hash, uint32_t number, uint32_t size) {
2895 return (hash + GetProbeOffset(number)) & (size - 1);
2899 return hash & (size - 1);
2902 static uint32_t
NextProbe(uint32_t last, uint32_t number, uint32_t size) {
2903 return (last + number) & (size - 1);
2923 virtual uint32_t
Hash() = 0;
3027 DISALLOW_IMPLICIT_CONSTRUCTORS(
MapCache);
3031 template <
typename Shape,
typename Key>
3051 return PropertyDetails(
3100 inline void Print() {
3103 void Print(FILE* out);
3115 PropertyDetails details);
3119 PropertyDetails details);
3128 PropertyDetails details,
3154 ASSERT(obj->IsDictionary());
3164 int unused_property_fields);
3199 static inline uint32_t
Hash(uint32_t key);
3205 :
public Dictionary<SeededNumberDictionaryShape, uint32_t> {
3208 ASSERT(obj->IsDictionary());
3216 PropertyDetails details);
3224 PropertyDetails details);
3228 PropertyDetails details);
3253 :
public Dictionary<UnseededNumberDictionaryShape, uint32_t> {
3256 ASSERT(obj->IsDictionary());
3275 template <
int entrysize>
3292 ASSERT(obj->IsHashTable());
3312 ASSERT(obj->IsHashTable());
3328 void RemoveEntry(
int entry);
3331 static inline int EntryToValueIndex(
int entry) {
3359 inline void Clear();
3370 void JSFunctionResultCacheVerify();
3492 #define FOR_EACH_NUMERIC_FIELD(V) \
3495 V(StackLocalCount) \
3496 V(ContextLocalCount)
3498 #define FIELD_ACCESSORS(name) \
3499 void Set##name(int value) { \
3500 set(k##name, Smi::FromInt(value)); \
3503 if (length() > 0) { \
3504 return Smi::cast(get(k##name))->value(); \
3510 #undef FIELD_ACCESSORS
3514 #define DECL_INDEX(name) k##name,
3517 #undef FOR_EACH_NUMERIC_FIELD
3548 int ParameterEntriesIndex();
3549 int StackLocalEntriesIndex();
3550 int ContextLocalNameEntriesIndex();
3551 int ContextLocalInfoEntriesIndex();
3552 int FunctionNameEntryIndex();
3555 enum FunctionVariableInfo {
3563 class TypeField:
public BitField<ScopeType, 0, 3> {};
3564 class CallsEvalField:
public BitField<bool, 3, 1> {};
3565 class LanguageModeField:
public BitField<LanguageMode, 4, 2> {};
3566 class FunctionVariableField:
public BitField<FunctionVariableInfo, 6, 2> {};
3567 class FunctionVariableMode:
public BitField<VariableMode, 8, 3> {};
3592 void NormalizedMapCacheVerify();
3604 inline byte get(
int index);
3605 inline void set(
int index,
byte value);
3608 inline int get_int(
int index);
3637 inline void ByteArrayPrint() {
3638 ByteArrayPrint(stdout);
3640 void ByteArrayPrint(FILE* out);
3643 void ByteArrayVerify();
3655 DISALLOW_IMPLICIT_CONSTRUCTORS(
ByteArray);
3673 inline void FreeSpacePrint() {
3674 FreeSpacePrint(stdout);
3676 void FreeSpacePrint(FILE* out);
3679 void FreeSpaceVerify();
3690 DISALLOW_IMPLICIT_CONSTRUCTORS(
FreeSpace);
3740 inline uint8_t* external_pixel_pointer();
3743 inline uint8_t get_scalar(
int index);
3745 inline void set(
int index, uint8_t value);
3755 inline void ExternalPixelArrayPrint() {
3756 ExternalPixelArrayPrint(stdout);
3758 void ExternalPixelArrayPrint(FILE* out);
3761 void ExternalPixelArrayVerify();
3772 inline int8_t get_scalar(
int index);
3774 inline void set(
int index, int8_t value);
3784 inline void ExternalByteArrayPrint() {
3785 ExternalByteArrayPrint(stdout);
3787 void ExternalByteArrayPrint(FILE* out);
3790 void ExternalByteArrayVerify();
3801 inline uint8_t get_scalar(
int index);
3803 inline void set(
int index, uint8_t value);
3813 inline void ExternalUnsignedByteArrayPrint() {
3814 ExternalUnsignedByteArrayPrint(stdout);
3816 void ExternalUnsignedByteArrayPrint(FILE* out);
3819 void ExternalUnsignedByteArrayVerify();
3830 inline int16_t get_scalar(
int index);
3832 inline void set(
int index,
int16_t value);
3842 inline void ExternalShortArrayPrint() {
3843 ExternalShortArrayPrint(stdout);
3845 void ExternalShortArrayPrint(FILE* out);
3848 void ExternalShortArrayVerify();
3859 inline uint16_t get_scalar(
int index);
3861 inline void set(
int index,
uint16_t value);
3871 inline void ExternalUnsignedShortArrayPrint() {
3872 ExternalUnsignedShortArrayPrint(stdout);
3874 void ExternalUnsignedShortArrayPrint(FILE* out);
3877 void ExternalUnsignedShortArrayVerify();
3888 inline int32_t get_scalar(
int index);
3890 inline void set(
int index,
int32_t value);
3900 inline void ExternalIntArrayPrint() {
3901 ExternalIntArrayPrint(stdout);
3903 void ExternalIntArrayPrint(FILE* out);
3906 void ExternalIntArrayVerify();
3917 inline uint32_t get_scalar(
int index);
3919 inline void set(
int index, uint32_t value);
3929 inline void ExternalUnsignedIntArrayPrint() {
3930 ExternalUnsignedIntArrayPrint(stdout);
3932 void ExternalUnsignedIntArrayPrint(FILE* out);
3935 void ExternalUnsignedIntArrayVerify();
3946 inline float get_scalar(
int index);
3948 inline void set(
int index,
float value);
3958 inline void ExternalFloatArrayPrint() {
3959 ExternalFloatArrayPrint(stdout);
3961 void ExternalFloatArrayPrint(FILE* out);
3964 void ExternalFloatArrayVerify();
3975 inline double get_scalar(
int index);
3977 inline void set(
int index,
double value);
3987 inline void ExternalDoubleArrayPrint() {
3988 ExternalDoubleArrayPrint(stdout);
3990 void ExternalDoubleArrayPrint(FILE* out);
3991 #endif // OBJECT_PRINT
3993 void ExternalDoubleArrayVerify();
4011 static const int kTranslationByteArrayIndex = 0;
4012 static const int kInlinedFunctionCountIndex = 1;
4013 static const int kLiteralArrayIndex = 2;
4014 static const int kOsrAstIdIndex = 3;
4015 static const int kOsrPcOffsetIndex = 4;
4016 static const int kFirstDeoptEntryIndex = 5;
4019 static const int kAstIdOffset = 0;
4020 static const int kTranslationIndexOffset = 1;
4021 static const int kArgumentsStackHeightOffset = 2;
4022 static const int kPcOffset = 3;
4023 static const int kDeoptEntrySize = 4;
4026 #define DEFINE_ELEMENT_ACCESSORS(name, type) \
4028 return type::cast(get(k##name##Index)); \
4030 void Set##name(type* value) { \
4031 set(k##name##Index, value); \
4040 #undef DEFINE_ELEMENT_ACCESSORS
4043 #define DEFINE_ENTRY_ACCESSORS(name, type) \
4044 type* name(int i) { \
4045 return type::cast(get(IndexForEntry(i) + k##name##Offset)); \
4047 void Set##name(int i, type* value) { \
4048 set(IndexForEntry(i) + k##name##Offset, value); \
4056 #undef DEFINE_ENTRY_ACCESSORS
4059 return (
length() - kFirstDeoptEntryIndex) / kDeoptEntrySize;
4069 #ifdef ENABLE_DISASSEMBLER
4070 void DeoptimizationInputDataPrint(FILE* out);
4074 static int IndexForEntry(
int i) {
4075 return kFirstDeoptEntryIndex + (i * kDeoptEntrySize);
4078 static int LengthFor(
int entry_count) {
4079 return IndexForEntry(entry_count);
4098 return deopt_points * 2;
4102 MUST_USE_RESULT static MaybeObject* Allocate(
int number_of_deopt_points,
4108 #if defined(OBJECT_PRINT) || defined(ENABLE_DISASSEMBLER)
4109 void DeoptimizationOutputDataPrint(FILE* out);
4115 class JSGlobalPropertyCell;
4128 inline Smi* AstId(
int index);
4129 inline void SetAstId(
int index,
Smi*
id);
4143 static inline Object* RawUninitializedSentinel(
Heap* heap);
4148 static const int kForInFastCaseMarker = 0;
4149 static const int kForInSlowCaseMarker = 1;
4154 class SafepointEntry;
4189 FIRST_IC_KIND = LOAD_IC,
4190 LAST_IC_KIND = TO_BOOLEAN_IC
4194 NUMBER_OF_KINDS = LAST_IC_KIND + 1
4201 #ifdef ENABLE_DISASSEMBLER
4203 static const char* Kind2String(
Kind kind);
4207 inline void Disassemble(
const char*
name) {
4208 Disassemble(name, stdout);
4210 void Disassemble(
const char*
name, FILE* out);
4211 #endif // ENABLE_DISASSEMBLER
4214 inline int instruction_size();
4215 inline void set_instruction_size(
int value);
4219 void InvalidateRelocation();
4238 inline
void set_ic_age(
int count);
4239 inline
int ic_age();
4242 inline
ByteArray* unchecked_relocation_info();
4243 inline
FixedArray* unchecked_deoptimization_data();
4245 inline
int relocation_size();
4248 inline Flags
flags();
4249 inline
void set_flags(Flags flags);
4254 inline ExtraICState extra_ic_state();
4256 inline
int arguments_count();
4259 inline
bool is_inline_cache_stub();
4260 inline
bool is_load_stub() {
return kind() == LOAD_IC; }
4272 inline int major_key();
4273 inline void set_major_key(
int value);
4277 inline bool is_pregenerated();
4278 inline void set_is_pregenerated(
bool value);
4281 inline bool optimizable();
4282 inline void set_optimizable(
bool value);
4286 inline bool has_deoptimization_support();
4287 inline void set_has_deoptimization_support(
bool value);
4291 inline bool has_debug_break_slots();
4292 inline void set_has_debug_break_slots(
bool value);
4296 inline bool is_compiled_optimizable();
4297 inline void set_compiled_optimizable(
bool value);
4303 inline void set_allow_osr_at_loop_nesting_level(
int level);
4304 inline int allow_osr_at_loop_nesting_level();
4308 inline int profiler_ticks();
4309 inline void set_profiler_ticks(
int ticks);
4313 inline unsigned stack_slots();
4314 inline void set_stack_slots(
unsigned slots);
4318 inline unsigned safepoint_table_offset();
4319 inline void set_safepoint_table_offset(
unsigned offset);
4323 inline unsigned stack_check_table_offset();
4324 inline void set_stack_check_table_offset(
unsigned offset);
4329 inline void set_check_type(
CheckType value);
4332 inline byte unary_op_type();
4333 inline void set_unary_op_type(
byte value);
4336 inline byte binary_op_type();
4337 inline void set_binary_op_type(
byte value);
4338 inline byte binary_op_result_type();
4339 inline void set_binary_op_result_type(
byte value);
4342 inline byte compare_state();
4343 inline void set_compare_state(
byte value);
4347 inline byte compare_operation();
4348 inline void set_compare_operation(
byte value);
4351 inline byte to_boolean_state();
4352 inline void set_to_boolean_state(
byte value);
4356 inline bool has_function_cache();
4357 inline void set_has_function_cache(
bool flag);
4359 bool allowed_in_shared_map_code_cache();
4362 SafepointEntry GetSafepointEntry(
Address pc);
4366 void SetNoStackCheckTable();
4369 Map* FindFirstMap();
4373 public BitField<KeyedAccessGrowMode, 1, 1> {};
4375 static const int kExtraICStateGrowModeShift = 1;
4378 return ExtraICStateStrictMode::decode(extra_ic_state);
4383 return ExtraICStateKeyedAccessGrowMode::decode(extra_ic_state);
4389 return ExtraICStateKeyedAccessGrowMode::encode(grow_mode) |
4390 ExtraICStateStrictMode::encode(strict_mode);
4394 static inline Flags ComputeFlags(
4397 ExtraICState extra_ic_state = kNoExtraICState,
4402 static inline Flags ComputeMonomorphicFlags(
4405 ExtraICState extra_ic_state = kNoExtraICState,
4411 static inline Kind ExtractKindFromFlags(Flags
flags);
4413 static inline ExtraICState ExtractExtraICStateFromFlags(Flags
flags);
4414 static inline int ExtractArgumentsCountFromFlags(Flags
flags);
4416 static inline Flags RemoveTypeFromFlags(Flags
flags);
4422 static inline Object* GetObjectFromEntryAddress(
Address location_of_address);
4425 inline byte* instruction_start();
4428 inline byte* instruction_end();
4431 inline int body_size();
4434 inline byte* relocation_start();
4437 inline byte* entry();
4440 inline bool contains(
byte*
pc);
4444 void Relocate(intptr_t delta);
4447 void CopyFrom(
const CodeDesc& desc);
4466 int SourceStatementPosition(
Address pc);
4473 inline void CodeIterateBody(ObjectVisitor* v);
4475 template<
typename StaticVisitor>
4476 inline void CodeIterateBody(
Heap* heap);
4478 inline void CodePrint() {
4481 void CodePrint(FILE* out);
4486 void ClearInlineCaches();
4487 void ClearTypeFeedbackCells(Heap* heap);
4491 static const int kMaxLoopNestingMarker = 6;
4495 static const int kRelocationInfoOffset = kInstructionSizeOffset +
kIntSize;
4496 static const int kHandlerTableOffset = kRelocationInfoOffset +
kPointerSize;
4497 static const int kDeoptimizationDataOffset =
4499 static const int kTypeFeedbackInfoOffset =
4501 static const int kGCMetadataOffset = kTypeFeedbackInfoOffset +
kPointerSize;
4502 static const int kICAgeOffset =
4504 static const int kFlagsOffset = kICAgeOffset +
kIntSize;
4505 static const int kKindSpecificFlagsOffset = kFlagsOffset +
kIntSize;
4506 static const int kKindSpecificFlagsSize = 2 *
kIntSize;
4508 static const int kHeaderPaddingStart = kKindSpecificFlagsOffset +
4509 kKindSpecificFlagsSize;
4517 static const int kStubMajorKeyOffset = kKindSpecificFlagsOffset;
4518 static const int kOptimizableOffset = kKindSpecificFlagsOffset;
4519 static const int kStackSlotsOffset = kKindSpecificFlagsOffset;
4520 static const int kCheckTypeOffset = kKindSpecificFlagsOffset;
4522 static const int kUnaryOpTypeOffset = kStubMajorKeyOffset + 1;
4523 static const int kBinaryOpTypeOffset = kStubMajorKeyOffset + 1;
4524 static const int kCompareStateOffset = kStubMajorKeyOffset + 1;
4525 static const int kToBooleanTypeOffset = kStubMajorKeyOffset + 1;
4526 static const int kHasFunctionCacheOffset = kStubMajorKeyOffset + 1;
4528 static const int kFullCodeFlags = kOptimizableOffset + 1;
4534 static const int kBinaryOpReturnTypeOffset = kBinaryOpTypeOffset + 1;
4536 static const int kCompareOperationOffset = kCompareStateOffset + 1;
4538 static const int kAllowOSRAtLoopNestingLevelOffset = kFullCodeFlags + 1;
4539 static const int kProfilerTicksOffset = kAllowOSRAtLoopNestingLevelOffset + 1;
4541 static const int kSafepointTableOffsetOffset = kStackSlotsOffset +
kIntSize;
4542 static const int kStackCheckTableOffsetOffset = kStackSlotsOffset +
kIntSize;
4553 static const int kArgumentsCountShift = 15;
4554 static const int kArgumentsCountMask = ~((1 << kArgumentsCountShift) - 1);
4557 static const int kFlagsNotUsedInLookup =
4558 TypeField::kMask | CacheHolderField::kMask;
4574 inline int instance_size();
4575 inline void set_instance_size(
int value);
4578 inline int inobject_properties();
4579 inline void set_inobject_properties(
int value);
4582 inline int pre_allocated_property_fields();
4583 inline void set_pre_allocated_property_fields(
int value);
4591 inline int unused_property_fields();
4592 inline void set_unused_property_fields(
int value);
4595 inline byte bit_field();
4596 inline void set_bit_field(
byte value);
4599 inline byte bit_field2();
4600 inline void set_bit_field2(
byte value);
4606 inline int bit_field3();
4607 inline void set_bit_field3(
int value);
4614 inline void set_non_instance_prototype(
bool value);
4615 inline bool has_non_instance_prototype();
4620 inline void set_function_with_prototype(
bool value);
4621 inline bool function_with_prototype();
4626 set_bit_field(bit_field() | (1 << kIsHiddenPrototype));
4630 return ((1 << kIsHiddenPrototype) & bit_field()) != 0;
4635 set_bit_field(bit_field() | (1 << kHasNamedInterceptor));
4639 return ((1 << kHasNamedInterceptor) & bit_field()) != 0;
4644 set_bit_field(bit_field() | (1 << kHasIndexedInterceptor));
4648 return ((1 << kHasIndexedInterceptor) & bit_field()) != 0;
4658 set_bit_field(bit_field() | (1 << kIsUndetectable));
4662 return ((1 << kIsUndetectable) & bit_field()) != 0;
4667 set_bit_field(bit_field() | (1 << kHasInstanceCallHandler));
4671 return ((1 << kHasInstanceCallHandler) & bit_field()) != 0;
4674 inline void set_is_extensible(
bool value);
4675 inline bool is_extensible();
4680 set_bit_field2((bit_field2() & ~kElementsKindMask) |
4681 (elements_kind << kElementsKindShift));
4682 ASSERT(this->elements_kind() == elements_kind);
4687 (bit_field2() & kElementsKindMask) >> kElementsKindShift);
4725 static bool IsValidElementsTransition(
ElementsKind from_kind,
4728 inline Map* elements_transition_map();
4729 inline void set_elements_transition_map(
Map* transitioned_map);
4733 inline void set_attached_to_shared_function_info(
bool value);
4735 inline bool attached_to_shared_function_info();
4740 inline void set_is_shared(
bool value);
4741 inline bool is_shared();
4748 inline void set_used_for_prototype(
bool value);
4749 inline bool used_for_prototype();
4753 inline void set_is_access_check_needed(
bool access_check_needed);
4754 inline bool is_access_check_needed();
4766 inline
void init_instance_descriptors();
4773 inline
void clear_instance_descriptors();
4782 inline
Object* GetBackPointer();
4783 inline
void SetBackPointer(
Object* value,
4796 inline
void init_prototype_transitions(
Object* undefined);
4797 inline
HeapObject* unchecked_prototype_transitions();
4799 static const
int kProtoTransitionHeaderSize = 2;
4800 static const
int kProtoTransitionNumberOfEntriesOffset = 0;
4801 static const
int kProtoTransitionBackPointerOffset = 1;
4802 static const
int kProtoTransitionElementsPerEntry = 2;
4803 static const
int kProtoTransitionPrototypeOffset = 0;
4804 static const
int kProtoTransitionMapOffset = 1;
4806 inline
int NumberOfProtoTransitions() {
4808 if (cache->
length() == 0)
return 0;
4810 Smi::cast(cache->
get(kProtoTransitionNumberOfEntriesOffset))->value();
4823 void LookupInDescriptors(
JSObject* holder,
4825 LookupResult* result);
4841 int NextFreePropertyIndex();
4856 inline void ClearCodeCache(
Heap* heap);
4877 void ClearNonLiveTransitions(
Heap* heap);
4902 Map* FindTransitionedMap(
MapList* candidates);
4909 void ZapInstanceDescriptors();
4910 void ZapPrototypeTransitions();
4915 inline void MapPrint() {
4918 void MapPrint(FILE* out);
4922 void SharedMapVerify();
4925 inline int visitor_id();
4926 inline void set_visitor_id(
int visitor_id);
4928 typedef void (*TraverseCallback)(
Map*
map,
void* data);
4930 void TraverseTransitionTree(TraverseCallback callback,
void* data);
4941 static const int kMaxCachedPrototypeTransitions = 256;
4943 Map* GetPrototypeTransition(
Object* prototype);
4948 static const int kMaxPreAllocatedPropertyFields = 255;
4952 static const int kInstanceAttributesOffset = kInstanceSizesOffset +
kIntSize;
4953 static const int kPrototypeOffset = kInstanceAttributesOffset +
kIntSize;
4964 static const int kInstanceDescriptorsOrBitField3Offset =
4966 static const int kCodeCacheOffset =
4968 static const int kPrototypeTransitionsOrBackPointerOffset =
4970 static const int kPadStart =
4971 kPrototypeTransitionsOrBackPointerOffset +
kPointerSize;
4977 static const int kPointerFieldsEndOffset =
4978 kPrototypeTransitionsOrBackPointerOffset +
kPointerSize;
4981 static const int kInstanceSizeOffset = kInstanceSizesOffset + 0;
4982 static const int kInObjectPropertiesByte = 1;
4983 static const int kInObjectPropertiesOffset =
4984 kInstanceSizesOffset + kInObjectPropertiesByte;
4985 static const int kPreAllocatedPropertyFieldsByte = 2;
4986 static const int kPreAllocatedPropertyFieldsOffset =
4987 kInstanceSizesOffset + kPreAllocatedPropertyFieldsByte;
4988 static const int kVisitorIdByte = 3;
4989 static const int kVisitorIdOffset = kInstanceSizesOffset + kVisitorIdByte;
4992 static const int kInstanceTypeOffset = kInstanceAttributesOffset + 0;
4993 static const int kUnusedPropertyFieldsOffset = kInstanceAttributesOffset + 1;
4994 static const int kBitFieldOffset = kInstanceAttributesOffset + 2;
4995 static const int kBitField2Offset = kInstanceAttributesOffset + 3;
5000 static const int kUnused = 0;
5001 static const int kHasNonInstancePrototype = 1;
5002 static const int kIsHiddenPrototype = 2;
5003 static const int kHasNamedInterceptor = 3;
5004 static const int kHasIndexedInterceptor = 4;
5005 static const int kIsUndetectable = 5;
5006 static const int kHasInstanceCallHandler = 6;
5007 static const int kIsAccessCheckNeeded = 7;
5010 static const int kIsExtensible = 0;
5011 static const int kStringWrapperSafeForDefaultValueOf = 1;
5012 static const int kAttachedToSharedFunctionInfo = 2;
5015 static const int kElementsKindShift = 3;
5016 static const int kElementsKindBitCount = 5;
5019 static const int kElementsKindMask = (-1 << kElementsKindShift) &
5020 ((1 << (kElementsKindShift + kElementsKindBitCount)) - 1);
5021 static const int8_t kMaximumBitField2FastElementValue =
static_cast<int8_t
>(
5023 static const int8_t kMaximumBitField2FastSmiElementValue =
5026 static const int8_t kMaximumBitField2FastHoleyElementValue =
5029 static const int8_t kMaximumBitField2FastHoleySmiElementValue =
5034 static const int kIsShared = 0;
5035 static const int kFunctionWithPrototype = 1;
5036 static const int kUsedForPrototype = 2;
5039 kPointerFieldsEndOffset,
5052 inline void InitializeBody(
int object_size);
5069 COMPILATION_TYPE_HOST = 0,
5070 COMPILATION_TYPE_EVAL = 1
5075 COMPILATION_STATE_INITIAL = 0,
5076 COMPILATION_STATE_COMPILED = 1
5128 inline
bool HasValidSource();
5131 inline void ScriptPrint() {
5132 ScriptPrint(stdout);
5134 void ScriptPrint(FILE* out);
5137 void ScriptVerify();
5149 static const int kCompilationStateOffset =
5154 static const int kEvalFrominstructionsOffsetOffset =
5175 #define FUNCTIONS_WITH_ID_LIST(V) \
5176 V(Array.prototype, push, ArrayPush) \
5177 V(Array.prototype, pop, ArrayPop) \
5178 V(Function.prototype, apply, FunctionApply) \
5179 V(String.prototype, charCodeAt, StringCharCodeAt) \
5180 V(String.prototype, charAt, StringCharAt) \
5181 V(String, fromCharCode, StringFromCharCode) \
5182 V(Math, floor, MathFloor) \
5183 V(Math, round, MathRound) \
5184 V(Math, ceil, MathCeil) \
5185 V(Math, abs, MathAbs) \
5186 V(Math, log, MathLog) \
5187 V(Math, sin, MathSin) \
5188 V(Math, cos, MathCos) \
5189 V(Math, tan, MathTan) \
5190 V(Math, asin, MathASin) \
5191 V(Math, acos, MathACos) \
5192 V(Math, atan, MathATan) \
5193 V(Math, exp, MathExp) \
5194 V(Math, sqrt, MathSqrt) \
5195 V(Math, pow, MathPow) \
5196 V(Math, random, MathRandom) \
5197 V(Math, max, MathMax) \
5198 V(Math, min, MathMin)
5202 #define DECLARE_FUNCTION_ID(ignored1, ignore2, name) \
5205 #undef DECLARE_FUNCTION_ID
5229 inline Code* unchecked_code();
5232 inline bool is_compiled();
5241 inline void set_formal_parameter_count(
int value);
5245 inline void DontAdaptArguments();
5248 inline int expected_nof_properties();
5249 inline void set_expected_nof_properties(
int value);
5302 static const int kGenerousAllocationCount = 8;
5306 inline int construction_count();
5307 inline void set_construction_count(
int value);
5317 inline
bool IsInobjectSlackTrackingInProgress();
5324 void StartInobjectSlackTracking(
Map*
map);
5328 void CompleteInobjectSlackTracking();
5332 void DetachInitialMap();
5336 void AttachInitialMap(
Map* map);
5354 inline
bool IsApiFunction();
5356 inline
bool HasBuiltinFunctionId();
5363 inline
int num_literals();
5364 inline
void set_num_literals(
int value);
5372 inline
void set_start_position_and_type(
int value);
5388 inline
int function_token_position();
5389 inline
void set_function_token_position(
int function_token_position);
5392 inline
int start_position();
5393 inline
void set_start_position(
int start_position);
5396 inline
int end_position();
5397 inline
void set_end_position(
int end_position);
5408 inline
void set_compiler_hints(
int value);
5410 inline
int ast_node_count();
5411 inline
void set_ast_node_count(
int count);
5416 inline
void set_stress_deopt_counter(
int counter);
5418 inline
int profiler_ticks();
5422 inline
int ic_age();
5423 inline
void set_ic_age(
int age);
5426 void SetThisPropertyAssignmentsInfo(
5431 void ClearThisPropertyAssignmentsInfo();
5435 inline
bool has_only_simple_this_property_assignments();
5447 inline
int code_age();
5448 inline
void set_code_age(
int age);
5463 inline
void set_language_mode(
LanguageMode language_mode);
5466 inline
bool is_classic_mode();
5469 inline
bool is_extended_mode();
5508 inline
bool has_deoptimization_support();
5511 void EnableDeoptimizationSupport(
Code* recompiled);
5515 void DisableOptimization();
5520 bool VerifyBailoutId(
int id);
5524 bool CanGenerateInlineConstructor(
Object* prototype);
5528 void ForbidInlineConstructor();
5533 inline
int this_property_assignments_count();
5534 inline
void set_this_property_assignments_count(
int value);
5535 String* GetThisPropertyAssignmentName(
int index);
5536 bool IsThisPropertyAssignmentArgument(
int index);
5537 int GetThisPropertyAssignmentArgument(
int index);
5538 Object* GetThisPropertyAssignmentConstant(
int index);
5541 bool HasSourceCode();
5545 inline
int opt_count();
5546 inline
void set_opt_count(
int opt_count);
5549 inline
void set_deopt_count(
int value);
5550 inline
int deopt_count();
5551 inline
void increment_deopt_count();
5555 inline
void set_opt_reenable_tries(
int value);
5556 inline
int opt_reenable_tries();
5558 inline
void TryReenableOptimization();
5561 inline
void set_counters(
int value);
5562 inline
int counters();
5568 int CalculateInstanceSize();
5571 int CalculateInObjectProperties();
5575 void SourceCodePrint(
StringStream* accumulator,
int max_length);
5577 inline void SharedFunctionInfoPrint() {
5578 SharedFunctionInfoPrint(stdout);
5580 void SharedFunctionInfoPrint(FILE* out);
5583 void SharedFunctionInfoVerify();
5586 void ResetForNewContext(
int new_ic_age);
5595 void SharedFunctionInfoIterateBody(ObjectVisitor* v);
5601 static const int kDontAdaptArgumentsSentinel = -1;
5609 static const int kInstanceClassNameOffset =
5611 static const int kFunctionDataOffset =
5616 static const int kInitialMapOffset =
5618 static const int kThisPropertyAssignmentsOffset =
5622 static const int kAstNodeCountOffset =
5624 #if V8_HOST_ARCH_32_BIT
5629 static const int kExpectedNofPropertiesOffset =
5631 static const int kNumLiteralsOffset =
5633 static const int kStartPositionAndTypeOffset =
5635 static const int kEndPositionOffset =
5637 static const int kFunctionTokenPositionOffset =
5639 static const int kCompilerHintsOffset =
5641 static const int kThisPropertyAssignmentsCountOffset =
5643 static const int kOptCountOffset =
5645 static const int kCountersOffset = kOptCountOffset +
kPointerSize;
5646 static const int kStressDeoptCounterOffset = kCountersOffset +
kPointerSize;
5649 static const int kSize = kStressDeoptCounterOffset +
kPointerSize;
5662 static const int kFormalParameterCountOffset =
5665 static const int kExpectedNofPropertiesOffset =
5666 kFormalParameterCountOffset +
kIntSize;
5667 static const int kNumLiteralsOffset =
5668 kExpectedNofPropertiesOffset +
kIntSize;
5670 static const int kEndPositionOffset =
5672 static const int kStartPositionAndTypeOffset =
5675 static const int kFunctionTokenPositionOffset =
5676 kStartPositionAndTypeOffset +
kIntSize;
5677 static const int kCompilerHintsOffset =
5678 kFunctionTokenPositionOffset +
kIntSize;
5680 static const int kThisPropertyAssignmentsCountOffset =
5682 static const int kOptCountOffset =
5683 kThisPropertyAssignmentsCountOffset +
kIntSize;
5685 static const int kCountersOffset = kOptCountOffset +
kIntSize;
5686 static const int kStressDeoptCounterOffset = kCountersOffset +
kIntSize;
5689 static const int kSize = kStressDeoptCounterOffset +
kIntSize;
5696 #if __BYTE_ORDER == __LITTLE_ENDIAN
5697 static const int kConstructionCountOffset = kCompilerHintsOffset + 3;
5698 #elif __BYTE_ORDER == __BIG_ENDIAN
5699 static const int kConstructionCountOffset = kCompilerHintsOffset + 0;
5701 #error Unknown byte ordering
5713 static const int kIsExpressionBit = 0;
5714 static const int kIsTopLevelBit = 1;
5715 static const int kStartPositionShift = 2;
5716 static const int kStartPositionMask = ~((1 << kStartPositionShift) - 1);
5719 static const int kCodeAgeSize = 3;
5720 static const int kCodeAgeMask = (1 << kCodeAgeSize) - 1;
5727 kOptimizationDisabled = kCodeAgeShift + kCodeAgeSize,
5747 #if V8_HOST_ARCH_32_BIT
5749 static const int kCompilerHintsSmiTagSize =
kSmiTagSize;
5753 static const int kCompilerHintsSmiTagSize = 0;
5754 static const int kCompilerHintsSize =
kIntSize;
5758 SharedFunctionInfo::kCompilerHintsSize *
kBitsPerByte);
5764 static const int kStrictModeBitWithinByte =
5765 (kStrictModeFunction + kCompilerHintsSmiTagSize) %
kBitsPerByte;
5767 static const int kExtendedModeBitWithinByte =
5768 (kExtendedModeFunction + kCompilerHintsSmiTagSize) %
kBitsPerByte;
5770 static const int kNativeBitWithinByte =
5773 #if __BYTE_ORDER == __LITTLE_ENDIAN
5774 static const int kStrictModeByteOffset = kCompilerHintsOffset +
5775 (kStrictModeFunction + kCompilerHintsSmiTagSize) /
kBitsPerByte;
5776 static const int kExtendedModeByteOffset = kCompilerHintsOffset +
5777 (kExtendedModeFunction + kCompilerHintsSmiTagSize) /
kBitsPerByte;
5778 static const int kNativeByteOffset = kCompilerHintsOffset +
5780 #elif __BYTE_ORDER == __BIG_ENDIAN
5781 static const int kStrictModeByteOffset = kCompilerHintsOffset +
5782 (kCompilerHintsSize - 1) -
5783 ((kStrictModeFunction + kCompilerHintsSmiTagSize) /
kBitsPerByte);
5784 static const int kExtendedModeByteOffset = kCompilerHintsOffset +
5785 (kCompilerHintsSize - 1) -
5786 ((kExtendedModeFunction + kCompilerHintsSmiTagSize) /
kBitsPerByte);
5787 static const int kNativeByteOffset = kCompilerHintsOffset +
5788 (kCompilerHintsSize - 1) -
5791 #error Unknown byte ordering
5810 inline void JSModulePrint() {
5811 JSModulePrint(stdout);
5813 void JSModulePrint(FILE* out);
5816 void JSModuleVerify();
5842 inline Object* unchecked_context();
5843 inline void set_context(
Object* context);
5849 inline Code* code();
5850 inline void set_code(
Code* code);
5851 inline void ReplaceCode(
Code* code);
5853 inline Code* unchecked_code();
5856 inline bool IsBuiltin();
5859 inline bool NeedsArgumentsAdaption();
5862 inline bool IsOptimized();
5865 inline bool IsOptimizable();
5869 void MarkForLazyRecompilation();
5881 inline bool IsMarkedForLazyRecompilation();
5884 bool IsInlineable();
5903 inline void set_literals(
FixedArray* literals);
5906 inline void set_function_bindings(
FixedArray* bindings);
5909 inline Map* initial_map();
5910 inline void set_initial_map(
Map* value);
5911 MUST_USE_RESULT inline MaybeObject* set_initial_map_and_cache_transitions(
5913 inline bool has_initial_map();
5919 inline bool has_prototype();
5920 inline bool has_instance_prototype();
5921 inline Object* prototype();
5922 inline Object* instance_prototype();
5928 Object* RemovePrototype();
5929 inline bool should_have_prototype();
5943 inline bool is_compiled();
5950 inline
void PrintName() {
5953 void PrintName(FILE* out);
5960 void JSFunctionIterateBody(
int object_size, ObjectVisitor* v);
5964 inline void JSFunctionPrint() {
5965 JSFunctionPrint(stdout);
5967 void JSFunctionPrint(FILE* out);
5970 void JSFunctionVerify();
5974 inline int NumberOfLiterals();
5977 static Context* GlobalContextFromLiterals(FixedArray* literals);
5982 static const int kPrototypeOrInitialMapOffset =
5984 static const int kSharedFunctionInfoOffset =
5986 static const int kContextOffset = kSharedFunctionInfoOffset +
kPointerSize;
5989 static const int kNextFunctionLinkOffset = kNonWeakFieldsEndOffset;
5993 static const int kLiteralsPrefixSize = 1;
5994 static const int kLiteralGlobalContextIndex = 0;
5997 static const int kBoundFunctionIndex = 0;
5998 static const int kBoundThisIndex = 1;
5999 static const int kBoundArgumentsStartIndex = 2;
6025 inline void JSGlobalProxyPrint() {
6026 JSGlobalProxyPrint(stdout);
6028 void JSGlobalProxyPrint(FILE* out);
6031 void JSGlobalProxyVerify();
6085 static const int kGlobalReceiverOffset = kGlobalContextOffset +
kPointerSize;
6101 inline void JSGlobalObjectPrint() {
6102 JSGlobalObjectPrint(stdout);
6104 void JSGlobalObjectPrint(FILE* out);
6107 void JSGlobalObjectVerify();
6135 inline void JSBuiltinsObjectPrint() {
6136 JSBuiltinsObjectPrint(stdout);
6138 void JSBuiltinsObjectPrint(FILE* out);
6141 void JSBuiltinsObjectVerify();
6149 static const int kJSBuiltinsCodeOffset =
6151 static const int kSize =
6152 kJSBuiltinsCodeOffset + (kJSBuiltinsCount *
kPointerSize);
6178 inline void JSValuePrint() {
6179 JSValuePrint(stdout);
6181 void JSValuePrint(FILE* out);
6184 void JSValueVerify();
6229 void SetValue(
Object* value,
bool is_value_nan);
6234 inline void JSDatePrint() {
6235 JSDatePrint(stdout);
6237 void JSDatePrint(FILE* out);
6240 void JSDateVerify();
6254 kMillisecond = kFirstUncachedField,
6258 kYearUTC = kFirstUTCField,
6289 inline void SetLocalFields(int64_t local_time_ms,
DateCache* date_cache);
6320 inline int start_position();
6321 inline void set_start_position(
int value);
6324 inline int end_position();
6325 inline void set_end_position(
int value);
6332 inline void JSMessageObjectPrint() {
6333 JSMessageObjectPrint(stdout);
6335 void JSMessageObjectPrint(FILE* out);
6338 void JSMessageObjectVerify();
6380 enum Type { NOT_COMPILED, ATOM, IRREGEXP };
6381 enum Flag {
NONE = 0, GLOBAL = 1, IGNORE_CASE = 2, MULTILINE = 4 };
6385 explicit Flags(uint32_t value) : value_(value) { }
6396 inline Type TypeTag();
6397 inline
int CaptureCount();
6398 inline Flags GetFlags();
6399 inline
String* Pattern();
6400 inline
Object* DataAt(
int index);
6402 inline
void SetDataAt(
int index,
Object* value);
6405 inline
Object* DataAtUnchecked(
int index);
6406 inline
void SetDataAtUnchecked(
int index,
Object* value,
Heap* heap);
6407 inline Type TypeTagUnchecked();
6409 static
int code_index(
bool is_ascii) {
6411 return kIrregexpASCIICodeIndex;
6413 return kIrregexpUC16CodeIndex;
6419 return kIrregexpASCIICodeSavedIndex;
6421 return kIrregexpUC16CodeSavedIndex;
6429 void JSRegExpVerify();
6436 static const int kTagIndex = 0;
6437 static const int kSourceIndex = kTagIndex + 1;
6438 static const int kFlagsIndex = kSourceIndex + 1;
6439 static const int kDataIndex = kFlagsIndex + 1;
6443 static const int kAtomPatternIndex = kDataIndex;
6445 static const int kAtomDataSize = kAtomPatternIndex + 1;
6450 static const int kIrregexpASCIICodeIndex = kDataIndex;
6454 static const int kIrregexpUC16CodeIndex = kDataIndex + 1;
6458 static const int kIrregexpASCIICodeSavedIndex = kDataIndex + 2;
6461 static const int kIrregexpUC16CodeSavedIndex = kDataIndex + 3;
6465 static const int kIrregexpMaxRegisterCountIndex = kDataIndex + 4;
6467 static const int kIrregexpCaptureCountIndex = kDataIndex + 5;
6469 static const int kIrregexpDataSize = kIrregexpCaptureCountIndex + 1;
6472 static const int kDataTagOffset =
6474 static const int kDataAsciiCodeOffset =
6476 static const int kDataUC16CodeOffset =
6478 static const int kIrregexpCaptureCountOffset =
6482 static const int kSourceFieldIndex = 0;
6483 static const int kGlobalFieldIndex = 1;
6484 static const int kIgnoreCaseFieldIndex = 2;
6485 static const int kMultilineFieldIndex = 3;
6486 static const int kLastIndexFieldIndex = 4;
6487 static const int kInObjectFieldCount = 5;
6490 static const int kUninitializedValue = -1;
6494 static const int kCompilationErrorValue = -2;
6499 static const int kCodeAgeMask = 0xff;
6521 static const int kPrefixSize = 0;
6522 static const int kEntrySize = 2;
6534 int scope_position);
6540 int scope_position);
6546 void Remove(
Object* value);
6574 void RemoveByIndex(
Object* name,
Code* code,
int index);
6579 inline void CodeCachePrint() {
6580 CodeCachePrint(stdout);
6582 void CodeCachePrint(FILE* out);
6585 void CodeCacheVerify();
6589 static const int kNormalTypeCacheOffset =
6601 static const int kCodeCacheEntrySize = 2;
6602 static const int kCodeCacheEntryNameOffset = 0;
6603 static const int kCodeCacheEntryCodeOffset = 1;
6627 static const int kPrefixSize = 0;
6628 static const int kEntrySize = 2;
6639 void RemoveByIndex(
int index);
6644 static const int kInitialSize = 64;
6670 inline void PolymorphicCodeCachePrint() {
6671 PolymorphicCodeCachePrint(stdout);
6673 void PolymorphicCodeCachePrint(FILE* out);
6676 void PolymorphicCodeCacheVerify();
6688 :
public HashTable<CodeCacheHashTableShape, HashTableKey*> {
6698 static const int kInitialSize = 64;
6706 inline int ic_total_count();
6707 inline void set_ic_total_count(
int count);
6709 inline int ic_with_type_info_count();
6710 inline void set_ic_with_type_info_count(
int count);
6717 inline void TypeFeedbackInfoPrint() {
6718 TypeFeedbackInfoPrint(stdout);
6720 void TypeFeedbackInfoPrint(FILE* out);
6723 void TypeFeedbackInfoVerify();
6727 static const int kIcWithTypeinfoCountOffset =
6729 static const int kTypeFeedbackCellsOffset =
6748 inline int aliased_context_slot();
6749 inline void set_aliased_context_slot(
int count);
6754 inline void AliasedArgumentsEntryPrint() {
6755 AliasedArgumentsEntryPrint(stdout);
6757 void AliasedArgumentsEntryPrint(FILE* out);
6760 void AliasedArgumentsEntryVerify();
6781 inline bool has_trivial_hash();
6784 inline void AddCharacter(uint32_t c);
6789 inline void AddCharacterNoIndex(uint32_t c);
6793 void AddSurrogatePair(
uc32 c);
6794 void AddSurrogatePairNoIndex(
uc32 c);
6798 uint32_t GetHashField();
6811 static uint32_t MakeArrayIndexHash(uint32_t value,
int length);
6816 static const int kZeroHash = 27;
6819 uint32_t array_index() {
6820 ASSERT(is_array_index());
6821 return array_index_;
6827 uint32_t raw_running_hash_;
6828 uint32_t array_index_;
6829 bool is_array_index_;
6830 bool is_first_char_;
6837 template <
typename s
char>
6856 inline explicit StringShape(
String* s);
6857 inline explicit StringShape(
Map* s);
6859 inline bool IsSequential();
6860 inline bool IsExternal();
6861 inline bool IsCons();
6862 inline bool IsSliced();
6863 inline bool IsIndirect();
6864 inline bool IsExternalAscii();
6865 inline bool IsExternalTwoByte();
6866 inline bool IsSequentialAscii();
6867 inline bool IsSequentialTwoByte();
6868 inline bool IsSymbol();
6870 inline uint32_t encoding_tag();
6871 inline uint32_t full_representation_tag();
6872 inline uint32_t size_tag();
6874 inline uint32_t
type() {
return type_; }
6875 inline void invalidate() { valid_ =
false; }
6876 inline bool valid() {
return valid_; }
6884 inline void set_valid() { valid_ =
true; }
6887 inline void set_valid() { }
6930 enum State { NON_FLAT, ASCII, TWO_BYTE };
6936 explicit FlatContent(Vector<const uc16> chars)
6938 state_(TWO_BYTE) { }
6939 FlatContent() :
buffer_(), state_(NON_FLAT) { }
6952 inline uint32_t hash_field();
6953 inline void set_hash_field(uint32_t value);
6959 inline bool IsAsciiRepresentation();
6960 inline bool IsTwoByteRepresentation();
6965 inline bool IsAsciiRepresentationUnderneath();
6966 inline bool IsTwoByteRepresentationUnderneath();
6970 inline bool HasOnlyAsciiChars();
6973 inline void Set(
int index,
uint16_t value);
7009 inline String* GetUnderlying();
7013 bool MarkAsUndetectable();
7021 inline bool Equals(
String* other);
7038 int* length_output = 0);
7042 int* length_output = 0);
7054 inline bool HasHashCode();
7057 inline uint32_t Hash();
7072 inline bool AsArrayIndex(uint32_t* index);
7077 void PrintOn(FILE* out);
7085 inline void StringPrint() {
7086 StringPrint(stdout);
7088 void StringPrint(FILE* out);
7090 char* ToAsciiArray();
7093 void StringVerify();
7095 inline bool IsFlat();
7104 static const int kMaxArrayIndexSize = 10;
7109 static const int kMaxUtf16CodeUnit = 0xffff;
7116 static const int kHashNotComputedMask = 1;
7117 static const int kIsNotArrayIndexMask = 1 << 1;
7118 static const int kNofHashBitFields = 2;
7121 static const int kHashShift = kNofHashBitFields;
7125 static const uint32_t kHashBitMask = 0xffffffffu >> kHashShift;
7129 static const int kMaxCachedArrayIndexLength = 7;
7134 static const int kArrayIndexValueBits = 24;
7135 static const int kArrayIndexLengthBits =
7136 kBitsPerInt - kArrayIndexValueBits - kNofHashBitFields;
7139 STATIC_CHECK(kMaxArrayIndexSize < (1 << kArrayIndexLengthBits));
7141 static const int kArrayIndexHashLengthShift =
7142 kArrayIndexValueBits + kNofHashBitFields;
7144 static const int kArrayIndexHashMask = (1 << kArrayIndexHashLengthShift) - 1;
7146 static const int kArrayIndexValueMask =
7147 ((1 << kArrayIndexValueBits) - 1) << kHashShift;
7154 static const int kContainsCachedArrayIndexMask =
7155 (~kMaxCachedArrayIndexLength << kArrayIndexHashLengthShift) |
7156 kIsNotArrayIndexMask;
7159 static const int kEmptyHashField =
7160 kIsNotArrayIndexMask | kHashNotComputedMask;
7163 static const int kZeroHash = kIsNotArrayIndexMask;
7170 static const int kMaxHashCalcLength = 16383;
7173 static const int kMaxShortPrintLength = 1024;
7176 const uc16* GetTwoByteData();
7177 const uc16* GetTwoByteData(
unsigned start);
7183 unsigned* remaining,
7188 unsigned* remaining,
7192 template <
typename sink
char>
7193 static void WriteToFlat(
String* source,
7198 static inline bool IsAscii(
const char* chars,
int length) {
7199 const char* limit = chars +
length;
7200 #ifdef V8_HOST_CAN_READ_UNALIGNED
7203 while (chars <= limit -
sizeof(uintptr_t)) {
7204 if (*reinterpret_cast<const uintptr_t*>(chars) & non_ascii_mask) {
7207 chars +=
sizeof(uintptr_t);
7210 while (chars < limit) {
7219 while (chars < limit) {
7232 unsigned remaining_) :
7233 util_buffer(util_buffer_),
7235 capacity(capacity_),
7236 remaining(remaining_) {
7247 unsigned max_chars);
7248 static void ReadBlockIntoBuffer(
String* input,
7250 unsigned* offset_ptr,
7251 unsigned max_chars);
7259 static inline bool IsHashFieldComputed(uint32_t field);
7263 bool SlowEquals(
String* other);
7266 bool SlowAsArrayIndex(uint32_t* index);
7269 uint32_t ComputeAndSetHash();
7293 static const bool kHasAsciiEncoding =
true;
7296 inline uint16_t SeqAsciiStringGet(
int index);
7297 inline void SeqAsciiStringSet(
int index,
uint16_t value);
7300 inline Address GetCharsAddress();
7302 inline char* GetChars();
7310 inline int SeqAsciiStringSize(
InstanceType instance_type);
7318 static const int kMaxSize = 512 *
MB - 1;
7324 inline void SeqAsciiStringReadBlockIntoBuffer(
ReadBlockBuffer* buffer,
7327 inline const unibrow::byte* SeqAsciiStringReadBlock(
unsigned* remaining,
7332 void SeqAsciiStringVerify();
7344 static const bool kHasAsciiEncoding =
false;
7347 inline uint16_t SeqTwoByteStringGet(
int index);
7348 inline void SeqTwoByteStringSet(
int index,
uint16_t value);
7351 inline Address GetCharsAddress();
7353 inline uc16* GetChars();
7356 const uint16_t* SeqTwoByteStringGetData(
unsigned start);
7364 inline int SeqTwoByteStringSize(
InstanceType instance_type);
7372 static const int kMaxSize = 512 *
MB - 1;
7378 inline void SeqTwoByteStringReadBlockIntoBuffer(
ReadBlockBuffer* buffer,
7379 unsigned* offset_ptr,
7401 inline Object* unchecked_first();
7402 inline void set_first(
String* first,
7409 inline Object* unchecked_second();
7410 inline void set_second(
String* second,
7426 unsigned* offset_ptr,
7429 unsigned* offset_ptr,
7433 static const int kMinLength = 13;
7439 void ConsStringVerify();
7462 inline void set_parent(
String* parent);
7463 inline int offset();
7464 inline void set_offset(
int offset);
7467 uint16_t SlicedStringGet(
int index);
7479 unsigned* offset_ptr,
7482 unsigned* offset_ptr,
7485 static const int kMinLength = 13;
7492 void SlicedStringVerify();
7521 inline bool is_short();
7534 static const bool kHasAsciiEncoding =
true;
7540 inline void set_resource(
const Resource* buffer);
7546 inline void update_data_cache();
7548 inline const char* GetChars();
7551 inline uint16_t ExternalAsciiStringGet(
int index);
7557 inline void ExternalAsciiStringIterateBody(ObjectVisitor* v);
7559 template<
typename StaticVisitor>
7560 inline void ExternalAsciiStringIterateBody();
7563 const unibrow::byte* ExternalAsciiStringReadBlock(
unsigned* remaining,
7566 inline void ExternalAsciiStringReadBlockIntoBuffer(
ReadBlockBuffer* buffer,
7579 static const bool kHasAsciiEncoding =
false;
7585 inline void set_resource(
const Resource* buffer);
7591 inline void update_data_cache();
7596 inline uint16_t ExternalTwoByteStringGet(
int index);
7599 inline const uint16_t* ExternalTwoByteStringGetData(
unsigned start);
7605 inline void ExternalTwoByteStringIterateBody(ObjectVisitor* v);
7607 template<
typename StaticVisitor>
7608 inline void ExternalTwoByteStringIterateBody();
7612 void ExternalTwoByteStringReadBlockIntoBuffer(
ReadBlockBuffer* buffer,
7613 unsigned* offset_ptr,
7626 explicit inline Relocatable(
Isolate* isolate);
7627 inline virtual ~Relocatable();
7631 static void PostGarbageCollectionProcessing();
7632 static int ArchiveSpacePerThread();
7633 static char* ArchiveState(
Isolate* isolate,
char* to);
7634 static char* RestoreState(
Isolate* isolate,
char* from);
7635 static void Iterate(ObjectVisitor* v);
7636 static void Iterate(ObjectVisitor* v, Relocatable* top);
7637 static char*
Iterate(ObjectVisitor* v,
char* t);
7651 void PostGarbageCollection();
7652 inline uc32 Get(
int index);
7673 virtual void Seek(
unsigned pos);
7676 unibrow::InputBuffer<
String,
String*, 1024>(backing) {}
7683 virtual void Seek(
unsigned pos);
7687 : unibrow::InputBuffer<
String,
String**, 256>(backing) {}
7691 template <
typename T>
7714 inline void set_kind(
byte kind);
7721 void OddballVerify();
7737 static const byte kNotBooleanMask = ~1;
7740 static const byte kArgumentMarker = 4;
7766 void JSGlobalPropertyCellVerify();
7769 inline void JSGlobalPropertyCellPrint() {
7770 JSGlobalPropertyCellPrint(stdout);
7772 void JSGlobalPropertyCellPrint(FILE* out);
7801 bool HasElementWithHandler(uint32_t index);
7854 inline void InitializeBody(
int object_size,
Object* value);
7865 inline void JSProxyPrint() {
7866 JSProxyPrint(stdout);
7868 void JSProxyPrint(FILE* out);
7871 void JSProxyVerify();
7882 static const int kPaddingSize = kSize - kPaddingOffset;
7908 inline void JSFunctionProxyPrint() {
7909 JSFunctionProxyPrint(stdout);
7911 void JSFunctionProxyPrint(FILE* out);
7914 void JSFunctionProxyVerify();
7922 static const int kPaddingSize = kSize - kPaddingOffset;
7945 inline void JSSetPrint() {
7948 void JSSetPrint(FILE* out);
7972 inline void JSMapPrint() {
7975 void JSMapPrint(FILE* out);
8002 inline void JSWeakMapPrint() {
8003 JSWeakMapPrint(stdout);
8005 void JSWeakMapPrint(FILE* out);
8008 void JSWeakMapVerify();
8026 inline Address foreign_address();
8027 inline void set_foreign_address(
Address value);
8033 inline void ForeignIterateBody(ObjectVisitor* v);
8035 template<
typename StaticVisitor>
8036 inline void ForeignIterateBody();
8039 inline void ForeignPrint() {
8040 ForeignPrint(stdout);
8042 void ForeignPrint(FILE* out);
8045 void ForeignVerify();
8074 MUST_USE_RESULT MaybeObject* JSArrayUpdateLengthFromIndex(uint32_t index,
8083 inline bool AllowsSetElementsLength();
8094 inline void EnsureSize(
int minimum_size_of_backing_fixed_array);
8098 inline void JSArrayPrint() {
8099 JSArrayPrint(stdout);
8101 void JSArrayPrint(FILE* out);
8104 void JSArrayVerify();
8108 static const int kPreallocatedArrayElements = 4;
8117 void Expand(
int minimum_size_of_backing_fixed_array);
8136 static const int kIndexIndex = 0;
8137 static const int kInputIndex = 1;
8161 inline bool all_can_read();
8162 inline void set_all_can_read(
bool value);
8164 inline bool all_can_write();
8165 inline void set_all_can_write(
bool value);
8167 inline bool prohibits_overwriting();
8168 inline void set_prohibits_overwriting(
bool value);
8174 inline bool IsCompatibleReceiver(
Object* receiver);
8179 inline void AccessorInfoPrint() {
8180 AccessorInfoPrint(stdout);
8182 void AccessorInfoPrint(FILE* out);
8185 void AccessorInfoVerify();
8198 static const int kAllCanReadBit = 0;
8199 static const int kAllCanWriteBit = 1;
8200 static const int kProhibitsOverwritingBit = 2;
8201 class AttributesField:
public BitField<PropertyAttributes, 3, 3> {};
8239 if (!getter->IsNull()) set_getter(getter);
8240 if (!setter->IsNull()) set_setter(setter);
8244 return IsJSAccessor(getter()) || IsJSAccessor(setter());
8248 void AccessorPairPrint(FILE* out = stdout);
8251 void AccessorPairVerify();
8264 bool IsJSAccessor(
Object* obj) {
8265 return obj->IsSpecFunction() || obj->IsUndefined();
8281 inline void AccessCheckInfoPrint() {
8282 AccessCheckInfoPrint(stdout);
8284 void AccessCheckInfoPrint(FILE* out);
8287 void AccessCheckInfoVerify();
8291 static const int kIndexedCallbackOffset = kNamedCallbackOffset +
kPointerSize;
8312 inline void InterceptorInfoPrint() {
8313 InterceptorInfoPrint(stdout);
8315 void InterceptorInfoPrint(FILE* out);
8318 void InterceptorInfoVerify();
8342 inline void CallHandlerInfoPrint() {
8343 CallHandlerInfoPrint(stdout);
8345 void CallHandlerInfoPrint(FILE* out);
8348 void CallHandlerInfoVerify();
8366 void TemplateInfoVerify();
8405 inline void FunctionTemplateInfoPrint() {
8406 FunctionTemplateInfoPrint(stdout);
8408 void FunctionTemplateInfoPrint(FILE* out);
8411 void FunctionTemplateInfoVerify();
8416 static const int kPropertyAccessorsOffset = kCallCodeOffset +
kPointerSize;
8417 static const int kPrototypeTemplateOffset =
8419 static const int kParentTemplateOffset =
8421 static const int kNamedPropertyHandlerOffset =
8423 static const int kIndexedPropertyHandlerOffset =
8425 static const int kInstanceTemplateOffset =
8427 static const int kClassNameOffset = kInstanceTemplateOffset +
kPointerSize;
8429 static const int kInstanceCallHandlerOffset = kSignatureOffset +
kPointerSize;
8430 static const int kAccessCheckInfoOffset =
8437 static const int kHiddenPrototypeBit = 0;
8438 static const int kUndetectableBit = 1;
8439 static const int kNeedsAccessCheckBit = 2;
8440 static const int kReadOnlyPrototypeBit = 3;
8454 inline void ObjectTemplateInfoPrint() {
8455 ObjectTemplateInfoPrint(stdout);
8457 void ObjectTemplateInfoPrint(FILE* out);
8460 void ObjectTemplateInfoVerify();
8464 static const int kInternalFieldCountOffset =
8478 inline void SignatureInfoPrint() {
8479 SignatureInfoPrint(stdout);
8481 void SignatureInfoPrint(FILE* out);
8484 void SignatureInfoVerify();
8503 inline void TypeSwitchInfoPrint() {
8504 TypeSwitchInfoPrint(stdout);
8506 void TypeSwitchInfoPrint(FILE* out);
8509 void TypeSwitchInfoVerify();
8517 #ifdef ENABLE_DEBUGGER_SUPPORT
8520 class DebugInfo:
public Struct {
8533 bool HasBreakPoint(
int code_position);
8535 Object* GetBreakPointInfo(
int code_position);
8542 int source_position,
int statement_position,
8545 Object* GetBreakPointObjects(
int code_position);
8550 int GetBreakPointCount();
8555 inline void DebugInfoPrint() {
8556 DebugInfoPrint(stdout);
8558 void DebugInfoPrint(FILE* out);
8561 void DebugInfoVerify();
8565 static const int kOriginalCodeIndex = kSharedFunctionInfoIndex +
kPointerSize;
8566 static const int kPatchedCodeIndex = kOriginalCodeIndex +
kPointerSize;
8567 static const int kActiveBreakPointsCountIndex =
8569 static const int kBreakPointsStateIndex =
8571 static const int kSize = kBreakPointsStateIndex +
kPointerSize;
8574 static const int kNoBreakPointInfo = -1;
8577 int GetBreakPointInfoIndex(
int code_position);
8586 class BreakPointInfo:
public Struct {
8599 static
void ClearBreakPoint(Handle<BreakPointInfo> info,
8600 Handle<
Object> break_point_object);
8602 static
void SetBreakPoint(Handle<BreakPointInfo> info,
8603 Handle<
Object> break_point_object);
8605 static
bool HasBreakPointObject(Handle<BreakPointInfo> info,
8606 Handle<
Object> break_point_object);
8608 int GetBreakPointCount();
8610 static inline BreakPointInfo* cast(
Object* obj);
8613 inline void BreakPointInfoPrint() {
8614 BreakPointInfoPrint(stdout);
8616 void BreakPointInfoPrint(FILE* out);
8619 void BreakPointInfoVerify();
8623 static const int kSourcePositionIndex = kCodePositionIndex +
kPointerSize;
8624 static const int kStatementPositionIndex =
8626 static const int kBreakPointObjectsIndex =
8628 static const int kSize = kBreakPointObjectsIndex +
kPointerSize;
8633 #endif // ENABLE_DEBUGGER_SUPPORT
8636 #undef DECL_BOOLEAN_ACCESSORS
8637 #undef DECL_ACCESSORS
8639 #define VISITOR_SYNCHRONIZATION_TAGS_LIST(V) \
8640 V(kSymbolTable, "symbol_table", "(Symbols)") \
8641 V(kExternalStringsTable, "external_strings_table", "(External strings)") \
8642 V(kStrongRootList, "strong_root_list", "(Strong roots)") \
8643 V(kSymbol, "symbol", "(Symbol)") \
8644 V(kBootstrapper, "bootstrapper", "(Bootstrapper)") \
8645 V(kTop, "top", "(Isolate)") \
8646 V(kRelocatable, "relocatable", "(Relocatable)") \
8647 V(kDebug, "debug", "(Debugger)") \
8648 V(kCompilationCache, "compilationcache", "(Compilation cache)") \
8649 V(kHandleScope, "handlescope", "(Handle scope)") \
8650 V(kBuiltins, "builtins", "(Builtins)") \
8651 V(kGlobalHandles, "globalhandles", "(Global handles)") \
8652 V(kThreadManager, "threadmanager", "(Thread manager)") \
8653 V(kExtensions, "Extensions", "(Extensions)")
8657 #define DECLARE_ENUM(enum_item, ignore1, ignore2) enum_item,
8664 static const char*
const kTags[kNumberOfSyncTags];
8665 static const char*
const kTagNames[kNumberOfSyncTags];
8676 virtual void VisitPointers(
Object** start,
Object** end) = 0;
8682 virtual void VisitCodeTarget(RelocInfo* rinfo);
8685 virtual void VisitCodeEntry(
Address entry_address);
8688 virtual void VisitGlobalPropertyCell(RelocInfo* rinfo);
8700 virtual void VisitDebugTarget(RelocInfo* rinfo);
8706 virtual void VisitEmbeddedPointer(RelocInfo* rinfo);
8715 virtual void VisitExternalReference(RelocInfo* rinfo);
8718 VisitExternalReferences(p, p + 1);
8744 static inline bool get(
Smi* smi,
int bit_position) {
8745 return get(smi->value(), bit_position);
8748 static inline bool get(
int value,
int bit_position) {
8749 return (value & (1 << bit_position)) != 0;
8752 static inline Smi*
set(
Smi* smi,
int bit_position,
bool v) {
8756 static inline int set(
int value,
int bit_position,
bool v) {
8758 value |= (1 << bit_position);
8760 value &= ~(1 << bit_position);
8768 #endif // V8_OBJECTS_H_
int StackSlotIndex(String *name)
static int SizeOf(Map *map, HeapObject *object)
MUST_USE_RESULT MaybeObject * GetElementWithReceiver(Object *receiver, uint32_t index)
MUST_USE_RESULT MaybeObject * GetElementWithInterceptor(Object *receiver, uint32_t index)
static const int kHeaderSize
static MapWord FromRawValue(uintptr_t value)
const uint32_t kShortcutTypeTag
void SetEnumCache(FixedArray *bridge_storage, FixedArray *new_cache, Object *new_index_cache)
MUST_USE_RESULT MaybeObject * LookupAsciiSymbol(Vector< const char > str, Object **s)
kPropertyAccessorsOffset kNamedPropertyHandlerOffset kInstanceTemplateOffset kAccessCheckInfoOffset eval_from_instructions_offset
static const int kMaxSize
void set_elements_kind(ElementsKind elements_kind)
static const int kRequiresSlowElementsTagSize
virtual void VisitExternalAsciiString(v8::String::ExternalAsciiStringResource **resource)
static Handle< Object > DeleteElement(Handle< JSObject > obj, uint32_t index)
Object * KeyAt(int entry)
INLINE(int Search(String *name))
STATIC_CHECK((kStringRepresentationMask|kStringEncodingMask)==Internals::kFullStringRepresentationMask)
static bool IsMatch(uint32_t key, Object *other)
static Handle< Object > SetProperty(Handle< JSReceiver > object, Handle< String > key, Handle< Object > value, PropertyAttributes attributes, StrictModeFlag strict_mode)
int LinearSearch(SearchMode mode, String *name, int len)
static const int kMaxLength
void set_null_unchecked(Heap *heap, int index)
PropertyAttributes GetPropertyAttribute(String *name)
bool HasExternalUnsignedShortElements()
#define FOR_EACH_NUMERIC_FIELD(V)
void CopyValuesTo(FixedArray *elements)
virtual void VisitExternalTwoByteString(v8::String::ExternalStringResource **resource)
static const int kNotFound
static bool is_the_hole_nan(double value)
bool IsExternalArrayElementsKind(ElementsKind kind)
static uint32_t SeededHash(Key key, uint32_t seed)
Object * LookupAccessor(String *name, AccessorComponent component)
static const int kMaxLength
bool has_external_array_elements()
static const int kEntries
static const int kStartOffset
static int EntryToIndex(int entry)
static ByteArray * FromDataStartAddress(Address address)
const char * ToCString(const v8::String::Utf8Value &value)
static const int kCacheSizeIndex
static const int kPrefixSize
FixedBodyDescriptor< kNameOffset, kThisPropertyAssignmentsOffset+kPointerSize, kSize > BodyDescriptor
static const int kHeaderSize
static const int kFingerOffset
virtual uint32_t Hash()=0
virtual void Synchronize(VisitorSynchronization::SyncTag tag)
static uint32_t Hash(uint32_t key)
static const int kElementsStartIndex
FixedBodyDescriptor< kParentOffset, kOffsetOffset+kPointerSize, kSize > BodyDescriptor
bool has_non_strict_arguments_elements()
bool is_hidden_prototype()
void set(int index, Object *value)
MUST_USE_RESULT MaybeObject * TransformPropertiesToFastFor(JSObject *obj, int unused_property_fields)
int GetInternalFieldOffset(int index)
static uint32_t Hash(HashTableKey *key)
MUST_USE_RESULT MaybeObject * AddProperty(String *name, Object *value, PropertyAttributes attributes, StrictModeFlag strict_mode, StoreFromKeyed store_mode=MAY_BE_STORE_FROM_KEYED)
MUST_USE_RESULT MaybeObject * GetPropertyWithCallback(Object *receiver, Object *structure, String *name)
#define DECLARE_FUNCTION_ID(ignored1, ignore2, name)
static double hole_nan_as_double()
static const int kFactoryOffset
FixedBodyDescriptor< HeapObject::kMapOffset, kStackFramesOffset+kPointerSize, kSize > BodyDescriptor
MUST_USE_RESULT MaybeObject * Add(Key key, Object *value, PropertyDetails details)
void SortUnchecked(const WhitenessWitness &)
void DetailsAtPut(int entry, PropertyDetails value)
MUST_USE_RESULT MaybeObject * SetPropertyWithDefinedSetter(JSReceiver *setter, Object *value)
const uint32_t kNotSymbolTag
static MapCache * cast(Object *obj)
FixedBodyDescriptor< kToStringOffset, kToNumberOffset+kPointerSize, kSize > BodyDescriptor
MUST_USE_RESULT MaybeObject * PrepareSlowElementsForSort(uint32_t limit)
const uint32_t kTwoByteStringTag
const int kFailureTypeTagSize
bool HasRealElementProperty(uint32_t index)
static const uint32_t kExponentMask
virtual uint32_t HashForObject(Object *key)=0
static DescriptorArray * cast(Object *obj)
static Failure * InternalError()
static void CopyFrom(Handle< DescriptorArray > dst, int dst_index, Handle< DescriptorArray > src, int src_index, const WhitenessWitness &witness)
int NumberOfLocalElements(PropertyAttributes filter)
static int SizeOf(Map *map, HeapObject *object)
virtual void VisitRuntimeEntry(RelocInfo *rinfo)
void DeleteHiddenProperty(String *key)
PropertyAttributes GetPropertyAttributeWithInterceptor(JSObject *receiver, String *name, bool continue_search)
Object * InObjectPropertyAt(int index)
static Smi * FromInt(int value)
bool IsFastObjectElementsKind(ElementsKind kind)
bool HasFastSmiElements()
void IteratePointer(ObjectVisitor *v, int offset)
static const int kOddballKindOffset
bool CallsNonStrictEval()
MUST_USE_RESULT MaybeObject * ToSmi()
void CopyKeysTo(FixedArray *storage, PropertyAttributes filter, SortMode sort_mode)
static const int kEnumCacheBridgeIndicesCacheIndex
const intptr_t kCodeAlignmentMask
kPropertyAccessorsOffset kNamedPropertyHandlerOffset kInstanceTemplateOffset kAccessCheckInfoOffset kEvalFrominstructionsOffsetOffset kThisPropertyAssignmentsOffset kNeedsAccessCheckBit kIsExpressionBit kHasOnlySimpleThisPropertyAssignments kUsesArguments formal_parameter_count
bool HasRealNamedProperty(String *key)
MUST_USE_RESULT MaybeObject * ConvertDescriptorToFieldAndMapTransition(String *name, Object *new_value, PropertyAttributes attributes)
MUST_USE_RESULT MaybeObject * CopyInsert(Descriptor *descriptor, TransitionFlag transition_flag)
virtual void VisitPointer(Object **p)
bool HasExternalByteElements()
MUST_USE_RESULT MaybeObject * EnsureCanContainHeapObjectElements()
static uint32_t Hash(HashTableKey *key)
void CopyTo(int pos, FixedArray *dest, int dest_pos, int len)
MUST_USE_RESULT MaybeObject * GetPropertyWithDefinedGetter(Object *receiver, JSReceiver *getter)
MUST_USE_RESULT MaybeObject * SetPropertyWithFailedAccessCheck(LookupResult *result, String *name, Object *value, bool check_prototype, StrictModeFlag strict_mode)
static MUST_USE_RESULT MaybeObject * Allocate(int at_least_space_for, PretenureFlag pretenure=NOT_TENURED)
static const int kPrefixSize
int ContextSlotIndex(String *name, VariableMode *mode, InitializationFlag *init_flag)
value format" "after each garbage collection") DEFINE_bool(print_cumulative_gc_stat, false, "print cumulative GC statistics in name=value format on exit") DEFINE_bool(trace_gc_verbose, false, "print more details following each garbage collection") DEFINE_bool(trace_fragmentation, false, "report fragmentation for old pointer and data pages") DEFINE_bool(collect_maps, true, "garbage collect maps from which no objects can be reached") DEFINE_bool(flush_code, true, "flush code that we expect not to use again before full gc") DEFINE_bool(incremental_marking, true, "use incremental marking") DEFINE_bool(incremental_marking_steps, true, "do incremental marking steps") DEFINE_bool(trace_incremental_marking, false, "trace progress of the incremental marking") DEFINE_bool(use_idle_notification, true, "Use idle notification to reduce memory footprint.") DEFINE_bool(send_idle_notification, false, "Send idle notifcation between stress runs.") DEFINE_bool(use_ic, true, "use inline caching") DEFINE_bool(native_code_counters, false, "generate extra code for manipulating stats counters") DEFINE_bool(always_compact, false, "Perform compaction on every full GC") DEFINE_bool(lazy_sweeping, true, "Use lazy sweeping for old pointer and data spaces") DEFINE_bool(never_compact, false, "Never perform compaction on full GC-testing only") DEFINE_bool(compact_code_space, true, "Compact code space on full non-incremental collections") DEFINE_bool(cleanup_code_caches_at_gc, true, "Flush inline caches prior to mark compact collection and" "flush code caches in maps during mark compact cycle.") DEFINE_int(random_seed, 0, "Default seed for initializing random generator" "(0, the default, means to use system random).") DEFINE_bool(use_verbose_printer, true, "allows verbose printing") DEFINE_bool(allow_natives_syntax, false, "allow natives syntax") DEFINE_bool(trace_sim, false, "Trace simulator execution") DEFINE_bool(check_icache, false, "Check icache flushes in ARM and MIPS simulator") DEFINE_int(stop_sim_at, 0, "Simulator stop after x number of instructions") DEFINE_int(sim_stack_alignment, 8, "Stack alingment in bytes in simulator(4 or 8, 8 is default)") DEFINE_bool(trace_exception, false, "print stack trace when throwing exceptions") DEFINE_bool(preallocate_message_memory, false, "preallocate some memory to build stack traces.") DEFINE_bool(randomize_hashes, true, "randomize hashes to avoid predictable hash collisions" "(with snapshots this option cannot override the baked-in seed)") DEFINE_int(hash_seed, 0, "Fixed seed to use to hash property keys(0 means random)" "(with snapshots this option cannot override the baked-in seed)") DEFINE_bool(preemption, false, "activate a 100ms timer that switches between V8 threads") DEFINE_bool(regexp_optimization, true, "generate optimized regexp code") DEFINE_bool(testing_bool_flag, true, "testing_bool_flag") DEFINE_int(testing_int_flag, 13, "testing_int_flag") DEFINE_float(testing_float_flag, 2.5, "float-flag") DEFINE_string(testing_string_flag, "Hello, world!", "string-flag") DEFINE_int(testing_prng_seed, 42, "Seed used for threading test randomness") DEFINE_string(testing_serialization_file, "/tmp/serdes", "file in which to serialize heap") DEFINE_bool(help, false, "Print usage message, including flags, on console") DEFINE_bool(dump_counters, false, "Dump counters on exit") DEFINE_string(map_counters, "", "Map counters to a file") DEFINE_args(js_arguments, JSARGUMENTS_INIT, "Pass all remaining arguments to the script.Alias for\"--\".") DEFINE_bool(debug_compile_events, true,"Enable debugger compile events") DEFINE_bool(debug_script_collected_events, true,"Enable debugger script collected events") DEFINE_bool(gdbjit, false,"enable GDBJIT interface (disables compacting GC)") DEFINE_bool(gdbjit_full, false,"enable GDBJIT interface for all code objects") DEFINE_bool(gdbjit_dump, false,"dump elf objects with debug info to disk") DEFINE_string(gdbjit_dump_filter,"","dump only objects containing this substring") DEFINE_bool(force_marking_deque_overflows, false,"force overflows of marking deque by reducing it's size ""to 64 words") DEFINE_bool(stress_compaction, false,"stress the GC compactor to flush out bugs (implies ""--force_marking_deque_overflows)")#define FLAG DEFINE_bool(enable_slow_asserts, false,"enable asserts that are slow to execute") DEFINE_bool(trace_codegen, false,"print name of functions for which code is generated") DEFINE_bool(print_source, false,"pretty print source code") DEFINE_bool(print_builtin_source, false,"pretty print source code for builtins") DEFINE_bool(print_ast, false,"print source AST") DEFINE_bool(print_builtin_ast, false,"print source AST for builtins") DEFINE_string(stop_at,"","function name where to insert a breakpoint") DEFINE_bool(print_builtin_scopes, false,"print scopes for builtins") DEFINE_bool(print_scopes, false,"print scopes") DEFINE_bool(trace_contexts, false,"trace contexts operations") DEFINE_bool(gc_greedy, false,"perform GC prior to some allocations") DEFINE_bool(gc_verbose, false,"print stuff during garbage collection") DEFINE_bool(heap_stats, false,"report heap statistics before and after GC") DEFINE_bool(code_stats, false,"report code statistics after GC") DEFINE_bool(verify_heap, false,"verify heap pointers before and after GC") DEFINE_bool(print_handles, false,"report handles after GC") DEFINE_bool(print_global_handles, false,"report global handles after GC") DEFINE_bool(trace_ic, false,"trace inline cache state transitions") DEFINE_bool(print_interfaces, false,"print interfaces") DEFINE_bool(print_interface_details, false,"print interface inference details") DEFINE_int(print_interface_depth, 5,"depth for printing interfaces") DEFINE_bool(trace_normalization, false,"prints when objects are turned into dictionaries.") DEFINE_bool(trace_lazy, false,"trace lazy compilation") DEFINE_bool(collect_heap_spill_statistics, false,"report heap spill statistics along with heap_stats ""(requires heap_stats)") DEFINE_bool(trace_isolates, false,"trace isolate state changes") DEFINE_bool(log_state_changes, false,"Log state changes.") DEFINE_bool(regexp_possessive_quantifier, false,"enable possessive quantifier syntax for testing") DEFINE_bool(trace_regexp_bytecodes, false,"trace regexp bytecode execution") DEFINE_bool(trace_regexp_assembler, false,"trace regexp macro assembler calls.")#define FLAG DEFINE_bool(log, false,"Minimal logging (no API, code, GC, suspect, or handles samples).") DEFINE_bool(log_all, false,"Log all events to the log file.") DEFINE_bool(log_runtime, false,"Activate runtime system %Log call.") DEFINE_bool(log_api, false,"Log API events to the log file.") DEFINE_bool(log_code, false,"Log code events to the log file without profiling.") DEFINE_bool(log_gc, false,"Log heap samples on garbage collection for the hp2ps tool.") DEFINE_bool(log_handles, false,"Log global handle events.") DEFINE_bool(log_snapshot_positions, false,"log positions of (de)serialized objects in the snapshot.") DEFINE_bool(log_suspect, false,"Log suspect operations.") DEFINE_bool(prof, false,"Log statistical profiling information (implies --log-code).") DEFINE_bool(prof_auto, true,"Used with --prof, starts profiling automatically") DEFINE_bool(prof_lazy, false,"Used with --prof, only does sampling and logging"" when profiler is active (implies --noprof_auto).") DEFINE_bool(prof_browser_mode, true,"Used with --prof, turns on browser-compatible mode for profiling.") DEFINE_bool(log_regexp, false,"Log regular expression execution.") DEFINE_bool(sliding_state_window, false,"Update sliding state window counters.") DEFINE_string(logfile,"v8.log","Specify the name of the log file.") DEFINE_bool(ll_prof, false,"Enable low-level linux profiler.")#define FLAG DEFINE_bool(trace_elements_transitions, false,"trace elements transitions") DEFINE_bool(print_code_stubs, false,"print code stubs") DEFINE_bool(test_secondary_stub_cache, false,"test secondary stub cache by disabling the primary one") DEFINE_bool(test_primary_stub_cache, false,"test primary stub cache by disabling the secondary one") DEFINE_bool(print_code, false,"print generated code") DEFINE_bool(print_opt_code, false,"print optimized code") DEFINE_bool(print_unopt_code, false,"print unoptimized code before ""printing optimized code based on it") DEFINE_bool(print_code_verbose, false,"print more information for code") DEFINE_bool(print_builtin_code, false,"print generated code for builtins")#43"/Users/thlorenz/dev/dx/v8-perf/build/v8/src/flags.cc"2#define FLAG_MODE_DEFINE_DEFAULTS#1"/Users/thlorenz/dev/dx/v8-perf/build/v8/src/flag-definitions.h"1#define FLAG_FULL(ftype, ctype, nam, def, cmt)#define FLAG_READONLY(ftype, ctype, nam, def, cmt)#define DEFINE_implication(whenflag, thenflag)#define DEFINE_bool(nam, def, cmt)#define DEFINE_int(nam, def, cmt)#define DEFINE_float(nam, def, cmt)#define DEFINE_string(nam, def, cmt)#define DEFINE_args(nam, def, cmt)#define FLAG DEFINE_bool(use_strict, false,"enforce strict mode") DEFINE_bool(es5_readonly, false,"activate correct semantics for inheriting readonliness") DEFINE_bool(es52_globals, false,"activate new semantics for global var declarations") DEFINE_bool(harmony_typeof, false,"enable harmony semantics for typeof") DEFINE_bool(harmony_scoping, false,"enable harmony block scoping") DEFINE_bool(harmony_modules, false,"enable harmony modules (implies block scoping)") DEFINE_bool(harmony_proxies, false,"enable harmony proxies") DEFINE_bool(harmony_collections, false,"enable harmony collections (sets, maps, and weak maps)") DEFINE_bool(harmony, false,"enable all harmony features (except typeof)") DEFINE_implication(harmony, harmony_scoping) DEFINE_implication(harmony, harmony_modules) DEFINE_implication(harmony, harmony_proxies) DEFINE_implication(harmony, harmony_collections) DEFINE_implication(harmony_modules, harmony_scoping) DEFINE_bool(packed_arrays, false,"optimizes arrays that have no holes") DEFINE_bool(smi_only_arrays, true,"tracks arrays with only smi values") DEFINE_bool(clever_optimizations, true,"Optimize object size, Array shift, DOM strings and string +") DEFINE_bool(unbox_double_arrays, true,"automatically unbox arrays of doubles") DEFINE_bool(string_slices, true,"use string slices") DEFINE_bool(crankshaft, true,"use crankshaft") DEFINE_string(hydrogen_filter,"","optimization filter") DEFINE_bool(use_range, true,"use hydrogen range analysis") DEFINE_bool(eliminate_dead_phis, true,"eliminate dead phis") DEFINE_bool(use_gvn, true,"use hydrogen global value numbering") DEFINE_bool(use_canonicalizing, true,"use hydrogen instruction canonicalizing") DEFINE_bool(use_inlining, true,"use function inlining") DEFINE_int(max_inlined_source_size, 600,"maximum source size in bytes considered for a single inlining") DEFINE_int(max_inlined_nodes, 196,"maximum number of AST nodes considered for a single inlining") DEFINE_int(max_inlined_nodes_cumulative, 196,"maximum cumulative number of AST nodes considered for inlining") DEFINE_bool(loop_invariant_code_motion, true,"loop invariant code motion") DEFINE_bool(collect_megamorphic_maps_from_stub_cache, true,"crankshaft harvests type feedback from stub cache") DEFINE_bool(hydrogen_stats, false,"print statistics for hydrogen") DEFINE_bool(trace_hydrogen, false,"trace generated hydrogen to file") DEFINE_string(trace_phase,"Z","trace generated IR for specified phases") DEFINE_bool(trace_inlining, false,"trace inlining decisions") DEFINE_bool(trace_alloc, false,"trace register allocator") DEFINE_bool(trace_all_uses, false,"trace all use positions") DEFINE_bool(trace_range, false,"trace range analysis") DEFINE_bool(trace_gvn, false,"trace global value numbering") DEFINE_bool(trace_representation, false,"trace representation types") DEFINE_bool(stress_pointer_maps, false,"pointer map for every instruction") DEFINE_bool(stress_environments, false,"environment for every instruction") DEFINE_int(deopt_every_n_times, 0,"deoptimize every n times a deopt point is passed") DEFINE_bool(trap_on_deopt, false,"put a break point before deoptimizing") DEFINE_bool(deoptimize_uncommon_cases, true,"deoptimize uncommon cases") DEFINE_bool(polymorphic_inlining, true,"polymorphic inlining") DEFINE_bool(use_osr, true,"use on-stack replacement") DEFINE_bool(array_bounds_checks_elimination, false,"perform array bounds checks elimination") DEFINE_bool(array_index_dehoisting, false,"perform array index dehoisting") DEFINE_bool(trace_osr, false,"trace on-stack replacement") DEFINE_int(stress_runs, 0,"number of stress runs") DEFINE_bool(optimize_closures, true,"optimize closures") DEFINE_bool(inline_construct, true,"inline constructor calls") DEFINE_bool(inline_arguments, true,"inline functions with arguments object") DEFINE_int(loop_weight, 1,"loop weight for representation inference") DEFINE_bool(optimize_for_in, true,"optimize functions containing for-in loops") DEFINE_bool(experimental_profiler, true,"enable all profiler experiments") DEFINE_bool(watch_ic_patching, false,"profiler considers IC stability") DEFINE_int(frame_count, 1,"number of stack frames inspected by the profiler") DEFINE_bool(self_optimization, false,"primitive functions trigger their own optimization") DEFINE_bool(direct_self_opt, false,"call recompile stub directly when self-optimizing") DEFINE_bool(retry_self_opt, false,"re-try self-optimization if it failed") DEFINE_bool(count_based_interrupts, false,"trigger profiler ticks based on counting instead of timing") DEFINE_bool(interrupt_at_exit, false,"insert an interrupt check at function exit") DEFINE_bool(weighted_back_edges, false,"weight back edges by jump distance for interrupt triggering") DEFINE_int(interrupt_budget, 5900,"execution budget before interrupt is triggered") DEFINE_int(type_info_threshold, 15,"percentage of ICs that must have type info to allow optimization") DEFINE_int(self_opt_count, 130,"call count before self-optimization") DEFINE_implication(experimental_profiler, watch_ic_patching) DEFINE_implication(experimental_profiler, self_optimization) DEFINE_implication(experimental_profiler, retry_self_opt) DEFINE_implication(experimental_profiler, count_based_interrupts) DEFINE_implication(experimental_profiler, interrupt_at_exit) DEFINE_implication(experimental_profiler, weighted_back_edges) DEFINE_bool(trace_opt_verbose, false,"extra verbose compilation tracing") DEFINE_implication(trace_opt_verbose, trace_opt) DEFINE_bool(debug_code, false,"generate extra code (assertions) for debugging") DEFINE_bool(code_comments, false,"emit comments in code disassembly") DEFINE_bool(enable_sse2, true,"enable use of SSE2 instructions if available") DEFINE_bool(enable_sse3, true,"enable use of SSE3 instructions if available") DEFINE_bool(enable_sse4_1, true,"enable use of SSE4.1 instructions if available") DEFINE_bool(enable_cmov, true,"enable use of CMOV instruction if available") DEFINE_bool(enable_rdtsc, true,"enable use of RDTSC instruction if available") DEFINE_bool(enable_sahf, true,"enable use of SAHF instruction if available (X64 only)") DEFINE_bool(enable_vfp3, true,"enable use of VFP3 instructions if available - this implies ""enabling ARMv7 instructions (ARM only)") DEFINE_bool(enable_armv7, true,"enable use of ARMv7 instructions if available (ARM only)") DEFINE_bool(enable_fpu, true,"enable use of MIPS FPU instructions if available (MIPS only)") DEFINE_string(expose_natives_as, NULL,"expose natives in global object") DEFINE_string(expose_debug_as, NULL,"expose debug in global object") DEFINE_bool(expose_gc, false,"expose gc extension") DEFINE_bool(expose_externalize_string, false,"expose externalize string extension") DEFINE_int(stack_trace_limit, 10,"number of stack frames to capture") DEFINE_bool(builtins_in_stack_traces, false,"show built-in functions in stack traces") DEFINE_bool(disable_native_files, false,"disable builtin natives files") DEFINE_bool(inline_new, true,"use fast inline allocation") DEFINE_bool(stack_trace_on_abort, true,"print a stack trace if an assertion failure occurs") DEFINE_bool(trace, false,"trace function calls") DEFINE_bool(mask_constants_with_cookie, true,"use random jit cookie to mask large constants") DEFINE_bool(lazy, true,"use lazy compilation") DEFINE_bool(trace_opt, false,"trace lazy optimization") DEFINE_bool(trace_opt_stats, false,"trace lazy optimization statistics") DEFINE_bool(opt, true,"use adaptive optimizations") DEFINE_bool(always_opt, false,"always try to optimize functions") DEFINE_bool(prepare_always_opt, false,"prepare for turning on always opt") DEFINE_bool(trace_deopt, false,"trace deoptimization") DEFINE_int(min_preparse_length, 1024,"minimum length for automatic enable preparsing") DEFINE_bool(always_full_compiler, false,"try to use the dedicated run-once backend for all code") DEFINE_bool(trace_bailout, false,"print reasons for falling back to using the classic V8 backend") DEFINE_bool(compilation_cache, true,"enable compilation cache") DEFINE_bool(cache_prototype_transitions, true,"cache prototype transitions") DEFINE_bool(trace_debug_json, false,"trace debugging JSON request/response") DEFINE_bool(debugger_auto_break, true,"automatically set the debug break flag when debugger commands are ""in the queue") DEFINE_bool(enable_liveedit, true,"enable liveedit experimental feature") DEFINE_bool(break_on_abort, true,"always cause a debug break before aborting") DEFINE_int(stack_size, kPointerSize *123,"default size of stack region v8 is allowed to use (in kBytes)") DEFINE_int(max_stack_trace_source_length, 300,"maximum length of function source code printed in a stack trace.") DEFINE_bool(always_inline_smi_code, false,"always inline smi code in non-opt code") DEFINE_int(max_new_space_size, 0,"max size of the new generation (in kBytes)") DEFINE_int(max_old_space_size, 0,"max size of the old generation (in Mbytes)") DEFINE_int(max_executable_size, 0,"max size of executable memory (in Mbytes)") DEFINE_bool(gc_global, false,"always perform global GCs") DEFINE_int(gc_interval,-1,"garbage collect after <n> allocations") DEFINE_bool(trace_gc, false,"print one trace line following each garbage collection") DEFINE_bool(trace_gc_nvp, false,"print one detailed trace line in name=value format ""after each garbage collection") DEFINE_bool(print_cumulative_gc_stat, false,"print cumulative GC statistics in name=value format on exit") DEFINE_bool(trace_gc_verbose, false,"print more details following each garbage collection") DEFINE_bool(trace_fragmentation, false,"report fragmentation for old pointer and data pages") DEFINE_bool(collect_maps, true,"garbage collect maps from which no objects can be reached") DEFINE_bool(flush_code, true,"flush code that we expect not to use again before full gc") DEFINE_bool(incremental_marking, true,"use incremental marking") DEFINE_bool(incremental_marking_steps, true,"do incremental marking steps") DEFINE_bool(trace_incremental_marking, false,"trace progress of the incremental marking") DEFINE_bool(use_idle_notification, true,"Use idle notification to reduce memory footprint.") DEFINE_bool(send_idle_notification, false,"Send idle notifcation between stress runs.") DEFINE_bool(use_ic, true,"use inline caching") DEFINE_bool(native_code_counters, false,"generate extra code for manipulating stats counters") DEFINE_bool(always_compact, false,"Perform compaction on every full GC") DEFINE_bool(lazy_sweeping, true,"Use lazy sweeping for old pointer and data spaces") DEFINE_bool(never_compact, false,"Never perform compaction on full GC - testing only") DEFINE_bool(compact_code_space, true,"Compact code space on full non-incremental collections") DEFINE_bool(cleanup_code_caches_at_gc, true,"Flush inline caches prior to mark compact collection and ""flush code caches in maps during mark compact cycle.") DEFINE_int(random_seed, 0,"Default seed for initializing random generator ""(0, the default, means to use system random).") DEFINE_bool(use_verbose_printer, true,"allows verbose printing") DEFINE_bool(allow_natives_syntax, false,"allow natives syntax") DEFINE_bool(trace_sim, false,"Trace simulator execution") DEFINE_bool(check_icache, false,"Check icache flushes in ARM and MIPS simulator") DEFINE_int(stop_sim_at, 0,"Simulator stop after x number of instructions") DEFINE_int(sim_stack_alignment, 8,"Stack alingment in bytes in simulator (4 or 8, 8 is default)") DEFINE_bool(trace_exception, false,"print stack trace when throwing exceptions") DEFINE_bool(preallocate_message_memory, false,"preallocate some memory to build stack traces.") DEFINE_bool(randomize_hashes, true,"randomize hashes to avoid predictable hash collisions ""(with snapshots this option cannot override the baked-in seed)") DEFINE_int(hash_seed, 0,"Fixed seed to use to hash property keys (0 means random)""(with snapshots this option cannot override the baked-in seed)") DEFINE_bool(preemption, false,"activate a 100ms timer that switches between V8 threads") DEFINE_bool(regexp_optimization, true,"generate optimized regexp code") DEFINE_bool(testing_bool_flag, true,"testing_bool_flag") DEFINE_int(testing_int_flag, 13,"testing_int_flag") DEFINE_float(testing_float_flag, 2.5,"float-flag") DEFINE_string(testing_string_flag,"Hello, world!","string-flag") DEFINE_int(testing_prng_seed, 42,"Seed used for threading test randomness") DEFINE_string(testing_serialization_file,"/tmp/serdes","file in which to serialize heap") DEFINE_bool(help, false,"Print usage message, including flags, on console") DEFINE_bool(dump_counters, false,"Dump counters on exit") DEFINE_string(map_counters,"","Map counters to a file") DEFINE_args(js_arguments, JSARGUMENTS_INIT,"Pass all remaining arguments to the script. Alias for \"--\".") DEFINE_bool(debug_compile_events, true,"Enable debugger compile events") DEFINE_bool(debug_script_collected_events, true,"Enable debugger script collected events") DEFINE_bool(gdbjit, false,"enable GDBJIT interface (disables compacting GC)") DEFINE_bool(gdbjit_full, false,"enable GDBJIT interface for all code objects") DEFINE_bool(gdbjit_dump, false,"dump elf objects with debug info to disk") DEFINE_string(gdbjit_dump_filter,"","dump only objects containing this substring") DEFINE_bool(force_marking_deque_overflows, false,"force overflows of marking deque by reducing it's size ""to 64 words") DEFINE_bool(stress_compaction, false,"stress the GC compactor to flush out bugs (implies ""--force_marking_deque_overflows)")#define FLAG DEFINE_bool(enable_slow_asserts, false,"enable asserts that are slow to execute") DEFINE_bool(trace_codegen, false,"print name of functions for which code is generated") DEFINE_bool(print_source, false,"pretty print source code") DEFINE_bool(print_builtin_source, false,"pretty print source code for builtins") DEFINE_bool(print_ast, false,"print source AST") DEFINE_bool(print_builtin_ast, false,"print source AST for builtins") DEFINE_string(stop_at,"","function name where to insert a breakpoint") DEFINE_bool(print_builtin_scopes, false,"print scopes for builtins") DEFINE_bool(print_scopes, false,"print scopes") DEFINE_bool(trace_contexts, false,"trace contexts operations") DEFINE_bool(gc_greedy, false,"perform GC prior to some allocations") DEFINE_bool(gc_verbose, false,"print stuff during garbage collection") DEFINE_bool(heap_stats, false,"report heap statistics before and after GC") DEFINE_bool(code_stats, false,"report code statistics after GC") DEFINE_bool(verify_heap, false,"verify heap pointers before and after GC") DEFINE_bool(print_handles, false,"report handles after GC") DEFINE_bool(print_global_handles, false,"report global handles after GC") DEFINE_bool(trace_ic, false,"trace inline cache state transitions") DEFINE_bool(print_interfaces, false,"print interfaces") DEFINE_bool(print_interface_details, false,"print interface inference details") DEFINE_int(print_interface_depth, 5,"depth for printing interfaces") DEFINE_bool(trace_normalization, false,"prints when objects are turned into dictionaries.") DEFINE_bool(trace_lazy, false,"trace lazy compilation") DEFINE_bool(collect_heap_spill_statistics, false,"report heap spill statistics along with heap_stats ""(requires heap_stats)") DEFINE_bool(trace_isolates, false,"trace isolate state changes") DEFINE_bool(log_state_changes, false,"Log state changes.") DEFINE_bool(regexp_possessive_quantifier, false,"enable possessive quantifier syntax for testing") DEFINE_bool(trace_regexp_bytecodes, false,"trace regexp bytecode execution") DEFINE_bool(trace_regexp_assembler, false,"trace regexp macro assembler calls.")#define FLAG DEFINE_bool(log, false,"Minimal logging (no API, code, GC, suspect, or handles samples).") DEFINE_bool(log_all, false,"Log all events to the log file.") DEFINE_bool(log_runtime, false,"Activate runtime system %Log call.") DEFINE_bool(log_api, false,"Log API events to the log file.") DEFINE_bool(log_code, false,"Log code events to the log file without profiling.") DEFINE_bool(log_gc, false,"Log heap samples on garbage collection for the hp2ps tool.") DEFINE_bool(log_handles, false,"Log global handle events.") DEFINE_bool(log_snapshot_positions, false,"log positions of (de)serialized objects in the snapshot.") DEFINE_bool(log_suspect, false,"Log suspect operations.") DEFINE_bool(prof, false,"Log statistical profiling information (implies --log-code).") DEFINE_bool(prof_auto, true,"Used with --prof, starts profiling automatically") DEFINE_bool(prof_lazy, false,"Used with --prof, only does sampling and logging"" when profiler is active (implies --noprof_auto).") DEFINE_bool(prof_browser_mode, true,"Used with --prof, turns on browser-compatible mode for profiling.") DEFINE_bool(log_regexp, false,"Log regular expression execution.") DEFINE_bool(sliding_state_window, false,"Update sliding state window counters.") DEFINE_string(logfile,"v8.log","Specify the name of the log file.") DEFINE_bool(ll_prof, false,"Enable low-level linux profiler.")#define FLAG DEFINE_bool(trace_elements_transitions, false,"trace elements transitions") DEFINE_bool(print_code_stubs, false,"print code stubs") DEFINE_bool(test_secondary_stub_cache, false,"test secondary stub cache by disabling the primary one") DEFINE_bool(test_primary_stub_cache, false,"test primary stub cache by disabling the secondary one") DEFINE_bool(print_code, false,"print generated code") DEFINE_bool(print_opt_code, false,"print optimized code") DEFINE_bool(print_unopt_code, false,"print unoptimized code before ""printing optimized code based on it") DEFINE_bool(print_code_verbose, false,"print more information for code") DEFINE_bool(print_builtin_code, false,"print generated code for builtins")#47"/Users/thlorenz/dev/dx/v8-perf/build/v8/src/flags.cc"2 namespace{struct Flag{enum FlagType{TYPE_BOOL, TYPE_INT, TYPE_FLOAT, TYPE_STRING, TYPE_ARGS} name
static HeapObject * cast(Object *obj)
static const int kFirstNonstringType
MUST_USE_RESULT MaybeObject * Rehash(HashTable *new_table, Key key)
static const int kPrefixSize
static bool IsAscii(const uc16 *chars, int length)
void set_has_named_interceptor()
bool HasExternalDoubleElements()
void SetAstId(int index, Smi *id)
void Sort(const WhitenessWitness &)
bool is_the_hole(int index)
const int kVariableSizeSentinel
MUST_USE_RESULT MaybeObject * AddKeysFromJSArray(JSArray *array)
static void IterateBody(HeapObject *obj, int object_size, ObjectVisitor *v)
void Get(int descriptor_number, Descriptor *desc)
static Failure * OutOfMemoryException()
JSFunction * GetConstantFunction(int descriptor_number)
static const int kFastPropertiesSoftLimit
int ParameterIndex(String *name)
int GetEnumElementKeys(FixedArray *storage)
static SymbolTable * cast(Object *obj)
MUST_USE_RESULT MaybeObject * GetPropertyWithFailedAccessCheck(Object *receiver, LookupResult *result, String *name, PropertyAttributes *attributes)
SeededNumberDictionary * element_dictionary()
Vector< const char > ToAsciiVector()
static const int kEnumCacheBridgeLength
static KeyedAccessGrowMode GetKeyedAccessGrowMode(ExtraICState extra_ic_state)
MUST_USE_RESULT MaybeObject * AddNumberEntry(uint32_t key, Object *value, PropertyDetails details)
static const uint32_t kMaxElementCount
MUST_USE_RESULT MaybeObject * RemoveTransitions(SharedMode shared_mode)
MUST_USE_RESULT MaybeObject * ConvertDescriptorToField(String *name, Object *new_value, PropertyAttributes attributes)
MUST_USE_RESULT MaybeObject * GetPropertyWithReceiver(Object *receiver, String *key, PropertyAttributes *attributes)
static ByteArray * cast(Object *obj)
int BinarySearch(String *name, int low, int high)
bool has_fast_object_elements()
MUST_USE_RESULT MaybeObject * SetElementWithCallbackSetterInPrototypes(uint32_t index, Object *value, bool *found, StrictModeFlag strict_mode)
int NumberOfEnumElements()
static const int kDummyIndex
static const int kExponentBias
const uint32_t kMaxAsciiCharCodeU
static FreeSpace * cast(Object *obj)
bool IsTransitionOnly(int descriptor_number)
void Set(int descriptor_number, Descriptor *desc, const WhitenessWitness &)
bool SameValue(Object *other)
static Failure * Exception()
static const int kExternalPointerOffset
static bool IsMatch(HashTableKey *key, Object *value)
MUST_USE_RESULT MaybeObject * GetElementsTransitionMapSlow(ElementsKind elements_kind)
static const int kStartOffset
MUST_USE_RESULT MaybeObject * ToObject()
MUST_USE_RESULT MaybeObject * PrepareElementsForSort(uint32_t limit)
static bool IsMatch(String *key, Object *other)
static const int kTransitionsOffset
int GetLocalElementKeys(FixedArray *storage, PropertyAttributes filter)
void PrintElementsTransition(FILE *file, ElementsKind from_kind, FixedArrayBase *from_elements, ElementsKind to_kind, FixedArrayBase *to_elements)
bool has_fast_double_elements()
static Smi * FromIntptr(intptr_t value)
bool Contains(Object *key)
static Handle< Object > TransitionElementsKind(Handle< JSObject > object, ElementsKind to_kind)
virtual void PostGarbageCollection()
Object * HeapNumberToBoolean()
static const int kSizeOffset
#define ASSERT(condition)
v8::Handle< v8::Value > Print(const v8::Arguments &args)
MUST_USE_RESULT MaybeObject * SetElement(uint32_t index, Object *value, PropertyAttributes attributes, StrictModeFlag strict_mode, bool check_prototype)
static Handle< Object > SetOwnElement(Handle< JSObject > object, uint32_t index, Handle< Object > value, StrictModeFlag strict_mode)
MUST_USE_RESULT MaybeObject * PreventExtensions()
InitializationFlag ContextLocalInitFlag(int var)
MUST_USE_RESULT MaybeObject * UnionOfKeys(FixedArray *other)
static MUST_USE_RESULT MaybeObject * AsObject(String *key)
unibrow::byte * util_buffer
static const int kPrefixSize
#define OBJECT_TYPE_LIST(V)
void LookupCallback(String *name, LookupResult *result)
void SetNullValueUnchecked(int descriptor_number, Heap *heap)
#define VISITOR_SYNCHRONIZATION_TAGS_LIST(V)
MUST_USE_RESULT MaybeObject * EnsureCapacity(int n, Key key)
VectorIterator(Vector< const T > data)
static Dictionary< Shape, Key > * cast(Object *obj)
Object * BypassGlobalProxy()
MUST_USE_RESULT MaybeObject * EnsureCapacity(int n, Key key)
Object * SlowReverseLookup(Object *value)
static int OffsetOfFunctionWithId(Builtins::JavaScript id)
const intptr_t kCodeAlignment
static uint32_t HashForObject(Object *key, Object *object)
PropertyAttributes GetPropertyAttributePostInterceptor(JSObject *receiver, String *name, bool continue_search)
kPropertyAccessorsOffset kNamedPropertyHandlerOffset instance_template
#define POINTER_SIZE_ALIGN(value)
#define IS_TYPE_FUNCTION_DECL(type_)
const uint32_t kStringRepresentationMask
bool NonFailureIsHeapObject()
int SizeFromMap(Map *map)
kPropertyAccessorsOffset kNamedPropertyHandlerOffset kInstanceTemplateOffset kAccessCheckInfoOffset kEvalFrominstructionsOffsetOffset kThisPropertyAssignmentsOffset kNeedsAccessCheckBit kIsExpressionBit kHasOnlySimpleThisPropertyAssignments uses_arguments
static uint32_t Hash(HashTableKey *key)
static MUST_USE_RESULT MaybeObject * AsObject(Object *key)
const int kExternalArrayTypeCount
bool HasElementWithInterceptor(JSReceiver *receiver, uint32_t index)
Object ** GetKeySlot(int descriptor_number)
bool IsInternalError() const
void set_is_undetectable()
static const int kStringResourceOffset
bool HasSpecificClassOf(String *name)
StringInputBuffer *const buffer_
int GetInternalFieldCount()
v8::String::ExternalStringResource Resource
void initialize_elements()
#define DEFINE_ELEMENT_ACCESSORS(name, type)
bool Contains(String *name)
static const int kEntrySize
bool ContainsTransition(int entry)
static const int kMaxSize
bool ReferencesObject(Object *obj)
static const int kJSObjectHeaderSize
void CopyEnumKeysTo(FixedArray *storage, FixedArray *sort_array)
void set_map_and_elements(Map *map, FixedArrayBase *value, WriteBarrierMode mode=UPDATE_WRITE_BARRIER)
MUST_USE_RESULT MaybeObject * EnsureWritableFastElements()
void set_the_hole(int index)
MUST_USE_RESULT MaybeObject * Copy()
bool MayContainTransitions()
static const int kNumberOfDeletedElementsIndex
const uint32_t kAsciiDataHintTag
static Handle< Object > SetHiddenProperty(Handle< JSObject > obj, Handle< String > key, Handle< Object > value)
static uint32_t Hash(HashTableKey *key)
const uint32_t kShortExternalStringMask
MUST_USE_RESULT MaybeObject * LookupSubStringAsciiSymbol(Handle< SeqAsciiString > str, int from, int length, Object **s)
bool HasElementWithReceiver(JSReceiver *receiver, uint32_t index)
static const int kHeaderSize
bool HasExternalPixelElements()
Object * GetValue(int descriptor_number)
static Object ** RawField(HeapObject *obj, int offset)
Object * GetNormalizedProperty(LookupResult *result)
static Smi * cast(Object *object)
static void IterateBody(HeapObject *obj, ObjectVisitor *v)
static Handle< ScopeInfo > Create(Scope *scope, Zone *zone)
static uint32_t Hash(Object *key)
bool HasExternalShortElements()
MUST_USE_RESULT MaybeObject * SetIdentityHash(Object *hash, CreationFlag flag)
Handle< String > SubString(Handle< String > str, int start, int end, PretenureFlag pretenure)
MUST_USE_RESULT MaybeObject * Get(JSObject *object, PropertyNormalizationMode mode)
static const int kHeaderSize
void Lookup(String *name, LookupResult *result)
static bool IsAscii(const char *chars, int length)
int GetInObjectPropertyOffset(int index)
static ScopeInfo * cast(Object *object)
Object * GetInternalField(int index)
MUST_USE_RESULT MaybeObject * AddNumberEntry(uint32_t key, Object *value)
void IterateBody(InstanceType type, int object_size, ObjectVisitor *v)
bool has_instance_call_handler()
static const int kAlignedSize
void set_has_instance_call_handler()
bool has_slow_elements_kind()
virtual MUST_USE_RESULT MaybeObject * AsObject()=0
static int set(int value, int bit_position, bool v)
MUST_USE_RESULT MaybeObject * SetPropertyWithCallback(Object *structure, String *name, Object *value, JSObject *holder, StrictModeFlag strict_mode)
Object * ValueAt(int entry)
Object * InObjectPropertyAtPut(int index, Object *value, WriteBarrierMode mode=UPDATE_WRITE_BARRIER)
static const int kMaxNumberKeyIndex
bool LookupSymbolIfExists(String *str, String **symbol)
Object ** GetTransitionsSlot()
MUST_USE_RESULT MaybeObject * LookupTwoByteSymbol(Vector< const uc16 > str, Object **s)
static const int kHeaderSize
kPropertyAccessorsOffset kNamedPropertyHandlerOffset kInstanceTemplateOffset kAccessCheckInfoOffset kEvalFrominstructionsOffsetOffset this_property_assignments
bool HasFastSmiOrObjectElements()
const uint32_t kNotStringTag
static void NoWriteBarrierSet(FixedArray *array, int index, Object *value)
kPropertyAccessorsOffset kNamedPropertyHandlerOffset kInstanceTemplateOffset kAccessCheckInfoOffset kEvalFrominstructionsOffsetOffset kThisPropertyAssignmentsOffset kNeedsAccessCheckBit kIsExpressionBit has_only_simple_this_property_assignments
static const uint32_t kMaxGap
bool HasNamedInterceptor()
String * GetKey(int descriptor_number)
static const int kNonMantissaBitsInTopWord
bool HasNonStrictArgumentsElements()
MUST_USE_RESULT MaybeObject * GetIdentityHash(CreationFlag flag)
void set_the_hole(int index)
void SetPcAndState(int index, Smi *offset)
void Iterate(ObjectVisitor *v)
#define MAP_POINTER_ALIGN(value)
MUST_USE_RESULT MaybeObject * AddFastPropertyUsingMap(Map *new_map, String *name, Object *value)
Object * GetElementNoExceptionThrown(uint32_t index)
static const int kEntrySize
static int SizeOf(Map *map, HeapObject *object)
MUST_USE_RESULT MaybeObject * SetFastElement(uint32_t index, Object *value, StrictModeFlag strict_mode, bool check_prototype)
virtual void IterateInstance(ObjectVisitor *v)
static int LengthFor(int size_in_bytes)
STATIC_ASSERT((FixedDoubleArray::kHeaderSize &kDoubleAlignmentMask)==0)
static SeededNumberDictionary * cast(Object *obj)
static const int kMaxLength
static const int kFactoryIndex
void LookupRealNamedPropertyInPrototypes(String *name, LookupResult *result)
int NumberOfElementsFilterAttributes(PropertyAttributes filter)
bool has_fast_smi_elements()
static bool IsMatch(HashTableKey *key, Object *value)
static const int kCapacityOffset
MUST_USE_RESULT MaybeObject * AddConstantFunctionProperty(String *name, JSFunction *function, PropertyAttributes attributes)
MUST_USE_RESULT MaybeObject * AddFastProperty(String *name, Object *value, PropertyAttributes attributes, StoreFromKeyed store_mode=MAY_BE_STORE_FROM_KEYED)
const uint32_t kIsSymbolMask
void set_unchecked(int index, Smi *value)
Object ** GetEnumCacheSlot()
static const int kExponentShift
DECL_ACCESSORS(external_pointer, void) static inline ExternalArray *cast(Object *obj)
bool IsStringObjectWithCharacterAt(uint32_t index)
static const int kValueOffset
MUST_USE_RESULT MaybeObject * Put(FixedArray *key, Map *value)
void set_undefined(int index)
MUST_USE_RESULT MaybeObject * GetLocalPropertyPostInterceptor(JSReceiver *receiver, String *name, PropertyAttributes *attributes)
static const int kRequiresSlowElementsMask
#define DECLARE_ENUM(enum_item, ignore1, ignore2)
static uint32_t SeededHash(uint32_t key, uint32_t seed)
void SetNumberOfProtoTransitions(int value)
void SetNumberOfElements(int nof)
MUST_USE_RESULT MaybeObject * SetFastDoubleElement(uint32_t index, Object *value, StrictModeFlag strict_mode, bool check_prototype=true)
static const int kMapInstanceTypeOffset
static const int kFirstOffset
static MUST_USE_RESULT MaybeObject * AsObject(HashTableKey *key)
static Failure * RetryAfterGC()
void IteratePointers(ObjectVisitor *v, int start, int end)
MUST_USE_RESULT MaybeObject * AddEntry(Key key, Object *value, PropertyDetails details, uint32_t hash)
void GetLocalPropertyNames(FixedArray *storage, int index)
static bool IsValid(intptr_t value)
static Failure * cast(MaybeObject *object)
const uint32_t kIsIndirectStringMask
static const int kMinValue
bool ToArrayIndex(uint32_t *index)
MUST_USE_RESULT MaybeObject * ResetElements()
ElementsKind GetElementsKind()
Smi * PcAndState(int index)
static Handle< Map > GetElementsTransitionMap(Handle< JSObject > object, ElementsKind to_kind)
static StrictModeFlag GetStrictMode(ExtraICState extra_ic_state)
static const int kPrefixSize
kPropertyAccessorsOffset kNamedPropertyHandlerOffset kInstanceTemplateOffset kAccessCheckInfoOffset kEvalFrominstructionsOffsetOffset kThisPropertyAssignmentsOffset kNeedsAccessCheckBit is_expression
MUST_USE_RESULT MaybeObject * DeleteElement(uint32_t index, DeleteMode mode)
kPropertyAccessorsOffset kNamedPropertyHandlerOffset kInstanceTemplateOffset kAccessCheckInfoOffset kEvalFrominstructionsOffsetOffset kThisPropertyAssignmentsOffset kNeedsAccessCheckBit kIsExpressionBit compiler_hints
uint32_t HashForObject(Key key, Object *object)
FixedBodyDescriptor< kPointerFieldsBeginOffset, kPointerFieldsEndOffset, kSize > BodyDescriptor
static UnseededNumberDictionary * cast(Object *obj)
static const int kMaxInstanceSize
int GetFieldIndex(int descriptor_number)
static const int kPrefixSize
bool IsAligned(T value, U alignment)
static const uint32_t kRequiresSlowElementsLimit
MUST_USE_RESULT MaybeObject * GenerateNewEnumerationIndices()
#define DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName)
void LookupRealNamedProperty(String *name, LookupResult *result)
bool HasElement(uint32_t index)
const uint32_t kAsciiDataHintMask
AllocationSpace allocation_space() const
static void TransformToFastProperties(Handle< JSObject > object, int unused_property_fields)
bool HasExternalUnsignedIntElements()
const uintptr_t kUintptrAllBitsSet
INLINE(static uint32_t GetProbeOffset(uint32_t n))
static ExtraICState ComputeExtraICState(KeyedAccessGrowMode grow_mode, StrictModeFlag strict_mode)
void SetCapacity(int capacity)
const uint32_t kShortcutTypeMask
bool ShouldConvertToFastDoubleElements(bool *has_smi_only_elements)
static Handle< Object > SetLocalPropertyIgnoreAttributes(Handle< JSObject > object, Handle< String > key, Handle< Object > value, PropertyAttributes attributes)
static const int kAlignedSize
STATIC_CHECK(kHeaderSize==Internals::kJSObjectHeaderSize)
Vector< const uc16 > ToUC16Vector()
static const int kEntrySize
uint32_t FindInsertionEntry(uint32_t hash)
static void IterateBody(HeapObject *obj, int object_size)
kPropertyAccessorsOffset named_property_handler
SetFastElementsCapacitySmiMode
static const int kDescriptorSize
static const int kPropertiesOffset
T RoundUp(T x, intptr_t m)
static const int kDescriptorKey
DECL_ACCESSORS(properties, FixedArray) inline void initialize_properties()
bool HasHeapAllocatedLocals()
static FixedDoubleArray * cast(Object *obj)
static MUST_USE_RESULT Handle< Object > SetElement(Handle< JSObject > object, uint32_t index, Handle< Object > value, PropertyAttributes attr, StrictModeFlag strict_mode, SetPropertyMode set_mode=SET_PROPERTY)
Object * FastPropertyAt(int index)
bool IsFastSmiElementsKind(ElementsKind kind)
static int OffsetOfElementAt(int index)
#define FIELD_ACCESSORS(name)
void set_length(int value)
const uint32_t kShortExternalStringTag
MUST_USE_RESULT MaybeObject * SetFastElementsCapacityAndLength(int capacity, int length, SetFastElementsCapacitySmiMode smi_mode)
Object * FastPropertyAtPut(int index, Object *value)
static const int kOddballType
static const bool kIsEnumerable
static int GetIdentityHash(Handle< JSObject > obj)
static int SizeFor(int length)
bool HasRealNamedCallbackProperty(String *key)
static const int kElementsOffset
InterceptorInfo * GetNamedInterceptor()
void SortPairs(FixedArray *numbers, uint32_t len)
WriteBarrierMode GetWriteBarrierMode(const AssertNoAllocation &)
static const bool UsesSeed
MUST_USE_RESULT MaybeObject * Shrink(Key key)
PropertyDetails GetDetails(int descriptor_number)
Object ** GetFirstElementAddress()
static uint32_t HashForObject(uint32_t key, Object *object)
void SetNumberOfDeletedElements(int nod)
MUST_USE_RESULT MaybeObject * GetPropertyPostInterceptor(JSReceiver *receiver, String *name, PropertyAttributes *attributes)
MUST_USE_RESULT MaybeObject * Copy()
const uint32_t kStringTag
static uint32_t HashForObject(String *key, Object *object)
Object * ToObjectUnchecked()
static ScopeInfo * Empty()
double get_scalar(int index)
Object * Lookup(Object *key)
static MUST_USE_RESULT MaybeObject * Allocate(int at_least_space_for)
void Lookup(String *name, LookupResult *result)
void set_has_indexed_interceptor()
void set_map_no_write_barrier(Map *value)
MUST_USE_RESULT MaybeObject * SetPropertyPostInterceptor(String *name, Object *value, PropertyAttributes attributes, StrictModeFlag strict_mode)
bool LookupTwoCharsSymbolIfExists(uint32_t c1, uint32_t c2, String **symbol)
static const int kPaddingOffset
kPropertyAccessorsOffset kNamedPropertyHandlerOffset kInstanceTemplateOffset kAccessCheckInfoOffset kEvalFrominstructionsOffsetOffset kThisPropertyAssignmentsOffset needs_access_check
VectorIterator(T *d, int l)
static int OffsetOfElementAt(int index)
Object * SlowReverseLookup(Object *value)
static uint32_t HashForObject(HashTableKey *key, Object *object)
int FunctionContextSlotIndex(String *name, VariableMode *mode)
PropertyAttributes GetPropertyAttributeWithReceiver(JSReceiver *receiver, String *name)
static int SizeFor(int length)
#define T(name, string, precedence)
bool IsFastSmiOrObjectElementsKind(ElementsKind kind)
void SetNextEnumerationIndex(int index)
static uint32_t SeededHashForObject(Key key, uint32_t seed, Object *object)
static JSFunctionResultCache * cast(Object *obj)
LocalElementType HasLocalElement(uint32_t index)
const int kElementsKindCount
static bool IsMatch(Object *key, Object *other)
static const int kHeaderSize
PropertyNormalizationMode
void set(int index, double value)
static const int kEnumerationIndexOffset
MUST_USE_RESULT MaybeObject * SetFastDoubleElementsCapacityAndLength(int capacity, int length)
bool HasProperty(String *name)
static int SizeFor(int length)
static const int kMapOffset
bool has_named_interceptor()
static const int kMantissaBitsInTopWord
bool ShouldConvertToSlowElements(int new_capacity)
MUST_USE_RESULT MaybeObject * DeleteNormalizedProperty(String *name, DeleteMode mode)
bool is_the_hole(int index)
static const int kEnumCacheBridgeCacheOffset
const uint32_t kIsNotStringMask
String * StackLocalName(int var)
bool IsOutOfMemoryException() const
void LocalLookup(String *name, LookupResult *result)
void IteratePrefix(ObjectVisitor *visitor)
VariableMode ContextLocalMode(int var)
static HeapNumber * cast(Object *obj)
MUST_USE_RESULT MaybeObject * NormalizeElements()
static StringDictionary * cast(Object *obj)
void set_value(double value)
const uint32_t kSlicedNotConsMask
static const int kLengthOffset
static uint32_t HashForObject(HashTableKey *key, Object *object)
bool is_compare_ic_stub()
FixedBodyDescriptor< kHandlerOffset, kPaddingOffset, kSize > BodyDescriptor
static uint32_t HashForObject(Key key, Object *object)
static ObjectHashTable * cast(Object *obj)
FixedBodyDescriptor< kFirstOffset, kSecondOffset+kPointerSize, kSize > BodyDescriptor
static const int kHeapObjectMapOffset
static const int kEntrySize
bool is_the_hole(int index)
static const int kBitField3StorageOffset
static const int kPrefixStartIndex
AccessorDescriptor * GetCallbacks(int descriptor_number)
InterceptorInfo * GetIndexedInterceptor()
static int SizeFor(int length)
#define OBJECT_POINTER_ALIGN(value)
#define IS_POWER_OF_TWO(x)
Object * ToObjectChecked()
bool has_fast_smi_or_object_elements()
INLINE(static HeapObject *EnsureDoubleAligned(Heap *heap, HeapObject *object, int size))
void SetInternalField(int index, Object *value)
PropertyType GetType(int descriptor_number)
static Vector< T > cast(Vector< S > input)
static Object * cast(Object *value)
name_should_print_as_anonymous
bool has_indexed_interceptor()
FixedBodyDescriptor< kValueOffset, kValueOffset+kPointerSize, kSize > BodyDescriptor
int NextEnumerationIndex()
static Handle< Object > DeleteProperty(Handle< JSObject > obj, Handle< String > name)
MUST_USE_RESULT MaybeObject * SetPropertyForResult(LookupResult *result, String *key, Object *value, PropertyAttributes attributes, StrictModeFlag strict_mode, StoreFromKeyed store_mode)
STATIC_CHECK(kMapOffset==Internals::kHeapObjectMapOffset)
static const int kEndOffset
static const int kNumberOfElementsIndex
static bool IsMatch(HashTableKey *key, Object *value)
static const int kEntriesIndex
void HeapObjectShortPrint(StringStream *accumulator)
static const uint32_t kSignMask
v8::String::ExternalAsciiStringResource Resource
PropertyDetails DetailsAt(int entry)
Object * DeleteProperty(int entry, JSObject::DeleteMode mode)
MUST_USE_RESULT MaybeObject * SetDictionaryElement(uint32_t index, Object *value, PropertyAttributes attributes, StrictModeFlag strict_mode, bool check_prototype, SetPropertyMode set_mode=SET_PROPERTY)
PropertyAttributes GetPropertyAttributeWithFailedAccessCheck(Object *receiver, LookupResult *result, String *name, bool continue_search)
String * LocalName(int var)
MUST_USE_RESULT MaybeObject * SetPropertyWithInterceptor(String *name, Object *value, PropertyAttributes attributes, StrictModeFlag strict_mode)
static int SizeFor(int length)
static const int kMaxNumberOfDescriptors
static const int kCapacityIndex
static JSReceiver * cast(Object *obj)
static const int kHeaderSize
uint32_t HashSequentialString(const schar *chars, int length, uint32_t seed)
bool ShouldConvertToFastElements()
static const int kFieldsAdded
static const int kMaxUncheckedOldFastElementsLength
MUST_USE_RESULT MaybeObject * DefineFastAccessor(String *name, AccessorComponent component, Object *accessor, PropertyAttributes attributes)
void ValueAtPut(int entry, Object *value)
int number_of_descriptors()
static const bool kIsEnumerable
kPropertyAccessorsOffset kNamedPropertyHandlerOffset kInstanceTemplateOffset kAccessCheckInfoOffset kEvalFrominstructionsOffsetOffset kThisPropertyAssignmentsOffset flag
bool is_keyed_store_stub()
static uint32_t HashForObject(HashTableKey *key, Object *object)
static void NoIncrementalWriteBarrierSet(FixedArray *array, int index, Object *value)
String * ContextLocalName(int var)
MUST_USE_RESULT MaybeObject * GetProperty(String *key)
#define ASSERT_EQ(v1, v2)
static const int kNextEnumerationIndexIndex
activate correct semantics for inheriting readonliness enable harmony semantics for typeof enable harmony enable harmony proxies enable all harmony harmony_scoping harmony_proxies harmony_scoping tracks arrays with only smi values automatically unbox arrays of doubles use crankshaft use hydrogen range analysis use hydrogen global value numbering use function inlining maximum number of AST nodes considered for a single inlining loop invariant code motion print statistics for hydrogen trace generated IR for specified phases trace register allocator trace range analysis trace representation types environment for every instruction put a break point before deoptimizing polymorphic inlining perform array bounds checks elimination trace on stack replacement optimize closures functions with arguments object optimize functions containing for in loops profiler considers IC stability primitive functions trigger their own optimization re try self optimization if it failed insert an interrupt check at function exit execution budget before interrupt is triggered call count before self optimization self_optimization count_based_interrupts weighted_back_edges trace_opt emit comments in code disassembly enable use of SSE3 instructions if available enable use of CMOV instruction if available enable use of SAHF instruction if enable use of VFP3 instructions if available this implies enabling ARMv7 enable use of ARMv7 instructions if enable use of MIPS FPU instructions if NULL
static MUST_USE_RESULT MaybeObject * AsObject(HashTableKey *key)
bool HasFastObjectElements()
static bool IsMatch(HashTableKey *key, Object *value)
Failure * ToFailureUnchecked()
MUST_USE_RESULT MaybeObject * Add(Object *key)
static const int kElementsKindShift
bool is_to_boolean_ic_stub()
static const int kMaxFastProperties
static const int kEntrySize
static HeapObject * FromAddress(Address address)
static void IterateBody(HeapObject *obj)
bool HasFastHoleyElements()
bool requires_slow_elements()
static const uint32_t kMantissaMask
static MUST_USE_RESULT MaybeObject * AsObject(HashTableKey *key)
void set(int index, byte value)
MUST_USE_RESULT MaybeObject * OptimizeAsPrototype()
void SetDetailsUnchecked(int descriptor_number, Smi *value)
static uint32_t NextProbe(uint32_t last, uint32_t number, uint32_t size)
static double canonical_not_the_hole_nan_as_double()
virtual void VisitSharedFunctionInfo(SharedFunctionInfo *shared)
bool TooManyFastProperties(int properties, StoreFromKeyed store_mode)
#define SLOT_ADDR(obj, offset)
#define DECL_ACCESSORS(name, type)
virtual bool IsMatch(Object *other)=0
static FixedArray * cast(Object *obj)
static const int kUndefinedOddballKind
MUST_USE_RESULT MaybeObject * GetPropertyWithInterceptor(JSReceiver *receiver, String *name, PropertyAttributes *attributes)
static const unsigned kMaxOneByteChar
#define HEAP_OBJECT_TYPE_LIST(V)
String * ParameterName(int var)
bool IsProperty(int descriptor_number)
static const int kHeaderSize
static const int kEnumCacheBridgeCacheIndex
static const int kDescriptorValue
static Smi * set(Smi *smi, int bit_position, bool v)
bool ToObject(Object **obj)
Object * SetNormalizedProperty(LookupResult *result, Object *value)
static HashTable * cast(Object *obj)
ElementsKind elements_kind()
MUST_USE_RESULT MaybeObject * AtNumberPut(uint32_t key, Object *value)
Object * GetHiddenProperty(String *key)
static int LengthOfFixedArray(int cell_count)
static Handle< Object > GetElement(Handle< Object > object, uint32_t index)
static void NormalizeProperties(Handle< JSObject > object, PropertyNormalizationMode mode, int expected_additional_properties)
const uint32_t kIsIndirectStringTag
void SetEntry(int entry, Object *key, Object *value)
virtual void VisitEmbedderReference(Object **p, uint16_t class_id)
MUST_USE_RESULT MaybeObject * AddSlowProperty(String *name, Object *value, PropertyAttributes attributes)
Object * GetCallbacksObject(int descriptor_number)
static const int kPrototypeOffset
int FindEntry(String *key)
static const int kFingerIndex
Address GetDataStartAddress()
static MUST_USE_RESULT Handle< SeededNumberDictionary > Set(Handle< SeededNumberDictionary > dictionary, uint32_t index, Handle< Object > value, PropertyDetails details)
static uint32_t Hash(String *key)
void IterateElements(ObjectVisitor *visitor)
bool IsNullDescriptor(int descriptor_number)
bool HasDictionaryElements()
MUST_USE_RESULT MaybeObject * Put(Object *key, Object *value)
ElementsAccessor * GetElementsAccessor()
bool IsInstanceOf(FunctionTemplateInfo *type)
bool HasFastDoubleElements()
kPropertyAccessorsOffset kNamedPropertyHandlerOffset kInstanceTemplateOffset kAccessCheckInfoOffset kEvalFrominstructionsOffsetOffset kThisPropertyAssignmentsOffset kNeedsAccessCheckBit kIsExpressionBit kHasOnlySimpleThisPropertyAssignments kUsesArguments kFormalParameterCountOffset kStartPositionAndTypeOffset kCompilerHintsOffset stress_deopt_counter
static const int kMaxLength
static uint32_t HashForObject(HashTableKey *key, Object *object)
MUST_USE_RESULT MaybeObject * SetPrototype(Object *value, bool skip_hidden_prototypes)
static uint32_t GetProbe(uint32_t hash, uint32_t number, uint32_t size)
bool HasFastArgumentsElements()
static const int kElementsStartOffset
MUST_USE_RESULT MaybeObject * LookupString(String *key, Object **s)
void set_bit_field3_storage(int value)
static MUST_USE_RESULT MaybeObject * AsObject(uint32_t key)
static void UpdateMapCodeCache(Handle< JSObject > object, Handle< String > name, Handle< Code > code)
void SwapPairs(FixedArray *numbers, int i, int j)
void set_finger_index(int finger_index)
void set_map_word(MapWord map_word)
void set(AccessorComponent component, Object *value)
static int LengthOfFixedArray(int deopt_points)
static uint32_t Hash(Key key)
static NormalizedMapCache * cast(Object *obj)
static const int kMaxCapacity
bool HasIndexedInterceptor()
bool HasExternalIntElements()
int NumberOfLocalProperties(PropertyAttributes filter=NONE)
static int SizeFor(int body_size)
const uint32_t kSymbolTag
static const int kEntrySize
bool HasLocalProperty(String *name)
const int kFailureTypeTagMask
MUST_USE_RESULT MaybeObject * AtPut(Key key, Object *value)
static const int kMaxUncheckedFastElementsLength
void LocalLookupRealNamedProperty(String *name, LookupResult *result)
bool is_keyed_call_stub()
Handle< Object > SetPrototype(Handle< JSFunction > function, Handle< Object > prototype)
static const int kEnumCacheBridgeEnumOffset
bool HasHiddenProperties()
static const int kEnumCacheBridgeEnumIndex
int NumberOfEnumElements()
static const int kForeignType
int NextEnumerationIndex()
const uint32_t kAsciiStringTag
int NumberOfDeletedElements()
Smi * GenerateIdentityHash()
static const int kEnumerationIndexIndex
static const int kExponentBits
virtual void VisitExternalReferences(Address *start, Address *end)
MUST_USE_RESULT MaybeObject * DeleteProperty(String *name, DeleteMode mode)
#define FUNCTIONS_WITH_ID_LIST(V)
static const bool UsesSeed
MUST_USE_RESULT MaybeObject * Shrink(Key key)
MUST_USE_RESULT MaybeObject * GetHash(CreationFlag flag)
static uint32_t FirstProbe(uint32_t hash, uint32_t size)
bool HasDictionaryArgumentsElements()
void JSObjectShortPrint(StringStream *accumulator)
static int NewElementsCapacity(int old_capacity)
#define DEFINE_ENTRY_ACCESSORS(name, type)
static const int kCacheSizeOffset
static FixedArrayBase * cast(Object *object)
MUST_USE_RESULT MaybeObject * LookupSymbol(Vector< const char > str, Object **s)
bool ContainsOnlySmisOrHoles()
static const int kTransitionsIndex
static const int kInitialMaxFastElementArray
ReadBlockBuffer(unibrow::byte *util_buffer_, unsigned cursor_, unsigned capacity_, unsigned remaining_)
static const int kMaxValue
bool HasExternalUnsignedByteElements()
static const int kMantissaBits
static const int kHeaderSize
LanguageMode language_mode()
static const int kEntrySize
static const int kNotFound
static void DefineAccessor(Handle< JSObject > object, Handle< String > name, Handle< Object > getter, Handle< Object > setter, PropertyAttributes attributes)
bool has_dictionary_elements()
const uc32 kMaxAsciiCharCode
MUST_USE_RESULT MaybeObject * Remove(Object *key)
static const int kNullOddballKind
INLINE(bool IsSpecObject())
Object ** GetValueSlot(int descriptor_number)
StringDictionary * property_dictionary()
static uint32_t SeededHashForObject(uint32_t key, uint32_t seed, Object *object)
static int saved_code_index(bool is_ascii)
MUST_USE_RESULT MaybeObject * CopySize(int new_length)
#define ASSERT_SIZE_TAG_ALIGNED(size)
MUST_USE_RESULT MaybeObject * ReplaceSlowProperty(String *name, Object *value, PropertyAttributes attributes)
static const int kExponentOffset
void UpdateMaxNumberKey(uint32_t key)
void SetNextEnumerationIndex(int value)
void ElementsRemoved(int n)
static ObjectHashSet * cast(Object *obj)
static JSObject * cast(Object *obj)
kPropertyAccessorsOffset kNamedPropertyHandlerOffset kInstanceTemplateOffset access_check_info
int64_t get_representation(int index)
bool HasExternalArrayElements()
bool IsDictionaryElementsKind(ElementsKind kind)
static const int kMaxSize
static MUST_USE_RESULT MaybeObject * Allocate(int number_of_descriptors, SharedMode shared_mode)
PropertyAttributes GetLocalPropertyAttribute(String *name)
bool HasExternalFloatElements()
static int OffsetOfCodeWithId(Builtins::JavaScript id)
void VisitExternalReference(Address *p)
uint32_t max_number_key()
kPropertyAccessorsOffset kNamedPropertyHandlerOffset kInstanceTemplateOffset kAccessCheckInfoOffset kEvalFrominstructionsOffsetOffset kThisPropertyAssignmentsOffset kNeedsAccessCheckBit start_position_and_type
static const int kAlignedSize
bool IsFastDoubleElementsKind(ElementsKind kind)
MUST_USE_RESULT MaybeObject * EnsureCanContainElements(Object **elements, uint32_t count, EnsureElementsMode mode)
static const int kFirstIndex
bool is_keyed_load_stub()
const uint32_t kStringEncodingMask
Object * Lookup(FixedArray *key)
MUST_USE_RESULT MaybeObject * AtNumberPut(uint32_t key, Object *value)
static MUST_USE_RESULT MaybeObject * AsObject(HashTableKey *key)
static const int kJSObjectType
static MUST_USE_RESULT Handle< UnseededNumberDictionary > Set(Handle< UnseededNumberDictionary > dictionary, uint32_t index, Handle< Object > value)
void SetComponents(Object *getter, Object *setter)
#define DECLARE_STRUCT_PREDICATE(NAME, Name, name)
static int ComputeCapacity(int at_least_space_for)
FixedBodyDescriptor< kHandlerOffset, kConstructTrapOffset+kPointerSize, kSize > BodyDescriptor
WhitenessWitness(DescriptorArray *array)
void InitializeBody(Map *map, Object *pre_allocated_value, Object *filler_value)
String * constructor_name()
void set_is_hidden_prototype()
static const int kForeignAddressOffset
void set_requires_slow_elements()
static const int kMantissaOffset
#define DECL_BOOLEAN_ACCESSORS(name)
static const int kDescriptorDetails
static const int kBitField3StorageIndex
Object * GetPropertyNoExceptionThrown(String *key)