40 #if V8_TARGET_ARCH_ARM64
42 #elif V8_TARGET_ARCH_ARM
44 #elif V8_TARGET_ARCH_MIPS
208 static_cast<int>(store_mode) + kGrowICDelta);
342 #define INSTANCE_TYPE_LIST(V) \
344 V(ASCII_STRING_TYPE) \
345 V(CONS_STRING_TYPE) \
346 V(CONS_ASCII_STRING_TYPE) \
347 V(SLICED_STRING_TYPE) \
348 V(SLICED_ASCII_STRING_TYPE) \
349 V(EXTERNAL_STRING_TYPE) \
350 V(EXTERNAL_ASCII_STRING_TYPE) \
351 V(EXTERNAL_STRING_WITH_ONE_BYTE_DATA_TYPE) \
352 V(SHORT_EXTERNAL_STRING_TYPE) \
353 V(SHORT_EXTERNAL_ASCII_STRING_TYPE) \
354 V(SHORT_EXTERNAL_STRING_WITH_ONE_BYTE_DATA_TYPE) \
356 V(INTERNALIZED_STRING_TYPE) \
357 V(ASCII_INTERNALIZED_STRING_TYPE) \
358 V(CONS_INTERNALIZED_STRING_TYPE) \
359 V(CONS_ASCII_INTERNALIZED_STRING_TYPE) \
360 V(EXTERNAL_INTERNALIZED_STRING_TYPE) \
361 V(EXTERNAL_ASCII_INTERNALIZED_STRING_TYPE) \
362 V(EXTERNAL_INTERNALIZED_STRING_WITH_ONE_BYTE_DATA_TYPE) \
363 V(SHORT_EXTERNAL_INTERNALIZED_STRING_TYPE) \
364 V(SHORT_EXTERNAL_ASCII_INTERNALIZED_STRING_TYPE) \
365 V(SHORT_EXTERNAL_INTERNALIZED_STRING_WITH_ONE_BYTE_DATA_TYPE) \
373 V(PROPERTY_CELL_TYPE) \
375 V(HEAP_NUMBER_TYPE) \
382 V(EXTERNAL_INT8_ARRAY_TYPE) \
383 V(EXTERNAL_UINT8_ARRAY_TYPE) \
384 V(EXTERNAL_INT16_ARRAY_TYPE) \
385 V(EXTERNAL_UINT16_ARRAY_TYPE) \
386 V(EXTERNAL_INT32_ARRAY_TYPE) \
387 V(EXTERNAL_UINT32_ARRAY_TYPE) \
388 V(EXTERNAL_FLOAT32_ARRAY_TYPE) \
389 V(EXTERNAL_FLOAT64_ARRAY_TYPE) \
390 V(EXTERNAL_UINT8_CLAMPED_ARRAY_TYPE) \
392 V(FIXED_INT8_ARRAY_TYPE) \
393 V(FIXED_UINT8_ARRAY_TYPE) \
394 V(FIXED_INT16_ARRAY_TYPE) \
395 V(FIXED_UINT16_ARRAY_TYPE) \
396 V(FIXED_INT32_ARRAY_TYPE) \
397 V(FIXED_UINT32_ARRAY_TYPE) \
398 V(FIXED_FLOAT32_ARRAY_TYPE) \
399 V(FIXED_FLOAT64_ARRAY_TYPE) \
400 V(FIXED_UINT8_CLAMPED_ARRAY_TYPE) \
404 V(DECLARED_ACCESSOR_DESCRIPTOR_TYPE) \
405 V(DECLARED_ACCESSOR_INFO_TYPE) \
406 V(EXECUTABLE_ACCESSOR_INFO_TYPE) \
407 V(ACCESSOR_PAIR_TYPE) \
408 V(ACCESS_CHECK_INFO_TYPE) \
409 V(INTERCEPTOR_INFO_TYPE) \
410 V(CALL_HANDLER_INFO_TYPE) \
411 V(FUNCTION_TEMPLATE_INFO_TYPE) \
412 V(OBJECT_TEMPLATE_INFO_TYPE) \
413 V(SIGNATURE_INFO_TYPE) \
414 V(TYPE_SWITCH_INFO_TYPE) \
415 V(ALLOCATION_MEMENTO_TYPE) \
416 V(ALLOCATION_SITE_TYPE) \
419 V(POLYMORPHIC_CODE_CACHE_TYPE) \
420 V(TYPE_FEEDBACK_INFO_TYPE) \
421 V(ALIASED_ARGUMENTS_ENTRY_TYPE) \
424 V(FIXED_ARRAY_TYPE) \
425 V(FIXED_DOUBLE_ARRAY_TYPE) \
426 V(CONSTANT_POOL_ARRAY_TYPE) \
427 V(SHARED_FUNCTION_INFO_TYPE) \
429 V(JS_MESSAGE_OBJECT_TYPE) \
434 V(JS_CONTEXT_EXTENSION_OBJECT_TYPE) \
435 V(JS_GENERATOR_OBJECT_TYPE) \
437 V(JS_GLOBAL_OBJECT_TYPE) \
438 V(JS_BUILTINS_OBJECT_TYPE) \
439 V(JS_GLOBAL_PROXY_TYPE) \
441 V(JS_ARRAY_BUFFER_TYPE) \
442 V(JS_TYPED_ARRAY_TYPE) \
443 V(JS_DATA_VIEW_TYPE) \
447 V(JS_WEAK_MAP_TYPE) \
448 V(JS_WEAK_SET_TYPE) \
451 V(JS_FUNCTION_TYPE) \
452 V(JS_FUNCTION_PROXY_TYPE) \
454 V(BREAK_POINT_INFO_TYPE)
459 #define STRING_TYPE_LIST(V) \
461 kVariableSizeSentinel, \
464 V(ASCII_STRING_TYPE, \
465 kVariableSizeSentinel, \
468 V(CONS_STRING_TYPE, \
472 V(CONS_ASCII_STRING_TYPE, \
476 V(SLICED_STRING_TYPE, \
477 SlicedString::kSize, \
480 V(SLICED_ASCII_STRING_TYPE, \
481 SlicedString::kSize, \
482 sliced_ascii_string, \
484 V(EXTERNAL_STRING_TYPE, \
485 ExternalTwoByteString::kSize, \
488 V(EXTERNAL_ASCII_STRING_TYPE, \
489 ExternalAsciiString::kSize, \
490 external_ascii_string, \
491 ExternalAsciiString) \
492 V(EXTERNAL_STRING_WITH_ONE_BYTE_DATA_TYPE, \
493 ExternalTwoByteString::kSize, \
494 external_string_with_one_byte_data, \
495 ExternalStringWithOneByteData) \
496 V(SHORT_EXTERNAL_STRING_TYPE, \
497 ExternalTwoByteString::kShortSize, \
498 short_external_string, \
499 ShortExternalString) \
500 V(SHORT_EXTERNAL_ASCII_STRING_TYPE, \
501 ExternalAsciiString::kShortSize, \
502 short_external_ascii_string, \
503 ShortExternalAsciiString) \
504 V(SHORT_EXTERNAL_STRING_WITH_ONE_BYTE_DATA_TYPE, \
505 ExternalTwoByteString::kShortSize, \
506 short_external_string_with_one_byte_data, \
507 ShortExternalStringWithOneByteData) \
509 V(INTERNALIZED_STRING_TYPE, \
510 kVariableSizeSentinel, \
511 internalized_string, \
512 InternalizedString) \
513 V(ASCII_INTERNALIZED_STRING_TYPE, \
514 kVariableSizeSentinel, \
515 ascii_internalized_string, \
516 AsciiInternalizedString) \
517 V(CONS_INTERNALIZED_STRING_TYPE, \
519 cons_internalized_string, \
520 ConsInternalizedString) \
521 V(CONS_ASCII_INTERNALIZED_STRING_TYPE, \
523 cons_ascii_internalized_string, \
524 ConsAsciiInternalizedString) \
525 V(EXTERNAL_INTERNALIZED_STRING_TYPE, \
526 ExternalTwoByteString::kSize, \
527 external_internalized_string, \
528 ExternalInternalizedString) \
529 V(EXTERNAL_ASCII_INTERNALIZED_STRING_TYPE, \
530 ExternalAsciiString::kSize, \
531 external_ascii_internalized_string, \
532 ExternalAsciiInternalizedString) \
533 V(EXTERNAL_INTERNALIZED_STRING_WITH_ONE_BYTE_DATA_TYPE, \
534 ExternalTwoByteString::kSize, \
535 external_internalized_string_with_one_byte_data, \
536 ExternalInternalizedStringWithOneByteData) \
537 V(SHORT_EXTERNAL_INTERNALIZED_STRING_TYPE, \
538 ExternalTwoByteString::kShortSize, \
539 short_external_internalized_string, \
540 ShortExternalInternalizedString) \
541 V(SHORT_EXTERNAL_ASCII_INTERNALIZED_STRING_TYPE, \
542 ExternalAsciiString::kShortSize, \
543 short_external_ascii_internalized_string, \
544 ShortExternalAsciiInternalizedString) \
545 V(SHORT_EXTERNAL_INTERNALIZED_STRING_WITH_ONE_BYTE_DATA_TYPE, \
546 ExternalTwoByteString::kShortSize, \
547 short_external_internalized_string_with_one_byte_data, \
548 ShortExternalInternalizedStringWithOneByteData) \
559 #define STRUCT_LIST_ALL(V) \
561 V(DECLARED_ACCESSOR_DESCRIPTOR, \
562 DeclaredAccessorDescriptor, \
563 declared_accessor_descriptor) \
564 V(DECLARED_ACCESSOR_INFO, DeclaredAccessorInfo, declared_accessor_info) \
565 V(EXECUTABLE_ACCESSOR_INFO, ExecutableAccessorInfo, executable_accessor_info)\
566 V(ACCESSOR_PAIR, AccessorPair, accessor_pair) \
567 V(ACCESS_CHECK_INFO, AccessCheckInfo, access_check_info) \
568 V(INTERCEPTOR_INFO, InterceptorInfo, interceptor_info) \
569 V(CALL_HANDLER_INFO, CallHandlerInfo, call_handler_info) \
570 V(FUNCTION_TEMPLATE_INFO, FunctionTemplateInfo, function_template_info) \
571 V(OBJECT_TEMPLATE_INFO, ObjectTemplateInfo, object_template_info) \
572 V(SIGNATURE_INFO, SignatureInfo, signature_info) \
573 V(TYPE_SWITCH_INFO, TypeSwitchInfo, type_switch_info) \
574 V(SCRIPT, Script, script) \
575 V(ALLOCATION_SITE, AllocationSite, allocation_site) \
576 V(ALLOCATION_MEMENTO, AllocationMemento, allocation_memento) \
577 V(CODE_CACHE, CodeCache, code_cache) \
578 V(POLYMORPHIC_CODE_CACHE, PolymorphicCodeCache, polymorphic_code_cache) \
579 V(TYPE_FEEDBACK_INFO, TypeFeedbackInfo, type_feedback_info) \
580 V(ALIASED_ARGUMENTS_ENTRY, AliasedArgumentsEntry, aliased_arguments_entry)
582 #ifdef ENABLE_DEBUGGER_SUPPORT
583 #define STRUCT_LIST_DEBUGGER(V) \
584 V(DEBUG_INFO, DebugInfo, debug_info) \
585 V(BREAK_POINT_INFO, BreakPointInfo, break_point_info)
587 #define STRUCT_LIST_DEBUGGER(V)
590 #define STRUCT_LIST(V) \
592 STRUCT_LIST_DEBUGGER(V)
863 #define FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(V) \
864 V(FAST_ELEMENTS_SUB_TYPE) \
865 V(DICTIONARY_ELEMENTS_SUB_TYPE) \
866 V(FAST_PROPERTIES_SUB_TYPE) \
867 V(DICTIONARY_PROPERTIES_SUB_TYPE) \
868 V(MAP_CODE_CACHE_SUB_TYPE) \
869 V(SCOPE_INFO_SUB_TYPE) \
870 V(STRING_TABLE_SUB_TYPE) \
871 V(DESCRIPTOR_ARRAY_SUB_TYPE) \
872 V(TRANSITION_ARRAY_SUB_TYPE)
875 #define DEFINE_FIXED_ARRAY_SUB_INSTANCE_TYPE(name) name,
877 #undef DEFINE_FIXED_ARRAY_SUB_INSTANCE_TYPE
891 #define DECL_BOOLEAN_ACCESSORS(name) \
892 inline bool name(); \
893 inline void set_##name(bool value); \
896 #define DECL_ACCESSORS(name, type) \
897 inline type* name(); \
898 inline void set_##name(type* value, \
899 WriteBarrierMode mode = UPDATE_WRITE_BARRIER); \
902 class AllocationSite;
903 class AllocationSiteCreationContext;
904 class AllocationSiteUsageContext;
905 class DictionaryElementsAccessor;
906 class ElementsAccessor;
908 class FixedArrayBase;
913 template<
class>
class TypeImpl;
914 struct HeapTypeConfig;
915 typedef TypeImpl<HeapTypeConfig>
HeapType;
922 #define DECLARE_VERIFIER(Name) void Name##Verify();
924 #define DECLARE_VERIFIER(Name)
928 #define DECLARE_PRINTER(Name) void Name##Print(FILE* out = stdout);
930 #define DECLARE_PRINTER(Name)
935 inline bool IsFailure();
936 inline bool IsRetryAfterGC();
937 inline bool IsException();
939 INLINE(
bool IsUninitialized());
941 if (IsFailure())
return false;
942 *obj =
reinterpret_cast<Object*
>(
this);
947 return reinterpret_cast<Failure*
>(
this);
953 return reinterpret_cast<Object*
>(
this);
957 return reinterpret_cast<Object*
>(
this);
962 if (IsFailure())
return false;
963 *obj = T::cast(reinterpret_cast<Object*>(
this));
969 if (IsFailure())
return false;
970 *obj =
handle(T::cast(reinterpret_cast<Object*>(
this)), isolate);
977 void Print(FILE* out);
979 void PrintLn(FILE* out);
988 #define OBJECT_TYPE_LIST(V) \
993 #define HEAP_OBJECT_TYPE_LIST(V) \
1002 V(ExternalTwoByteString) \
1003 V(ExternalAsciiString) \
1004 V(SeqTwoByteString) \
1005 V(SeqOneByteString) \
1006 V(InternalizedString) \
1010 V(ExternalInt8Array) \
1011 V(ExternalUint8Array) \
1012 V(ExternalInt16Array) \
1013 V(ExternalUint16Array) \
1014 V(ExternalInt32Array) \
1015 V(ExternalUint32Array) \
1016 V(ExternalFloat32Array) \
1017 V(ExternalFloat64Array) \
1018 V(ExternalUint8ClampedArray) \
1019 V(FixedTypedArrayBase) \
1020 V(FixedUint8Array) \
1022 V(FixedUint16Array) \
1023 V(FixedInt16Array) \
1024 V(FixedUint32Array) \
1025 V(FixedInt32Array) \
1026 V(FixedFloat32Array) \
1027 V(FixedFloat64Array) \
1028 V(FixedUint8ClampedArray) \
1033 V(JSContextExtensionObject) \
1034 V(JSGeneratorObject) \
1037 V(DescriptorArray) \
1038 V(TransitionArray) \
1039 V(DeoptimizationInputData) \
1040 V(DeoptimizationOutputData) \
1043 V(FixedDoubleArray) \
1044 V(ConstantPoolArray) \
1051 V(SharedFunctionInfo) \
1054 V(JSMessageObject) \
1060 V(JSArrayBufferView) \
1064 V(JSFunctionProxy) \
1067 V(JSWeakCollection) \
1074 V(JSFunctionResultCache) \
1075 V(NormalizedMapCache) \
1076 V(CompilationCacheTable) \
1077 V(CodeCacheHashTable) \
1078 V(PolymorphicCodeCacheHashTable) \
1083 V(JSBuiltinsObject) \
1085 V(UndetectableObject) \
1086 V(AccessCheckNeeded) \
1089 V(ObjectHashTable) \
1093 #define ERROR_MESSAGES_LIST(V) \
1094 V(kNoReason, "no reason") \
1096 V(k32BitValueInRegisterIsNotZeroExtended, \
1097 "32 bit value in register is not zero-extended") \
1098 V(kAlignmentMarkerExpected, "Alignment marker expected") \
1099 V(kAllocationIsNotDoubleAligned, "Allocation is not double aligned") \
1100 V(kAPICallReturnedInvalidObject, "API call returned invalid object") \
1101 V(kArgumentsObjectValueInATestContext, \
1102 "Arguments object value in a test context") \
1103 V(kArrayBoilerplateCreationFailed, "Array boilerplate creation failed") \
1104 V(kArrayIndexConstantValueTooBig, "Array index constant value too big") \
1105 V(kAssignmentToArguments, "Assignment to arguments") \
1106 V(kAssignmentToLetVariableBeforeInitialization, \
1107 "Assignment to let variable before initialization") \
1108 V(kAssignmentToLOOKUPVariable, "Assignment to LOOKUP variable") \
1109 V(kAssignmentToParameterFunctionUsesArgumentsObject, \
1110 "Assignment to parameter, function uses arguments object") \
1111 V(kAssignmentToParameterInArgumentsObject, \
1112 "Assignment to parameter in arguments object") \
1113 V(kAttemptToUseUndefinedCache, "Attempt to use undefined cache") \
1114 V(kBadValueContextForArgumentsObjectValue, \
1115 "Bad value context for arguments object value") \
1116 V(kBadValueContextForArgumentsValue, \
1117 "Bad value context for arguments value") \
1118 V(kBailedOutDueToDependencyChange, "Bailed out due to dependency change") \
1119 V(kBailoutWasNotPrepared, "Bailout was not prepared") \
1120 V(kBinaryStubGenerateFloatingPointCode, \
1121 "BinaryStub_GenerateFloatingPointCode") \
1122 V(kBothRegistersWereSmisInSelectNonSmi, \
1123 "Both registers were smis in SelectNonSmi") \
1124 V(kCallToAJavaScriptRuntimeFunction, \
1125 "Call to a JavaScript runtime function") \
1126 V(kCannotTranslatePositionInChangedArea, \
1127 "Cannot translate position in changed area") \
1128 V(kCodeGenerationFailed, "Code generation failed") \
1129 V(kCodeObjectNotProperlyPatched, "Code object not properly patched") \
1130 V(kCompoundAssignmentToLookupSlot, "Compound assignment to lookup slot") \
1131 V(kContextAllocatedArguments, "Context-allocated arguments") \
1132 V(kCopyBuffersOverlap, "Copy buffers overlap") \
1133 V(kCouldNotGenerateZero, "Could not generate +0.0") \
1134 V(kCouldNotGenerateNegativeZero, "Could not generate -0.0") \
1135 V(kDebuggerIsActive, "Debugger is active") \
1136 V(kDebuggerStatement, "DebuggerStatement") \
1137 V(kDeclarationInCatchContext, "Declaration in catch context") \
1138 V(kDeclarationInWithContext, "Declaration in with context") \
1139 V(kDefaultNaNModeNotSet, "Default NaN mode not set") \
1140 V(kDeleteWithGlobalVariable, "Delete with global variable") \
1141 V(kDeleteWithNonGlobalVariable, "Delete with non-global variable") \
1142 V(kDestinationOfCopyNotAligned, "Destination of copy not aligned") \
1143 V(kDontDeleteCellsCannotContainTheHole, \
1144 "DontDelete cells can't contain the hole") \
1145 V(kDoPushArgumentNotImplementedForDoubleType, \
1146 "DoPushArgument not implemented for double type") \
1147 V(kEliminatedBoundsCheckFailed, "Eliminated bounds check failed") \
1148 V(kEmitLoadRegisterUnsupportedDoubleImmediate, \
1149 "EmitLoadRegister: Unsupported double immediate") \
1151 V(kExpected0AsASmiSentinel, "Expected 0 as a Smi sentinel") \
1152 V(kExpectedAlignmentMarker, "Expected alignment marker") \
1153 V(kExpectedAllocationSite, "Expected allocation site") \
1154 V(kExpectedFunctionObject, "Expected function object in register") \
1155 V(kExpectedHeapNumber, "Expected HeapNumber") \
1156 V(kExpectedNativeContext, "Expected native context") \
1157 V(kExpectedNonIdenticalObjects, "Expected non-identical objects") \
1158 V(kExpectedNonNullContext, "Expected non-null context") \
1159 V(kExpectedPositiveZero, "Expected +0.0") \
1160 V(kExpectedAllocationSiteInCell, \
1161 "Expected AllocationSite in property cell") \
1162 V(kExpectedFixedArrayInFeedbackVector, \
1163 "Expected fixed array in feedback vector") \
1164 V(kExpectedFixedArrayInRegisterA2, \
1165 "Expected fixed array in register a2") \
1166 V(kExpectedFixedArrayInRegisterEbx, \
1167 "Expected fixed array in register ebx") \
1168 V(kExpectedFixedArrayInRegisterR2, \
1169 "Expected fixed array in register r2") \
1170 V(kExpectedFixedArrayInRegisterRbx, \
1171 "Expected fixed array in register rbx") \
1172 V(kExpectedSmiOrHeapNumber, "Expected smi or HeapNumber") \
1173 V(kExpectedUndefinedOrCell, \
1174 "Expected undefined or cell in register") \
1175 V(kExpectingAlignmentForCopyBytes, \
1176 "Expecting alignment for CopyBytes") \
1177 V(kExportDeclaration, "Export declaration") \
1178 V(kExternalStringExpectedButNotFound, \
1179 "External string expected, but not found") \
1180 V(kFailedBailedOutLastTime, "Failed/bailed out last time") \
1181 V(kForInStatementIsNotFastCase, "ForInStatement is not fast case") \
1182 V(kForInStatementOptimizationIsDisabled, \
1183 "ForInStatement optimization is disabled") \
1184 V(kForInStatementWithNonLocalEachVariable, \
1185 "ForInStatement with non-local each variable") \
1186 V(kForOfStatement, "ForOfStatement") \
1187 V(kFrameIsExpectedToBeAligned, "Frame is expected to be aligned") \
1188 V(kFunctionCallsEval, "Function calls eval") \
1189 V(kFunctionIsAGenerator, "Function is a generator") \
1190 V(kFunctionWithIllegalRedeclaration, "Function with illegal redeclaration") \
1191 V(kGeneratedCodeIsTooLarge, "Generated code is too large") \
1192 V(kGeneratorFailedToResume, "Generator failed to resume") \
1193 V(kGenerator, "Generator") \
1194 V(kGlobalFunctionsMustHaveInitialMap, \
1195 "Global functions must have initial map") \
1196 V(kHeapNumberMapRegisterClobbered, "HeapNumberMap register clobbered") \
1197 V(kHydrogenFilter, "Optimization disabled by filter") \
1198 V(kImportDeclaration, "Import declaration") \
1199 V(kImproperObjectOnPrototypeChainForStore, \
1200 "Improper object on prototype chain for store") \
1201 V(kIndexIsNegative, "Index is negative") \
1202 V(kIndexIsTooLarge, "Index is too large") \
1203 V(kInlinedRuntimeFunctionClassOf, "Inlined runtime function: ClassOf") \
1204 V(kInlinedRuntimeFunctionFastAsciiArrayJoin, \
1205 "Inlined runtime function: FastAsciiArrayJoin") \
1206 V(kInlinedRuntimeFunctionGeneratorNext, \
1207 "Inlined runtime function: GeneratorNext") \
1208 V(kInlinedRuntimeFunctionGeneratorThrow, \
1209 "Inlined runtime function: GeneratorThrow") \
1210 V(kInlinedRuntimeFunctionGetFromCache, \
1211 "Inlined runtime function: GetFromCache") \
1212 V(kInlinedRuntimeFunctionIsNonNegativeSmi, \
1213 "Inlined runtime function: IsNonNegativeSmi") \
1214 V(kInlinedRuntimeFunctionIsStringWrapperSafeForDefaultValueOf, \
1215 "Inlined runtime function: IsStringWrapperSafeForDefaultValueOf") \
1216 V(kInliningBailedOut, "Inlining bailed out") \
1217 V(kInputGPRIsExpectedToHaveUpper32Cleared, \
1218 "Input GPR is expected to have upper32 cleared") \
1219 V(kInputStringTooLong, "Input string too long") \
1220 V(kInstanceofStubUnexpectedCallSiteCacheCheck, \
1221 "InstanceofStub unexpected call site cache (check)") \
1222 V(kInstanceofStubUnexpectedCallSiteCacheCmp1, \
1223 "InstanceofStub unexpected call site cache (cmp 1)") \
1224 V(kInstanceofStubUnexpectedCallSiteCacheCmp2, \
1225 "InstanceofStub unexpected call site cache (cmp 2)") \
1226 V(kInstanceofStubUnexpectedCallSiteCacheMov, \
1227 "InstanceofStub unexpected call site cache (mov)") \
1228 V(kInteger32ToSmiFieldWritingToNonSmiLocation, \
1229 "Integer32ToSmiField writing to non-smi location") \
1230 V(kInvalidCaptureReferenced, "Invalid capture referenced") \
1231 V(kInvalidElementsKindForInternalArrayOrInternalPackedArray, \
1232 "Invalid ElementsKind for InternalArray or InternalPackedArray") \
1233 V(kInvalidFullCodegenState, "invalid full-codegen state") \
1234 V(kInvalidHandleScopeLevel, "Invalid HandleScope level") \
1235 V(kInvalidLeftHandSideInAssignment, "Invalid left-hand side in assignment") \
1236 V(kInvalidLhsInCompoundAssignment, "Invalid lhs in compound assignment") \
1237 V(kInvalidLhsInCountOperation, "Invalid lhs in count operation") \
1238 V(kInvalidMinLength, "Invalid min_length") \
1239 V(kJSGlobalObjectNativeContextShouldBeANativeContext, \
1240 "JSGlobalObject::native_context should be a native context") \
1241 V(kJSGlobalProxyContextShouldNotBeNull, \
1242 "JSGlobalProxy::context() should not be null") \
1243 V(kJSObjectWithFastElementsMapHasSlowElements, \
1244 "JSObject with fast elements map has slow elements") \
1245 V(kLetBindingReInitialization, "Let binding re-initialization") \
1246 V(kLhsHasBeenClobbered, "lhs has been clobbered") \
1247 V(kLiveBytesCountOverflowChunkSize, "Live Bytes Count overflow chunk size") \
1248 V(kLiveEditFrameDroppingIsNotSupportedOnARM64, \
1249 "LiveEdit frame dropping is not supported on arm64") \
1250 V(kLiveEditFrameDroppingIsNotSupportedOnArm, \
1251 "LiveEdit frame dropping is not supported on arm") \
1252 V(kLiveEditFrameDroppingIsNotSupportedOnMips, \
1253 "LiveEdit frame dropping is not supported on mips") \
1254 V(kLiveEdit, "LiveEdit") \
1255 V(kLookupVariableInCountOperation, \
1256 "Lookup variable in count operation") \
1257 V(kMapIsNoLongerInEax, "Map is no longer in eax") \
1258 V(kModuleDeclaration, "Module declaration") \
1259 V(kModuleLiteral, "Module literal") \
1260 V(kModulePath, "Module path") \
1261 V(kModuleStatement, "Module statement") \
1262 V(kModuleVariable, "Module variable") \
1263 V(kModuleUrl, "Module url") \
1264 V(kNativeFunctionLiteral, "Native function literal") \
1265 V(kNoCasesLeft, "No cases left") \
1266 V(kNoEmptyArraysHereInEmitFastAsciiArrayJoin, \
1267 "No empty arrays here in EmitFastAsciiArrayJoin") \
1268 V(kNonInitializerAssignmentToConst, \
1269 "Non-initializer assignment to const") \
1270 V(kNonSmiIndex, "Non-smi index") \
1271 V(kNonSmiKeyInArrayLiteral, "Non-smi key in array literal") \
1272 V(kNonSmiValue, "Non-smi value") \
1273 V(kNonObject, "Non-object value") \
1274 V(kNotEnoughVirtualRegistersForValues, \
1275 "Not enough virtual registers for values") \
1276 V(kNotEnoughSpillSlotsForOsr, \
1277 "Not enough spill slots for OSR") \
1278 V(kNotEnoughVirtualRegistersRegalloc, \
1279 "Not enough virtual registers (regalloc)") \
1280 V(kObjectFoundInSmiOnlyArray, "Object found in smi-only array") \
1281 V(kObjectLiteralWithComplexProperty, \
1282 "Object literal with complex property") \
1283 V(kOddballInStringTableIsNotUndefinedOrTheHole, \
1284 "Oddball in string table is not undefined or the hole") \
1285 V(kOffsetOutOfRange, "Offset out of range") \
1286 V(kOperandIsASmiAndNotAName, "Operand is a smi and not a name") \
1287 V(kOperandIsASmiAndNotAString, "Operand is a smi and not a string") \
1288 V(kOperandIsASmi, "Operand is a smi") \
1289 V(kOperandIsNotAName, "Operand is not a name") \
1290 V(kOperandIsNotANumber, "Operand is not a number") \
1291 V(kOperandIsNotASmi, "Operand is not a smi") \
1292 V(kOperandIsNotAString, "Operand is not a string") \
1293 V(kOperandIsNotSmi, "Operand is not smi") \
1294 V(kOperandNotANumber, "Operand not a number") \
1295 V(kOptimizationDisabled, "Optimization is disabled") \
1296 V(kOptimizedTooManyTimes, "Optimized too many times") \
1297 V(kOutOfVirtualRegistersWhileTryingToAllocateTempRegister, \
1298 "Out of virtual registers while trying to allocate temp register") \
1299 V(kParseScopeError, "Parse/scope error") \
1300 V(kPossibleDirectCallToEval, "Possible direct call to eval") \
1301 V(kPreconditionsWereNotMet, "Preconditions were not met") \
1302 V(kPropertyAllocationCountFailed, "Property allocation count failed") \
1303 V(kReceivedInvalidReturnAddress, "Received invalid return address") \
1304 V(kReferenceToAVariableWhichRequiresDynamicLookup, \
1305 "Reference to a variable which requires dynamic lookup") \
1306 V(kReferenceToGlobalLexicalVariable, \
1307 "Reference to global lexical variable") \
1308 V(kReferenceToUninitializedVariable, "Reference to uninitialized variable") \
1309 V(kRegisterDidNotMatchExpectedRoot, "Register did not match expected root") \
1310 V(kRegisterWasClobbered, "Register was clobbered") \
1311 V(kRememberedSetPointerInNewSpace, "Remembered set pointer is in new space") \
1312 V(kReturnAddressNotFoundInFrame, "Return address not found in frame") \
1313 V(kRhsHasBeenClobbered, "Rhs has been clobbered") \
1314 V(kScopedBlock, "ScopedBlock") \
1315 V(kSmiAdditionOverflow, "Smi addition overflow") \
1316 V(kSmiSubtractionOverflow, "Smi subtraction overflow") \
1317 V(kStackAccessBelowStackPointer, "Stack access below stack pointer") \
1318 V(kStackFrameTypesMustMatch, "Stack frame types must match") \
1319 V(kSwitchStatementMixedOrNonLiteralSwitchLabels, \
1320 "SwitchStatement: mixed or non-literal switch labels") \
1321 V(kSwitchStatementTooManyClauses, "SwitchStatement: too many clauses") \
1322 V(kTheCurrentStackPointerIsBelowCsp, \
1323 "The current stack pointer is below csp") \
1324 V(kTheInstructionShouldBeALui, "The instruction should be a lui") \
1325 V(kTheInstructionShouldBeAnOri, "The instruction should be an ori") \
1326 V(kTheInstructionToPatchShouldBeALoadFromPc, \
1327 "The instruction to patch should be a load from pc") \
1328 V(kTheInstructionToPatchShouldBeALoadFromPp, \
1329 "The instruction to patch should be a load from pp") \
1330 V(kTheInstructionToPatchShouldBeAnLdrLiteral, \
1331 "The instruction to patch should be a ldr literal") \
1332 V(kTheInstructionToPatchShouldBeALui, \
1333 "The instruction to patch should be a lui") \
1334 V(kTheInstructionToPatchShouldBeAnOri, \
1335 "The instruction to patch should be an ori") \
1336 V(kTheSourceAndDestinationAreTheSame, \
1337 "The source and destination are the same") \
1338 V(kTheStackPointerIsNotAligned, "The stack pointer is not aligned.") \
1339 V(kTheStackWasCorruptedByMacroAssemblerCall, \
1340 "The stack was corrupted by MacroAssembler::Call()") \
1341 V(kTooManyParametersLocals, "Too many parameters/locals") \
1342 V(kTooManyParameters, "Too many parameters") \
1343 V(kTooManySpillSlotsNeededForOSR, "Too many spill slots needed for OSR") \
1344 V(kToOperand32UnsupportedImmediate, "ToOperand32 unsupported immediate.") \
1345 V(kToOperandIsDoubleRegisterUnimplemented, \
1346 "ToOperand IsDoubleRegister unimplemented") \
1347 V(kToOperandUnsupportedDoubleImmediate, \
1348 "ToOperand Unsupported double immediate") \
1349 V(kTryCatchStatement, "TryCatchStatement") \
1350 V(kTryFinallyStatement, "TryFinallyStatement") \
1351 V(kUnableToEncodeValueAsSmi, "Unable to encode value as smi") \
1352 V(kUnalignedAllocationInNewSpace, "Unaligned allocation in new space") \
1353 V(kUnalignedCellInWriteBarrier, "Unaligned cell in write barrier") \
1354 V(kUndefinedValueNotLoaded, "Undefined value not loaded") \
1355 V(kUndoAllocationOfNonAllocatedMemory, \
1356 "Undo allocation of non allocated memory") \
1357 V(kUnexpectedAllocationTop, "Unexpected allocation top") \
1358 V(kUnexpectedColorFound, "Unexpected color bit pattern found") \
1359 V(kUnexpectedElementsKindInArrayConstructor, \
1360 "Unexpected ElementsKind in array constructor") \
1361 V(kUnexpectedFallthroughFromCharCodeAtSlowCase, \
1362 "Unexpected fallthrough from CharCodeAt slow case") \
1363 V(kUnexpectedFallthroughFromCharFromCodeSlowCase, \
1364 "Unexpected fallthrough from CharFromCode slow case") \
1365 V(kUnexpectedFallThroughFromStringComparison, \
1366 "Unexpected fall-through from string comparison") \
1367 V(kUnexpectedFallThroughInBinaryStubGenerateFloatingPointCode, \
1368 "Unexpected fall-through in BinaryStub_GenerateFloatingPointCode") \
1369 V(kUnexpectedFallthroughToCharCodeAtSlowCase, \
1370 "Unexpected fallthrough to CharCodeAt slow case") \
1371 V(kUnexpectedFallthroughToCharFromCodeSlowCase, \
1372 "Unexpected fallthrough to CharFromCode slow case") \
1373 V(kUnexpectedFPUStackDepthAfterInstruction, \
1374 "Unexpected FPU stack depth after instruction") \
1375 V(kUnexpectedInitialMapForArrayFunction1, \
1376 "Unexpected initial map for Array function (1)") \
1377 V(kUnexpectedInitialMapForArrayFunction2, \
1378 "Unexpected initial map for Array function (2)") \
1379 V(kUnexpectedInitialMapForArrayFunction, \
1380 "Unexpected initial map for Array function") \
1381 V(kUnexpectedInitialMapForInternalArrayFunction, \
1382 "Unexpected initial map for InternalArray function") \
1383 V(kUnexpectedLevelAfterReturnFromApiCall, \
1384 "Unexpected level after return from api call") \
1385 V(kUnexpectedNegativeValue, "Unexpected negative value") \
1386 V(kUnexpectedNumberOfPreAllocatedPropertyFields, \
1387 "Unexpected number of pre-allocated property fields") \
1388 V(kUnexpectedSmi, "Unexpected smi value") \
1389 V(kUnexpectedStringFunction, "Unexpected String function") \
1390 V(kUnexpectedStringType, "Unexpected string type") \
1391 V(kUnexpectedStringWrapperInstanceSize, \
1392 "Unexpected string wrapper instance size") \
1393 V(kUnexpectedTypeForRegExpDataFixedArrayExpected, \
1394 "Unexpected type for RegExp data, FixedArray expected") \
1395 V(kUnexpectedValue, "Unexpected value") \
1396 V(kUnexpectedUnusedPropertiesOfStringWrapper, \
1397 "Unexpected unused properties of string wrapper") \
1398 V(kUnimplemented, "unimplemented") \
1399 V(kUninitializedKSmiConstantRegister, "Uninitialized kSmiConstantRegister") \
1400 V(kUnknown, "Unknown") \
1401 V(kUnsupportedConstCompoundAssignment, \
1402 "Unsupported const compound assignment") \
1403 V(kUnsupportedCountOperationWithConst, \
1404 "Unsupported count operation with const") \
1405 V(kUnsupportedDoubleImmediate, "Unsupported double immediate") \
1406 V(kUnsupportedLetCompoundAssignment, "Unsupported let compound assignment") \
1407 V(kUnsupportedLookupSlotInDeclaration, \
1408 "Unsupported lookup slot in declaration") \
1409 V(kUnsupportedNonPrimitiveCompare, "Unsupported non-primitive compare") \
1410 V(kUnsupportedPhiUseOfArguments, "Unsupported phi use of arguments") \
1411 V(kUnsupportedPhiUseOfConstVariable, \
1412 "Unsupported phi use of const variable") \
1413 V(kUnsupportedTaggedImmediate, "Unsupported tagged immediate") \
1414 V(kVariableResolvedToWithContext, "Variable resolved to with context") \
1415 V(kWeShouldNotHaveAnEmptyLexicalContext, \
1416 "We should not have an empty lexical context") \
1417 V(kWithStatement, "WithStatement") \
1418 V(kWrongAddressOrValuePassedToRecordWrite, \
1419 "Wrong address or value passed to RecordWrite") \
1423 #define ERROR_MESSAGES_CONSTANTS(C, T) C,
1428 #undef ERROR_MESSAGES_CONSTANTS
1445 #define IS_TYPE_FUNCTION_DECL(type_) inline bool Is##type_();
1448 #undef IS_TYPE_FUNCTION_DECL
1455 #define DECLARE_STRUCT_PREDICATE(NAME, Name, name) inline bool Is##Name();
1457 #undef DECLARE_STRUCT_PREDICATE
1459 INLINE(
bool IsSpecObject());
1460 INLINE(
bool IsSpecFunction());
1464 INLINE(
bool IsUndefined());
1466 INLINE(
bool IsTheHole());
1467 INLINE(
bool IsUninitialized());
1478 inline bool IsNaN();
1495 }
else if (FLAG_track_double_fields && IsHeapNumber()) {
1497 }
else if (FLAG_track_computed_fields && IsUninitialized()) {
1499 }
else if (FLAG_track_heap_object_fields) {
1508 if (FLAG_track_fields && representation.
IsNone()) {
1510 }
else if (FLAG_track_fields && representation.
IsSmi()) {
1512 }
else if (FLAG_track_double_fields && representation.
IsDouble()) {
1514 }
else if (FLAG_track_heap_object_fields && representation.
IsHeapObject()) {
1515 return IsHeapObject();
1564 LookupResult* result,
1571 LookupResult* result,
1576 LookupResult* result,
1629 static void VerifyPointer(
Object* p);
1647 DISALLOW_IMPLICIT_CONSTRUCTORS(
Object);
1668 static inline bool IsValid(intptr_t value);
1684 DISALLOW_IMPLICIT_CONSTRUCTORS(
Smi);
1723 OUT_OF_MEMORY_EXCEPTION = 3
1726 inline Type type()
const;
1731 inline bool IsInternalError()
const;
1734 static inline Failure* RetryAfterGC();
1736 static inline Failure* InternalError();
1741 void FailurePrint(FILE* out = stdout);
1747 inline intptr_t value() const;
1748 static inline
Failure* Construct(
Type type, intptr_t value = 0);
1750 DISALLOW_IMPLICIT_CONSTRUCTORS(
Failure);
1763 static inline MapWord FromMap(
Map*
map);
1766 inline Map* ToMap();
1775 inline bool IsForwardingAddress();
1778 static inline MapWord FromForwardingAddress(
HeapObject*
object);
1784 return MapWord(value);
1795 explicit MapWord(uintptr_t value) : value_(value) {}
1808 inline void set_map(
Map* value);
1812 inline void set_map_no_write_barrier(
Map* value);
1816 inline MapWord map_word();
1817 inline void set_map_word(MapWord map_word);
1820 inline Heap* GetHeap();
1832 void Iterate(ObjectVisitor* v);
1838 void IterateBody(
InstanceType type,
int object_size, ObjectVisitor* v);
1846 inline int SizeFromMap(
Map* map);
1875 void PrintHeader(FILE* out,
const char*
id);
1880 inline void VerifyObjectField(
int offset);
1881 inline void VerifySmiField(
int offset);
1885 static void VerifyHeapPointer(
Object* p);
1898 inline void IteratePointers(ObjectVisitor* v,
int start,
int end);
1900 inline void IteratePointer(ObjectVisitor* v,
int offset);
1902 inline void IterateNextCodeLink(ObjectVisitor* v,
int offset);
1912 template<
int start_offset,
int end_offset,
int size>
1915 static const int kStartOffset = start_offset;
1916 static const int kEndOffset = end_offset;
1919 static inline void IterateBody(
HeapObject*
obj, ObjectVisitor* v);
1921 template<
typename StaticVisitor>
1932 template<
int start_offset>
1935 static const int kStartOffset = start_offset;
1941 template<
typename StaticVisitor>
1954 inline double value();
1955 inline void set_value(
double value);
1961 bool HeapNumberBooleanValue();
1963 void HeapNumberPrint(FILE* out = stdout);
1967 inline int get_exponent();
1968 inline int get_sign();
1976 static const int kMantissaOffset = kValueOffset;
1977 static const int kExponentOffset = kValueOffset + 4;
1981 static const uint32_t kExponentMask = 0x7ff00000u;
1982 static const uint32_t kMantissaMask = 0xfffffu;
1983 static const int kMantissaBits = 52;
1984 static const int kExponentBits = 11;
1985 static const int kExponentBias = 1023;
1986 static const int kExponentShift = 20;
1987 static const int kInfinityOrNanExponent =
1988 (kExponentMask >> kExponentShift) - kExponentBias;
1989 static const int kMantissaBitsInTopWord = 20;
1990 static const int kNonMantissaBitsInTopWord = 12;
2035 CERTAINLY_NOT_STORE_FROM_KEYED
2042 OMIT_EXTENSIBILITY_CHECK
2054 StoreFromKeyed store_mode =
2055 MAY_BE_STORE_FROM_KEYED);
2071 DeleteMode
mode = NORMAL_DELETION);
2074 DeleteMode
mode = NORMAL_DELETION);
2077 bool IsSimpleEnum();
2084 String* constructor_name();
2108 inline Object* GetConstructor();
2112 inline Object* GetIdentityHash();
2121 void LocalLookup(
Name*
name, LookupResult* result,
2122 bool search_hidden_prototypes =
false);
2126 Smi* GenerateIdentityHash();
2136 LookupResult* result,
2138 bool continue_search);
2141 LookupResult* result,
2146 StoreFromKeyed store_from_keyed);
2152 class ObjectHashTable;
2164 inline void initialize_properties();
2165 inline bool HasFastProperties();
2187 inline void initialize_elements();
2192 inline bool HasFastSmiElements();
2194 inline bool HasFastObjectElements();
2197 inline bool HasFastSmiOrObjectElements();
2199 inline bool HasFastElements();
2202 inline bool HasFastDoubleElements();
2205 inline bool HasFastHoleyElements();
2206 inline bool HasSloppyArgumentsElements();
2207 inline bool HasDictionaryElements();
2209 inline bool HasExternalUint8ClampedElements();
2210 inline bool HasExternalArrayElements();
2211 inline bool HasExternalInt8Elements();
2212 inline bool HasExternalUint8Elements();
2213 inline bool HasExternalInt16Elements();
2214 inline bool HasExternalUint16Elements();
2215 inline bool HasExternalInt32Elements();
2216 inline bool HasExternalUint32Elements();
2217 inline bool HasExternalFloat32Elements();
2218 inline bool HasExternalFloat64Elements();
2220 inline bool HasFixedTypedArrayElements();
2222 inline bool HasFixedUint8ClampedElements();
2223 inline bool HasFixedArrayElements();
2224 inline bool HasFixedInt8Elements();
2225 inline bool HasFixedUint8Elements();
2226 inline bool HasFixedInt16Elements();
2227 inline bool HasFixedUint16Elements();
2228 inline bool HasFixedInt32Elements();
2229 inline bool HasFixedUint32Elements();
2230 inline bool HasFixedFloat32Elements();
2231 inline bool HasFixedFloat64Elements();
2233 bool HasFastArgumentsElements();
2234 bool HasDictionaryArgumentsElements();
2237 inline void set_map_and_elements(
2256 MUST_USE_RESULT MaybeObject* PrepareSlowElementsForSort(uint32_t limit);
2280 LookupResult* result,
2318 Object* GetNormalizedProperty(
const LookupResult* result);
2323 const LookupResult* result,
2331 PropertyDetails details);
2344 bool continue_search);
2349 bool continue_search);
2352 LookupResult* result,
2354 bool continue_search);
2359 bool continue_search);
2427 inline void ValidateElements();
2433 static inline void EnsureCanContainElements(
2438 static inline void EnsureCanContainElements(
2443 static void EnsureCanContainElements(
2445 Arguments* arguments,
2455 bool ShouldConvertToSlowElements(
int new_capacity);
2460 bool ShouldConvertToFastElements();
2464 bool ShouldConvertToFastDoubleElements(
bool* has_smi_only_elements);
2469 return old_capacity + (old_capacity >> 1) + 16;
2474 AccessorPair* GetLocalElementAccessorPair(uint32_t index);
2479 bool check_prototype);
2493 bool check_prototype =
true,
2505 kDontAllowSmiElements
2515 SetFastElementsCapacitySmiMode smi_mode);
2516 static void SetFastDoubleElementsCapacityAndLength(
2526 inline bool HasNamedInterceptor();
2527 inline bool HasIndexedInterceptor();
2532 static bool HasRealElementProperty(
Handle<JSObject> object, uint32_t index);
2538 inline int GetHeaderSize();
2540 inline int GetInternalFieldCount();
2541 inline int GetInternalFieldOffset(
int index);
2542 inline Object* GetInternalField(
int index);
2543 inline void SetInternalField(
int index,
Object* value);
2544 inline void SetInternalField(
int index, Smi* value);
2547 void LocalLookupRealNamedProperty(
Name* name, LookupResult* result);
2548 void LookupRealNamedProperty(
Name* name, LookupResult* result);
2549 void LookupRealNamedPropertyInPrototypes(
Name* name, LookupResult* result);
2550 void LookupCallbackProperty(
Name* name, LookupResult* result);
2557 void GetLocalPropertyNames(
2564 int NumberOfEnumElements();
2601 int expected_additional_properties);
2610 int unused_property_fields);
2616 inline Object* RawFastPropertyAt(
int index);
2617 inline void FastPropertyAtPut(
int index,
Object* value);
2620 inline int GetInObjectPropertyOffset(
int index);
2621 inline Object* InObjectPropertyAt(
int index);
2622 inline Object* InObjectPropertyAtPut(
int index,
2630 bool skip_hidden_prototypes =
false);
2637 inline void InitializeBody(
Map* map,
2638 Object* pre_allocated_value,
2642 bool ReferencesObject(
Object* obj);
2656 kObjectIsShallowArray = 1
2662 DeepCopyHints hints = kNoHints);
2674 void PrintProperties(FILE* out = stdout);
2675 void PrintElements(FILE* out = stdout);
2676 void PrintTransitions(FILE* out = stdout);
2679 static void PrintElementsTransition(
2684 void PrintInstanceMigration(FILE* file,
Map* original_map,
Map* new_map);
2688 class SpillInformation {
2692 int number_of_objects_;
2693 int number_of_objects_with_fast_properties_;
2694 int number_of_objects_with_fast_elements_;
2695 int number_of_fast_used_fields_;
2696 int number_of_fast_unused_fields_;
2697 int number_of_slow_used_properties_;
2698 int number_of_slow_unused_properties_;
2699 int number_of_fast_used_elements_;
2700 int number_of_fast_unused_elements_;
2701 int number_of_slow_used_elements_;
2702 int number_of_slow_unused_elements_;
2705 void IncrementSpillStatistics(SpillInformation* info);
2712 bool ElementsAreSafeToExamine();
2720 inline bool TooManyFastProperties(
2721 StoreFromKeyed store_mode = MAY_BE_STORE_FROM_KEYED);
2725 static const uint32_t kMaxElementCount = 0xffffffffu;
2732 static const uint32_t kMaxGap = 1024;
2736 static const int kMaxUncheckedFastElementsLength = 5000;
2740 static const int kMaxUncheckedOldFastElementsLength = 500;
2744 static const int kInitialMaxFastElementArray = 100000;
2746 static const int kFastPropertiesSoftLimit = 12;
2747 static const int kMaxFastProperties = 64;
2752 static const int kFieldsAdded = 3;
2784 LookupResult* result,
2796 bool continue_search);
2801 bool continue_search);
2815 bool check_prototype,
2823 bool check_prototype,
2837 bool check_prototype,
2844 bool check_prototype =
true);
2865 LookupResult* lookup,
2871 LookupResult* result,
2874 bool check_prototype,
2937 bool ReferencesObjectFromElements(
FixedArray* elements,
2942 bool HasDenseElements();
2945 void GetElementsCapacityAndUsage(
int* capacity,
int* used);
3008 inline int length();
3009 inline void set_length(
int value);
3028 inline Object*
get(
int index);
3030 inline void set(
int index,
Object* value);
3031 inline bool is_the_hole(
int index);
3034 inline void set(
int index, Smi* value);
3039 inline void set_undefined(
int index);
3040 inline void set_null(
int index);
3041 inline void set_the_hole(
int index);
3043 inline Object** GetFirstElementAddress();
3044 inline bool ContainsOnlySmisOrHoles();
3047 inline Object** data_start();
3050 void Shrink(
int length);
3064 void CopyTo(
int pos,
FixedArray* dest,
int dest_pos,
int len);
3098 void SwapPairs(
FixedArray* numbers,
int i,
int j);
3103 void SortPairs(
FixedArray* numbers, uint32_t len);
3108 return SizeFor(reinterpret_cast<FixedArray*>(
object)->length());
3115 static inline void NoWriteBarrierSet(
FixedArray* array,
3122 static inline void NoIncrementalWriteBarrierSet(
FixedArray* array,
3137 inline double get_scalar(
int index);
3138 inline int64_t get_representation(
int index);
3142 inline void set(
int index,
double value);
3143 inline void set_the_hole(
int index);
3146 inline bool is_the_hole(
int index);
3157 inline double* data_start();
3162 inline static bool is_the_hole_nan(
double value);
3163 inline static double hole_nan_as_double();
3164 inline static double canonical_not_the_hole_nan_as_double();
3172 static const int kMaxSize = 512 *
MB;
3198 inline int first_code_ptr_index();
3200 inline int first_int64_index();
3201 inline int first_int32_index();
3204 inline int count_of_code_ptr_entries();
3205 inline int count_of_heap_ptr_entries();
3206 inline int count_of_int64_entries();
3207 inline int count_of_int32_entries();
3210 inline Address get_code_ptr_entry(
int index);
3211 inline Object* get_heap_ptr_entry(
int index);
3212 inline int64_t get_int64_entry(
int index);
3213 inline int32_t get_int32_entry(
int index);
3214 inline double get_int64_entry_as_double(
int index);
3216 inline void set(
int index,
Address value);
3217 inline void set(
int index,
Object* value);
3218 inline void set(
int index, int64_t value);
3219 inline void set(
int index,
double value);
3220 inline void set(
int index,
int32_t value);
3223 inline void SetEntryCounts(
int number_of_int64_entries,
3224 int number_of_code_ptr_entries,
3225 int number_of_heap_ptr_entries,
3226 int number_of_int32_entries);
3232 inline static int SizeFor(
int number_of_int64_entries,
3233 int number_of_code_ptr_entries,
3234 int number_of_heap_ptr_entries,
3235 int number_of_int32_entries) {
3236 return RoundUp(OffsetAt(number_of_int64_entries,
3237 number_of_code_ptr_entries,
3238 number_of_heap_ptr_entries,
3239 number_of_int32_entries),
3245 ASSERT(index < length());
3246 if (index >= first_int32_index()) {
3247 return OffsetAt(count_of_int64_entries(), count_of_code_ptr_entries(),
3248 count_of_heap_ptr_entries(), index - first_int32_index());
3250 return OffsetAt(count_of_int64_entries(), count_of_code_ptr_entries(),
3252 }
else if (index >= first_code_ptr_index()) {
3253 return OffsetAt(count_of_int64_entries(), index - first_code_ptr_index(),
3256 return OffsetAt(index, 0, 0, 0);
3270 static const int kFirstHeapPointerIndexOffset =
3272 static const int kFirstInt32IndexOffset =
3277 void ConstantPoolIterateBody(ObjectVisitor* v);
3283 inline
void set_first_code_ptr_index(
int value);
3284 inline
void set_first_heap_ptr_index(
int value);
3285 inline
void set_first_int32_index(
int value);
3287 inline static
int OffsetAt(
int number_of_int64_entries,
3288 int number_of_code_ptr_entries,
3289 int number_of_heap_ptr_entries,
3290 int number_of_int32_entries) {
3293 + (number_of_code_ptr_entries * kPointerSize)
3332 inline bool IsEmpty();
3336 ASSERT(length() >= kFirstIndex || IsEmpty());
3338 return len == 0 ? 0 :
Smi::cast(
get(kDescriptorLengthIndex))->
value();
3343 return len == 0 ? 0 : (len - kFirstIndex) / kDescriptorSize;
3347 return number_of_descriptors_storage() - number_of_descriptors();
3350 inline void SetNumberOfDescriptors(
int number_of_descriptors);
3354 return !IsEmpty() && !
get(kEnumCacheIndex)->IsSmi();
3358 set(kEnumCacheIndex, array->
get(kEnumCacheIndex));
3368 if (IsEmpty())
return false;
3369 Object*
object =
get(kEnumCacheIndex);
3370 if (object->IsSmi())
return false;
3372 return !bridge->
get(kEnumCacheBridgeIndicesCacheIndex)->IsSmi();
3376 ASSERT(HasEnumIndicesCache());
3387 void ClearEnumCache();
3391 void SetEnumCache(
FixedArray* bridge_storage,
3393 Object* new_index_cache);
3396 inline Name* GetKey(
int descriptor_number);
3397 inline Object** GetKeySlot(
int descriptor_number);
3398 inline Object* GetValue(
int descriptor_number);
3399 inline Object** GetValueSlot(
int descriptor_number);
3400 inline Object** GetDescriptorStartSlot(
int descriptor_number);
3401 inline Object** GetDescriptorEndSlot(
int descriptor_number);
3402 inline PropertyDetails GetDetails(
int descriptor_number);
3404 inline int GetFieldIndex(
int descriptor_number);
3405 inline Object* GetConstant(
int descriptor_number);
3406 inline Object* GetCallbacksObject(
int descriptor_number);
3409 inline Name* GetSortedKey(
int descriptor_number);
3410 inline int GetSortedKeyIndex(
int descriptor_number);
3411 inline void SetSortedKey(
int pointer,
int descriptor_number);
3412 inline void InitializeRepresentations(
Representation representation);
3413 inline void SetRepresentation(
int descriptor_number,
3417 inline void Get(
int descriptor_number, Descriptor* desc);
3418 inline void Set(
int descriptor_number,
3420 const WhitenessWitness&);
3421 inline void Set(
int descriptor_number, Descriptor* desc);
3426 inline void Append(Descriptor* desc,
const WhitenessWitness&);
3427 inline void Append(Descriptor* desc);
3431 void CopyFrom(
int dst_index,
3434 const WhitenessWitness&);
3449 bool IsMoreGeneralThan(
int verbatim,
3455 return CopyUpToAddAttributes(enumeration_index,
NONE);
3460 int enumeration_index,
3463 int enumeration_index,
3479 int number_of_descriptors,
3486 static const int kNotFound = -1;
3488 static const int kDescriptorLengthIndex = 0;
3489 static const int kEnumCacheIndex = 1;
3490 static const int kFirstIndex = 2;
3493 static const int kEnumCacheBridgeLength = 2;
3494 static const int kEnumCacheBridgeCacheIndex = 0;
3495 static const int kEnumCacheBridgeIndicesCacheIndex = 1;
3499 static const int kEnumCacheOffset = kDescriptorLengthOffset +
kPointerSize;
3506 static const int kDescriptorKey = 0;
3507 static const int kDescriptorDetails = 1;
3508 static const int kDescriptorValue = 2;
3509 static const int kDescriptorSize = 3;
3513 void PrintDescriptors(FILE* out = stdout);
3518 bool IsSortedNoDuplicates(
int valid_descriptors = -1);
3521 bool IsConsistentWithBackPointers(
Map* current_map);
3530 return ToKeyIndex(number_of_descriptors);
3538 descs_(descs), index_(index) { }
3540 inline PropertyType type() {
return descs_->GetType(index_); }
3541 inline Object* GetCallbackObject() {
return descs_->GetValue(index_); }
3544 DescriptorArray* descs_;
3549 static int ToKeyIndex(
int descriptor_number) {
3550 return kFirstIndex +
3551 (descriptor_number * kDescriptorSize) +
3555 static int ToDetailsIndex(
int descriptor_number) {
3556 return kFirstIndex +
3557 (descriptor_number * kDescriptorSize) +
3561 static int ToValueIndex(
int descriptor_number) {
3562 return kFirstIndex +
3563 (descriptor_number * kDescriptorSize) +
3568 inline void SwapSortedKeys(
int first,
int second);
3576 template<SearchMode search_mode,
typename T>
3577 inline int LinearSearch(
T* array, Name* name,
int len,
int valid_entries);
3580 template<SearchMode search_mode,
typename T>
3581 inline int Search(
T* array, Name* name,
int valid_entries = 0);
3617 template<
typename Key>
3620 static const bool UsesSeed =
false;
3621 static uint32_t
Hash(Key key) {
return 0; }
3629 return HashForObject(key,
object);
3633 template<
typename Shape,
typename Key>
3638 if (Shape::UsesSeed) {
3639 return Shape::SeededHash(key,
3640 GetHeap()->HashSeed());
3642 return Shape::Hash(key);
3647 if (Shape::UsesSeed) {
3648 return Shape::SeededHashForObject(key,
3649 GetHeap()->HashSeed(),
object);
3651 return Shape::HashForObject(key,
object);
3677 SetNumberOfElements(NumberOfElements() - 1);
3678 SetNumberOfDeletedElements(NumberOfDeletedElements() + 1);
3681 SetNumberOfElements(NumberOfElements() - n);
3682 SetNumberOfDeletedElements(NumberOfDeletedElements() + n);
3688 int at_least_space_for,
3694 static int ComputeCapacity(
int at_least_space_for);
3702 return !k->IsTheHole() && !k->IsUndefined();
3706 void IteratePrefix(ObjectVisitor* visitor);
3707 void IterateElements(ObjectVisitor* visitor);
3713 INLINE(
static uint32_t GetProbeOffset(uint32_t n)) {
3714 return (n + n * n) >> 1;
3717 static const int kNumberOfElementsIndex = 0;
3718 static const int kNumberOfDeletedElementsIndex = 1;
3719 static const int kCapacityIndex = 2;
3720 static const int kPrefixStartIndex = 3;
3721 static const int kElementsStartIndex =
3722 kPrefixStartIndex + Shape::kPrefixSize;
3723 static const int kEntrySize = Shape::kEntrySize;
3724 static const int kElementsStartOffset =
3726 static const int kCapacityOffset =
3730 static const int kNotFound = -1;
3735 static const int kMaxCapacity =
3739 inline int FindEntry(Key key);
3740 int FindEntry(
Isolate* isolate, Key key);
3743 void Rehash(Key key);
3751 uint32_t FindInsertionEntry(uint32_t hash);
3755 return (entry * kEntrySize) + kElementsStartIndex;
3774 ASSERT(capacity <= kMaxCapacity);
3782 return (hash + GetProbeOffset(number)) & (size - 1);
3786 return hash & (size - 1);
3790 uint32_t last, uint32_t number, uint32_t
size) {
3791 return (last + number) & (size - 1);
3797 uint32_t EntryForProbe(Key key,
Object* k,
int probe, uint32_t expected);
3819 virtual bool IsMatch(
Object* other) = 0;
3821 virtual uint32_t Hash() = 0;
3823 virtual uint32_t HashForObject(
Object* key) = 0;
3848 static const int kPrefixSize = 0;
3849 static const int kEntrySize = 1;
3870 bool LookupStringIfExists(
String* str,
String** result);
3877 template <
bool seq_ascii>
friend class JsonParser;
3901 static const int kPrefixSize = 0;
3902 static const int kEntrySize = 2;
3922 template <
typename Shape,
typename Key>
3942 return PropertyDetails(
3965 int NumberOfEnumElements();
3971 SortMode sort_mode);
3976 SortMode sort_mode);
3981 this->set(kNextEnumerationIndexIndex,
Smi::FromInt(index));
3991 int at_least_space_for,
3998 void Print(FILE* out = stdout);
4004 inline void SetEntry(
int entry,
4007 inline void SetEntry(
int entry,
4010 PropertyDetails details);
4014 PropertyDetails details);
4023 PropertyDetails details,
4028 static const int kMaxNumberKeyIndex =
4030 static const int kNextEnumerationIndexIndex = kMaxNumberKeyIndex + 1;
4036 static inline bool IsMatch(
Name* key,
Object* other);
4037 static inline uint32_t Hash(
Name* key);
4038 static inline uint32_t HashForObject(
Name* key,
Object*
object);
4041 static const int kPrefixSize = 2;
4042 static const int kEntrySize = 3;
4043 static const bool kIsEnumerable =
true;
4050 ASSERT(obj->IsDictionary());
4056 static void DoGenerateNewEnumerationIndices(
4062 int unused_property_fields);
4066 int FindEntry(
Name* key);
4072 static inline bool IsMatch(uint32_t key,
Object* other);
4075 static const int kEntrySize = 3;
4076 static const bool kIsEnumerable =
false;
4082 static const bool UsesSeed =
true;
4083 static const int kPrefixSize = 2;
4085 static inline uint32_t SeededHash(uint32_t key, uint32_t seed);
4086 static inline uint32_t SeededHashForObject(uint32_t key,
4094 static const int kPrefixSize = 0;
4096 static inline uint32_t Hash(uint32_t key);
4097 static inline uint32_t HashForObject(uint32_t key,
Object*
object);
4102 :
public Dictionary<SeededNumberDictionaryShape, uint32_t> {
4105 ASSERT(obj->IsDictionary());
4115 PropertyDetails details);
4118 PropertyDetails details);
4126 PropertyDetails details);
4130 PropertyDetails details);
4132 void UpdateMaxNumberKey(uint32_t key);
4139 inline bool requires_slow_elements();
4140 inline void set_requires_slow_elements();
4145 inline uint32_t max_number_key();
4148 static const int kRequiresSlowElementsMask = 1;
4149 static const int kRequiresSlowElementsTagSize = 1;
4150 static const uint32_t kRequiresSlowElementsLimit = (1 << 29) - 1;
4155 :
public Dictionary<UnseededNumberDictionaryShape, uint32_t> {
4158 ASSERT(obj->IsDictionary());
4177 template <
int entrysize>
4180 static inline bool IsMatch(
Object* key,
Object* other);
4181 static inline uint32_t Hash(
Object* key);
4182 static inline uint32_t HashForObject(
Object* key,
Object*
object);
4185 static const int kPrefixSize = 0;
4186 static const int kEntrySize = entrysize;
4195 ASSERT(obj->IsHashTable());
4200 bool Contains(
Object* key);
4227 ASSERT(obj->IsHashTable());
4255 void RemoveEntry(
int entry);
4258 static inline int EntryToValueIndex(
int entry) {
4259 return EntryToIndex(entry) + 1;
4264 template <
int entrysize>
4267 static inline bool IsMatch(
Object* key,
Object* other);
4268 static inline uint32_t Hash(
Object* key);
4269 static inline uint32_t HashForObject(
Object* key,
Object*
object);
4272 static const int kPrefixSize = 0;
4273 static const int kEntrySize = entrysize;
4283 ASSERT(obj->IsHashTable());
4297 int capacity = Capacity();
4298 for (
int i = 0; i < capacity; i++) {
4299 set(EntryToIndex(i), value);
4300 set(EntryToValueIndex(i), value);
4310 static inline int EntryToValueIndex(
int entry) {
4311 return EntryToIndex(entry) + 1;
4325 static const int kFactoryIndex = 0;
4326 static const int kFingerIndex = kFactoryIndex + 1;
4327 static const int kCacheSizeIndex = kFingerIndex + 1;
4328 static const int kDummyIndex = kCacheSizeIndex + 1;
4329 static const int kEntriesIndex = kDummyIndex + 1;
4331 static const int kEntrySize = 2;
4337 inline void MakeZeroSize();
4338 inline void Clear();
4341 inline void set_size(
int size);
4342 inline int finger_index();
4343 inline void set_finger_index(
int finger_index);
4383 int StackSlotCount();
4392 int ContextLength();
4395 bool HasFunctionName();
4398 bool HasHeapAllocatedLocals();
4407 String* ParameterName(
int var);
4410 String* LocalName(
int var);
4413 String* StackLocalName(
int var);
4416 String* ContextLocalName(
int var);
4428 int StackSlotIndex(
String* name);
4435 int ContextSlotIndex(
String* name,
4442 int ParameterIndex(
String* name);
4474 #define FOR_EACH_NUMERIC_FIELD(V) \
4477 V(StackLocalCount) \
4478 V(ContextLocalCount)
4480 #define FIELD_ACCESSORS(name) \
4481 void Set##name(int value) { \
4482 set(k##name, Smi::FromInt(value)); \
4485 if (length() > 0) { \
4486 return Smi::cast(get(k##name))->value(); \
4492 #undef FIELD_ACCESSORS
4496 #define DECL_INDEX(name) k##name,
4499 #undef FOR_EACH_NUMERIC_FIELD
4530 int ParameterEntriesIndex();
4531 int StackLocalEntriesIndex();
4532 int ContextLocalNameEntriesIndex();
4533 int ContextLocalInfoEntriesIndex();
4534 int FunctionNameEntryIndex();
4537 enum FunctionVariableInfo {
4545 class ScopeTypeField:
public BitField<ScopeType, 0, 3> {};
4546 class CallsEvalField:
public BitField<bool, 3, 1> {};
4547 class StrictModeField:
public BitField<StrictMode, 4, 1> {};
4548 class FunctionVariableField:
public BitField<FunctionVariableInfo, 5, 2> {};
4549 class FunctionVariableMode:
public BitField<VariableMode, 7, 3> {};
4553 class ContextLocalMode:
public BitField<VariableMode, 0, 3> {};
4554 class ContextLocalInitFlag:
public BitField<InitializationFlag, 3, 1> {};
4563 static const int kEntries = 64;
4585 inline byte get(
int index);
4586 inline void set(
int index,
byte value);
4589 inline int get_int(
int index);
4605 inline Address GetDataStartAddress();
4615 return SizeFor(this->length());
4624 static const
int kMaxSize = 512 *
MB;
4626 static const
int kMaxLength = kMaxSize - kHeaderSize;
4629 DISALLOW_IMPLICIT_CONSTRUCTORS(
ByteArray);
4639 inline void set_size(
int value);
4652 static const
int kSizeOffset = HeapObject::kHeaderSize;
4653 static const
int kHeaderSize = kSizeOffset + kPointerSize;
4658 DISALLOW_IMPLICIT_CONSTRUCTORS(
FreeSpace);
4663 #define TYPED_ARRAYS(V) \
4664 V(Uint8, uint8, UINT8, uint8_t, 1) \
4665 V(Int8, int8, INT8, int8_t, 1) \
4666 V(Uint16, uint16, UINT16, uint16_t, 2) \
4667 V(Int16, int16, INT16, int16_t, 2) \
4668 V(Uint32, uint32, UINT32, uint32_t, 4) \
4669 V(Int32, int32, INT32, int32_t, 4) \
4670 V(Float32, float32, FLOAT32, float, 4) \
4671 V(Float64, float64, FLOAT64, double, 8) \
4672 V(Uint8Clamped, uint8_clamped, UINT8_CLAMPED, uint8_t, 1)
4699 static const
int kMaxLength = 0x3fffffff;
4702 static const
int kExternalPointerOffset =
4704 static const
int kHeaderSize = kExternalPointerOffset + kPointerSize;
4722 inline uint8_t* external_uint8_clamped_pointer();
4725 inline uint8_t get_scalar(
int index);
4727 inline void set(
int index, uint8_t value);
4752 inline int8_t get_scalar(
int index);
4754 inline void set(
int index, int8_t value);
4779 inline uint8_t get_scalar(
int index);
4781 inline void set(
int index, uint8_t value);
4806 inline int16_t get_scalar(
int index);
4808 inline void set(
int index,
int16_t value);
4833 inline uint16_t get_scalar(
int index);
4835 inline void set(
int index,
uint16_t value);
4860 inline int32_t get_scalar(
int index);
4862 inline void set(
int index,
int32_t value);
4887 inline uint32_t get_scalar(
int index);
4889 inline void set(
int index, uint32_t value);
4914 inline float get_scalar(
int index);
4916 inline void set(
int index,
float value);
4941 inline double get_scalar(
int index);
4943 inline void set(
int index,
double value);
4975 inline void* DataPtr();
4977 inline int DataSize();
4984 template <
class Traits>
4998 return ElementOffset(length);
5001 inline ElementType get_scalar(
int index);
5003 inline void set(
int index, ElementType value);
5005 static inline ElementType from_int(
int value);
5006 static inline ElementType from_double(
double value);
5023 #define FIXED_TYPED_ARRAY_TRAITS(Type, type, TYPE, elementType, size) \
5024 class Type##ArrayTraits { \
5026 typedef elementType ElementType; \
5027 static const InstanceType kInstanceType = FIXED_##TYPE##_ARRAY_TYPE; \
5028 static const char* Designator() { return #type " array"; } \
5029 static inline MaybeObject* ToObject(Heap* heap, elementType scalar); \
5030 static inline elementType defaultValue(); \
5033 typedef FixedTypedArray<Type##ArrayTraits> Fixed##Type##Array;
5037 #undef FIXED_TYPED_ARRAY_TRAITS
5049 static const int kTranslationByteArrayIndex = 0;
5050 static const int kInlinedFunctionCountIndex = 1;
5051 static const int kLiteralArrayIndex = 2;
5052 static const int kOsrAstIdIndex = 3;
5053 static const int kOsrPcOffsetIndex = 4;
5054 static const int kOptimizationIdIndex = 5;
5055 static const int kSharedFunctionInfoIndex = 6;
5056 static const int kFirstDeoptEntryIndex = 7;
5059 static const int kAstIdRawOffset = 0;
5060 static const int kTranslationIndexOffset = 1;
5061 static const int kArgumentsStackHeightOffset = 2;
5062 static const int kPcOffset = 3;
5063 static const int kDeoptEntrySize = 4;
5066 #define DEFINE_ELEMENT_ACCESSORS(name, type) \
5068 return type::cast(get(k##name##Index)); \
5070 void Set##name(type* value) { \
5071 set(k##name##Index, value); \
5082 #undef DEFINE_ELEMENT_ACCESSORS
5085 #define DEFINE_ENTRY_ACCESSORS(name, type) \
5086 type* name(int i) { \
5087 return type::cast(get(IndexForEntry(i) + k##name##Offset)); \
5089 void Set##name(int i, type* value) { \
5090 set(IndexForEntry(i) + k##name##Offset, value); \
5098 #undef DEFINE_ENTRY_ACCESSORS
5109 return (length() - kFirstDeoptEntryIndex) / kDeoptEntrySize;
5114 int deopt_entry_count,
5120 #ifdef ENABLE_DISASSEMBLER
5121 void DeoptimizationInputDataPrint(FILE* out);
5125 static int IndexForEntry(
int i) {
5126 return kFirstDeoptEntryIndex + (i * kDeoptEntrySize);
5129 static int LengthFor(
int entry_count) {
5130 return IndexForEntry(entry_count);
5156 return deopt_points * 2;
5161 int number_of_deopt_points,
5167 #if defined(OBJECT_PRINT) || defined(ENABLE_DISASSEMBLER)
5168 void DeoptimizationOutputDataPrint(FILE* out);
5176 class SafepointEntry;
5177 class TypeFeedbackInfo;
5186 #define NON_IC_KIND_LIST(V) \
5188 V(OPTIMIZED_FUNCTION) \
5194 #define IC_KIND_LIST(V) \
5204 #define CODE_KIND_LIST(V) \
5205 NON_IC_KIND_LIST(V) \
5209 #define DEFINE_CODE_KIND_ENUM(name) name,
5211 #undef DEFINE_CODE_KIND_ENUM
5219 static const char* Kind2String(Kind kind);
5227 static const int kPrologueOffsetNotSet = -1;
5229 #ifdef ENABLE_DISASSEMBLER
5232 static const char* StubType2String(
StubType type);
5234 void Disassemble(
const char* name, FILE* out = stdout);
5235 #endif // ENABLE_DISASSEMBLER
5238 inline int instruction_size();
5239 inline void set_instruction_size(
int value);
5243 void InvalidateRelocation();
5244 void InvalidateEmbeddedObjects();
5257 inline
Object* type_feedback_info();
5258 inline
void set_type_feedback_info(
5260 inline
int stub_info();
5261 inline
void set_stub_info(
int info);
5274 inline
void set_ic_age(
int count);
5275 inline
int ic_age();
5279 inline
int prologue_offset();
5280 inline
void set_prologue_offset(
int offset);
5283 inline ByteArray* unchecked_relocation_info();
5285 inline
int relocation_size();
5289 inline
void set_flags(
Flags flags);
5299 inline
bool is_inline_cache_stub();
5300 inline
bool is_debug_stub();
5301 inline
bool is_handler() {
return kind() ==
HANDLER; }
5310 inline bool is_keyed_stub();
5313 inline void set_raw_kind_specific_flags1(
int value);
5314 inline void set_raw_kind_specific_flags2(
int value);
5317 inline int major_key();
5318 inline void set_major_key(
int value);
5319 inline bool has_major_key();
5323 bool is_crankshafted();
5324 inline void set_is_crankshafted(
bool value);
5327 inline bool optimizable();
5328 inline void set_optimizable(
bool value);
5332 inline bool has_deoptimization_support();
5333 inline void set_has_deoptimization_support(
bool value);
5337 inline bool has_debug_break_slots();
5338 inline void set_has_debug_break_slots(
bool value);
5342 inline bool is_compiled_optimizable();
5343 inline void set_compiled_optimizable(
bool value);
5349 inline void set_allow_osr_at_loop_nesting_level(
int level);
5350 inline int allow_osr_at_loop_nesting_level();
5354 inline int profiler_ticks();
5355 inline void set_profiler_ticks(
int ticks);
5359 inline unsigned stack_slots();
5360 inline void set_stack_slots(
unsigned slots);
5364 inline unsigned safepoint_table_offset();
5365 inline void set_safepoint_table_offset(
unsigned offset);
5369 inline unsigned back_edge_table_offset();
5370 inline void set_back_edge_table_offset(
unsigned offset);
5372 inline bool back_edges_patched_for_osr();
5373 inline void set_back_edges_patched_for_osr(
bool value);
5376 inline byte to_boolean_state();
5380 inline bool has_function_cache();
5381 inline void set_has_function_cache(
bool flag);
5386 inline bool marked_for_deoptimization();
5387 inline void set_marked_for_deoptimization(
bool flag);
5391 inline void set_constant_pool(
Object* constant_pool);
5394 SafepointEntry GetSafepointEntry(
Address pc);
5397 Object* FindNthObject(
int n,
Map* match_map);
5403 Map* FindFirstMap();
5408 Code* FindFirstHandler();
5415 Name* FindFirstName();
5417 class FindAndReplacePattern;
5422 void FindAndReplace(
const FindAndReplacePattern& pattern);
5431 inline void WipeOutHeader();
5434 static inline Flags ComputeFlags(
5441 static inline Flags ComputeMonomorphicFlags(
5447 static inline Flags ComputeHandlerFlags(
5453 static inline StubType ExtractTypeFromFlags(Flags
flags);
5454 static inline Kind ExtractKindFromFlags(Flags
flags);
5458 static inline Flags RemoveTypeFromFlags(Flags
flags);
5461 static inline Code* GetCodeFromTargetAddress(
Address address);
5464 static inline Object* GetObjectFromEntryAddress(
Address location_of_address);
5467 inline byte* instruction_start();
5470 inline byte* instruction_end();
5473 inline int body_size();
5476 inline byte* relocation_start();
5479 inline byte* entry();
5482 inline bool contains(
byte*
pc);
5486 void Relocate(intptr_t delta);
5489 void CopyFrom(
const CodeDesc& desc);
5501 ASSERT_EQ(static_cast<int>(instruction_start() - address()),
5508 int SourceStatementPosition(
Address pc);
5515 inline void CodeIterateBody(ObjectVisitor* v);
5517 template<
typename StaticVisitor>
5518 inline void CodeIterateBody(
Heap* heap);
5523 void ClearInlineCaches();
5524 void ClearInlineCaches(Kind kind);
5526 void ClearTypeFeedbackInfo(
Heap* heap);
5528 BailoutId TranslatePcOffsetToAstId(uint32_t pc_offset);
5529 uint32_t TranslateAstIdToPcOffset(
BailoutId ast_id);
5531 #define DECLARE_CODE_AGE_ENUM(X) k##X##CodeAge,
5533 kNotExecutedCodeAge = -2,
5534 kExecutedOnceCodeAge = -1,
5538 kFirstCodeAge = kNotExecutedCodeAge,
5539 kLastCodeAge = kAfterLastCodeAge - 1,
5540 kCodeAgeCount = kAfterLastCodeAge - kNotExecutedCodeAge - 1,
5541 kIsOldCodeAge = kSexagenarianCodeAge,
5542 kPreAgedCodeAge = kIsOldCodeAge - 1
5544 #undef DECLARE_CODE_AGE_ENUM
5550 static void MakeCodeAgeSequenceYoung(
byte* sequence,
Isolate* isolate);
5551 static void MarkCodeAsExecuted(
byte* sequence,
Isolate* isolate);
5553 static bool IsYoungSequence(
byte* sequence);
5563 void PrintDeoptLocation(FILE* out,
int bailout_id);
5567 void VerifyEmbeddedObjectsDependency();
5571 return is_optimized_code() && IsWeakObjectInOptimizedCode(
object);
5574 inline bool IsWeakObjectInOptimizedCode(
Object*
object);
5578 static const int kMaxLoopNestingMarker = 6;
5582 static const int kRelocationInfoOffset = kInstructionSizeOffset +
kIntSize;
5583 static const int kHandlerTableOffset = kRelocationInfoOffset +
kPointerSize;
5584 static const int kDeoptimizationDataOffset =
5586 static const int kTypeFeedbackInfoOffset =
5588 static const int kNextCodeLinkOffset = kTypeFeedbackInfoOffset +
kPointerSize;
5590 static const int kICAgeOffset =
5592 static const int kFlagsOffset = kICAgeOffset +
kIntSize;
5593 static const int kKindSpecificFlags1Offset = kFlagsOffset +
kIntSize;
5594 static const int kKindSpecificFlags2Offset =
5595 kKindSpecificFlags1Offset +
kIntSize;
5597 static const int kPrologueOffset = kKindSpecificFlags2Offset +
kIntSize;
5600 static const int kHeaderPaddingStart = kConstantPoolOffset +
kIntSize;
5604 static const int kHeaderSize =
5608 static const int kOptimizableOffset = kKindSpecificFlags1Offset;
5610 static const int kFullCodeFlags = kOptimizableOffset + 1;
5616 static const int kAllowOSRAtLoopNestingLevelOffset = kFullCodeFlags + 1;
5617 static const int kProfilerTicksOffset = kAllowOSRAtLoopNestingLevelOffset + 1;
5626 PlatformSmiTagging::kSmiValueSize - 11 + 1> {};
5629 static const int kStackSlotsFirstBit = 0;
5630 static const int kStackSlotsBitCount = 24;
5631 static const int kHasFunctionCacheFirstBit =
5632 kStackSlotsFirstBit + kStackSlotsBitCount;
5633 static const int kHasFunctionCacheBitCount = 1;
5634 static const int kMarkedForDeoptimizationFirstBit =
5635 kStackSlotsFirstBit + kStackSlotsBitCount + 1;
5636 static const int kMarkedForDeoptimizationBitCount = 1;
5638 STATIC_ASSERT(kStackSlotsFirstBit + kStackSlotsBitCount <= 32);
5639 STATIC_ASSERT(kHasFunctionCacheFirstBit + kHasFunctionCacheBitCount <= 32);
5641 kMarkedForDeoptimizationBitCount <= 32);
5644 kStackSlotsFirstBit, kStackSlotsBitCount> {};
5646 kHasFunctionCacheFirstBit, kHasFunctionCacheBitCount> {};
5648 kMarkedForDeoptimizationFirstBit,
5649 kMarkedForDeoptimizationBitCount> {};
5652 static const int kIsCrankshaftedBit = 0;
5654 kIsCrankshaftedBit, 1> {};
5657 static const int kStubMajorKeyFirstBit = kIsCrankshaftedBit + 1;
5658 static const int kSafepointTableOffsetFirstBit =
5660 static const int kSafepointTableOffsetBitCount = 24;
5662 STATIC_ASSERT(kStubMajorKeyFirstBit + kStubMajorKeyBits <= 32);
5664 kSafepointTableOffsetBitCount <= 32);
5666 kSafepointTableOffsetBitCount <= 32);
5669 kSafepointTableOffsetFirstBit,
5670 kSafepointTableOffsetBitCount> {};
5672 kStubMajorKeyFirstBit, kStubMajorKeyBits> {};
5676 kIsCrankshaftedBit + 1, 29> {};
5678 kIsCrankshaftedBit + 1 + 29, 1> {};
5680 static const int kArgumentsBits = 16;
5681 static const int kMaxArguments = (1 << kArgumentsBits) - 1;
5684 static const int kFlagsNotUsedInLookup =
5685 TypeField::kMask | CacheHolderField::kMask;
5691 void ClearInlineCaches(
Kind* kind);
5694 byte* FindCodeAgeSequence();
5695 static void GetCodeAgeAndParity(
Code*
code,
Age* age,
5697 static void GetCodeAgeAndParity(
byte* sequence,
Age* age,
5702 static void PatchPlatformCodeAge(
Isolate* isolate,
5757 kGroupCount = kAllocationSiteTransitionChangedGroup + 1
5766 int at(
int i) {
return start_indexes_[i]; }
5769 int start_indexes_[kGroupCount + 1];
5772 bool Contains(DependencyGroup group,
Code*
code);
5774 DependencyGroup group,
5776 void UpdateToFinishedCode(DependencyGroup group,
5782 void DeoptimizeDependentCodeGroup(
Isolate* isolate,
5785 bool MarkCodeForDeoptimization(
Isolate* isolate,
5790 inline int number_of_entries(DependencyGroup group);
5791 inline void set_number_of_entries(DependencyGroup group,
int value);
5792 inline bool is_code_at(
int i);
5793 inline Code* code_at(
int i);
5795 inline void set_object_at(
int i,
Object*
object);
5796 inline Object** slot_at(
int i);
5797 inline Object* object_at(
int i);
5798 inline void clear_at(
int i);
5799 inline void copy(
int from,
int to);
5803 DependencyGroup group);
5808 inline void ExtendGroup(DependencyGroup group);
5809 static const int kCodesStartIndex = kGroupCount;
5817 class Map:
public HeapObject {
5822 inline int instance_size();
5823 inline void set_instance_size(
int value);
5826 inline int inobject_properties();
5827 inline void set_inobject_properties(
int value);
5830 inline int pre_allocated_property_fields();
5831 inline void set_pre_allocated_property_fields(
int value);
5839 inline int unused_property_fields();
5840 inline void set_unused_property_fields(
int value);
5843 inline byte bit_field();
5844 inline void set_bit_field(
byte value);
5847 inline byte bit_field2();
5848 inline void set_bit_field2(
byte value);
5851 inline uint32_t bit_field3();
5852 inline void set_bit_field3(uint32_t bits);
5855 0, kDescriptorIndexBitCount> {};
5857 kDescriptorIndexBitCount, kDescriptorIndexBitCount> {};
5858 STATIC_ASSERT(kDescriptorIndexBitCount + kDescriptorIndexBitCount == 20);
5874 inline void set_non_instance_prototype(
bool value);
5875 inline bool has_non_instance_prototype();
5880 inline void set_function_with_prototype(
bool value);
5881 inline bool function_with_prototype();
5886 set_bit_field(bit_field() | (1 << kIsHiddenPrototype));
5890 return ((1 << kIsHiddenPrototype) & bit_field()) != 0;
5895 set_bit_field(bit_field() | (1 << kHasNamedInterceptor));
5899 return ((1 << kHasNamedInterceptor) & bit_field()) != 0;
5904 set_bit_field(bit_field() | (1 << kHasIndexedInterceptor));
5908 return ((1 << kHasIndexedInterceptor) & bit_field()) != 0;
5918 set_bit_field(bit_field() | (1 << kIsUndetectable));
5922 return ((1 << kIsUndetectable) & bit_field()) != 0;
5927 set_bit_field(bit_field() | (1 << kIsObserved));
5931 return ((1 << kIsObserved) & bit_field()) != 0;
5934 inline void set_is_extensible(
bool value);
5935 inline bool is_extensible();
5940 set_bit_field2((bit_field2() & ~kElementsKindMask) |
5941 (elements_kind << kElementsKindShift));
5942 ASSERT(this->elements_kind() == elements_kind);
5947 (bit_field2() & kElementsKindMask) >> kElementsKindShift);
5993 static bool IsValidElementsTransition(
ElementsKind from_kind,
5998 bool DictionaryElementsInPrototypeChainOnly();
6000 inline bool HasTransitionArray();
6001 inline bool HasElementsTransition();
6002 inline Map* elements_transition_map();
6004 Map* transitioned_map);
6005 inline void SetTransition(
int transition_index,
Map* target);
6006 inline Map* GetTransition(
int transition_index);
6017 inline
void ClearTransitions(
Heap* heap,
6020 void DeprecateTransitionTree();
6027 inline
int GetInObjectPropertyOffset(
int index);
6029 int NumberOfFields();
6031 bool InstancesNeedRewriting(
Map* target,
6032 int target_number_of_fields,
6033 int target_inobject,
6035 static
Handle<
Map> GeneralizeAllFieldRepresentations(
6038 static
Handle<
Map> GeneralizeRepresentation(
6043 static
Handle<
Map> CopyGeneralizeAllRepresentations(
6048 const
char* reason);
6050 void PrintGeneralization(FILE* file,
6055 bool constant_to_field,
6061 String* constructor_name();
6065 inline
void set_attached_to_shared_function_info(
bool value);
6067 inline
bool attached_to_shared_function_info();
6072 inline
void set_is_shared(
bool value);
6073 inline
bool is_shared();
6079 inline
void set_dictionary_map(
bool value);
6080 inline
bool is_dictionary_map();
6084 inline
void set_is_access_check_needed(
bool access_check_needed);
6085 inline
bool is_access_check_needed();
6088 inline
bool has_code_cache();
6110 inline
Object* GetBackPointer();
6111 inline
void SetBackPointer(
Object* value,
6113 inline
void init_back_pointer(
Object* undefined);
6123 inline
FixedArray* GetPrototypeTransitions();
6126 inline
bool HasPrototypeTransitions();
6128 inline HeapObject* UncheckedPrototypeTransitions();
6131 static const
int kProtoTransitionHeaderSize = 1;
6132 static const
int kProtoTransitionNumberOfEntriesOffset = 0;
6133 static const
int kProtoTransitionElementsPerEntry = 2;
6134 static const
int kProtoTransitionPrototypeOffset = 0;
6135 static const
int kProtoTransitionMapOffset = 1;
6137 inline
int NumberOfProtoTransitions() {
6138 FixedArray* cache = GetPrototypeTransitions();
6139 if (cache->
length() == 0)
return 0;
6145 FixedArray* cache = GetPrototypeTransitions();
6147 cache->
set(kProtoTransitionNumberOfEntriesOffset,
Smi::FromInt(value));
6153 inline void LookupDescriptor(
JSObject* holder,
6155 LookupResult* result);
6157 inline void LookupTransition(
JSObject* holder,
6159 LookupResult* result);
6161 inline PropertyDetails GetLastDescriptorDetails();
6166 inline bool CanHaveMoreTransitions();
6169 int number_of_own_descriptors = NumberOfOwnDescriptors();
6170 ASSERT(number_of_own_descriptors > 0);
6171 return number_of_own_descriptors - 1;
6175 return NumberOfOwnDescriptorsBits::decode(bit_field3());
6179 ASSERT(number <= instance_descriptors()->number_of_descriptors());
6180 set_bit_field3(NumberOfOwnDescriptorsBits::update(bit_field3(), number));
6183 inline Cell* RetrieveDescriptorsPointer();
6186 return EnumLengthBits::decode(bit_field3());
6190 if (length != kInvalidEnumCacheSentinel) {
6192 ASSERT(length == 0 || instance_descriptors()->HasEnumCache());
6193 ASSERT(length <= NumberOfOwnDescriptors());
6195 set_bit_field3(EnumLengthBits::update(bit_field3(), length));
6198 inline bool owns_descriptors();
6199 inline void set_owns_descriptors(
bool is_shared);
6200 inline bool has_instance_call_handler();
6201 inline void set_has_instance_call_handler();
6202 inline void freeze();
6203 inline bool is_frozen();
6204 inline void mark_unstable();
6205 inline bool is_stable();
6206 inline void set_migration_target(
bool value);
6207 inline bool is_migration_target();
6208 inline void deprecate();
6209 inline bool is_deprecated();
6210 inline bool CanBeDeprecated();
6239 Descriptor* descriptor);
6240 MUST_USE_RESULT MaybeObject* CopyAddDescriptor(Descriptor* descriptor,
6242 MUST_USE_RESULT MaybeObject* CopyInsertDescriptor(Descriptor* descriptor,
6246 Descriptor* descriptor,
6263 inline void AppendDescriptor(Descriptor* desc,
6272 int NextFreePropertyIndex();
6282 return pre_allocated_property_fields() + unused_property_fields() -
6283 inobject_properties();
6295 inline void ClearCodeCache(
Heap* heap);
6305 static void AppendCallbackDescriptors(
Handle<Map> map,
6308 static void EnsureDescriptorSlack(
Handle<Map> map,
int slack);
6318 void RemoveFromCodeCache(
Name* name,
Code*
code,
int index);
6323 void ClearNonLiveTransitions(
Heap* heap);
6328 bool EquivalentToForTransition(
Map* other);
6346 Map* FindTransitionedMap(
MapList* candidates);
6354 void ZapPrototypeTransitions();
6355 void ZapTransitions();
6380 inline void NotifyLeafMapLayoutChange();
6382 inline bool CanOmitMapChecks();
6390 bool IsMapInArrayPrototypeChain();
6397 void SharedMapVerify();
6398 void VerifyOmittedMapChecks();
6401 inline int visitor_id();
6402 inline void set_visitor_id(
int visitor_id);
6404 typedef void (*TraverseCallback)(
Map*
map,
void* data);
6406 void TraverseTransitionTree(TraverseCallback callback,
void* data);
6415 static const int kMaxCachedPrototypeTransitions = 256;
6422 static const int kMaxPreAllocatedPropertyFields = 255;
6426 static const int kInstanceAttributesOffset = kInstanceSizesOffset +
kIntSize;
6427 static const int kPrototypeOffset = kInstanceAttributesOffset +
kIntSize;
6433 static const int kTransitionsOrBackPointerOffset =
6435 static const int kDescriptorsOffset =
6445 static const int kPointerFieldsEndOffset = kBitField3Offset +
kPointerSize;
6448 static const int kInstanceSizeOffset = kInstanceSizesOffset + 0;
6449 static const int kInObjectPropertiesByte = 1;
6450 static const int kInObjectPropertiesOffset =
6451 kInstanceSizesOffset + kInObjectPropertiesByte;
6452 static const int kPreAllocatedPropertyFieldsByte = 2;
6453 static const int kPreAllocatedPropertyFieldsOffset =
6454 kInstanceSizesOffset + kPreAllocatedPropertyFieldsByte;
6455 static const int kVisitorIdByte = 3;
6456 static const int kVisitorIdOffset = kInstanceSizesOffset + kVisitorIdByte;
6459 static const int kInstanceTypeOffset = kInstanceAttributesOffset + 0;
6460 static const int kUnusedPropertyFieldsOffset = kInstanceAttributesOffset + 1;
6461 static const int kBitFieldOffset = kInstanceAttributesOffset + 2;
6462 static const int kBitField2Offset = kInstanceAttributesOffset + 3;
6467 static const int kUnused = 0;
6468 static const int kHasNonInstancePrototype = 1;
6469 static const int kIsHiddenPrototype = 2;
6470 static const int kHasNamedInterceptor = 3;
6471 static const int kHasIndexedInterceptor = 4;
6472 static const int kIsUndetectable = 5;
6473 static const int kIsObserved = 6;
6474 static const int kIsAccessCheckNeeded = 7;
6477 static const int kIsExtensible = 0;
6478 static const int kStringWrapperSafeForDefaultValueOf = 1;
6479 static const int kAttachedToSharedFunctionInfo = 2;
6482 static const int kElementsKindShift = 3;
6483 static const int kElementsKindBitCount = 5;
6486 static const int kElementsKindMask = (-1 << kElementsKindShift) &
6487 ((1 << (kElementsKindShift + kElementsKindBitCount)) - 1);
6488 static const int8_t kMaximumBitField2FastElementValue =
static_cast<int8_t
>(
6490 static const int8_t kMaximumBitField2FastSmiElementValue =
6493 static const int8_t kMaximumBitField2FastHoleyElementValue =
6496 static const int8_t kMaximumBitField2FastHoleySmiElementValue =
6501 kPointerFieldsEndOffset,
6514 inline void InitializeBody(
int object_size);
6531 static const
int kValueOffset = HeapObject::kHeaderSize;
6532 static const
int kSize = kValueOffset + kPointerSize;
6535 DISALLOW_IMPLICIT_CONSTRUCTORS(
Box);
6551 COMPILATION_TYPE_HOST = 0,
6552 COMPILATION_TYPE_EVAL = 1
6557 COMPILATION_STATE_INITIAL = 0,
6558 COMPILATION_STATE_COMPILED = 1
6602 inline CompilationType compilation_type();
6603 inline
void set_compilation_type(CompilationType type);
6607 inline CompilationState compilation_state();
6608 inline
void set_compilation_state(CompilationState state);
6620 inline
bool HasValidSource();
6626 static const
int kSourceOffset = HeapObject::kHeaderSize;
6627 static const
int kNameOffset = kSourceOffset + kPointerSize;
6628 static const
int kLineOffsetOffset = kNameOffset + kPointerSize;
6629 static const
int kColumnOffsetOffset = kLineOffsetOffset + kPointerSize;
6630 static const
int kContextOffset = kColumnOffsetOffset + kPointerSize;
6631 static const
int kWrapperOffset = kContextOffset + kPointerSize;
6632 static const
int kTypeOffset = kWrapperOffset + kPointerSize;
6633 static const
int kLineEndsOffset = kTypeOffset + kPointerSize;
6634 static const
int kIdOffset = kLineEndsOffset + kPointerSize;
6635 static const
int kEvalFromSharedOffset = kIdOffset + kPointerSize;
6636 static const
int kEvalFrominstructionsOffsetOffset =
6637 kEvalFromSharedOffset + kPointerSize;
6638 static const
int kFlagsOffset =
6639 kEvalFrominstructionsOffsetOffset + kPointerSize;
6640 static const
int kSize = kFlagsOffset + kPointerSize;
6644 static const
int kCompilationTypeBit = 0;
6645 static const
int kCompilationStateBit = 1;
6646 static const
int kIsSharedCrossOriginBit = 2;
6648 DISALLOW_IMPLICIT_CONSTRUCTORS(
Script);
6661 #define FUNCTIONS_WITH_ID_LIST(V) \
6662 V(Array.prototype, push, ArrayPush) \
6663 V(Array.prototype, pop, ArrayPop) \
6664 V(Function.prototype, apply, FunctionApply) \
6665 V(String.prototype, charCodeAt, StringCharCodeAt) \
6666 V(String.prototype, charAt, StringCharAt) \
6667 V(String, fromCharCode, StringFromCharCode) \
6668 V(Math, floor, MathFloor) \
6669 V(Math, round, MathRound) \
6670 V(Math, ceil, MathCeil) \
6671 V(Math, abs, MathAbs) \
6672 V(Math, log, MathLog) \
6673 V(Math, exp, MathExp) \
6674 V(Math, sqrt, MathSqrt) \
6675 V(Math, pow, MathPow) \
6676 V(Math, max, MathMax) \
6677 V(Math, min, MathMin) \
6678 V(Math, imul, MathImul)
6682 #define DECLARE_FUNCTION_ID(ignored1, ignore2, name) \
6685 #undef DECLARE_FUNCTION_ID
6696 class SharedFunctionInfo:
public HeapObject {
6703 inline void ReplaceCode(
Code*
code);
6716 FixedArray* GetLiteralsFromOptimizedCodeMap(
int index);
6718 Code* GetCodeFromOptimizedCodeMap(
int index);
6721 void ClearOptimizedCodeMap();
6724 void EvictFromOptimizedCodeMap(
Code* optimized_code,
const char* reason);
6727 void TrimOptimizedCodeMap(
int shrink_by);
6741 static const int kNextMapIndex = 0;
6742 static const int kEntriesStart = 1;
6743 static const int kContextOffset = 0;
6744 static const int kCachedCodeOffset = 1;
6745 static const int kLiteralsOffset = 2;
6746 static const int kOsrAstIdOffset = 3;
6747 static const int kEntryLength = 4;
6748 static const int kInitialLength = kEntriesStart + kEntryLength;
6757 inline
bool is_compiled();
6761 inline
int length();
6762 inline
void set_length(
int value);
6766 inline
void set_formal_parameter_count(
int value);
6770 inline
void DontAdaptArguments();
6773 inline
int expected_nof_properties();
6774 inline
void set_expected_nof_properties(
int value);
6827 static const
int kGenerousAllocationCount = 8;
6831 inline
int construction_count();
6832 inline
void set_construction_count(
int value);
6842 inline
bool IsInobjectSlackTrackingInProgress();
6849 void StartInobjectSlackTracking(
Map* map);
6853 void CompleteInobjectSlackTracking();
6857 inline
void BeforeVisitingPointers();
6861 void DetachInitialMap();
6865 void AttachInitialMap(
Map* map);
6883 inline
bool IsApiFunction();
6885 inline
bool HasBuiltinFunctionId();
6892 inline
int num_literals();
6893 inline
void set_num_literals(
int value);
6901 inline
void set_start_position_and_type(
int value);
6917 inline
int function_token_position();
6918 inline
void set_function_token_position(
int function_token_position);
6921 inline
int start_position();
6922 inline
void set_start_position(
int start_position);
6925 inline
int end_position();
6926 inline
void set_end_position(
int end_position);
6937 inline
void set_compiler_hints(
int value);
6939 inline
int ast_node_count();
6940 inline
void set_ast_node_count(
int count);
6942 inline
int profiler_ticks();
6946 inline
int ic_age();
6947 inline
void set_ic_age(
int age);
6968 inline
void set_strict_mode(
StrictMode strict_mode);
7019 inline
bool has_deoptimization_support();
7022 void EnableDeoptimizationSupport(
Code* recompiled);
7036 bool HasSourceCode();
7040 inline
int opt_count();
7041 inline
void set_opt_count(
int opt_count);
7044 inline
void set_deopt_count(
int value);
7045 inline
int deopt_count();
7046 inline
void increment_deopt_count();
7050 inline
void set_opt_reenable_tries(
int value);
7051 inline
int opt_reenable_tries();
7053 inline
void TryReenableOptimization();
7056 inline
void set_counters(
int value);
7057 inline
int counters();
7060 inline
void set_opt_count_and_bailout_reason(
int value);
7061 inline
int opt_count_and_bailout_reason();
7064 set_opt_count_and_bailout_reason(
7065 DisabledOptimizationReasonBits::update(opt_count_and_bailout_reason(),
7070 set_bailout_reason(reason);
7071 set_dont_optimize(reason != kNoReason);
7075 bool IsInlineable();
7081 int CalculateInstanceSize();
7084 int CalculateInObjectProperties();
7088 void SourceCodePrint(
StringStream* accumulator,
int max_length);
7092 void ResetForNewContext(
int new_ic_age);
7095 static inline SharedFunctionInfo* cast(
Object* obj);
7098 static const
int kDontAdaptArgumentsSentinel = -1;
7102 static const
int kNameOffset = HeapObject::kHeaderSize;
7103 static const
int kCodeOffset = kNameOffset + kPointerSize;
7104 static const
int kOptimizedCodeMapOffset = kCodeOffset + kPointerSize;
7105 static const
int kScopeInfoOffset = kOptimizedCodeMapOffset + kPointerSize;
7106 static const
int kConstructStubOffset = kScopeInfoOffset + kPointerSize;
7107 static const
int kInstanceClassNameOffset =
7108 kConstructStubOffset + kPointerSize;
7109 static const
int kFunctionDataOffset =
7110 kInstanceClassNameOffset + kPointerSize;
7111 static const
int kScriptOffset = kFunctionDataOffset + kPointerSize;
7112 static const
int kDebugInfoOffset = kScriptOffset + kPointerSize;
7113 static const
int kInferredNameOffset = kDebugInfoOffset + kPointerSize;
7114 static const
int kInitialMapOffset =
7115 kInferredNameOffset + kPointerSize;
7118 static const
int kAstNodeCountOffset =
7119 kInitialMapOffset + kPointerSize;
7120 #if V8_HOST_ARCH_32_BIT
7122 static const int kLengthOffset =
7124 static const int kFormalParameterCountOffset = kLengthOffset +
kPointerSize;
7125 static const int kExpectedNofPropertiesOffset =
7127 static const int kNumLiteralsOffset =
7129 static const int kStartPositionAndTypeOffset =
7131 static const int kEndPositionOffset =
7133 static const int kFunctionTokenPositionOffset =
7135 static const int kCompilerHintsOffset =
7137 static const int kOptCountAndBailoutReasonOffset =
7139 static const int kCountersOffset =
7143 static const int kSize = kCountersOffset +
kPointerSize;
7154 static const int kLengthOffset =
7156 static const int kFormalParameterCountOffset =
7159 static const int kExpectedNofPropertiesOffset =
7160 kFormalParameterCountOffset +
kIntSize;
7161 static const int kNumLiteralsOffset =
7162 kExpectedNofPropertiesOffset +
kIntSize;
7164 static const int kEndPositionOffset =
7166 static const int kStartPositionAndTypeOffset =
7169 static const int kFunctionTokenPositionOffset =
7170 kStartPositionAndTypeOffset +
kIntSize;
7171 static const int kCompilerHintsOffset =
7172 kFunctionTokenPositionOffset +
kIntSize;
7174 static const int kOptCountAndBailoutReasonOffset =
7177 static const int kCountersOffset =
7178 kOptCountAndBailoutReasonOffset +
kIntSize;
7188 #if __BYTE_ORDER == __LITTLE_ENDIAN
7189 static const int kConstructionCountOffset = kCompilerHintsOffset + 3;
7190 #elif __BYTE_ORDER == __BIG_ENDIAN
7191 static const int kConstructionCountOffset = kCompilerHintsOffset + 0;
7193 #error Unknown byte ordering
7205 static const int kIsExpressionBit = 0;
7206 static const int kIsTopLevelBit = 1;
7207 static const int kStartPositionShift = 2;
7208 static const int kStartPositionMask = ~((1 << kStartPositionShift) - 1);
7241 #if V8_HOST_ARCH_32_BIT
7243 static const int kCompilerHintsSmiTagSize =
kSmiTagSize;
7247 static const int kCompilerHintsSmiTagSize = 0;
7248 static const int kCompilerHintsSize =
kIntSize;
7252 SharedFunctionInfo::kCompilerHintsSize *
kBitsPerByte);
7258 static const int kStrictModeBitWithinByte =
7259 (kStrictModeFunction + kCompilerHintsSmiTagSize) %
kBitsPerByte;
7261 static const int kNativeBitWithinByte =
7264 #if __BYTE_ORDER == __LITTLE_ENDIAN
7265 static const int kStrictModeByteOffset = kCompilerHintsOffset +
7266 (kStrictModeFunction + kCompilerHintsSmiTagSize) /
kBitsPerByte;
7267 static const int kNativeByteOffset = kCompilerHintsOffset +
7269 #elif __BYTE_ORDER == __BIG_ENDIAN
7270 static const int kStrictModeByteOffset = kCompilerHintsOffset +
7271 (kCompilerHintsSize - 1) -
7272 ((kStrictModeFunction + kCompilerHintsSmiTagSize) /
kBitsPerByte);
7273 static const int kNativeByteOffset = kCompilerHintsOffset +
7274 (kCompilerHintsSize - 1) -
7277 #error Unknown byte ordering
7301 inline int continuation();
7302 inline void set_continuation(
int continuation);
7309 inline int stack_handler_index();
7310 inline void set_stack_handler_index(
int stack_handler_index);
7320 static const
int kGeneratorExecuting = -1;
7321 static const
int kGeneratorClosed = 0;
7324 static const
int kFunctionOffset =
JSObject::kHeaderSize;
7325 static const
int kContextOffset = kFunctionOffset + kPointerSize;
7326 static const
int kReceiverOffset = kContextOffset + kPointerSize;
7327 static const
int kContinuationOffset = kReceiverOffset + kPointerSize;
7328 static const
int kOperandStackOffset = kContinuationOffset + kPointerSize;
7329 static const
int kStackHandlerIndexOffset =
7330 kOperandStackOffset + kPointerSize;
7331 static const
int kSize = kStackHandlerIndexOffset + kPointerSize;
7338 static const int kResultValuePropertyIndex = 0;
7339 static const int kResultDonePropertyIndex = 1;
7340 static const int kResultPropertyCount = 2;
7343 static const int kResultDonePropertyOffset =
7369 static const
int kContextOffset =
JSObject::kHeaderSize;
7370 static const
int kScopeInfoOffset = kContextOffset + kPointerSize;
7371 static const
int kSize = kScopeInfoOffset + kPointerSize;
7374 DISALLOW_IMPLICIT_CONSTRUCTORS(
JSModule);
7390 inline void set_context(
Object* context);
7397 inline void set_code(
Code* code);
7398 inline void set_code_no_write_barrier(
Code* code);
7399 inline void ReplaceCode(
Code* code);
7402 inline bool IsBuiltin();
7405 inline bool NeedsArgumentsAdaption();
7408 inline bool IsOptimized();
7411 inline bool IsOptimizable();
7415 void MarkForOptimization();
7416 void MarkForConcurrentOptimization();
7417 void MarkInOptimizationQueue();
7421 inline bool IsMarkedForOptimization();
7422 inline bool IsMarkedForConcurrentOptimization();
7425 inline bool IsInOptimizationQueue();
7444 inline void set_literals(
FixedArray* literals);
7447 inline void set_function_bindings(
FixedArray* bindings);
7450 inline Map* initial_map();
7451 inline void set_initial_map(
Map* value);
7452 inline bool has_initial_map();
7459 inline bool has_prototype();
7460 inline bool has_instance_prototype();
7461 inline Object* prototype();
7462 inline Object* instance_prototype();
7470 void RemovePrototype();
7471 inline bool should_have_prototype();
7482 void SetInstanceClassName(
String* name);
7485 inline bool is_compiled();
7494 void PrintName(FILE* out = stdout);
7501 void JSFunctionIterateBody(
int object_size, ObjectVisitor* v);
7508 inline int NumberOfLiterals();
7514 bool PassesFilter(
const char* raw_filter);
7519 static const int kPrototypeOrInitialMapOffset =
7521 static const int kSharedFunctionInfoOffset =
7523 static const int kContextOffset = kSharedFunctionInfoOffset +
kPointerSize;
7526 static const int kNextFunctionLinkOffset = kNonWeakFieldsEndOffset;
7530 static const int kLiteralsPrefixSize = 1;
7531 static const int kLiteralNativeContextIndex = 0;
7534 static const int kBoundFunctionIndex = 0;
7535 static const int kBoundThisIndex = 1;
7536 static const int kBoundArgumentsStartIndex = 2;
7567 static const
int kNativeContextOffset =
JSObject::kHeaderSize;
7568 static const
int kSize = kNativeContextOffset + kPointerSize;
7612 static const int kGlobalContextOffset = kNativeContextOffset +
kPointerSize;
7613 static const int kGlobalReceiverOffset = kGlobalContextOffset +
kPointerSize;
7631 inline bool IsDetached();
7667 static const
int kJSBuiltinsCount =
Builtins::id_count;
7668 static const
int kJSBuiltinsOffset = GlobalObject::kHeaderSize;
7669 static const
int kJSBuiltinsCodeOffset =
7670 GlobalObject::kHeaderSize + (kJSBuiltinsCount * kPointerSize);
7671 static const
int kSize =
7672 kJSBuiltinsCodeOffset + (kJSBuiltinsCount * kPointerSize);
7674 static
int OffsetOfFunctionWithId(
Builtins::JavaScript
id) {
7702 static const
int kSize = kValueOffset + kPointerSize;
7705 DISALLOW_IMPLICIT_CONSTRUCTORS(
JSValue);
7742 void SetValue(
Object* value,
bool is_value_nan);
7761 kMillisecond = kFirstUncachedField,
7765 kYearUTC = kFirstUTCField,
7796 inline void SetLocalFields(int64_t local_time_ms,
DateCache* date_cache);
7824 inline int start_position();
7825 inline void set_start_position(
int value);
7828 inline int end_position();
7829 inline void set_end_position(
int value);
7840 static const
int kArgumentsOffset = kTypeOffset + kPointerSize;
7841 static const
int kScriptOffset = kArgumentsOffset + kPointerSize;
7842 static const
int kStackFramesOffset = kScriptOffset + kPointerSize;
7843 static const
int kStartPositionOffset = kStackFramesOffset + kPointerSize;
7844 static const
int kEndPositionOffset = kStartPositionOffset + kPointerSize;
7845 static const
int kSize = kEndPositionOffset + kPointerSize;
7848 kStackFramesOffset + kPointerSize,
7876 enum Type { NOT_COMPILED, ATOM, IRREGEXP };
7881 explicit Flags(uint32_t value) : value_(value) { }
7892 inline
Type TypeTag();
7893 inline
int CaptureCount();
7894 inline Flags GetFlags();
7895 inline
String* Pattern();
7896 inline
Object* DataAt(
int index);
7898 inline
void SetDataAt(
int index,
Object* value);
7900 static
int code_index(
bool is_ascii) {
7902 return kIrregexpASCIICodeIndex;
7904 return kIrregexpUC16CodeIndex;
7910 return kIrregexpASCIICodeSavedIndex;
7912 return kIrregexpUC16CodeSavedIndex;
7921 static const
int kDataOffset = JSObject::kHeaderSize;
7922 static const
int kSize = kDataOffset + kPointerSize;
7925 static const
int kTagIndex = 0;
7926 static const
int kSourceIndex = kTagIndex + 1;
7927 static const
int kFlagsIndex = kSourceIndex + 1;
7928 static const
int kDataIndex = kFlagsIndex + 1;
7932 static const
int kAtomPatternIndex = kDataIndex;
7934 static const
int kAtomDataSize = kAtomPatternIndex + 1;
7939 static const
int kIrregexpASCIICodeIndex = kDataIndex;
7943 static const
int kIrregexpUC16CodeIndex = kDataIndex + 1;
7947 static const
int kIrregexpASCIICodeSavedIndex = kDataIndex + 2;
7950 static const
int kIrregexpUC16CodeSavedIndex = kDataIndex + 3;
7954 static const
int kIrregexpMaxRegisterCountIndex = kDataIndex + 4;
7956 static const
int kIrregexpCaptureCountIndex = kDataIndex + 5;
7958 static const
int kIrregexpDataSize = kIrregexpCaptureCountIndex + 1;
7961 static const
int kDataTagOffset =
7962 FixedArray::kHeaderSize + kTagIndex * kPointerSize;
7963 static const
int kDataAsciiCodeOffset =
7964 FixedArray::kHeaderSize + kIrregexpASCIICodeIndex * kPointerSize;
7965 static const
int kDataUC16CodeOffset =
7966 FixedArray::kHeaderSize + kIrregexpUC16CodeIndex * kPointerSize;
7967 static const
int kIrregexpCaptureCountOffset =
7968 FixedArray::kHeaderSize + kIrregexpCaptureCountIndex * kPointerSize;
7971 static const
int kSourceFieldIndex = 0;
7972 static const
int kGlobalFieldIndex = 1;
7973 static const
int kIgnoreCaseFieldIndex = 2;
7974 static const
int kMultilineFieldIndex = 3;
7975 static const
int kLastIndexFieldIndex = 4;
7976 static const
int kInObjectFieldCount = 5;
7979 static const
int kUninitializedValue = -1;
7983 static const
int kCompilationErrorValue = -2;
7988 static const
int kCodeAgeMask = 0xff;
7998 static inline uint32_t
Hash(HashTableKey* key) {
8007 HashTableKey* key) {
8011 static const int kPrefixSize = 0;
8012 static const int kEntrySize = 2;
8024 int scope_position);
8031 SharedFunctionInfo* value,
8032 int scope_position);
8038 void Remove(
Object* value);
8066 void RemoveByIndex(
Object* name,
Code* code,
int index);
8074 static const
int kDefaultCacheOffset = HeapObject::kHeaderSize;
8075 static const
int kNormalTypeCacheOffset =
8076 kDefaultCacheOffset + kPointerSize;
8077 static const
int kSize = kNormalTypeCacheOffset + kPointerSize;
8087 static const
int kCodeCacheEntrySize = 2;
8088 static const
int kCodeCacheEntryNameOffset = 0;
8089 static const
int kCodeCacheEntryCodeOffset = 1;
8091 DISALLOW_IMPLICIT_CONSTRUCTORS(
CodeCache);
8101 static inline uint32_t
Hash(HashTableKey* key) {
8110 HashTableKey* key) {
8114 static const int kPrefixSize = 0;
8115 static const int kEntrySize = 2;
8126 void RemoveByIndex(
int index);
8131 static const int kInitialSize = 64;
8160 static const
int kCacheOffset = HeapObject::kHeaderSize;
8161 static const
int kSize = kCacheOffset + kPointerSize;
8179 static const int kInitialSize = 64;
8187 inline int ic_total_count();
8188 inline void set_ic_total_count(
int count);
8190 inline int ic_with_type_info_count();
8191 inline void change_ic_with_type_info_count(
int count);
8193 inline void initialize_storage();
8195 inline void change_own_type_change_checksum();
8196 inline int own_type_change_checksum();
8198 inline void set_inlined_type_change_checksum(
int checksum);
8199 inline bool matches_inlined_type_change_checksum(
int checksum);
8209 static const
int kStorage1Offset = HeapObject::kHeaderSize;
8210 static const
int kStorage2Offset = kStorage1Offset + kPointerSize;
8211 static const
int kFeedbackVectorOffset =
8212 kStorage2Offset + kPointerSize;
8213 static const
int kSize = kFeedbackVectorOffset + kPointerSize;
8228 static inline
Object* RawUninitializedSentinel(
Heap* heap);
8230 static const
int kForInFastCaseMarker = 0;
8231 static const
int kForInSlowCaseMarker = 1;
8234 static const
int kTypeChangeChecksumBits = 7;
8236 class ICTotalCountField: public
BitField<
int, 0,
8237 kSmiValueSize - kTypeChangeChecksumBits> {};
8238 class OwnTypeChangeChecksum:
public BitField<int,
8239 kSmiValueSize - kTypeChangeChecksumBits,
8240 kTypeChangeChecksumBits> {};
8241 class ICsWithTypeInfoCountField:
public BitField<int, 0,
8242 kSmiValueSize - kTypeChangeChecksumBits> {};
8243 class InlinedTypeChangeChecksum:
public BitField<int,
8244 kSmiValueSize - kTypeChangeChecksumBits,
8245 kTypeChangeChecksumBits> {};
8260 static const uint32_t kMaximumArrayBytesToPretransition = 8 * 1024;
8262 static const int kPretenureMinimumCreated = 100;
8270 kLastPretenureDecisionValue = kZombie
8283 inline
void Initialize();
8286 bool IsNestedSite();
8297 STATIC_ASSERT(PretenureDecisionBits::kMax >= kLastPretenureDecisionValue);
8301 inline bool IncrementMementoFoundCount();
8303 inline void IncrementMementoCreateCount();
8307 void ResetPretenureDecision();
8310 int value = pretenure_data()->value();
8311 return PretenureDecisionBits::decode(value);
8315 int value = pretenure_data()->value();
8317 Smi::FromInt(PretenureDecisionBits::update(value, decision)),
8322 int value = pretenure_data()->value();
8323 return DeoptDependentCodeBit::decode(value);
8327 int value = pretenure_data()->value();
8329 Smi::FromInt(DeoptDependentCodeBit::update(value, deopt)),
8334 int value = pretenure_data()->value();
8335 return MementoFoundCountBits::decode(value);
8338 inline void set_memento_found_count(
int count);
8341 return pretenure_create_count()->value();
8353 return pretenure_decision() == kZombie;
8356 inline void MarkZombie();
8358 inline bool DigestPretenuringFeedback();
8361 ASSERT(!SitePointsToLiteral());
8363 return ElementsKindBits::decode(value);
8368 set_transition_info(
Smi::FromInt(ElementsKindBits::update(value, kind)),
8374 return DoNotInlineBit::decode(value) == 0;
8379 set_transition_info(
Smi::FromInt(DoNotInlineBit::update(value,
true)),
8387 return transition_info()->IsJSArray() || transition_info()->IsJSObject();
8411 static const
int kTransitionInfoOffset = HeapObject::kHeaderSize;
8412 static const
int kNestedSiteOffset = kTransitionInfoOffset + kPointerSize;
8413 static const
int kPretenureDataOffset = kNestedSiteOffset + kPointerSize;
8414 static const
int kPretenureCreateCountOffset =
8415 kPretenureDataOffset + kPointerSize;
8416 static const
int kDependentCodeOffset =
8417 kPretenureCreateCountOffset + kPointerSize;
8418 static const
int kWeakNextOffset = kDependentCodeOffset + kPointerSize;
8419 static const
int kSize = kWeakNextOffset + kPointerSize;
8423 static const
int kPointerFieldsBeginOffset = kTransitionInfoOffset;
8424 static const
int kPointerFieldsEndOffset = kDependentCodeOffset;
8428 kDependentCodeOffset + kPointerSize,
8433 bool PretenuringDecisionMade() {
8434 return pretenure_decision() != kUndecided;
8449 return allocation_site()->IsAllocationSite() &&
8477 inline int aliased_context_slot();
8478 inline void set_aliased_context_slot(
int count);
8486 static const
int kAliasedContextSlot = HeapObject::kHeaderSize;
8487 static const
int kSize = kAliasedContextSlot + kPointerSize;
8500 explicit inline StringHasher(
int length, uint32_t seed);
8502 template <
typename s
char>
8503 static inline uint32_t HashSequentialString(
const schar* chars,
8510 int* utf16_length_out);
8515 static uint32_t MakeArrayIndexHash(uint32_t value,
int length);
8520 static const int kZeroHash = 27;
8523 INLINE(
static uint32_t AddCharacterCore(uint32_t running_hash,
uint16_t c));
8524 INLINE(
static uint32_t GetHashCore(uint32_t running_hash));
8529 uint32_t GetHashField();
8532 inline bool has_trivial_hash();
8534 template<
typename Char>
8535 inline void AddCharacters(
const Char* chars,
int len);
8539 inline void AddCharacter(
uint16_t c);
8541 inline bool UpdateIndex(
uint16_t c);
8544 uint32_t raw_running_hash_;
8545 uint32_t array_index_;
8546 bool is_array_index_;
8547 bool is_first_char_;
8565 inline explicit StringShape(
String* s);
8566 inline explicit StringShape(
Map* s);
8568 inline bool IsSequential();
8570 inline bool IsCons();
8571 inline bool IsSliced();
8572 inline bool IsIndirect();
8573 inline bool IsExternalAscii();
8574 inline bool IsExternalTwoByte();
8575 inline bool IsSequentialAscii();
8576 inline bool IsSequentialTwoByte();
8577 inline bool IsInternalized();
8579 inline uint32_t encoding_tag();
8580 inline uint32_t full_representation_tag();
8581 inline uint32_t size_tag();
8583 inline uint32_t type() {
return type_; }
8584 inline void invalidate() { valid_ =
false; }
8585 inline bool valid() {
return valid_; }
8593 inline void set_valid() { valid_ =
true; }
8596 inline void set_valid() { }
8606 inline uint32_t hash_field();
8607 inline void set_hash_field(uint32_t value);
8610 inline bool HasHashCode();
8613 inline uint32_t Hash();
8616 inline bool Equals(
Name* other);
8619 inline bool AsArrayIndex(uint32_t* index);
8624 bool IsCacheable(
Isolate* isolate);
8629 static const
int kHashFieldOffset = HeapObject::kHeaderSize;
8630 static const
int kSize = kHashFieldOffset + kPointerSize;
8637 static const
int kHashNotComputedMask = 1;
8638 static const
int kIsNotArrayIndexMask = 1 << 1;
8639 static const
int kNofHashBitFields = 2;
8642 static const
int kHashShift = kNofHashBitFields;
8646 static const uint32_t kHashBitMask = 0xffffffffu >> kHashShift;
8649 static const
int kMaxCachedArrayIndexLength = 7;
8654 static const
int kArrayIndexValueBits = 24;
8655 static const
int kArrayIndexLengthBits =
8656 kBitsPerInt - kArrayIndexValueBits - kNofHashBitFields;
8660 static const
int kArrayIndexHashLengthShift =
8661 kArrayIndexValueBits + kNofHashBitFields;
8663 static const
int kArrayIndexHashMask = (1 << kArrayIndexHashLengthShift) - 1;
8665 static const
int kArrayIndexValueMask =
8666 ((1 << kArrayIndexValueBits) - 1) << kHashShift;
8673 static const
unsigned int kContainsCachedArrayIndexMask =
8674 (~kMaxCachedArrayIndexLength << kArrayIndexHashLengthShift) |
8675 kIsNotArrayIndexMask;
8678 static const
int kEmptyHashField =
8679 kIsNotArrayIndexMask | kHashNotComputedMask;
8682 static inline
bool IsHashFieldComputed(uint32_t field);
8685 DISALLOW_IMPLICIT_CONSTRUCTORS(
Name);
8708 static const
int kNameOffset = Name::kSize;
8709 static const
int kFlagsOffset = kNameOffset + kPointerSize;
8710 static const
int kSize = kFlagsOffset + kPointerSize;
8715 static const
int kPrivateBit = 0;
8717 DISALLOW_IMPLICIT_CONSTRUCTORS(
Symbol);
8733 enum Encoding { ONE_BYTE_ENCODING, TWO_BYTE_ENCODING };
8763 enum State { NON_FLAT, ASCII, TWO_BYTE };
8769 explicit FlatContent(Vector<const uc16> chars)
8770 : buffer_(Vector<const
byte>::cast(chars)),
8771 state_(TWO_BYTE) { }
8772 FlatContent() : buffer_(), state_(NON_FLAT) { }
8774 Vector<const uint8_t> buffer_;
8781 inline int length();
8782 inline void set_length(
int value);
8788 inline bool IsOneByteRepresentation();
8789 inline bool IsTwoByteRepresentation();
8794 inline bool IsOneByteRepresentationUnderneath();
8795 inline bool IsTwoByteRepresentationUnderneath();
8799 inline bool HasOnlyOneByteChars();
8802 inline void Set(
int index,
uint16_t value);
8838 inline String* GetUnderlying();
8842 bool MarkAsUndetectable();
8845 inline bool Equals(
String* other);
8862 int* length_output = 0);
8866 int* length_output = 0);
8877 bool ComputeArrayIndex(uint32_t* index);
8884 inline bool AsArrayIndex(uint32_t* index);
8889 void PrintOn(FILE* out);
8897 char* ToAsciiArray();
8902 inline
bool IsFlat();
8905 static const
int kLengthOffset = Name::kSize;
8906 static const
int kSize = kLengthOffset + kPointerSize;
8910 static const
int kMaxArrayIndexSize = 10;
8911 STATIC_CHECK(kMaxArrayIndexSize < (1 << kArrayIndexLengthBits));
8914 static const
int32_t kMaxOneByteCharCode = unibrow::Latin1::kMaxChar;
8915 static const uint32_t kMaxOneByteCharCodeU = unibrow::Latin1::kMaxChar;
8916 static const
int kMaxUtf16CodeUnit = 0xffff;
8919 static const
int kEmptyStringHash = kIsNotArrayIndexMask;
8922 static const
int kMaxLength = (1 << 28) - 16;
8926 static const
int kMaxHashCalcLength = 16383;
8929 static const
int kMaxShortPrintLength = 1024;
8932 const
uc16* GetTwoByteData(
unsigned start);
8935 template <typename sinkchar>
8936 static
void WriteToFlat(
String* source,
8944 static inline
int NonAsciiStart(const
char* chars,
int length) {
8945 const char* start = chars;
8946 const char* limit = chars + length;
8947 #ifdef V8_HOST_CAN_READ_UNALIGNED
8950 while (chars +
sizeof(uintptr_t) <= limit) {
8951 if (*reinterpret_cast<const uintptr_t*>(chars) & non_ascii_mask) {
8952 return static_cast<int>(chars - start);
8954 chars +=
sizeof(uintptr_t);
8957 while (chars < limit) {
8959 return static_cast<int>(chars - start);
8963 return static_cast<int>(chars - start);
8966 static inline bool IsAscii(
const char* chars,
int length) {
8967 return NonAsciiStart(chars, length) >= length;
8970 static inline bool IsAscii(
const uint8_t* chars,
int length) {
8972 NonAsciiStart(reinterpret_cast<const char*>(chars), length) >= length;
8976 const uc16* limit = chars + length;
8977 const uc16* start = chars;
8978 while (chars < limit) {
8979 if (*chars > kMaxOneByteCharCodeU)
return static_cast<int>(chars - start);
8982 return static_cast<int>(chars - start);
8986 return NonOneByteStart(chars, length) >= length;
8990 template<
class Visitor,
class ConsOp>
8991 static inline void Visit(
String*
string,
8998 template<
class Visitor>
8999 static inline ConsString* VisitFlat(Visitor* visitor,
9005 template<
class Visitor>
9009 int32_t type =
string->map()->instance_type();
9010 return VisitFlat(visitor,
string, offset, string->
length(), type);
9023 bool SlowEquals(
String* other);
9026 bool SlowAsArrayIndex(uint32_t* index);
9029 uint32_t ComputeAndSetHash();
9058 static const bool kHasAsciiEncoding =
true;
9061 inline uint16_t SeqOneByteStringGet(
int index);
9062 inline void SeqOneByteStringSet(
int index,
uint16_t value);
9065 inline Address GetCharsAddress();
9067 inline uint8_t* GetChars();
9075 inline int SeqOneByteStringSize(
InstanceType instance_type);
9083 static const int kMaxSize = 512 * MB - 1;
9095 static const bool kHasAsciiEncoding =
false;
9098 inline uint16_t SeqTwoByteStringGet(
int index);
9099 inline void SeqTwoByteStringSet(
int index,
uint16_t value);
9102 inline Address GetCharsAddress();
9104 inline uc16* GetChars();
9107 const uint16_t* SeqTwoByteStringGetData(
unsigned start);
9115 inline int SeqTwoByteStringSize(
InstanceType instance_type);
9123 static const int kMaxSize = 512 * MB - 1;
9146 inline Object* unchecked_first();
9147 inline void set_first(
String* first,
9154 inline Object* unchecked_second();
9155 inline void set_second(
String* second,
9170 static const int kMinLength = 13;
9178 DISALLOW_IMPLICIT_CONSTRUCTORS(ConsString);
9196 inline String* parent();
9197 inline void set_parent(String* parent,
9199 inline int offset();
9200 inline void set_offset(
int offset);
9203 uint16_t SlicedStringGet(
int index);
9214 static const int kMinLength = 13;
9247 static const int kMaxShortLength =
9251 inline bool is_short();
9264 static const bool kHasAsciiEncoding =
true;
9270 inline void set_resource(
const Resource* buffer);
9276 inline void update_data_cache();
9278 inline const uint8_t* GetChars();
9281 inline uint16_t ExternalAsciiStringGet(
int index);
9287 inline void ExternalAsciiStringIterateBody(ObjectVisitor* v);
9289 template<
typename StaticVisitor>
9290 inline void ExternalAsciiStringIterateBody();
9301 static const bool kHasAsciiEncoding =
false;
9307 inline void set_resource(
const Resource* buffer);
9313 inline void update_data_cache();
9318 inline uint16_t ExternalTwoByteStringGet(
int index);
9321 inline const uint16_t* ExternalTwoByteStringGetData(
unsigned start);
9327 inline void ExternalTwoByteStringIterateBody(ObjectVisitor* v);
9329 template<
typename StaticVisitor>
9330 inline void ExternalTwoByteStringIterateBody();
9342 explicit inline Relocatable(
Isolate* isolate);
9343 inline virtual ~Relocatable();
9347 static void PostGarbageCollectionProcessing(
Isolate* isolate);
9348 static int ArchiveSpacePerThread();
9349 static char* ArchiveState(
Isolate* isolate,
char* to);
9350 static char* RestoreState(
Isolate* isolate,
char* from);
9351 static void Iterate(
Isolate* isolate, ObjectVisitor* v);
9352 static void Iterate(ObjectVisitor* v, Relocatable* top);
9353 static char* Iterate(ObjectVisitor* v,
char* t);
9368 void PostGarbageCollection();
9369 inline uc32 Get(
int index);
9385 static inline String* Operate(String*,
unsigned*,
int32_t*,
unsigned*);
9398 String* Operate(String*
string,
9399 unsigned* offset_out,
9401 unsigned* length_out);
9402 inline String* ContinueOperation(
int32_t* type_out,
unsigned* length_out);
9403 inline void Reset();
9404 inline bool HasMore();
9408 static const unsigned kStackSize = 32;
9410 static const unsigned kDepthMask = kStackSize-1;
9412 static inline unsigned OffsetForDepth(
unsigned depth);
9414 inline void PushLeft(ConsString*
string);
9415 inline void PushRight(ConsString*
string);
9416 inline void AdjustMaximumDepth();
9418 String* NextLeaf(
bool* blew_stack,
int32_t* type_out,
unsigned* length_out);
9419 String*
Search(
unsigned* offset_out,
9421 unsigned* length_out);
9424 unsigned maximum_depth_;
9427 ConsString* frames_[kStackSize];
9439 unsigned offset = 0);
9441 inline bool HasMore();
9442 inline void Reset(String*
string,
unsigned offset = 0);
9443 inline void VisitOneByteString(
const uint8_t* chars,
unsigned length);
9444 inline void VisitTwoByteString(
const uint16_t* chars,
unsigned length);
9452 const uint8_t*
end_;
9458 template <
typename T>
9481 inline void set_kind(
byte kind);
9491 const char* to_string,
9503 static const byte kNotBooleanMask = ~1;
9506 static const byte kArgumentMarker = 4;
9508 static const byte kUninitialized = 6;
9533 Object* result = FromAddress(value - kValueOffset);
9534 ASSERT(result->IsCell() || result->IsPropertyCell());
9535 return static_cast<Cell*
>(result);
9539 return address() + kValueOffset;
9547 static const
int kValueOffset = HeapObject::kHeaderSize;
9548 static const
int kSize = kValueOffset + kPointerSize;
9551 kValueOffset + kPointerSize,
9552 kSize> BodyDescriptor;
9555 DISALLOW_IMPLICIT_CONSTRUCTORS(
Cell);
9589 return address() + kTypeOffset;
9597 static const
int kTypeOffset = kValueOffset + kPointerSize;
9598 static const
int kDependentCodeOffset = kTypeOffset + kPointerSize;
9599 static const
int kSize = kDependentCodeOffset + kPointerSize;
9601 static const
int kPointerFieldsBeginOffset = kValueOffset;
9602 static const
int kPointerFieldsEndOffset = kDependentCodeOffset;
9606 kSize> BodyDescriptor;
9659 inline void InitializeBody(
int object_size,
Object* value);
9675 static const
int kHandlerOffset = HeapObject::kHeaderSize;
9676 static const
int kHashOffset = kHandlerOffset + kPointerSize;
9677 static const
int kPaddingOffset = kHashOffset + kPointerSize;
9679 static const
int kHeaderSize = kPaddingOffset;
9680 static const
int kPaddingSize = kSize - kPaddingOffset;
9686 kSize> BodyDescriptor;
9689 friend class JSReceiver;
9692 Handle<JSReceiver> receiver,
9698 Handle<JSReceiver> receiver,
9704 static
bool HasElementWithHandler(
Handle<
JSProxy> proxy, uint32_t index);
9717 DISALLOW_IMPLICIT_CONSTRUCTORS(
JSProxy);
9737 static const
int kCallTrapOffset = JSProxy::kPaddingOffset;
9738 static const
int kConstructTrapOffset = kCallTrapOffset + kPointerSize;
9739 static const
int kPaddingOffset = kConstructTrapOffset + kPointerSize;
9741 static const
int kPaddingSize = kSize - kPaddingOffset;
9746 kConstructTrapOffset + kPointerSize,
9747 kSize> BodyDescriptor;
9767 static const
int kTableOffset = JSObject::kHeaderSize;
9768 static const
int kSize = kTableOffset + kPointerSize;
9771 DISALLOW_IMPLICIT_CONSTRUCTORS(
JSSet);
9788 static const
int kTableOffset = JSObject::kHeaderSize;
9789 static const
int kSize = kTableOffset + kPointerSize;
9792 DISALLOW_IMPLICIT_CONSTRUCTORS(
JSMap);
9805 static const
int kTableOffset = JSObject::kHeaderSize;
9806 static const
int kNextOffset = kTableOffset + kPointerSize;
9807 static const
int kSize = kNextOffset + kPointerSize;
9855 inline bool is_external();
9856 inline void set_is_external(
bool value);
9858 inline bool should_be_freed();
9859 inline void set_should_be_freed(
bool value);
9877 static const
int kBackingStoreOffset =
JSObject::kHeaderSize;
9878 static const
int kByteLengthOffset = kBackingStoreOffset + kPointerSize;
9879 static const
int kFlagOffset = kByteLengthOffset + kPointerSize;
9880 static const
int kWeakNextOffset = kFlagOffset + kPointerSize;
9881 static const
int kWeakFirstViewOffset = kWeakNextOffset + kPointerSize;
9882 static const
int kSize = kWeakFirstViewOffset + kPointerSize;
9884 static const
int kSizeWithInternalFields =
9885 kSize + v8::
ArrayBuffer::kInternalFieldCount * kPointerSize;
9889 static const
int kIsExternalBit = 0;
9890 static const
int kShouldBeFreed = 1;
9915 static const
int kBufferOffset = JSObject::kHeaderSize;
9916 static const
int kByteOffsetOffset = kBufferOffset + kPointerSize;
9917 static const
int kByteLengthOffset = kByteOffsetOffset + kPointerSize;
9918 static const
int kWeakNextOffset = kByteLengthOffset + kPointerSize;
9919 static const
int kViewSize = kWeakNextOffset + kPointerSize;
9941 size_t element_size();
9949 static const
int kLengthOffset = kViewSize + kPointerSize;
9950 static const
int kSize = kLengthOffset + kPointerSize;
9952 static const
int kSizeWithInternalFields =
9956 static
Handle<JSArrayBuffer> MaterializeArrayBuffer(
9975 static const
int kSize = kViewSize;
9977 static const
int kSizeWithInternalFields =
9991 inline Address foreign_address();
9992 inline void set_foreign_address(
Address value);
9998 inline void ForeignIterateBody(ObjectVisitor* v);
10000 template<
typename StaticVisitor>
10001 inline void ForeignIterateBody();
10009 static const
int kForeignAddressOffset = HeapObject::kHeaderSize;
10010 static const
int kSize = kForeignAddressOffset + kPointerSize;
10015 DISALLOW_IMPLICIT_CONSTRUCTORS(
Foreign);
10031 inline void set_length(Smi* length);
10037 MUST_USE_RESULT MaybeObject* JSArrayUpdateLengthFromIndex(uint32_t index,
10043 static void Initialize(
Handle<JSArray> array,
int capacity,
int length = 0);
10046 inline bool AllowsSetElementsLength();
10061 int minimum_size_of_backing_fixed_array);
10066 int minimum_size_of_backing_fixed_array);
10073 static const
int kPreallocatedArrayElements = 4;
10076 static const
int kLengthOffset = JSObject::kHeaderSize;
10077 static const
int kSize = kLengthOffset + kPointerSize;
10080 DISALLOW_IMPLICIT_CONSTRUCTORS(
JSArray);
10101 static const int kIndexIndex = 0;
10102 static const int kInputIndex = 1;
10114 inline bool all_can_read();
10115 inline void set_all_can_read(
bool value);
10117 inline bool all_can_write();
10118 inline void set_all_can_write(
bool value);
10120 inline bool prohibits_overwriting();
10121 inline void set_prohibits_overwriting(
bool value);
10127 inline bool IsCompatibleReceiver(
Object* receiver);
10138 int valid_descriptors);
10147 static const int kAllCanReadBit = 0;
10148 static const int kAllCanWriteBit = 1;
10149 static const int kProhibitsOverwritingBit = 2;
10150 class AttributesField:
public BitField<PropertyAttributes, 3, 3> {};
10239 static const
int kSerializedDataOffset = HeapObject::kHeaderSize;
10240 static const
int kSize = kSerializedDataOffset + kPointerSize;
10257 static const
int kDescriptorOffset = AccessorInfo::kSize;
10258 static const
int kSize = kDescriptorOffset + kPointerSize;
10286 static const
int kGetterOffset = AccessorInfo::kSize;
10287 static const
int kSetterOffset = kGetterOffset + kPointerSize;
10288 static const
int kDataOffset = kSetterOffset + kPointerSize;
10289 static const
int kSize = kDataOffset + kPointerSize;
10311 inline bool all_can_read();
10312 inline bool all_can_write();
10313 inline bool prohibits_overwriting();
10336 if (!getter->IsNull()) set_getter(getter);
10337 if (!setter->IsNull()) set_setter(setter);
10341 return IsJSAccessor(getter()) || IsJSAccessor(setter());
10348 static const
int kGetterOffset = HeapObject::kHeaderSize;
10349 static const
int kSetterOffset = kGetterOffset + kPointerSize;
10350 static const
int kAccessFlagsOffset = kSetterOffset + kPointerSize;
10351 static const
int kSize = kAccessFlagsOffset + kPointerSize;
10354 static const
int kAllCanReadBit = 0;
10355 static const
int kAllCanWriteBit = 1;
10356 static const
int kProhibitsOverwritingBit = 2;
10363 bool IsJSAccessor(
Object* obj) {
10364 return obj->IsSpecFunction() || obj->IsUndefined();
10383 static const
int kNamedCallbackOffset = HeapObject::kHeaderSize;
10384 static const
int kIndexedCallbackOffset = kNamedCallbackOffset + kPointerSize;
10385 static const
int kDataOffset = kIndexedCallbackOffset + kPointerSize;
10386 static const
int kSize = kDataOffset + kPointerSize;
10408 static const
int kGetterOffset = HeapObject::kHeaderSize;
10409 static const
int kSetterOffset = kGetterOffset + kPointerSize;
10410 static const
int kQueryOffset = kSetterOffset + kPointerSize;
10411 static const
int kDeleterOffset = kQueryOffset + kPointerSize;
10412 static const
int kEnumeratorOffset = kDeleterOffset + kPointerSize;
10413 static const
int kDataOffset = kEnumeratorOffset + kPointerSize;
10414 static const
int kSize = kDataOffset + kPointerSize;
10432 static const
int kCallbackOffset = HeapObject::kHeaderSize;
10433 static const
int kDataOffset = kCallbackOffset + kPointerSize;
10434 static const
int kSize = kDataOffset + kPointerSize;
10449 static const
int kTagOffset = HeapObject::kHeaderSize;
10450 static const
int kPropertyListOffset = kTagOffset + kPointerSize;
10451 static const
int kPropertyAccessorsOffset =
10452 kPropertyListOffset + kPointerSize;
10453 static const
int kHeaderSize = kPropertyAccessorsOffset + kPointerSize;
10475 inline int length();
10476 inline void set_length(
int value);
10494 static const
int kSerialNumberOffset = TemplateInfo::kHeaderSize;
10495 static const
int kCallCodeOffset = kSerialNumberOffset + kPointerSize;
10496 static const
int kPrototypeTemplateOffset =
10497 kCallCodeOffset + kPointerSize;
10498 static const
int kParentTemplateOffset =
10499 kPrototypeTemplateOffset + kPointerSize;
10500 static const
int kNamedPropertyHandlerOffset =
10501 kParentTemplateOffset + kPointerSize;
10502 static const
int kIndexedPropertyHandlerOffset =
10503 kNamedPropertyHandlerOffset + kPointerSize;
10504 static const
int kInstanceTemplateOffset =
10505 kIndexedPropertyHandlerOffset + kPointerSize;
10506 static const
int kClassNameOffset = kInstanceTemplateOffset + kPointerSize;
10507 static const
int kSignatureOffset = kClassNameOffset + kPointerSize;
10508 static const
int kInstanceCallHandlerOffset = kSignatureOffset + kPointerSize;
10509 static const
int kAccessCheckInfoOffset =
10510 kInstanceCallHandlerOffset + kPointerSize;
10511 static const
int kFlagOffset = kAccessCheckInfoOffset + kPointerSize;
10512 static const
int kLengthOffset = kFlagOffset + kPointerSize;
10513 static const
int kSize = kLengthOffset + kPointerSize;
10516 bool IsTemplateFor(
Object*
object);
10517 bool IsTemplateFor(
Map* map);
10521 static const
int kHiddenPrototypeBit = 0;
10522 static const
int kUndetectableBit = 1;
10523 static const
int kNeedsAccessCheckBit = 2;
10524 static const
int kReadOnlyPrototypeBit = 3;
10525 static const
int kRemovePrototypeBit = 4;
10526 static const
int kDoNotCacheBit = 5;
10543 static const
int kConstructorOffset = TemplateInfo::kHeaderSize;
10544 static const
int kInternalFieldCountOffset =
10545 kConstructorOffset + kPointerSize;
10546 static const
int kSize = kInternalFieldCountOffset + kPointerSize;
10561 static const
int kReceiverOffset = Struct::kHeaderSize;
10562 static const
int kArgsOffset = kReceiverOffset + kPointerSize;
10563 static const
int kSize = kArgsOffset + kPointerSize;
10580 static const
int kTypesOffset = Struct::kHeaderSize;
10581 static const
int kSize = kTypesOffset + kPointerSize;
10585 #ifdef ENABLE_DEBUGGER_SUPPORT
10588 class DebugInfo:
public Struct {
10601 bool HasBreakPoint(
int code_position);
10603 Object* GetBreakPointInfo(
int code_position);
10610 int source_position,
int statement_position,
10613 Object* GetBreakPointObjects(
int code_position);
10618 int GetBreakPointCount();
10627 static const int kOriginalCodeIndex = kSharedFunctionInfoIndex +
kPointerSize;
10628 static const int kPatchedCodeIndex = kOriginalCodeIndex +
kPointerSize;
10629 static const int kActiveBreakPointsCountIndex =
10631 static const int kBreakPointsStateIndex =
10633 static const int kSize = kBreakPointsStateIndex +
kPointerSize;
10636 static const int kNoBreakPointInfo = -1;
10639 int GetBreakPointInfoIndex(
int code_position);
10648 class BreakPointInfo:
public Struct {
10661 static
void ClearBreakPoint(
Handle<BreakPointInfo> info,
10664 static
void SetBreakPoint(
Handle<BreakPointInfo> info,
10667 static
bool HasBreakPointObject(
Handle<BreakPointInfo> info,
10670 int GetBreakPointCount();
10672 static inline BreakPointInfo* cast(
Object* obj);
10678 static const
int kCodePositionIndex = Struct::kHeaderSize;
10679 static const
int kSourcePositionIndex = kCodePositionIndex + kPointerSize;
10680 static const
int kStatementPositionIndex =
10681 kSourcePositionIndex + kPointerSize;
10682 static const
int kBreakPointObjectsIndex =
10683 kStatementPositionIndex + kPointerSize;
10684 static const
int kSize = kBreakPointObjectsIndex + kPointerSize;
10687 DISALLOW_IMPLICIT_CONSTRUCTORS(BreakPointInfo);
10689 #endif // ENABLE_DEBUGGER_SUPPORT
10692 #undef DECL_BOOLEAN_ACCESSORS
10693 #undef DECL_ACCESSORS
10694 #undef DECLARE_VERIFIER
10696 #define VISITOR_SYNCHRONIZATION_TAGS_LIST(V) \
10697 V(kStringTable, "string_table", "(Internalized strings)") \
10698 V(kExternalStringsTable, "external_strings_table", "(External strings)") \
10699 V(kStrongRootList, "strong_root_list", "(Strong roots)") \
10700 V(kSmiRootList, "smi_root_list", "(Smi roots)") \
10701 V(kInternalizedString, "internalized_string", "(Internal string)") \
10702 V(kBootstrapper, "bootstrapper", "(Bootstrapper)") \
10703 V(kTop, "top", "(Isolate)") \
10704 V(kRelocatable, "relocatable", "(Relocatable)") \
10705 V(kDebug, "debug", "(Debugger)") \
10706 V(kCompilationCache, "compilationcache", "(Compilation cache)") \
10707 V(kHandleScope, "handlescope", "(Handle scope)") \
10708 V(kBuiltins, "builtins", "(Builtins)") \
10709 V(kGlobalHandles, "globalhandles", "(Global handles)") \
10710 V(kEternalHandles, "eternalhandles", "(Eternal handles)") \
10711 V(kThreadManager, "threadmanager", "(Thread manager)") \
10712 V(kExtensions, "Extensions", "(Extensions)")
10716 #define DECLARE_ENUM(enum_item, ignore1, ignore2) enum_item,
10721 #undef DECLARE_ENUM
10723 static const char*
const kTags[kNumberOfSyncTags];
10724 static const char*
const kTagNames[kNumberOfSyncTags];
10735 virtual void VisitPointers(
Object** start,
Object** end) = 0;
10747 virtual void VisitCodeTarget(RelocInfo* rinfo);
10750 virtual void VisitCodeEntry(
Address entry_address);
10753 virtual void VisitCell(RelocInfo* rinfo);
10765 virtual void VisitDebugTarget(RelocInfo* rinfo);
10769 virtual void VisitCodeAgeSequence(RelocInfo* rinfo);
10772 virtual void VisitEmbeddedPointer(RelocInfo* rinfo);
10775 virtual void VisitExternalReference(RelocInfo* rinfo);
10803 static inline bool get(Smi* smi,
int bit_position) {
10804 return get(smi->value(), bit_position);
10807 static inline bool get(
int value,
int bit_position) {
10808 return (value & (1 << bit_position)) != 0;
10811 static inline Smi*
set(Smi* smi,
int bit_position,
bool v) {
10815 static inline int set(
int value,
int bit_position,
bool v) {
10817 value |= (1 << bit_position);
10819 value &= ~(1 << bit_position);
10827 #endif // V8_OBJECTS_H_
static const double kPretenureRatio
enable upcoming ES6 features enable harmony block scoping enable harmony enable harmony proxies enable harmony generators enable harmony numeric enable harmony string enable harmony math functions harmony_scoping harmony_symbols harmony_collections harmony_iteration harmony_strings harmony_scoping harmony_maths tracks arrays with only smi values Optimize object Array DOM strings and string pretenure call new trace pretenuring decisions of HAllocate instructions track fields with only smi values track fields with heap values track_fields track_fields Enables optimizations which favor memory size over execution speed use string slices optimization filter maximum number of GVN fix point iterations use function inlining use allocation folding eliminate write barriers targeting allocations in optimized code maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining crankshaft harvests type feedback from stub cache trace check elimination phase hydrogen tracing filter NULL
static MapWord FromRawValue(uintptr_t value)
const uint32_t kShortcutTypeTag
static Handle< Object > GetElementWithReceiver(Isolate *isolate, Handle< Object > object, Handle< Object > receiver, uint32_t index)
void set_elements_kind(ElementsKind elements_kind)
virtual void VisitExternalAsciiString(v8::String::ExternalAsciiStringResource **resource)
FixedArraySubInstanceType
Object * KeyAt(int entry)
STATIC_CHECK((kStringRepresentationMask|kStringEncodingMask)==Internals::kFullStringRepresentationMask)
static const int kMaxLength
#define FOR_EACH_NUMERIC_FIELD(V)
void set_deopt_dependent_code(bool deopt)
virtual void VisitExternalTwoByteString(v8::String::ExternalStringResource **resource)
bool IsExternalArrayElementsKind(ElementsKind kind)
static uint32_t SeededHash(Key key, uint32_t seed)
bool has_external_array_elements()
static int EntryToIndex(int entry)
const char * ToCString(const v8::String::Utf8Value &value)
virtual uint32_t Hash()=0
virtual void Synchronize(VisitorSynchronization::SyncTag tag)
Object ** RawFieldOfElementAt(int index)
FixedBodyDescriptor< kParentOffset, kOffsetOffset+kPointerSize, kSize > BodyDescriptor
AllocationSite * GetAllocationSite()
void set(int index, Object *value)
bool is_hidden_prototype()
static Representation Smi()
static uint32_t Hash(HashTableKey *key)
const uint16_t * buffer16_
void SetAstId(int index, BailoutId id)
#define DECLARE_FUNCTION_ID(ignored1, ignore2, name)
enable upcoming ES6 features enable harmony block scoping enable harmony enable harmony proxies enable harmony generators enable harmony numeric enable harmony string enable harmony math functions harmony_scoping harmony_symbols harmony_collections harmony_iteration harmony_strings harmony_scoping harmony_maths tracks arrays with only smi values Optimize object Array DOM strings and string pretenure call new trace pretenuring decisions of HAllocate instructions track fields with only smi values track fields with heap values track_fields track_fields Enables optimizations which favor memory size over execution speed use string slices optimization filter maximum number of GVN fix point iterations use function inlining use allocation folding eliminate write barriers targeting allocations in optimized code maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining crankshaft harvests type feedback from stub cache trace check elimination phase hydrogen tracing filter trace hydrogen to given file name trace inlining decisions trace store elimination trace all use positions trace global value numbering trace hydrogen escape analysis trace the tracking of allocation sites trace map generalization environment for every instruction deoptimize every n garbage collections put a break point before deoptimizing deoptimize uncommon cases use on stack replacement trace array bounds check elimination perform array index dehoisting use load elimination use store elimination use constant folding eliminate unreachable code number of stress runs when picking a function to watch for shared function not JSFunction itself flushes the cache of optimized code for closures on every GC functions with arguments object maximum number of escape analysis fix point iterations allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms concurrent on stack replacement do not emit check maps for constant values that have a leaf map
virtual void VisitExternalReference(Address *p)
#define DECLARE_CODE_AGE_ENUM(X)
kInstanceClassNameOffset kNeedsAccessCheckBit kRemovePrototypeBit is_expression
void DetailsAtPut(int entry, PropertyDetails value)
kInstanceClassNameOffset needs_access_check
bool SitePointsToLiteral()
FixedBodyDescriptor< kToStringOffset, kToNumberOffset+kPointerSize, kSize > BodyDescriptor
const uint32_t kTwoByteStringTag
Handle< FixedArray > AddKeysFromJSArray(Handle< FixedArray > content, Handle< JSArray > array)
const int kFailureTypeTagSize
int memento_create_count()
BailoutId AstId(int index)
virtual uint32_t HashForObject(Object *key)=0
const int kStubMajorKeyBits
int number_of_descriptors_storage()
static int SizeOf(Map *map, HeapObject *object)
virtual void VisitRuntimeEntry(RelocInfo *rinfo)
bool ToUint32(uint32_t *value)
static Smi * FromInt(int value)
bool IsFastObjectElementsKind(ElementsKind kind)
static MUST_USE_RESULT MaybeObject * AsObject(Heap *heap, HashTableKey *key)
static const int kOddballKindOffset
MUST_USE_RESULT MaybeObject * ToSmi()
void set_memento_create_count(int count)
PretenureDecision pretenure_decision()
const intptr_t kCodeAlignmentMask
kInstanceClassNameOffset kNeedsAccessCheckBit remove_prototype
int NumberOfOwnDescriptors()
kInstanceClassNameOffset kNeedsAccessCheckBit kRemovePrototypeBit start_position_and_type
virtual void VisitPointer(Object **p)
static uint32_t Hash(HashTableKey *key)
MUST_USE_RESULT MaybeObject * GetPropertyWithDefinedGetter(Object *receiver, JSReceiver *getter)
int InitialPropertiesLength()
AccessorDescriptorType type
void VerifyApiCallResultType()
static const int kFirstNonstringType
MaybeObject * AllocateNewStorageFor(Heap *heap, Representation representation)
void set_has_named_interceptor()
bool is_the_hole(int index)
const int kVariableSizeSentinel
kSerializedDataOffset Object
bool ToInt32(int32_t *value)
static Code * GetPreAgedCodeAgeStub(Isolate *isolate)
bool has_fast_object_elements()
static AllocationSite * cast(Object *obj)
v8::DeclaredAccessorDescriptorDataType data_type
Handle< Object > DeleteProperty(Handle< JSObject > object, Handle< Object > key)
bool SameValue(Object *other)
MUST_USE_RESULT MaybeObject * ToObject(Isolate *isolate)
static uint32_t HashForObject(HashTableKey *key, Object *object)
static uint32_t Hash(HashTableKey *key)
static bool IsMatch(HashTableKey *key, Object *value)
const uint32_t kIsNotInternalizedMask
static Handle< Object > GetElementNoExceptionThrown(Isolate *isolate, Handle< Object > object, uint32_t index)
bool has_fast_double_elements()
static Smi * FromIntptr(intptr_t value)
void SetEnumLength(int length)
Handle< FixedArray > UnionOfKeys(Handle< FixedArray > first, Handle< FixedArray > second)
virtual void PostGarbageCollection()
#define ASSERT(condition)
#define DECLARE_PRINTER(Name)
bool IsHeapObject() const
static Handle< Object > GetPropertyWithReceiver(Handle< Object > object, Handle< Object > receiver, Handle< Name > name, PropertyAttributes *attributes)
#define OBJECT_TYPE_LIST(V)
#define VISITOR_SYNCHRONIZATION_TAGS_LIST(V)
VectorIterator(Vector< const T > data)
static Dictionary< Shape, Key > * cast(Object *obj)
bool IsWeakObject(Object *object)
const intptr_t kCodeAlignment
#define POINTER_SIZE_ALIGN(value)
bool has_sloppy_arguments_elements()
#define IS_TYPE_FUNCTION_DECL(type_)
#define FIXED_TYPED_ARRAY_TRAITS(Type, type, TYPE, elementType, size)
const uint32_t kStringRepresentationMask
bool NonFailureIsHeapObject()
static uint32_t Hash(HashTableKey *key)
#define ERROR_MESSAGES_LIST(V)
const int kExternalArrayTypeCount
static Representation Double()
void set_is_undetectable()
static const int kStringResourceOffset
#define DEFINE_FIXED_ARRAY_SUB_INSTANCE_TYPE(name)
bool HasSpecificClassOf(String *name)
v8::String::ExternalStringResource Resource
#define DEFINE_ELEMENT_ACCESSORS(name, type)
static const int kJSObjectHeaderSize
bool IsFastElementsKind(ElementsKind kind)
const uint32_t kShortExternalStringMask
static bool IsMatch(HashTableKey *key, Object *value)
FixedBodyDescriptor< kNameOffset, kInitialMapOffset+kPointerSize, kSize > BodyDescriptor
void SetDoNotInlineCall()
kSerializedDataOffset kPrototypeTemplateOffset kIndexedPropertyHandlerOffset kInstanceCallHandlerOffset internal_field_count
static Object ** RawField(HeapObject *obj, int offset)
static Smi * cast(Object *object)
Handle< Object > HasProperty(Handle< JSReceiver > obj, Handle< Object > key)
static const int kHeaderSize
static bool IsAscii(const char *chars, int length)
Map * GetMarkerMap(Isolate *isolate)
kInstanceClassNameOffset flag
bool has_slow_elements_kind()
static bool IsOneByte(const uc16 *chars, int length)
static int set(int value, int bit_position, bool v)
Object * ValueAt(int entry)
static const int kHeaderSize
const uint32_t kNotStringTag
void CopyEnumCacheFrom(DescriptorArray *array)
void SetPcAndState(int index, Smi *offset)
static const int kFixedArrayHeaderSize
enable upcoming ES6 features enable harmony block scoping enable harmony enable harmony proxies enable harmony generators enable harmony numeric enable harmony string enable harmony math functions harmony_scoping harmony_symbols harmony_collections harmony_iteration harmony_strings harmony_scoping harmony_maths tracks arrays with only smi values Optimize object Array DOM strings and string pretenure call new trace pretenuring decisions of HAllocate instructions track fields with only smi values track fields with heap values track_fields track_fields Enables optimizations which favor memory size over execution speed use string slices optimization filter maximum number of GVN fix point iterations use function inlining use allocation folding eliminate write barriers targeting allocations in optimized code maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining crankshaft harvests type feedback from stub cache trace check elimination phase hydrogen tracing filter trace hydrogen to given file name trace inlining decisions trace store elimination trace all use positions trace global value numbering trace hydrogen escape analysis trace the tracking of allocation sites trace map generalization environment for every instruction deoptimize every n garbage collections put a break point before deoptimizing deoptimize uncommon cases use on stack replacement trace array bounds check elimination perform array index dehoisting use load elimination use store elimination use constant folding eliminate unreachable code number of stress runs when picking a function to watch for shared function not JSFunction itself flushes the cache of optimized code for closures on every GC functions with arguments object maximum number of escape analysis fix point iterations allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms concurrent on stack replacement do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes number of stack frames inspected by the profiler percentage of ICs that must have type info to allow optimization extra verbose compilation tracing generate extra emit comments in code disassembly enable use of SSE3 instructions if available enable use of CMOV instruction if available enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long mode(MIPS only)") DEFINE_string(expose_natives_as
static int SizeOf(Map *map, HeapObject *object)
enable upcoming ES6 features enable harmony block scoping enable harmony enable harmony proxies enable harmony generators enable harmony numeric enable harmony string enable harmony math functions harmony_scoping harmony_symbols harmony_collections harmony_iteration harmony_strings harmony_scoping harmony_maths tracks arrays with only smi values Optimize object size
virtual void IterateInstance(ObjectVisitor *v)
static int LengthFor(int size_in_bytes)
bool has_fixed_typed_array_elements()
static SeededNumberDictionary * cast(Object *obj)
bool has_fast_smi_elements()
Object ** GetEnumCacheSlot()
STATIC_ASSERT(sizeof(CPURegister)==sizeof(Register))
bool IsStringObjectWithCharacterAt(uint32_t index)
enable upcoming ES6 features enable harmony block scoping enable harmony enable harmony proxies enable harmony generators enable harmony numeric enable harmony string enable harmony math functions harmony_scoping harmony_symbols harmony_collections harmony_iteration harmony_strings harmony_scoping harmony_maths tracks arrays with only smi values Optimize object Array DOM strings and string pretenure call new trace pretenuring decisions of HAllocate instructions track fields with only smi values track fields with heap values track_fields track_fields Enables optimizations which favor memory size over execution speed use string slices optimization filter maximum number of GVN fix point iterations use function inlining use allocation folding eliminate write barriers targeting allocations in optimized code maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining crankshaft harvests type feedback from stub cache trace check elimination phase hydrogen tracing filter trace hydrogen to given file name trace inlining decisions trace store elimination trace all use positions trace global value numbering trace hydrogen escape analysis trace the tracking of allocation sites trace map generalization environment for every instruction deoptimize every n garbage collections put a break point before deoptimizing deoptimize uncommon cases use on stack replacement trace array bounds check elimination perform array index dehoisting use load elimination use store elimination use constant folding eliminate unreachable code number of stress runs when picking a function to watch for shared function not JSFunction itself flushes the cache of optimized code for closures on every GC functions with arguments object maximum number of escape analysis fix point iterations allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms concurrent on stack replacement do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes number of stack frames inspected by the profiler percentage of ICs that must have type info to allow optimization extra verbose compilation tracing generate extra emit comments in code disassembly enable use of SSE3 instructions if available enable use of CMOV instruction if available enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long expose natives in global object expose freeBuffer extension expose gc extension under the specified name expose externalize string extension number of stack frames to capture disable builtin natives files print name of functions for which code is generated use random jit cookie to mask large constants trace lazy optimization use adaptive optimizations always try to OSR functions trace optimize function deoptimization minimum length for automatic enable preparsing maximum number of optimization attempts before giving up cache prototype transitions trace debugging JSON request response trace out of bounds accesses to external arrays trace_js_array_abuse automatically set the debug break flag when debugger commands are in the queue abort by crashing maximum length of function source code printed in a stack trace max size of the new max size of the old max size of executable always perform global GCs print one trace line following each garbage collection do not print trace line after scavenger collection print statistics of the maximum memory committed for the heap in only print modified registers Don t break for ASM_UNIMPLEMENTED_BREAK macros print stack trace when an illegal exception is thrown randomize hashes to avoid predictable hash Fixed seed to use to hash property Print the time it takes to deserialize the snapshot testing_bool_flag testing_int_flag string flag tmp file in which to serialize heap Print the time it takes to lazily compile hydrogen code stubs concurrent_recompilation concurrent_sweeping Print usage including flags
static MUST_USE_RESULT MaybeObject * GetPropertyOrFail(Handle< Object > object, Handle< Object > receiver, LookupResult *result, Handle< Name > key, PropertyAttributes *attributes)
static int SizeFor(int length)
bool FitsRepresentation(Representation representation)
static Representation HeapObject()
#define DECLARE_ENUM(enum_item, ignore1, ignore2)
void SetNumberOfProtoTransitions(int value)
void SetNumberOfElements(int nof)
static const int kMapInstanceTypeOffset
static bool IsValid(intptr_t value)
static bool IsAscii(const uint8_t *chars, int length)
const uint32_t kIsIndirectStringMask
static const int kMinValue
bool ToArrayIndex(uint32_t *index)
Smi * PcAndState(int index)
MUST_USE_RESULT MaybeObject * CopyUpTo(int enumeration_index)
#define DECLARE_VERIFIER(Name)
static MUST_USE_RESULT MaybeObject * AsObject(Heap *heap, HashTableKey *key)
uint32_t HashForObject(Key key, Object *object)
FixedBodyDescriptor< kPointerFieldsBeginOffset, kPointerFieldsEndOffset, kSize > BodyDescriptor
static UnseededNumberDictionary * cast(Object *obj)
Object ** RawFieldOfElementAt(int index)
static ConsString * VisitFlat(Visitor *visitor, String *string, int offset=0)
bool IsAligned(T value, U alignment)
Object * GetPrototype(Isolate *isolate)
#define DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName)
const uintptr_t kUintptrAllBitsSet
INLINE(static uint32_t GetProbeOffset(uint32_t n))
enable upcoming ES6 features enable harmony block scoping enable harmony enable harmony proxies enable harmony generators enable harmony numeric enable harmony string enable harmony math functions harmony_scoping harmony_symbols harmony_collections harmony_iteration harmony_strings harmony_scoping harmony_maths tracks arrays with only smi values Optimize object Array DOM strings and string pretenure call new trace pretenuring decisions of HAllocate instructions track fields with only smi values track fields with heap values track_fields track_fields Enables optimizations which favor memory size over execution speed use string slices optimization filter maximum number of GVN fix point iterations use function inlining use allocation folding eliminate write barriers targeting allocations in optimized code maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining crankshaft harvests type feedback from stub cache trace check elimination phase hydrogen tracing filter trace hydrogen to given file name trace inlining decisions trace store elimination trace all use positions trace global value numbering trace hydrogen escape analysis trace the tracking of allocation sites trace map generalization environment for every instruction deoptimize every n garbage collections put a break point before deoptimizing deoptimize uncommon cases use on stack replacement trace array bounds check elimination perform array index dehoisting use load elimination use store elimination use constant folding eliminate unreachable code number of stress runs when picking a function to watch for shared function not JSFunction itself flushes the cache of optimized code for closures on every GC functions with arguments object maximum number of escape analysis fix point iterations allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms concurrent on stack replacement do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes number of stack frames inspected by the profiler percentage of ICs that must have type info to allow optimization extra verbose compilation tracing generate extra code(assertions) for debugging") DEFINE_bool(code_comments
bool deopt_dependent_code()
const uint32_t kOneByteDataHintMask
#define DISALLOW_COPY_AND_ASSIGN(TypeName)
void SetCapacity(int capacity)
const uint32_t kShortcutTypeMask
int Search(T *array, Name *name, int valid_entries)
Vector< const uc16 > ToUC16Vector()
static void IterateBody(HeapObject *obj, int object_size)
bool IsFixedTypedArrayElementsKind(ElementsKind kind)
int memento_found_count()
SetFastElementsCapacitySmiMode
T RoundUp(T x, intptr_t m)
bool is_compare_nil_ic_stub()
static NameDictionary * cast(Object *obj)
ElementsKind GetElementsKind()
bool IsFastSmiElementsKind(ElementsKind kind)
static int OffsetOfElementAt(int index)
#define FIELD_ACCESSORS(name)
const uint32_t kShortExternalStringTag
void SetNumberOfOwnDescriptors(int number)
FixedArray * GetEnumIndicesCache()
static const int kOddballType
static const int kHeaderSize
static int SizeFor(int length)
#define DEFINE_CODE_KIND_ENUM(name)
void SetNumberOfDeletedElements(int nod)
const uint32_t kStringTag
Object * ToObjectUnchecked()
void set_has_indexed_interceptor()
static int NonOneByteStart(const uc16 *chars, int length)
static Handle< Object > GetOrCreateHash(Handle< Object > object, Isolate *isolate)
const uint32_t kInternalizedTag
MUST_USE_RESULT MaybeObject * GetProperty(Name *key)
VectorIterator(T *d, int l)
static int OffsetOfElementAt(int index)
static int SizeFor(int length)
#define T(name, string, precedence)
bool HasEnumIndicesCache()
bool IsFastSmiOrObjectElementsKind(ElementsKind kind)
void SetNextEnumerationIndex(int index)
static uint32_t SeededHashForObject(Key key, uint32_t seed, Object *object)
void set_dont_optimize_reason(BailoutReason reason)
const int kElementsKindCount
static const int kHeaderSize
PropertyNormalizationMode
void Lookup(Name *name, LookupResult *result)
void SetElementsKind(ElementsKind kind)
static int SizeFor(int length)
bool has_named_interceptor()
#define FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(V)
const uint32_t kIsNotStringMask
virtual void VisitNextCodeLink(Object **p)
const char * GetBailoutReason(BailoutReason reason)
const uint32_t kSlicedNotConsMask
const uint32_t kNotInternalizedTag
static uint32_t HashForObject(HashTableKey *key, Object *object)
bool is_compare_ic_stub()
static uint32_t HashForObject(Key key, Object *object)
static ObjectHashTable * cast(Object *obj)
FixedBodyDescriptor< kFirstOffset, kSecondOffset+kPointerSize, kSize > BodyDescriptor
static const int kHeapObjectMapOffset
Handle< T > handle(T *t, Isolate *isolate)
const int kStubMinorKeyBits
enable upcoming ES6 features enable harmony block scoping enable harmony enable harmony proxies enable harmony generators enable harmony numeric enable harmony string enable harmony math functions harmony_scoping harmony_symbols harmony_collections harmony_iteration harmony_strings harmony_scoping harmony_maths tracks arrays with only smi values Optimize object Array DOM strings and string pretenure call new trace pretenuring decisions of HAllocate instructions track fields with only smi values track fields with heap values track_fields track_fields Enables optimizations which favor memory size over execution speed use string slices optimization filter maximum number of GVN fix point iterations use function inlining use allocation folding eliminate write barriers targeting allocations in optimized code maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining crankshaft harvests type feedback from stub cache trace check elimination phase hydrogen tracing filter trace hydrogen to given file name trace inlining decisions trace store elimination trace all use positions trace global value numbering trace hydrogen escape analysis trace the tracking of allocation sites trace map generalization environment for every instruction deoptimize every n garbage collections put a break point before deoptimizing deoptimize uncommon cases use on stack replacement trace array bounds check elimination perform array index dehoisting use load elimination use store elimination use constant folding eliminate unreachable code number of stress runs when picking a function to watch for shared function info
#define CODE_KIND_LIST(V)
#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))
static Vector< T > cast(Vector< S > input)
static Object * cast(Object *value)
name_should_print_as_anonymous
Object * GetPropertyNoExceptionThrown(Name *key)
bool has_indexed_interceptor()
static bool IsMatch(HashTableKey *key, Object *value)
Traits::ElementType ElementType
v8::String::ExternalAsciiStringResource Resource
PropertyDetails DetailsAt(int entry)
static int SizeFor(int length)
kSerializedDataOffset kPrototypeTemplateOffset kIndexedPropertyHandlerOffset instance_call_handler
const uint32_t kOneByteDataHintTag
static const int kHeaderSize
void ShortPrint(FILE *out=stdout)
void ValueAtPut(int entry, Object *value)
int number_of_descriptors()
bool is_keyed_store_stub()
static uint32_t HashForObject(HashTableKey *key, Object *object)
static int SizeFor(int number_of_int64_entries, int number_of_code_ptr_entries, int number_of_heap_ptr_entries, int number_of_int32_entries)
Representation OptimalRepresentation(ValueType type=OPTIMAL_REPRESENTATION)
#define ASSERT_EQ(v1, v2)
static bool IsMatch(HashTableKey *key, Object *value)
Failure * ToFailureUnchecked()
static const int kElementsKindShift
bool is_to_boolean_ic_stub()
static void IterateBody(HeapObject *obj)
kInstanceClassNameOffset kNeedsAccessCheckBit kRemovePrototypeBit kIsExpressionBit kAllowLazyCompilation kUsesArguments formal_parameter_count
const uint32_t kOneByteStringTag
static uint32_t NextProbe(uint32_t last, uint32_t number, uint32_t size)
void SmiPrint(FILE *out=stdout)
#define DECL_ACCESSORS(name, type)
DeclaredAccessorDescriptorDataType
virtual bool IsMatch(Object *other)=0
static int ElementOffset(int index)
static FixedArray * cast(Object *obj)
static MUST_USE_RESULT MaybeObject * AsObject(Heap *heap, HashTableKey *key)
static const int kUndefinedOddballKind
static const unsigned kMaxOneByteChar
#define HEAP_OBJECT_TYPE_LIST(V)
static const int kHeaderSize
void Print(const v8::FunctionCallbackInfo< v8::Value > &args)
static Smi * set(Smi *smi, int bit_position, bool v)
kSerializedDataOffset kPrototypeTemplateOffset kIndexedPropertyHandlerOffset kInstanceCallHandlerOffset kInternalFieldCountOffset dependent_code
bool ToObject(Object **obj)
int NumberOfSlackDescriptors()
ElementsKind elements_kind()
FixedArray * GetEnumCache()
int OffsetOfElementAt(int index)
const uint32_t kIsIndirectStringTag
virtual void VisitEmbedderReference(Object **p, uint16_t class_id)
kSerializedDataOffset kPrototypeTemplateOffset indexed_property_handler
bool IsJSGlobalObjectMap()
static const int kPrototypeOffset
bool IsJSGlobalProxyMap()
static Handle< Object > GetElement(Isolate *isolate, Handle< Object > object, uint32_t index)
static uint32_t HashForObject(HashTableKey *key, Object *object)
static uint32_t GetProbe(uint32_t hash, uint32_t number, uint32_t size)
static WeakHashTable * cast(Object *obj)
kInstanceClassNameOffset kNeedsAccessCheckBit kRemovePrototypeBit kIsExpressionBit kAllowLazyCompilation uses_arguments
enable upcoming ES6 features enable harmony block scoping enable harmony enable harmony proxies enable harmony generators enable harmony numeric literals(0o77, 0b11)") DEFINE_bool(harmony_strings
void set(AccessorComponent component, Object *value)
static int LengthOfFixedArray(int deopt_points)
static uint32_t Hash(Key key)
static Representation None()
static const int kMaxLength
static int SizeFor(int body_size)
static int LengthFor(int number_of_descriptors)
const int kFailureTypeTagMask
bool ToHandle(Handle< T > *obj, Isolate *isolate)
kInstanceClassNameOffset kNeedsAccessCheckBit kRemovePrototypeBit kIsExpressionBit compiler_hints
static Representation Tagged()
static const int kForeignType
int NextEnumerationIndex()
int NumberOfDeletedElements()
kSerializedDataOffset prototype_template
kInstanceClassNameOffset kNeedsAccessCheckBit kRemovePrototypeBit kIsExpressionBit allows_lazy_compilation
static int SizeFor(int length)
Vector< const uint8_t > ToOneByteVector()
#define FUNCTIONS_WITH_ID_LIST(V)
static uint32_t FirstProbe(uint32_t hash, uint32_t size)
void set_pretenure_decision(PretenureDecision decision)
static int NewElementsCapacity(int old_capacity)
#define DEFINE_ENTRY_ACCESSORS(name, type)
TypeImpl< HeapTypeConfig > HeapType
static const int kMaxValue
enable upcoming ES6 features enable harmony block scoping enable harmony enable harmony proxies enable harmony generators enable harmony numeric enable harmony string enable harmony math functions harmony_scoping harmony_symbols harmony_collections harmony_iteration harmony_strings harmony_scoping harmony_maths tracks arrays with only smi values Optimize object Array DOM strings and string pretenure call new trace pretenuring decisions of HAllocate instructions track fields with only smi values track fields with heap values track_fields track_fields Enables optimizations which favor memory size over execution speed use string slices optimization filter maximum number of GVN fix point iterations use function inlining use allocation folding eliminate write barriers targeting allocations in optimized code maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining crankshaft harvests type feedback from stub cache trace check elimination phase hydrogen tracing filter trace hydrogen to given file name trace inlining decisions trace store elimination trace all use positions trace global value numbering trace hydrogen escape analysis trace the tracking of allocation sites trace map generalization environment for every instruction deoptimize every n garbage collections put a break point before deoptimizing deoptimize uncommon cases use on stack replacement trace array bounds check elimination perform array index dehoisting use load elimination use store elimination use constant folding eliminate unreachable code number of stress runs when picking a function to watch for shared function not JSFunction itself flushes the cache of optimized code for closures on every GC functions with arguments object maximum number of escape analysis fix point iterations allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms concurrent on stack replacement do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes number of stack frames inspected by the profiler percentage of ICs that must have type info to allow optimization extra verbose compilation tracing generate extra emit comments in code disassembly enable use of SSE3 instructions if available enable use of CMOV instruction if available enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long expose natives in global object expose freeBuffer extension expose gc extension under the specified name expose externalize string extension number of stack frames to capture disable builtin natives files print name of functions for which code is generated use random jit cookie to mask large constants trace lazy optimization use adaptive optimizations always try to OSR functions trace optimize function deoptimization minimum length for automatic enable preparsing maximum number of optimization attempts before giving up cache prototype transitions trace debugging JSON request response trace out of bounds accesses to external arrays trace_js_array_abuse automatically set the debug break flag when debugger commands are in the queue abort by crashing maximum length of function source code printed in a stack trace max size of the new max size of the old max size of executable always perform global GCs print one trace line following each garbage collection do not print trace line after scavenger collection print statistics of the maximum memory committed for the heap in name
bool has_dictionary_elements()
static const int kNullOddballKind
INLINE(bool IsSpecObject())
static Cell * FromValueAddress(Address value)
static int saved_code_index(bool is_ascii)
#define ASSERT_SIZE_TAG_ALIGNED(size)
int LinearSearch(T *array, Name *name, int len, int valid_entries)
void ElementsRemoved(int n)
static ObjectHashSet * cast(Object *obj)
#define ERROR_MESSAGES_CONSTANTS(C, T)
bool IsDictionaryElementsKind(ElementsKind kind)
static int OffsetOfCodeWithId(Builtins::JavaScript id)
bool IsFastDoubleElementsKind(ElementsKind kind)
bool is_keyed_load_stub()
const uint32_t kStringEncodingMask
static const int kJSObjectType
void SetComponents(Object *getter, Object *setter)
static MUST_USE_RESULT MaybeObject * AsObject(Heap *heap, HashTableKey *key)
#define DECLARE_STRUCT_PREDICATE(NAME, Name, name)
virtual MUST_USE_RESULT MaybeObject * AsObject(Heap *heap)=0
void set_is_hidden_prototype()
#define DECL_BOOLEAN_ACCESSORS(name)