Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Side by Side Diff: src/objects.h

Issue 181453002: Reset trunk to 3.24.35.4 (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/object-observe.js ('k') | src/objects.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 19 matching lines...) Expand all
30 30
31 #include "allocation.h" 31 #include "allocation.h"
32 #include "assert-scope.h" 32 #include "assert-scope.h"
33 #include "builtins.h" 33 #include "builtins.h"
34 #include "elements-kind.h" 34 #include "elements-kind.h"
35 #include "flags.h" 35 #include "flags.h"
36 #include "list.h" 36 #include "list.h"
37 #include "property-details.h" 37 #include "property-details.h"
38 #include "smart-pointers.h" 38 #include "smart-pointers.h"
39 #include "unicode-inl.h" 39 #include "unicode-inl.h"
40 #if V8_TARGET_ARCH_A64 40 #if V8_TARGET_ARCH_ARM
41 #include "a64/constants-a64.h"
42 #elif V8_TARGET_ARCH_ARM
43 #include "arm/constants-arm.h" 41 #include "arm/constants-arm.h"
44 #elif V8_TARGET_ARCH_MIPS 42 #elif V8_TARGET_ARCH_MIPS
45 #include "mips/constants-mips.h" 43 #include "mips/constants-mips.h"
46 #endif 44 #endif
47 #include "v8checks.h" 45 #include "v8checks.h"
48 #include "zone.h" 46 #include "zone.h"
49 47
50 48
51 // 49 //
52 // Most object types in the V8 JavaScript are described in this file. 50 // Most object types in the V8 JavaScript are described in this file.
(...skipping 980 matching lines...) Expand 10 before | Expand all | Expand 10 after
1033 V(JSObject) \ 1031 V(JSObject) \
1034 V(JSContextExtensionObject) \ 1032 V(JSContextExtensionObject) \
1035 V(JSGeneratorObject) \ 1033 V(JSGeneratorObject) \
1036 V(JSModule) \ 1034 V(JSModule) \
1037 V(Map) \ 1035 V(Map) \
1038 V(DescriptorArray) \ 1036 V(DescriptorArray) \
1039 V(TransitionArray) \ 1037 V(TransitionArray) \
1040 V(DeoptimizationInputData) \ 1038 V(DeoptimizationInputData) \
1041 V(DeoptimizationOutputData) \ 1039 V(DeoptimizationOutputData) \
1042 V(DependentCode) \ 1040 V(DependentCode) \
1041 V(TypeFeedbackCells) \
1043 V(FixedArray) \ 1042 V(FixedArray) \
1044 V(FixedDoubleArray) \ 1043 V(FixedDoubleArray) \
1045 V(ConstantPoolArray) \ 1044 V(ConstantPoolArray) \
1046 V(Context) \ 1045 V(Context) \
1047 V(NativeContext) \ 1046 V(NativeContext) \
1048 V(ScopeInfo) \ 1047 V(ScopeInfo) \
1049 V(JSFunction) \ 1048 V(JSFunction) \
1050 V(Code) \ 1049 V(Code) \
1051 V(Oddball) \ 1050 V(Oddball) \
1052 V(SharedFunctionInfo) \ 1051 V(SharedFunctionInfo) \
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
1123 V(kBothRegistersWereSmisInSelectNonSmi, \ 1122 V(kBothRegistersWereSmisInSelectNonSmi, \
1124 "Both registers were smis in SelectNonSmi") \ 1123 "Both registers were smis in SelectNonSmi") \
1125 V(kCallToAJavaScriptRuntimeFunction, \ 1124 V(kCallToAJavaScriptRuntimeFunction, \
1126 "Call to a JavaScript runtime function") \ 1125 "Call to a JavaScript runtime function") \
1127 V(kCannotTranslatePositionInChangedArea, \ 1126 V(kCannotTranslatePositionInChangedArea, \
1128 "Cannot translate position in changed area") \ 1127 "Cannot translate position in changed area") \
1129 V(kCodeGenerationFailed, "Code generation failed") \ 1128 V(kCodeGenerationFailed, "Code generation failed") \
1130 V(kCodeObjectNotProperlyPatched, "Code object not properly patched") \ 1129 V(kCodeObjectNotProperlyPatched, "Code object not properly patched") \
1131 V(kCompoundAssignmentToLookupSlot, "Compound assignment to lookup slot") \ 1130 V(kCompoundAssignmentToLookupSlot, "Compound assignment to lookup slot") \
1132 V(kContextAllocatedArguments, "Context-allocated arguments") \ 1131 V(kContextAllocatedArguments, "Context-allocated arguments") \
1133 V(kCopyBuffersOverlap, "Copy buffers overlap") \
1134 V(kCouldNotGenerateZero, "Could not generate +0.0") \
1135 V(kCouldNotGenerateNegativeZero, "Could not generate -0.0") \
1136 V(kDebuggerIsActive, "Debugger is active") \ 1132 V(kDebuggerIsActive, "Debugger is active") \
1137 V(kDebuggerStatement, "DebuggerStatement") \ 1133 V(kDebuggerStatement, "DebuggerStatement") \
1138 V(kDeclarationInCatchContext, "Declaration in catch context") \ 1134 V(kDeclarationInCatchContext, "Declaration in catch context") \
1139 V(kDeclarationInWithContext, "Declaration in with context") \ 1135 V(kDeclarationInWithContext, "Declaration in with context") \
1140 V(kDefaultNaNModeNotSet, "Default NaN mode not set") \ 1136 V(kDefaultNaNModeNotSet, "Default NaN mode not set") \
1141 V(kDeleteWithGlobalVariable, "Delete with global variable") \ 1137 V(kDeleteWithGlobalVariable, "Delete with global variable") \
1142 V(kDeleteWithNonGlobalVariable, "Delete with non-global variable") \ 1138 V(kDeleteWithNonGlobalVariable, "Delete with non-global variable") \
1143 V(kDestinationOfCopyNotAligned, "Destination of copy not aligned") \ 1139 V(kDestinationOfCopyNotAligned, "Destination of copy not aligned") \
1144 V(kDontDeleteCellsCannotContainTheHole, \ 1140 V(kDontDeleteCellsCannotContainTheHole, \
1145 "DontDelete cells can't contain the hole") \ 1141 "DontDelete cells can't contain the hole") \
1146 V(kDoPushArgumentNotImplementedForDoubleType, \ 1142 V(kDoPushArgumentNotImplementedForDoubleType, \
1147 "DoPushArgument not implemented for double type") \ 1143 "DoPushArgument not implemented for double type") \
1148 V(kEliminatedBoundsCheckFailed, "Eliminated bounds check failed") \
1149 V(kEmitLoadRegisterUnsupportedDoubleImmediate, \ 1144 V(kEmitLoadRegisterUnsupportedDoubleImmediate, \
1150 "EmitLoadRegister: Unsupported double immediate") \ 1145 "EmitLoadRegister: Unsupported double immediate") \
1151 V(kEval, "eval") \ 1146 V(kEval, "eval") \
1152 V(kExpected0AsASmiSentinel, "Expected 0 as a Smi sentinel") \ 1147 V(kExpected0AsASmiSentinel, "Expected 0 as a Smi sentinel") \
1153 V(kExpectedAlignmentMarker, "Expected alignment marker") \ 1148 V(kExpectedAlignmentMarker, "expected alignment marker") \
1154 V(kExpectedAllocationSite, "Expected allocation site") \ 1149 V(kExpectedAllocationSite, "expected allocation site") \
1155 V(kExpectedFunctionObject, "Expected function object in register") \ 1150 V(kExpectedPropertyCellInRegisterA2, \
1156 V(kExpectedHeapNumber, "Expected HeapNumber") \ 1151 "Expected property cell in register a2") \
1157 V(kExpectedNativeContext, "Expected native context") \ 1152 V(kExpectedPropertyCellInRegisterEbx, \
1158 V(kExpectedNonIdenticalObjects, "Expected non-identical objects") \ 1153 "Expected property cell in register ebx") \
1159 V(kExpectedNonNullContext, "Expected non-null context") \ 1154 V(kExpectedPropertyCellInRegisterRbx, \
1160 V(kExpectedPositiveZero, "Expected +0.0") \ 1155 "Expected property cell in register rbx") \
1161 V(kExpectedAllocationSiteInCell, \
1162 "Expected AllocationSite in property cell") \
1163 V(kExpectedFixedArrayInFeedbackVector, \
1164 "Expected fixed array in feedback vector") \
1165 V(kExpectedFixedArrayInRegisterA2, \
1166 "Expected fixed array in register a2") \
1167 V(kExpectedFixedArrayInRegisterEbx, \
1168 "Expected fixed array in register ebx") \
1169 V(kExpectedFixedArrayInRegisterR2, \
1170 "Expected fixed array in register r2") \
1171 V(kExpectedFixedArrayInRegisterRbx, \
1172 "Expected fixed array in register rbx") \
1173 V(kExpectedSmiOrHeapNumber, "Expected smi or HeapNumber") \
1174 V(kExpectingAlignmentForCopyBytes, \ 1156 V(kExpectingAlignmentForCopyBytes, \
1175 "Expecting alignment for CopyBytes") \ 1157 "Expecting alignment for CopyBytes") \
1176 V(kExportDeclaration, "Export declaration") \ 1158 V(kExportDeclaration, "Export declaration") \
1177 V(kExternalStringExpectedButNotFound, \ 1159 V(kExternalStringExpectedButNotFound, \
1178 "External string expected, but not found") \ 1160 "External string expected, but not found") \
1179 V(kFailedBailedOutLastTime, "Failed/bailed out last time") \ 1161 V(kFailedBailedOutLastTime, "Failed/bailed out last time") \
1180 V(kForInStatementIsNotFastCase, "ForInStatement is not fast case") \ 1162 V(kForInStatementIsNotFastCase, "ForInStatement is not fast case") \
1181 V(kForInStatementOptimizationIsDisabled, \ 1163 V(kForInStatementOptimizationIsDisabled, \
1182 "ForInStatement optimization is disabled") \ 1164 "ForInStatement optimization is disabled") \
1183 V(kForInStatementWithNonLocalEachVariable, \ 1165 V(kForInStatementWithNonLocalEachVariable, \
(...skipping 24 matching lines...) Expand all
1208 "Inlined runtime function: GeneratorThrow") \ 1190 "Inlined runtime function: GeneratorThrow") \
1209 V(kInlinedRuntimeFunctionGetFromCache, \ 1191 V(kInlinedRuntimeFunctionGetFromCache, \
1210 "Inlined runtime function: GetFromCache") \ 1192 "Inlined runtime function: GetFromCache") \
1211 V(kInlinedRuntimeFunctionIsNonNegativeSmi, \ 1193 V(kInlinedRuntimeFunctionIsNonNegativeSmi, \
1212 "Inlined runtime function: IsNonNegativeSmi") \ 1194 "Inlined runtime function: IsNonNegativeSmi") \
1213 V(kInlinedRuntimeFunctionIsStringWrapperSafeForDefaultValueOf, \ 1195 V(kInlinedRuntimeFunctionIsStringWrapperSafeForDefaultValueOf, \
1214 "Inlined runtime function: IsStringWrapperSafeForDefaultValueOf") \ 1196 "Inlined runtime function: IsStringWrapperSafeForDefaultValueOf") \
1215 V(kInliningBailedOut, "Inlining bailed out") \ 1197 V(kInliningBailedOut, "Inlining bailed out") \
1216 V(kInputGPRIsExpectedToHaveUpper32Cleared, \ 1198 V(kInputGPRIsExpectedToHaveUpper32Cleared, \
1217 "Input GPR is expected to have upper32 cleared") \ 1199 "Input GPR is expected to have upper32 cleared") \
1218 V(kInputStringTooLong, "Input string too long") \
1219 V(kInstanceofStubUnexpectedCallSiteCacheCheck, \ 1200 V(kInstanceofStubUnexpectedCallSiteCacheCheck, \
1220 "InstanceofStub unexpected call site cache (check)") \ 1201 "InstanceofStub unexpected call site cache (check)") \
1221 V(kInstanceofStubUnexpectedCallSiteCacheCmp1, \ 1202 V(kInstanceofStubUnexpectedCallSiteCacheCmp1, \
1222 "InstanceofStub unexpected call site cache (cmp 1)") \ 1203 "InstanceofStub unexpected call site cache (cmp 1)") \
1223 V(kInstanceofStubUnexpectedCallSiteCacheCmp2, \ 1204 V(kInstanceofStubUnexpectedCallSiteCacheCmp2, \
1224 "InstanceofStub unexpected call site cache (cmp 2)") \ 1205 "InstanceofStub unexpected call site cache (cmp 2)") \
1225 V(kInstanceofStubUnexpectedCallSiteCacheMov, \ 1206 V(kInstanceofStubUnexpectedCallSiteCacheMov, \
1226 "InstanceofStub unexpected call site cache (mov)") \ 1207 "InstanceofStub unexpected call site cache (mov)") \
1227 V(kInteger32ToSmiFieldWritingToNonSmiLocation, \ 1208 V(kInteger32ToSmiFieldWritingToNonSmiLocation, \
1228 "Integer32ToSmiField writing to non-smi location") \ 1209 "Integer32ToSmiField writing to non-smi location") \
1229 V(kInvalidCaptureReferenced, "Invalid capture referenced") \ 1210 V(kInvalidCaptureReferenced, "Invalid capture referenced") \
1230 V(kInvalidElementsKindForInternalArrayOrInternalPackedArray, \ 1211 V(kInvalidElementsKindForInternalArrayOrInternalPackedArray, \
1231 "Invalid ElementsKind for InternalArray or InternalPackedArray") \ 1212 "Invalid ElementsKind for InternalArray or InternalPackedArray") \
1232 V(kInvalidFullCodegenState, "invalid full-codegen state") \
1233 V(kInvalidHandleScopeLevel, "Invalid HandleScope level") \ 1213 V(kInvalidHandleScopeLevel, "Invalid HandleScope level") \
1234 V(kInvalidLeftHandSideInAssignment, "Invalid left-hand side in assignment") \ 1214 V(kInvalidLeftHandSideInAssignment, "Invalid left-hand side in assignment") \
1235 V(kInvalidLhsInCompoundAssignment, "Invalid lhs in compound assignment") \ 1215 V(kInvalidLhsInCompoundAssignment, "Invalid lhs in compound assignment") \
1236 V(kInvalidLhsInCountOperation, "Invalid lhs in count operation") \ 1216 V(kInvalidLhsInCountOperation, "Invalid lhs in count operation") \
1237 V(kInvalidMinLength, "Invalid min_length") \ 1217 V(kInvalidMinLength, "Invalid min_length") \
1238 V(kJSGlobalObjectNativeContextShouldBeANativeContext, \ 1218 V(kJSGlobalObjectNativeContextShouldBeANativeContext, \
1239 "JSGlobalObject::native_context should be a native context") \ 1219 "JSGlobalObject::native_context should be a native context") \
1240 V(kJSGlobalProxyContextShouldNotBeNull, \ 1220 V(kJSGlobalProxyContextShouldNotBeNull, \
1241 "JSGlobalProxy::context() should not be null") \ 1221 "JSGlobalProxy::context() should not be null") \
1242 V(kJSObjectWithFastElementsMapHasSlowElements, \ 1222 V(kJSObjectWithFastElementsMapHasSlowElements, \
1243 "JSObject with fast elements map has slow elements") \ 1223 "JSObject with fast elements map has slow elements") \
1244 V(kLetBindingReInitialization, "Let binding re-initialization") \ 1224 V(kLetBindingReInitialization, "Let binding re-initialization") \
1245 V(kLhsHasBeenClobbered, "lhs has been clobbered") \
1246 V(kLiveBytesCountOverflowChunkSize, "Live Bytes Count overflow chunk size") \ 1225 V(kLiveBytesCountOverflowChunkSize, "Live Bytes Count overflow chunk size") \
1247 V(kLiveEditFrameDroppingIsNotSupportedOnA64, \
1248 "LiveEdit frame dropping is not supported on a64") \
1249 V(kLiveEditFrameDroppingIsNotSupportedOnArm, \ 1226 V(kLiveEditFrameDroppingIsNotSupportedOnArm, \
1250 "LiveEdit frame dropping is not supported on arm") \ 1227 "LiveEdit frame dropping is not supported on arm") \
1251 V(kLiveEditFrameDroppingIsNotSupportedOnMips, \ 1228 V(kLiveEditFrameDroppingIsNotSupportedOnMips, \
1252 "LiveEdit frame dropping is not supported on mips") \ 1229 "LiveEdit frame dropping is not supported on mips") \
1253 V(kLiveEdit, "LiveEdit") \ 1230 V(kLiveEdit, "LiveEdit") \
1254 V(kLookupVariableInCountOperation, \ 1231 V(kLookupVariableInCountOperation, \
1255 "Lookup variable in count operation") \ 1232 "Lookup variable in count operation") \
1256 V(kMapIsNoLongerInEax, "Map is no longer in eax") \ 1233 V(kMapIsNoLongerInEax, "Map is no longer in eax") \
1257 V(kModuleDeclaration, "Module declaration") \ 1234 V(kModuleDeclaration, "Module declaration") \
1258 V(kModuleLiteral, "Module literal") \ 1235 V(kModuleLiteral, "Module literal") \
(...skipping 15 matching lines...) Expand all
1274 "Not enough virtual registers for values") \ 1251 "Not enough virtual registers for values") \
1275 V(kNotEnoughSpillSlotsForOsr, \ 1252 V(kNotEnoughSpillSlotsForOsr, \
1276 "Not enough spill slots for OSR") \ 1253 "Not enough spill slots for OSR") \
1277 V(kNotEnoughVirtualRegistersRegalloc, \ 1254 V(kNotEnoughVirtualRegistersRegalloc, \
1278 "Not enough virtual registers (regalloc)") \ 1255 "Not enough virtual registers (regalloc)") \
1279 V(kObjectFoundInSmiOnlyArray, "Object found in smi-only array") \ 1256 V(kObjectFoundInSmiOnlyArray, "Object found in smi-only array") \
1280 V(kObjectLiteralWithComplexProperty, \ 1257 V(kObjectLiteralWithComplexProperty, \
1281 "Object literal with complex property") \ 1258 "Object literal with complex property") \
1282 V(kOddballInStringTableIsNotUndefinedOrTheHole, \ 1259 V(kOddballInStringTableIsNotUndefinedOrTheHole, \
1283 "Oddball in string table is not undefined or the hole") \ 1260 "Oddball in string table is not undefined or the hole") \
1284 V(kOffsetOutOfRange, "Offset out of range") \
1285 V(kOperandIsASmiAndNotAName, "Operand is a smi and not a name") \ 1261 V(kOperandIsASmiAndNotAName, "Operand is a smi and not a name") \
1286 V(kOperandIsASmiAndNotAString, "Operand is a smi and not a string") \ 1262 V(kOperandIsASmiAndNotAString, "Operand is a smi and not a string") \
1287 V(kOperandIsASmi, "Operand is a smi") \ 1263 V(kOperandIsASmi, "Operand is a smi") \
1288 V(kOperandIsNotAName, "Operand is not a name") \ 1264 V(kOperandIsNotAName, "Operand is not a name") \
1289 V(kOperandIsNotANumber, "Operand is not a number") \ 1265 V(kOperandIsNotANumber, "Operand is not a number") \
1290 V(kOperandIsNotASmi, "Operand is not a smi") \ 1266 V(kOperandIsNotASmi, "Operand is not a smi") \
1291 V(kOperandIsNotAString, "Operand is not a string") \ 1267 V(kOperandIsNotAString, "Operand is not a string") \
1292 V(kOperandIsNotSmi, "Operand is not smi") \ 1268 V(kOperandIsNotSmi, "Operand is not smi") \
1293 V(kOperandNotANumber, "Operand not a number") \ 1269 V(kOperandNotANumber, "Operand not a number") \
1294 V(kOptimizationDisabled, "Optimization is disabled") \ 1270 V(kOptimizationDisabled, "Optimization is disabled") \
1295 V(kOptimizedTooManyTimes, "Optimized too many times") \ 1271 V(kOptimizedTooManyTimes, "Optimized too many times") \
1296 V(kOutOfVirtualRegistersWhileTryingToAllocateTempRegister, \ 1272 V(kOutOfVirtualRegistersWhileTryingToAllocateTempRegister, \
1297 "Out of virtual registers while trying to allocate temp register") \ 1273 "Out of virtual registers while trying to allocate temp register") \
1298 V(kParseScopeError, "Parse/scope error") \ 1274 V(kParseScopeError, "Parse/scope error") \
1299 V(kPossibleDirectCallToEval, "Possible direct call to eval") \ 1275 V(kPossibleDirectCallToEval, "Possible direct call to eval") \
1300 V(kPreconditionsWereNotMet, "Preconditions were not met") \
1301 V(kPropertyAllocationCountFailed, "Property allocation count failed") \ 1276 V(kPropertyAllocationCountFailed, "Property allocation count failed") \
1302 V(kReceivedInvalidReturnAddress, "Received invalid return address") \ 1277 V(kReceivedInvalidReturnAddress, "Received invalid return address") \
1303 V(kReferenceToAVariableWhichRequiresDynamicLookup, \ 1278 V(kReferenceToAVariableWhichRequiresDynamicLookup, \
1304 "Reference to a variable which requires dynamic lookup") \ 1279 "Reference to a variable which requires dynamic lookup") \
1305 V(kReferenceToGlobalLexicalVariable, \ 1280 V(kReferenceToGlobalLexicalVariable, \
1306 "Reference to global lexical variable") \ 1281 "Reference to global lexical variable") \
1307 V(kReferenceToUninitializedVariable, "Reference to uninitialized variable") \ 1282 V(kReferenceToUninitializedVariable, "Reference to uninitialized variable") \
1308 V(kRegisterDidNotMatchExpectedRoot, "Register did not match expected root") \ 1283 V(kRegisterDidNotMatchExpectedRoot, "Register did not match expected root") \
1309 V(kRegisterWasClobbered, "Register was clobbered") \ 1284 V(kRegisterWasClobbered, "Register was clobbered") \
1310 V(kRememberedSetPointerInNewSpace, "Remembered set pointer is in new space") \
1311 V(kReturnAddressNotFoundInFrame, "Return address not found in frame") \
1312 V(kRhsHasBeenClobbered, "Rhs has been clobbered") \
1313 V(kScopedBlock, "ScopedBlock") \ 1285 V(kScopedBlock, "ScopedBlock") \
1314 V(kSmiAdditionOverflow, "Smi addition overflow") \ 1286 V(kSmiAdditionOverflow, "Smi addition overflow") \
1315 V(kSmiSubtractionOverflow, "Smi subtraction overflow") \ 1287 V(kSmiSubtractionOverflow, "Smi subtraction overflow") \
1316 V(kStackAccessBelowStackPointer, "Stack access below stack pointer") \
1317 V(kStackFrameTypesMustMatch, "Stack frame types must match") \ 1288 V(kStackFrameTypesMustMatch, "Stack frame types must match") \
1318 V(kSwitchStatementMixedOrNonLiteralSwitchLabels, \ 1289 V(kSwitchStatementMixedOrNonLiteralSwitchLabels, \
1319 "SwitchStatement: mixed or non-literal switch labels") \ 1290 "SwitchStatement: mixed or non-literal switch labels") \
1320 V(kSwitchStatementTooManyClauses, "SwitchStatement: too many clauses") \ 1291 V(kSwitchStatementTooManyClauses, "SwitchStatement: too many clauses") \
1321 V(kTheCurrentStackPointerIsBelowCsp, \
1322 "The current stack pointer is below csp") \
1323 V(kTheInstructionShouldBeALui, "The instruction should be a lui") \ 1292 V(kTheInstructionShouldBeALui, "The instruction should be a lui") \
1324 V(kTheInstructionShouldBeAnOri, "The instruction should be an ori") \ 1293 V(kTheInstructionShouldBeAnOri, "The instruction should be an ori") \
1325 V(kTheInstructionToPatchShouldBeALoadFromPc, \ 1294 V(kTheInstructionToPatchShouldBeALoadFromPc, \
1326 "The instruction to patch should be a load from pc") \ 1295 "The instruction to patch should be a load from pc") \
1327 V(kTheInstructionToPatchShouldBeAnLdrLiteral, \
1328 "The instruction to patch should be a ldr literal") \
1329 V(kTheInstructionToPatchShouldBeALui, \ 1296 V(kTheInstructionToPatchShouldBeALui, \
1330 "The instruction to patch should be a lui") \ 1297 "The instruction to patch should be a lui") \
1331 V(kTheInstructionToPatchShouldBeAnOri, \ 1298 V(kTheInstructionToPatchShouldBeAnOri, \
1332 "The instruction to patch should be an ori") \ 1299 "The instruction to patch should be an ori") \
1333 V(kTheSourceAndDestinationAreTheSame, \
1334 "The source and destination are the same") \
1335 V(kTheStackPointerIsNotAligned, "The stack pointer is not aligned.") \
1336 V(kTheStackWasCorruptedByMacroAssemblerCall, \
1337 "The stack was corrupted by MacroAssembler::Call()") \
1338 V(kTooManyParametersLocals, "Too many parameters/locals") \ 1300 V(kTooManyParametersLocals, "Too many parameters/locals") \
1339 V(kTooManyParameters, "Too many parameters") \ 1301 V(kTooManyParameters, "Too many parameters") \
1340 V(kTooManySpillSlotsNeededForOSR, "Too many spill slots needed for OSR") \ 1302 V(kTooManySpillSlotsNeededForOSR, "Too many spill slots needed for OSR") \
1341 V(kToOperand32UnsupportedImmediate, "ToOperand32 unsupported immediate.") \
1342 V(kToOperandIsDoubleRegisterUnimplemented, \ 1303 V(kToOperandIsDoubleRegisterUnimplemented, \
1343 "ToOperand IsDoubleRegister unimplemented") \ 1304 "ToOperand IsDoubleRegister unimplemented") \
1344 V(kToOperandUnsupportedDoubleImmediate, \ 1305 V(kToOperandUnsupportedDoubleImmediate, \
1345 "ToOperand Unsupported double immediate") \ 1306 "ToOperand Unsupported double immediate") \
1346 V(kTryCatchStatement, "TryCatchStatement") \ 1307 V(kTryCatchStatement, "TryCatchStatement") \
1347 V(kTryFinallyStatement, "TryFinallyStatement") \ 1308 V(kTryFinallyStatement, "TryFinallyStatement") \
1348 V(kUnableToEncodeValueAsSmi, "Unable to encode value as smi") \ 1309 V(kUnableToEncodeValueAsSmi, "Unable to encode value as smi") \
1349 V(kUnalignedAllocationInNewSpace, "Unaligned allocation in new space") \ 1310 V(kUnalignedAllocationInNewSpace, "Unaligned allocation in new space") \
1350 V(kUnalignedCellInWriteBarrier, "Unaligned cell in write barrier") \
1351 V(kUndefinedValueNotLoaded, "Undefined value not loaded") \ 1311 V(kUndefinedValueNotLoaded, "Undefined value not loaded") \
1352 V(kUndoAllocationOfNonAllocatedMemory, \ 1312 V(kUndoAllocationOfNonAllocatedMemory, \
1353 "Undo allocation of non allocated memory") \ 1313 "Undo allocation of non allocated memory") \
1354 V(kUnexpectedAllocationTop, "Unexpected allocation top") \ 1314 V(kUnexpectedAllocationTop, "Unexpected allocation top") \
1355 V(kUnexpectedColorFound, "Unexpected color bit pattern found") \
1356 V(kUnexpectedElementsKindInArrayConstructor, \ 1315 V(kUnexpectedElementsKindInArrayConstructor, \
1357 "Unexpected ElementsKind in array constructor") \ 1316 "Unexpected ElementsKind in array constructor") \
1358 V(kUnexpectedFallthroughFromCharCodeAtSlowCase, \ 1317 V(kUnexpectedFallthroughFromCharCodeAtSlowCase, \
1359 "Unexpected fallthrough from CharCodeAt slow case") \ 1318 "Unexpected fallthrough from CharCodeAt slow case") \
1360 V(kUnexpectedFallthroughFromCharFromCodeSlowCase, \ 1319 V(kUnexpectedFallthroughFromCharFromCodeSlowCase, \
1361 "Unexpected fallthrough from CharFromCode slow case") \ 1320 "Unexpected fallthrough from CharFromCode slow case") \
1362 V(kUnexpectedFallThroughFromStringComparison, \ 1321 V(kUnexpectedFallThroughFromStringComparison, \
1363 "Unexpected fall-through from string comparison") \ 1322 "Unexpected fall-through from string comparison") \
1364 V(kUnexpectedFallThroughInBinaryStubGenerateFloatingPointCode, \ 1323 V(kUnexpectedFallThroughInBinaryStubGenerateFloatingPointCode, \
1365 "Unexpected fall-through in BinaryStub_GenerateFloatingPointCode") \ 1324 "Unexpected fall-through in BinaryStub_GenerateFloatingPointCode") \
1366 V(kUnexpectedFallthroughToCharCodeAtSlowCase, \ 1325 V(kUnexpectedFallthroughToCharCodeAtSlowCase, \
1367 "Unexpected fallthrough to CharCodeAt slow case") \ 1326 "Unexpected fallthrough to CharCodeAt slow case") \
1368 V(kUnexpectedFallthroughToCharFromCodeSlowCase, \ 1327 V(kUnexpectedFallthroughToCharFromCodeSlowCase, \
1369 "Unexpected fallthrough to CharFromCode slow case") \ 1328 "Unexpected fallthrough to CharFromCode slow case") \
1370 V(kUnexpectedFPUStackDepthAfterInstruction, \ 1329 V(kUnexpectedFPUStackDepthAfterInstruction, \
1371 "Unexpected FPU stack depth after instruction") \ 1330 "Unexpected FPU stack depth after instruction") \
1372 V(kUnexpectedInitialMapForArrayFunction1, \ 1331 V(kUnexpectedInitialMapForArrayFunction1, \
1373 "Unexpected initial map for Array function (1)") \ 1332 "Unexpected initial map for Array function (1)") \
1374 V(kUnexpectedInitialMapForArrayFunction2, \ 1333 V(kUnexpectedInitialMapForArrayFunction2, \
1375 "Unexpected initial map for Array function (2)") \ 1334 "Unexpected initial map for Array function (2)") \
1376 V(kUnexpectedInitialMapForArrayFunction, \ 1335 V(kUnexpectedInitialMapForArrayFunction, \
1377 "Unexpected initial map for Array function") \ 1336 "Unexpected initial map for Array function") \
1378 V(kUnexpectedInitialMapForInternalArrayFunction, \ 1337 V(kUnexpectedInitialMapForInternalArrayFunction, \
1379 "Unexpected initial map for InternalArray function") \ 1338 "Unexpected initial map for InternalArray function") \
1380 V(kUnexpectedLevelAfterReturnFromApiCall, \ 1339 V(kUnexpectedLevelAfterReturnFromApiCall, \
1381 "Unexpected level after return from api call") \ 1340 "Unexpected level after return from api call") \
1382 V(kUnexpectedNegativeValue, "Unexpected negative value") \
1383 V(kUnexpectedNumberOfPreAllocatedPropertyFields, \ 1341 V(kUnexpectedNumberOfPreAllocatedPropertyFields, \
1384 "Unexpected number of pre-allocated property fields") \ 1342 "Unexpected number of pre-allocated property fields") \
1385 V(kUnexpectedSmi, "Unexpected smi value") \
1386 V(kUnexpectedStringFunction, "Unexpected String function") \ 1343 V(kUnexpectedStringFunction, "Unexpected String function") \
1387 V(kUnexpectedStringType, "Unexpected string type") \ 1344 V(kUnexpectedStringType, "Unexpected string type") \
1388 V(kUnexpectedStringWrapperInstanceSize, \ 1345 V(kUnexpectedStringWrapperInstanceSize, \
1389 "Unexpected string wrapper instance size") \ 1346 "Unexpected string wrapper instance size") \
1390 V(kUnexpectedTypeForRegExpDataFixedArrayExpected, \ 1347 V(kUnexpectedTypeForRegExpDataFixedArrayExpected, \
1391 "Unexpected type for RegExp data, FixedArray expected") \ 1348 "Unexpected type for RegExp data, FixedArray expected") \
1392 V(kUnexpectedValue, "Unexpected value") \
1393 V(kUnexpectedUnusedPropertiesOfStringWrapper, \ 1349 V(kUnexpectedUnusedPropertiesOfStringWrapper, \
1394 "Unexpected unused properties of string wrapper") \ 1350 "Unexpected unused properties of string wrapper") \
1395 V(kUnimplemented, "unimplemented") \
1396 V(kUninitializedKSmiConstantRegister, "Uninitialized kSmiConstantRegister") \ 1351 V(kUninitializedKSmiConstantRegister, "Uninitialized kSmiConstantRegister") \
1397 V(kUnknown, "Unknown") \ 1352 V(kUnknown, "Unknown") \
1398 V(kUnsupportedConstCompoundAssignment, \ 1353 V(kUnsupportedConstCompoundAssignment, \
1399 "Unsupported const compound assignment") \ 1354 "Unsupported const compound assignment") \
1400 V(kUnsupportedCountOperationWithConst, \ 1355 V(kUnsupportedCountOperationWithConst, \
1401 "Unsupported count operation with const") \ 1356 "Unsupported count operation with const") \
1402 V(kUnsupportedDoubleImmediate, "Unsupported double immediate") \ 1357 V(kUnsupportedDoubleImmediate, "Unsupported double immediate") \
1403 V(kUnsupportedLetCompoundAssignment, "Unsupported let compound assignment") \ 1358 V(kUnsupportedLetCompoundAssignment, "Unsupported let compound assignment") \
1404 V(kUnsupportedLookupSlotInDeclaration, \ 1359 V(kUnsupportedLookupSlotInDeclaration, \
1405 "Unsupported lookup slot in declaration") \ 1360 "Unsupported lookup slot in declaration") \
(...skipping 872 matching lines...) Expand 10 before | Expand all | Expand 10 after
2278 // Migrates the given object to a map whose field representations are the 2233 // Migrates the given object to a map whose field representations are the
2279 // lowest upper bound of all known representations for that field. 2234 // lowest upper bound of all known representations for that field.
2280 static void MigrateInstance(Handle<JSObject> instance); 2235 static void MigrateInstance(Handle<JSObject> instance);
2281 2236
2282 // Migrates the given object only if the target map is already available, 2237 // Migrates the given object only if the target map is already available,
2283 // or returns an empty handle if such a map is not yet available. 2238 // or returns an empty handle if such a map is not yet available.
2284 static Handle<Object> TryMigrateInstance(Handle<JSObject> instance); 2239 static Handle<Object> TryMigrateInstance(Handle<JSObject> instance);
2285 2240
2286 // Retrieve a value in a normalized object given a lookup result. 2241 // Retrieve a value in a normalized object given a lookup result.
2287 // Handles the special representation of JS global objects. 2242 // Handles the special representation of JS global objects.
2288 Object* GetNormalizedProperty(const LookupResult* result); 2243 Object* GetNormalizedProperty(LookupResult* result);
2289 2244
2290 // Sets the property value in a normalized object given a lookup result. 2245 // Sets the property value in a normalized object given a lookup result.
2291 // Handles the special representation of JS global objects. 2246 // Handles the special representation of JS global objects.
2292 static void SetNormalizedProperty(Handle<JSObject> object, 2247 static void SetNormalizedProperty(Handle<JSObject> object,
2293 const LookupResult* result, 2248 LookupResult* result,
2294 Handle<Object> value); 2249 Handle<Object> value);
2295 2250
2296 // Sets the property value in a normalized object given (key, value, details). 2251 // Sets the property value in a normalized object given (key, value, details).
2297 // Handles the special representation of JS global objects. 2252 // Handles the special representation of JS global objects.
2298 static void SetNormalizedProperty(Handle<JSObject> object, 2253 static void SetNormalizedProperty(Handle<JSObject> object,
2299 Handle<Name> key, 2254 Handle<Name> key,
2300 Handle<Object> value, 2255 Handle<Object> value,
2301 PropertyDetails details); 2256 PropertyDetails details);
2302 2257
2303 static void OptimizeAsPrototype(Handle<JSObject> object); 2258 static void OptimizeAsPrototype(Handle<JSObject> object);
(...skipping 2685 matching lines...) Expand 10 before | Expand all | Expand 10 after
4989 // 4944 //
4990 // It can be empty. 4945 // It can be empty.
4991 class DeoptimizationInputData: public FixedArray { 4946 class DeoptimizationInputData: public FixedArray {
4992 public: 4947 public:
4993 // Layout description. Indices in the array. 4948 // Layout description. Indices in the array.
4994 static const int kTranslationByteArrayIndex = 0; 4949 static const int kTranslationByteArrayIndex = 0;
4995 static const int kInlinedFunctionCountIndex = 1; 4950 static const int kInlinedFunctionCountIndex = 1;
4996 static const int kLiteralArrayIndex = 2; 4951 static const int kLiteralArrayIndex = 2;
4997 static const int kOsrAstIdIndex = 3; 4952 static const int kOsrAstIdIndex = 3;
4998 static const int kOsrPcOffsetIndex = 4; 4953 static const int kOsrPcOffsetIndex = 4;
4999 static const int kOptimizationIdIndex = 5; 4954 static const int kFirstDeoptEntryIndex = 5;
5000 static const int kFirstDeoptEntryIndex = 6;
5001 4955
5002 // Offsets of deopt entry elements relative to the start of the entry. 4956 // Offsets of deopt entry elements relative to the start of the entry.
5003 static const int kAstIdRawOffset = 0; 4957 static const int kAstIdRawOffset = 0;
5004 static const int kTranslationIndexOffset = 1; 4958 static const int kTranslationIndexOffset = 1;
5005 static const int kArgumentsStackHeightOffset = 2; 4959 static const int kArgumentsStackHeightOffset = 2;
5006 static const int kPcOffset = 3; 4960 static const int kPcOffset = 3;
5007 static const int kDeoptEntrySize = 4; 4961 static const int kDeoptEntrySize = 4;
5008 4962
5009 // Simple element accessors. 4963 // Simple element accessors.
5010 #define DEFINE_ELEMENT_ACCESSORS(name, type) \ 4964 #define DEFINE_ELEMENT_ACCESSORS(name, type) \
5011 type* name() { \ 4965 type* name() { \
5012 return type::cast(get(k##name##Index)); \ 4966 return type::cast(get(k##name##Index)); \
5013 } \ 4967 } \
5014 void Set##name(type* value) { \ 4968 void Set##name(type* value) { \
5015 set(k##name##Index, value); \ 4969 set(k##name##Index, value); \
5016 } 4970 }
5017 4971
5018 DEFINE_ELEMENT_ACCESSORS(TranslationByteArray, ByteArray) 4972 DEFINE_ELEMENT_ACCESSORS(TranslationByteArray, ByteArray)
5019 DEFINE_ELEMENT_ACCESSORS(InlinedFunctionCount, Smi) 4973 DEFINE_ELEMENT_ACCESSORS(InlinedFunctionCount, Smi)
5020 DEFINE_ELEMENT_ACCESSORS(LiteralArray, FixedArray) 4974 DEFINE_ELEMENT_ACCESSORS(LiteralArray, FixedArray)
5021 DEFINE_ELEMENT_ACCESSORS(OsrAstId, Smi) 4975 DEFINE_ELEMENT_ACCESSORS(OsrAstId, Smi)
5022 DEFINE_ELEMENT_ACCESSORS(OsrPcOffset, Smi) 4976 DEFINE_ELEMENT_ACCESSORS(OsrPcOffset, Smi)
5023 DEFINE_ELEMENT_ACCESSORS(OptimizationId, Smi)
5024 4977
5025 #undef DEFINE_ELEMENT_ACCESSORS 4978 #undef DEFINE_ELEMENT_ACCESSORS
5026 4979
5027 // Accessors for elements of the ith deoptimization entry. 4980 // Accessors for elements of the ith deoptimization entry.
5028 #define DEFINE_ENTRY_ACCESSORS(name, type) \ 4981 #define DEFINE_ENTRY_ACCESSORS(name, type) \
5029 type* name(int i) { \ 4982 type* name(int i) { \
5030 return type::cast(get(IndexForEntry(i) + k##name##Offset)); \ 4983 return type::cast(get(IndexForEntry(i) + k##name##Offset)); \
5031 } \ 4984 } \
5032 void Set##name(int i, type* value) { \ 4985 void Set##name(int i, type* value) { \
5033 set(IndexForEntry(i) + k##name##Offset, value); \ 4986 set(IndexForEntry(i) + k##name##Offset, value); \
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
5109 5062
5110 #if defined(OBJECT_PRINT) || defined(ENABLE_DISASSEMBLER) 5063 #if defined(OBJECT_PRINT) || defined(ENABLE_DISASSEMBLER)
5111 void DeoptimizationOutputDataPrint(FILE* out); 5064 void DeoptimizationOutputDataPrint(FILE* out);
5112 #endif 5065 #endif
5113 }; 5066 };
5114 5067
5115 5068
5116 // Forward declaration. 5069 // Forward declaration.
5117 class Cell; 5070 class Cell;
5118 class PropertyCell; 5071 class PropertyCell;
5072
5073 // TypeFeedbackCells is a fixed array used to hold the association between
5074 // cache cells and AST ids for code generated by the full compiler.
5075 // The format of the these objects is
5076 // [i * 2]: Global property cell of ith cache cell.
5077 // [i * 2 + 1]: Ast ID for ith cache cell.
5078 class TypeFeedbackCells: public FixedArray {
5079 public:
5080 int CellCount() { return length() / 2; }
5081 static int LengthOfFixedArray(int cell_count) { return cell_count * 2; }
5082
5083 // Accessors for AST ids associated with cache values.
5084 inline TypeFeedbackId AstId(int index);
5085 inline void SetAstId(int index, TypeFeedbackId id);
5086
5087 // Accessors for global property cells holding the cache values.
5088 inline Cell* GetCell(int index);
5089 inline void SetCell(int index, Cell* cell);
5090
5091 // The object that indicates an uninitialized cache.
5092 static inline Handle<Object> UninitializedSentinel(Isolate* isolate);
5093
5094 // The object that indicates a megamorphic state.
5095 static inline Handle<Object> MegamorphicSentinel(Isolate* isolate);
5096
5097 // The object that indicates a monomorphic state of Array with
5098 // ElementsKind
5099 static inline Handle<Object> MonomorphicArraySentinel(Isolate* isolate,
5100 ElementsKind elements_kind);
5101
5102 // A raw version of the uninitialized sentinel that's safe to read during
5103 // garbage collection (e.g., for patching the cache).
5104 static inline Object* RawUninitializedSentinel(Heap* heap);
5105
5106 // Casting.
5107 static inline TypeFeedbackCells* cast(Object* obj);
5108
5109 static const int kForInFastCaseMarker = 0;
5110 static const int kForInSlowCaseMarker = 1;
5111 };
5112
5113
5114 // Forward declaration.
5119 class SafepointEntry; 5115 class SafepointEntry;
5120 class TypeFeedbackInfo; 5116 class TypeFeedbackInfo;
5121 5117
5122 // Code describes objects with on-the-fly generated machine code. 5118 // Code describes objects with on-the-fly generated machine code.
5123 class Code: public HeapObject { 5119 class Code: public HeapObject {
5124 public: 5120 public:
5125 // Opaque data type for encapsulating code flags like kind, inline 5121 // Opaque data type for encapsulating code flags like kind, inline
5126 // cache state, and arguments count. 5122 // cache state, and arguments count.
5127 typedef uint32_t Flags; 5123 typedef uint32_t Flags;
5128 5124
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
5227 inline ByteArray* unchecked_relocation_info(); 5223 inline ByteArray* unchecked_relocation_info();
5228 5224
5229 inline int relocation_size(); 5225 inline int relocation_size();
5230 5226
5231 // [flags]: Various code flags. 5227 // [flags]: Various code flags.
5232 inline Flags flags(); 5228 inline Flags flags();
5233 inline void set_flags(Flags flags); 5229 inline void set_flags(Flags flags);
5234 5230
5235 // [flags]: Access to specific code flags. 5231 // [flags]: Access to specific code flags.
5236 inline Kind kind(); 5232 inline Kind kind();
5233 inline Kind handler_kind() {
5234 return static_cast<Kind>(arguments_count());
5235 }
5237 inline InlineCacheState ic_state(); // Only valid for IC stubs. 5236 inline InlineCacheState ic_state(); // Only valid for IC stubs.
5238 inline ExtraICState extra_ic_state(); // Only valid for IC stubs. 5237 inline ExtraICState extra_ic_state(); // Only valid for IC stubs.
5239 5238
5239 inline ExtraICState extended_extra_ic_state(); // Only valid for
5240 // non-call IC stubs.
5241 static bool needs_extended_extra_ic_state(Kind kind) {
5242 // TODO(danno): This is a bit of a hack right now since there are still
5243 // clients of this API that pass "extra" values in for argc. These clients
5244 // should be retrofitted to used ExtendedExtraICState.
5245 return kind == COMPARE_NIL_IC || kind == TO_BOOLEAN_IC ||
5246 kind == BINARY_OP_IC;
5247 }
5248
5240 inline StubType type(); // Only valid for monomorphic IC stubs. 5249 inline StubType type(); // Only valid for monomorphic IC stubs.
5250 inline int arguments_count(); // Only valid for call IC stubs.
5241 5251
5242 // Testers for IC stub kinds. 5252 // Testers for IC stub kinds.
5243 inline bool is_inline_cache_stub(); 5253 inline bool is_inline_cache_stub();
5244 inline bool is_debug_stub(); 5254 inline bool is_debug_stub();
5245 inline bool is_handler() { return kind() == HANDLER; } 5255 inline bool is_handler() { return kind() == HANDLER; }
5246 inline bool is_load_stub() { return kind() == LOAD_IC; } 5256 inline bool is_load_stub() { return kind() == LOAD_IC; }
5247 inline bool is_keyed_load_stub() { return kind() == KEYED_LOAD_IC; } 5257 inline bool is_keyed_load_stub() { return kind() == KEYED_LOAD_IC; }
5248 inline bool is_store_stub() { return kind() == STORE_IC; } 5258 inline bool is_store_stub() { return kind() == STORE_IC; }
5249 inline bool is_keyed_store_stub() { return kind() == KEYED_STORE_IC; } 5259 inline bool is_keyed_store_stub() { return kind() == KEYED_STORE_IC; }
5250 inline bool is_binary_op_stub() { return kind() == BINARY_OP_IC; } 5260 inline bool is_binary_op_stub() { return kind() == BINARY_OP_IC; }
5251 inline bool is_compare_ic_stub() { return kind() == COMPARE_IC; } 5261 inline bool is_compare_ic_stub() { return kind() == COMPARE_IC; }
5252 inline bool is_compare_nil_ic_stub() { return kind() == COMPARE_NIL_IC; } 5262 inline bool is_compare_nil_ic_stub() { return kind() == COMPARE_NIL_IC; }
5253 inline bool is_to_boolean_ic_stub() { return kind() == TO_BOOLEAN_IC; } 5263 inline bool is_to_boolean_ic_stub() { return kind() == TO_BOOLEAN_IC; }
5254 inline bool is_keyed_stub(); 5264 inline bool is_keyed_stub();
5255 inline bool is_optimized_code() { return kind() == OPTIMIZED_FUNCTION; }
5256 5265
5257 inline void set_raw_kind_specific_flags1(int value); 5266 inline void set_raw_kind_specific_flags1(int value);
5258 inline void set_raw_kind_specific_flags2(int value); 5267 inline void set_raw_kind_specific_flags2(int value);
5259 5268
5260 // [major_key]: For kind STUB or BINARY_OP_IC, the major key. 5269 // [major_key]: For kind STUB or BINARY_OP_IC, the major key.
5261 inline int major_key(); 5270 inline int major_key();
5262 inline void set_major_key(int value); 5271 inline void set_major_key(int value);
5263 inline bool has_major_key(); 5272 inline bool has_major_key();
5264 5273
5265 // For kind STUB or ICs, tells whether or not a code object was generated by 5274 // For kind STUB or ICs, tells whether or not a code object was generated by
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
5370 // which would make snapshot production non-reproducible. This method wipes 5379 // which would make snapshot production non-reproducible. This method wipes
5371 // out the to-be-overwritten header data for reproducible snapshots. 5380 // out the to-be-overwritten header data for reproducible snapshots.
5372 inline void WipeOutHeader(); 5381 inline void WipeOutHeader();
5373 5382
5374 // Flags operations. 5383 // Flags operations.
5375 static inline Flags ComputeFlags( 5384 static inline Flags ComputeFlags(
5376 Kind kind, 5385 Kind kind,
5377 InlineCacheState ic_state = UNINITIALIZED, 5386 InlineCacheState ic_state = UNINITIALIZED,
5378 ExtraICState extra_ic_state = kNoExtraICState, 5387 ExtraICState extra_ic_state = kNoExtraICState,
5379 StubType type = NORMAL, 5388 StubType type = NORMAL,
5389 int argc = -1,
5380 InlineCacheHolderFlag holder = OWN_MAP); 5390 InlineCacheHolderFlag holder = OWN_MAP);
5381 5391
5382 static inline Flags ComputeMonomorphicFlags( 5392 static inline Flags ComputeMonomorphicFlags(
5383 Kind kind, 5393 Kind kind,
5384 ExtraICState extra_ic_state = kNoExtraICState, 5394 ExtraICState extra_ic_state = kNoExtraICState,
5385 InlineCacheHolderFlag holder = OWN_MAP, 5395 InlineCacheHolderFlag holder = OWN_MAP,
5386 StubType type = NORMAL);
5387
5388 static inline Flags ComputeHandlerFlags(
5389 Kind handler_kind,
5390 StubType type = NORMAL, 5396 StubType type = NORMAL,
5391 InlineCacheHolderFlag holder = OWN_MAP); 5397 int argc = -1);
5392 5398
5393 static inline InlineCacheState ExtractICStateFromFlags(Flags flags); 5399 static inline InlineCacheState ExtractICStateFromFlags(Flags flags);
5394 static inline StubType ExtractTypeFromFlags(Flags flags); 5400 static inline StubType ExtractTypeFromFlags(Flags flags);
5395 static inline Kind ExtractKindFromFlags(Flags flags); 5401 static inline Kind ExtractKindFromFlags(Flags flags);
5396 static inline InlineCacheHolderFlag ExtractCacheHolderFromFlags(Flags flags); 5402 static inline InlineCacheHolderFlag ExtractCacheHolderFromFlags(Flags flags);
5397 static inline ExtraICState ExtractExtraICStateFromFlags(Flags flags); 5403 static inline ExtraICState ExtractExtraICStateFromFlags(Flags flags);
5404 static inline ExtraICState ExtractExtendedExtraICStateFromFlags(Flags flags);
5405 static inline int ExtractArgumentsCountFromFlags(Flags flags);
5398 5406
5399 static inline Flags RemoveTypeFromFlags(Flags flags); 5407 static inline Flags RemoveTypeFromFlags(Flags flags);
5400 5408
5401 // Convert a target address into a code object. 5409 // Convert a target address into a code object.
5402 static inline Code* GetCodeFromTargetAddress(Address address); 5410 static inline Code* GetCodeFromTargetAddress(Address address);
5403 5411
5404 // Convert an entry address into an object. 5412 // Convert an entry address into an object.
5405 static inline Object* GetObjectFromEntryAddress(Address location_of_address); 5413 static inline Object* GetObjectFromEntryAddress(Address location_of_address);
5406 5414
5407 // Returns the address of the first instruction. 5415 // Returns the address of the first instruction.
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
5457 5465
5458 template<typename StaticVisitor> 5466 template<typename StaticVisitor>
5459 inline void CodeIterateBody(Heap* heap); 5467 inline void CodeIterateBody(Heap* heap);
5460 5468
5461 DECLARE_PRINTER(Code) 5469 DECLARE_PRINTER(Code)
5462 DECLARE_VERIFIER(Code) 5470 DECLARE_VERIFIER(Code)
5463 5471
5464 void ClearInlineCaches(); 5472 void ClearInlineCaches();
5465 void ClearInlineCaches(Kind kind); 5473 void ClearInlineCaches(Kind kind);
5466 5474
5467 void ClearTypeFeedbackInfo(Heap* heap); 5475 void ClearTypeFeedbackCells(Heap* heap);
5468 5476
5469 BailoutId TranslatePcOffsetToAstId(uint32_t pc_offset); 5477 BailoutId TranslatePcOffsetToAstId(uint32_t pc_offset);
5470 uint32_t TranslateAstIdToPcOffset(BailoutId ast_id); 5478 uint32_t TranslateAstIdToPcOffset(BailoutId ast_id);
5471 5479
5472 #define DECLARE_CODE_AGE_ENUM(X) k##X##CodeAge, 5480 #define DECLARE_CODE_AGE_ENUM(X) k##X##CodeAge,
5473 enum Age { 5481 enum Age {
5474 kNotExecutedCodeAge = -2, 5482 kNotExecutedCodeAge = -2,
5475 kExecutedOnceCodeAge = -1, 5483 kExecutedOnceCodeAge = -1,
5476 kNoAgeCodeAge = 0, 5484 kNoAgeCodeAge = 0,
5477 CODE_AGE_LIST(DECLARE_CODE_AGE_ENUM) 5485 CODE_AGE_LIST(DECLARE_CODE_AGE_ENUM)
(...skipping 23 matching lines...) Expand all
5501 return GetCodeAgeStub(isolate, kNotExecutedCodeAge, NO_MARKING_PARITY); 5509 return GetCodeAgeStub(isolate, kNotExecutedCodeAge, NO_MARKING_PARITY);
5502 } 5510 }
5503 5511
5504 void PrintDeoptLocation(FILE* out, int bailout_id); 5512 void PrintDeoptLocation(FILE* out, int bailout_id);
5505 bool CanDeoptAt(Address pc); 5513 bool CanDeoptAt(Address pc);
5506 5514
5507 #ifdef VERIFY_HEAP 5515 #ifdef VERIFY_HEAP
5508 void VerifyEmbeddedObjectsDependency(); 5516 void VerifyEmbeddedObjectsDependency();
5509 #endif 5517 #endif
5510 5518
5511 inline bool IsWeakObject(Object* object) { 5519 static bool IsWeakEmbeddedObject(Kind kind, Object* object);
5512 return is_optimized_code() && IsWeakObjectInOptimizedCode(object);
5513 }
5514
5515 inline bool IsWeakObjectInOptimizedCode(Object* object);
5516 5520
5517 // Max loop nesting marker used to postpose OSR. We don't take loop 5521 // Max loop nesting marker used to postpose OSR. We don't take loop
5518 // nesting that is deeper than 5 levels into account. 5522 // nesting that is deeper than 5 levels into account.
5519 static const int kMaxLoopNestingMarker = 6; 5523 static const int kMaxLoopNestingMarker = 6;
5520 5524
5521 // Layout description. 5525 // Layout description.
5522 static const int kInstructionSizeOffset = HeapObject::kHeaderSize; 5526 static const int kInstructionSizeOffset = HeapObject::kHeaderSize;
5523 static const int kRelocationInfoOffset = kInstructionSizeOffset + kIntSize; 5527 static const int kRelocationInfoOffset = kInstructionSizeOffset + kIntSize;
5524 static const int kHandlerTableOffset = kRelocationInfoOffset + kPointerSize; 5528 static const int kHandlerTableOffset = kRelocationInfoOffset + kPointerSize;
5525 static const int kDeoptimizationDataOffset = 5529 static const int kDeoptimizationDataOffset =
(...skipping 30 matching lines...) Expand all
5556 5560
5557 static const int kAllowOSRAtLoopNestingLevelOffset = kFullCodeFlags + 1; 5561 static const int kAllowOSRAtLoopNestingLevelOffset = kFullCodeFlags + 1;
5558 static const int kProfilerTicksOffset = kAllowOSRAtLoopNestingLevelOffset + 1; 5562 static const int kProfilerTicksOffset = kAllowOSRAtLoopNestingLevelOffset + 1;
5559 5563
5560 // Flags layout. BitField<type, shift, size>. 5564 // Flags layout. BitField<type, shift, size>.
5561 class ICStateField: public BitField<InlineCacheState, 0, 3> {}; 5565 class ICStateField: public BitField<InlineCacheState, 0, 3> {};
5562 class TypeField: public BitField<StubType, 3, 1> {}; 5566 class TypeField: public BitField<StubType, 3, 1> {};
5563 class CacheHolderField: public BitField<InlineCacheHolderFlag, 5, 1> {}; 5567 class CacheHolderField: public BitField<InlineCacheHolderFlag, 5, 1> {};
5564 class KindField: public BitField<Kind, 6, 4> {}; 5568 class KindField: public BitField<Kind, 6, 4> {};
5565 // TODO(bmeurer): Bit 10 is available for free use. :-) 5569 // TODO(bmeurer): Bit 10 is available for free use. :-)
5566 class ExtraICStateField: public BitField<ExtraICState, 11, 5570 class ExtraICStateField: public BitField<ExtraICState, 11, 6> {};
5571 class ExtendedExtraICStateField: public BitField<ExtraICState, 11,
5567 PlatformSmiTagging::kSmiValueSize - 11 + 1> {}; // NOLINT 5572 PlatformSmiTagging::kSmiValueSize - 11 + 1> {}; // NOLINT
5573 STATIC_ASSERT(ExtraICStateField::kShift == ExtendedExtraICStateField::kShift);
5568 5574
5569 // KindSpecificFlags1 layout (STUB and OPTIMIZED_FUNCTION) 5575 // KindSpecificFlags1 layout (STUB and OPTIMIZED_FUNCTION)
5570 static const int kStackSlotsFirstBit = 0; 5576 static const int kStackSlotsFirstBit = 0;
5571 static const int kStackSlotsBitCount = 24; 5577 static const int kStackSlotsBitCount = 24;
5572 static const int kHasFunctionCacheFirstBit = 5578 static const int kHasFunctionCacheFirstBit =
5573 kStackSlotsFirstBit + kStackSlotsBitCount; 5579 kStackSlotsFirstBit + kStackSlotsBitCount;
5574 static const int kHasFunctionCacheBitCount = 1; 5580 static const int kHasFunctionCacheBitCount = 1;
5575 static const int kMarkedForDeoptimizationFirstBit = 5581 static const int kMarkedForDeoptimizationFirstBit =
5576 kStackSlotsFirstBit + kStackSlotsBitCount + 1; 5582 kStackSlotsFirstBit + kStackSlotsBitCount + 1;
5577 static const int kMarkedForDeoptimizationBitCount = 1; 5583 static const int kMarkedForDeoptimizationBitCount = 1;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
5611 kSafepointTableOffsetBitCount> {}; // NOLINT 5617 kSafepointTableOffsetBitCount> {}; // NOLINT
5612 class StubMajorKeyField: public BitField<int, 5618 class StubMajorKeyField: public BitField<int,
5613 kStubMajorKeyFirstBit, kStubMajorKeyBits> {}; // NOLINT 5619 kStubMajorKeyFirstBit, kStubMajorKeyBits> {}; // NOLINT
5614 5620
5615 // KindSpecificFlags2 layout (FUNCTION) 5621 // KindSpecificFlags2 layout (FUNCTION)
5616 class BackEdgeTableOffsetField: public BitField<int, 5622 class BackEdgeTableOffsetField: public BitField<int,
5617 kIsCrankshaftedBit + 1, 29> {}; // NOLINT 5623 kIsCrankshaftedBit + 1, 29> {}; // NOLINT
5618 class BackEdgesPatchedForOSRField: public BitField<bool, 5624 class BackEdgesPatchedForOSRField: public BitField<bool,
5619 kIsCrankshaftedBit + 1 + 29, 1> {}; // NOLINT 5625 kIsCrankshaftedBit + 1 + 29, 1> {}; // NOLINT
5620 5626
5621 static const int kArgumentsBits = 16; 5627 // Signed field cannot be encoded using the BitField class.
5628 static const int kArgumentsCountShift = 17;
5629 static const int kArgumentsCountMask = ~((1 << kArgumentsCountShift) - 1);
5630 static const int kArgumentsBits =
5631 PlatformSmiTagging::kSmiValueSize - Code::kArgumentsCountShift + 1;
5622 static const int kMaxArguments = (1 << kArgumentsBits) - 1; 5632 static const int kMaxArguments = (1 << kArgumentsBits) - 1;
5623 5633
5634 // ICs can use either argument count or ExtendedExtraIC, since their storage
5635 // overlaps.
5636 STATIC_ASSERT(ExtraICStateField::kShift +
5637 ExtraICStateField::kSize + kArgumentsBits ==
5638 ExtendedExtraICStateField::kShift +
5639 ExtendedExtraICStateField::kSize);
5640
5624 // This constant should be encodable in an ARM instruction. 5641 // This constant should be encodable in an ARM instruction.
5625 static const int kFlagsNotUsedInLookup = 5642 static const int kFlagsNotUsedInLookup =
5626 TypeField::kMask | CacheHolderField::kMask; 5643 TypeField::kMask | CacheHolderField::kMask;
5627 5644
5628 private: 5645 private:
5629 friend class RelocIterator; 5646 friend class RelocIterator;
5630 5647
5631 void ClearInlineCaches(Kind* kind); 5648 void ClearInlineCaches(Kind* kind);
5632 5649
5633 // Code aging 5650 // Code aging
(...skipping 985 matching lines...) Expand 10 before | Expand all | Expand 10 after
6619 V(Math, imul, MathImul) 6636 V(Math, imul, MathImul)
6620 6637
6621 enum BuiltinFunctionId { 6638 enum BuiltinFunctionId {
6622 kArrayCode, 6639 kArrayCode,
6623 #define DECLARE_FUNCTION_ID(ignored1, ignore2, name) \ 6640 #define DECLARE_FUNCTION_ID(ignored1, ignore2, name) \
6624 k##name, 6641 k##name,
6625 FUNCTIONS_WITH_ID_LIST(DECLARE_FUNCTION_ID) 6642 FUNCTIONS_WITH_ID_LIST(DECLARE_FUNCTION_ID)
6626 #undef DECLARE_FUNCTION_ID 6643 #undef DECLARE_FUNCTION_ID
6627 // Fake id for a special case of Math.pow. Note, it continues the 6644 // Fake id for a special case of Math.pow. Note, it continues the
6628 // list of math functions. 6645 // list of math functions.
6629 kMathPowHalf, 6646 kMathPowHalf
6630 // Installed only on --harmony-maths.
6631 kMathClz32
6632 }; 6647 };
6633 6648
6634 6649
6635 // SharedFunctionInfo describes the JSFunction information that can be 6650 // SharedFunctionInfo describes the JSFunction information that can be
6636 // shared by multiple instances of the function. 6651 // shared by multiple instances of the function.
6637 class SharedFunctionInfo: public HeapObject { 6652 class SharedFunctionInfo: public HeapObject {
6638 public: 6653 public:
6639 // [name]: Function name. 6654 // [name]: Function name.
6640 DECL_ACCESSORS(name, Object) 6655 DECL_ACCESSORS(name, Object)
6641 6656
(...skipping 1139 matching lines...) Expand 10 before | Expand all | Expand 10 after
7781 public: 7796 public:
7782 // [type]: the type of error message. 7797 // [type]: the type of error message.
7783 DECL_ACCESSORS(type, String) 7798 DECL_ACCESSORS(type, String)
7784 7799
7785 // [arguments]: the arguments for formatting the error message. 7800 // [arguments]: the arguments for formatting the error message.
7786 DECL_ACCESSORS(arguments, JSArray) 7801 DECL_ACCESSORS(arguments, JSArray)
7787 7802
7788 // [script]: the script from which the error message originated. 7803 // [script]: the script from which the error message originated.
7789 DECL_ACCESSORS(script, Object) 7804 DECL_ACCESSORS(script, Object)
7790 7805
7806 // [stack_trace]: the stack trace for this error message.
7807 DECL_ACCESSORS(stack_trace, Object)
7808
7791 // [stack_frames]: an array of stack frames for this error object. 7809 // [stack_frames]: an array of stack frames for this error object.
7792 DECL_ACCESSORS(stack_frames, Object) 7810 DECL_ACCESSORS(stack_frames, Object)
7793 7811
7794 // [start_position]: the start position in the script for the error message. 7812 // [start_position]: the start position in the script for the error message.
7795 inline int start_position(); 7813 inline int start_position();
7796 inline void set_start_position(int value); 7814 inline void set_start_position(int value);
7797 7815
7798 // [end_position]: the end position in the script for the error message. 7816 // [end_position]: the end position in the script for the error message.
7799 inline int end_position(); 7817 inline int end_position();
7800 inline void set_end_position(int value); 7818 inline void set_end_position(int value);
7801 7819
7802 // Casting. 7820 // Casting.
7803 static inline JSMessageObject* cast(Object* obj); 7821 static inline JSMessageObject* cast(Object* obj);
7804 7822
7805 // Dispatched behavior. 7823 // Dispatched behavior.
7806 DECLARE_PRINTER(JSMessageObject) 7824 DECLARE_PRINTER(JSMessageObject)
7807 DECLARE_VERIFIER(JSMessageObject) 7825 DECLARE_VERIFIER(JSMessageObject)
7808 7826
7809 // Layout description. 7827 // Layout description.
7810 static const int kTypeOffset = JSObject::kHeaderSize; 7828 static const int kTypeOffset = JSObject::kHeaderSize;
7811 static const int kArgumentsOffset = kTypeOffset + kPointerSize; 7829 static const int kArgumentsOffset = kTypeOffset + kPointerSize;
7812 static const int kScriptOffset = kArgumentsOffset + kPointerSize; 7830 static const int kScriptOffset = kArgumentsOffset + kPointerSize;
7813 static const int kStackFramesOffset = kScriptOffset + kPointerSize; 7831 static const int kStackTraceOffset = kScriptOffset + kPointerSize;
7832 static const int kStackFramesOffset = kStackTraceOffset + kPointerSize;
7814 static const int kStartPositionOffset = kStackFramesOffset + kPointerSize; 7833 static const int kStartPositionOffset = kStackFramesOffset + kPointerSize;
7815 static const int kEndPositionOffset = kStartPositionOffset + kPointerSize; 7834 static const int kEndPositionOffset = kStartPositionOffset + kPointerSize;
7816 static const int kSize = kEndPositionOffset + kPointerSize; 7835 static const int kSize = kEndPositionOffset + kPointerSize;
7817 7836
7818 typedef FixedBodyDescriptor<HeapObject::kMapOffset, 7837 typedef FixedBodyDescriptor<HeapObject::kMapOffset,
7819 kStackFramesOffset + kPointerSize, 7838 kStackFramesOffset + kPointerSize,
7820 kSize> BodyDescriptor; 7839 kSize> BodyDescriptor;
7821 }; 7840 };
7822 7841
7823 7842
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
8162 inline void change_ic_with_type_info_count(int count); 8181 inline void change_ic_with_type_info_count(int count);
8163 8182
8164 inline void initialize_storage(); 8183 inline void initialize_storage();
8165 8184
8166 inline void change_own_type_change_checksum(); 8185 inline void change_own_type_change_checksum();
8167 inline int own_type_change_checksum(); 8186 inline int own_type_change_checksum();
8168 8187
8169 inline void set_inlined_type_change_checksum(int checksum); 8188 inline void set_inlined_type_change_checksum(int checksum);
8170 inline bool matches_inlined_type_change_checksum(int checksum); 8189 inline bool matches_inlined_type_change_checksum(int checksum);
8171 8190
8172 DECL_ACCESSORS(feedback_vector, FixedArray) 8191 DECL_ACCESSORS(type_feedback_cells, TypeFeedbackCells)
8173 8192
8174 static inline TypeFeedbackInfo* cast(Object* obj); 8193 static inline TypeFeedbackInfo* cast(Object* obj);
8175 8194
8176 // Dispatched behavior. 8195 // Dispatched behavior.
8177 DECLARE_PRINTER(TypeFeedbackInfo) 8196 DECLARE_PRINTER(TypeFeedbackInfo)
8178 DECLARE_VERIFIER(TypeFeedbackInfo) 8197 DECLARE_VERIFIER(TypeFeedbackInfo)
8179 8198
8180 static const int kStorage1Offset = HeapObject::kHeaderSize; 8199 static const int kStorage1Offset = HeapObject::kHeaderSize;
8181 static const int kStorage2Offset = kStorage1Offset + kPointerSize; 8200 static const int kStorage2Offset = kStorage1Offset + kPointerSize;
8182 static const int kFeedbackVectorOffset = 8201 static const int kTypeFeedbackCellsOffset = kStorage2Offset + kPointerSize;
8183 kStorage2Offset + kPointerSize; 8202 static const int kSize = kTypeFeedbackCellsOffset + kPointerSize;
8184 static const int kSize = kFeedbackVectorOffset + kPointerSize;
8185
8186 // The object that indicates an uninitialized cache.
8187 static inline Handle<Object> UninitializedSentinel(Isolate* isolate);
8188
8189 // The object that indicates a megamorphic state.
8190 static inline Handle<Object> MegamorphicSentinel(Isolate* isolate);
8191
8192 // The object that indicates a monomorphic state of Array with
8193 // ElementsKind
8194 static inline Handle<Object> MonomorphicArraySentinel(Isolate* isolate,
8195 ElementsKind elements_kind);
8196
8197 // A raw version of the uninitialized sentinel that's safe to read during
8198 // garbage collection (e.g., for patching the cache).
8199 static inline Object* RawUninitializedSentinel(Heap* heap);
8200
8201 static const int kForInFastCaseMarker = 0;
8202 static const int kForInSlowCaseMarker = 1;
8203 8203
8204 private: 8204 private:
8205 static const int kTypeChangeChecksumBits = 7; 8205 static const int kTypeChangeChecksumBits = 7;
8206 8206
8207 class ICTotalCountField: public BitField<int, 0, 8207 class ICTotalCountField: public BitField<int, 0,
8208 kSmiValueSize - kTypeChangeChecksumBits> {}; // NOLINT 8208 kSmiValueSize - kTypeChangeChecksumBits> {}; // NOLINT
8209 class OwnTypeChangeChecksum: public BitField<int, 8209 class OwnTypeChangeChecksum: public BitField<int,
8210 kSmiValueSize - kTypeChangeChecksumBits, 8210 kSmiValueSize - kTypeChangeChecksumBits,
8211 kTypeChangeChecksumBits> {}; // NOLINT 8211 kTypeChangeChecksumBits> {}; // NOLINT
8212 class ICsWithTypeInfoCountField: public BitField<int, 0, 8212 class ICsWithTypeInfoCountField: public BitField<int, 0,
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
8255 8255
8256 // This method is expensive, it should only be called for reporting. 8256 // This method is expensive, it should only be called for reporting.
8257 bool IsNestedSite(); 8257 bool IsNestedSite();
8258 8258
8259 // transition_info bitfields, for constructed array transition info. 8259 // transition_info bitfields, for constructed array transition info.
8260 class ElementsKindBits: public BitField<ElementsKind, 0, 15> {}; 8260 class ElementsKindBits: public BitField<ElementsKind, 0, 15> {};
8261 class UnusedBits: public BitField<int, 15, 14> {}; 8261 class UnusedBits: public BitField<int, 15, 14> {};
8262 class DoNotInlineBit: public BitField<bool, 29, 1> {}; 8262 class DoNotInlineBit: public BitField<bool, 29, 1> {};
8263 8263
8264 // Bitfields for pretenure_data 8264 // Bitfields for pretenure_data
8265 class MementoFoundCountBits: public BitField<int, 0, 27> {}; 8265 class MementoFoundCountBits: public BitField<int, 0, 28> {};
8266 class PretenureDecisionBits: public BitField<PretenureDecision, 27, 2> {}; 8266 class PretenureDecisionBits: public BitField<PretenureDecision, 28, 2> {};
8267 class DeoptDependentCodeBit: public BitField<bool, 29, 1> {};
8268 STATIC_ASSERT(PretenureDecisionBits::kMax >= kLastPretenureDecisionValue); 8267 STATIC_ASSERT(PretenureDecisionBits::kMax >= kLastPretenureDecisionValue);
8269 8268
8270 // Increments the mementos found counter and returns true when the first 8269 // Increments the mementos found counter and returns true when the first
8271 // memento was found for a given allocation site. 8270 // memento was found for a given allocation site.
8272 inline bool IncrementMementoFoundCount(); 8271 inline bool IncrementMementoFoundCount();
8273 8272
8274 inline void IncrementMementoCreateCount(); 8273 inline void IncrementMementoCreateCount();
8275 8274
8276 PretenureFlag GetPretenureMode(); 8275 PretenureFlag GetPretenureMode();
8277 8276
8278 void ResetPretenureDecision(); 8277 void ResetPretenureDecision();
8279 8278
8280 PretenureDecision pretenure_decision() { 8279 PretenureDecision pretenure_decision() {
8281 int value = pretenure_data()->value(); 8280 int value = pretenure_data()->value();
8282 return PretenureDecisionBits::decode(value); 8281 return PretenureDecisionBits::decode(value);
8283 } 8282 }
8284 8283
8285 void set_pretenure_decision(PretenureDecision decision) { 8284 void set_pretenure_decision(PretenureDecision decision) {
8286 int value = pretenure_data()->value(); 8285 int value = pretenure_data()->value();
8287 set_pretenure_data( 8286 set_pretenure_data(
8288 Smi::FromInt(PretenureDecisionBits::update(value, decision)), 8287 Smi::FromInt(PretenureDecisionBits::update(value, decision)),
8289 SKIP_WRITE_BARRIER); 8288 SKIP_WRITE_BARRIER);
8290 } 8289 }
8291 8290
8292 bool deopt_dependent_code() {
8293 int value = pretenure_data()->value();
8294 return DeoptDependentCodeBit::decode(value);
8295 }
8296
8297 void set_deopt_dependent_code(bool deopt) {
8298 int value = pretenure_data()->value();
8299 set_pretenure_data(
8300 Smi::FromInt(DeoptDependentCodeBit::update(value, deopt)),
8301 SKIP_WRITE_BARRIER);
8302 }
8303
8304 int memento_found_count() { 8291 int memento_found_count() {
8305 int value = pretenure_data()->value(); 8292 int value = pretenure_data()->value();
8306 return MementoFoundCountBits::decode(value); 8293 return MementoFoundCountBits::decode(value);
8307 } 8294 }
8308 8295
8309 inline void set_memento_found_count(int count); 8296 inline void set_memento_found_count(int count);
8310 8297
8311 int memento_create_count() { 8298 int memento_create_count() {
8312 return pretenure_create_count()->value(); 8299 return pretenure_create_count()->value();
8313 } 8300 }
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
8633 static const int kArrayIndexHashMask = (1 << kArrayIndexHashLengthShift) - 1; 8620 static const int kArrayIndexHashMask = (1 << kArrayIndexHashLengthShift) - 1;
8634 8621
8635 static const int kArrayIndexValueMask = 8622 static const int kArrayIndexValueMask =
8636 ((1 << kArrayIndexValueBits) - 1) << kHashShift; 8623 ((1 << kArrayIndexValueBits) - 1) << kHashShift;
8637 8624
8638 // Check that kMaxCachedArrayIndexLength + 1 is a power of two so we 8625 // Check that kMaxCachedArrayIndexLength + 1 is a power of two so we
8639 // could use a mask to test if the length of string is less than or equal to 8626 // could use a mask to test if the length of string is less than or equal to
8640 // kMaxCachedArrayIndexLength. 8627 // kMaxCachedArrayIndexLength.
8641 STATIC_CHECK(IS_POWER_OF_TWO(kMaxCachedArrayIndexLength + 1)); 8628 STATIC_CHECK(IS_POWER_OF_TWO(kMaxCachedArrayIndexLength + 1));
8642 8629
8643 static const unsigned int kContainsCachedArrayIndexMask = 8630 static const int kContainsCachedArrayIndexMask =
8644 (~kMaxCachedArrayIndexLength << kArrayIndexHashLengthShift) | 8631 (~kMaxCachedArrayIndexLength << kArrayIndexHashLengthShift) |
8645 kIsNotArrayIndexMask; 8632 kIsNotArrayIndexMask;
8646 8633
8647 // Value of empty hash field indicating that the hash is not computed. 8634 // Value of empty hash field indicating that the hash is not computed.
8648 static const int kEmptyHashField = 8635 static const int kEmptyHashField =
8649 kIsNotArrayIndexMask | kHashNotComputedMask; 8636 kIsNotArrayIndexMask | kHashNotComputedMask;
8650 8637
8651 protected: 8638 protected:
8652 static inline bool IsHashFieldComputed(uint32_t field); 8639 static inline bool IsHashFieldComputed(uint32_t field);
8653 8640
(...skipping 1998 matching lines...) Expand 10 before | Expand all | Expand 10 after
10652 10639
10653 10640
10654 #undef DECL_BOOLEAN_ACCESSORS 10641 #undef DECL_BOOLEAN_ACCESSORS
10655 #undef DECL_ACCESSORS 10642 #undef DECL_ACCESSORS
10656 #undef DECLARE_VERIFIER 10643 #undef DECLARE_VERIFIER
10657 10644
10658 #define VISITOR_SYNCHRONIZATION_TAGS_LIST(V) \ 10645 #define VISITOR_SYNCHRONIZATION_TAGS_LIST(V) \
10659 V(kStringTable, "string_table", "(Internalized strings)") \ 10646 V(kStringTable, "string_table", "(Internalized strings)") \
10660 V(kExternalStringsTable, "external_strings_table", "(External strings)") \ 10647 V(kExternalStringsTable, "external_strings_table", "(External strings)") \
10661 V(kStrongRootList, "strong_root_list", "(Strong roots)") \ 10648 V(kStrongRootList, "strong_root_list", "(Strong roots)") \
10662 V(kSmiRootList, "smi_root_list", "(Smi roots)") \
10663 V(kInternalizedString, "internalized_string", "(Internal string)") \ 10649 V(kInternalizedString, "internalized_string", "(Internal string)") \
10664 V(kBootstrapper, "bootstrapper", "(Bootstrapper)") \ 10650 V(kBootstrapper, "bootstrapper", "(Bootstrapper)") \
10665 V(kTop, "top", "(Isolate)") \ 10651 V(kTop, "top", "(Isolate)") \
10666 V(kRelocatable, "relocatable", "(Relocatable)") \ 10652 V(kRelocatable, "relocatable", "(Relocatable)") \
10667 V(kDebug, "debug", "(Debugger)") \ 10653 V(kDebug, "debug", "(Debugger)") \
10668 V(kCompilationCache, "compilationcache", "(Compilation cache)") \ 10654 V(kCompilationCache, "compilationcache", "(Compilation cache)") \
10669 V(kHandleScope, "handlescope", "(Handle scope)") \ 10655 V(kHandleScope, "handlescope", "(Handle scope)") \
10670 V(kBuiltins, "builtins", "(Builtins)") \ 10656 V(kBuiltins, "builtins", "(Builtins)") \
10671 V(kGlobalHandles, "globalhandles", "(Global handles)") \ 10657 V(kGlobalHandles, "globalhandles", "(Global handles)") \
10672 V(kEternalHandles, "eternalhandles", "(Eternal handles)") \ 10658 V(kEternalHandles, "eternalhandles", "(Eternal handles)") \
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
10777 } else { 10763 } else {
10778 value &= ~(1 << bit_position); 10764 value &= ~(1 << bit_position);
10779 } 10765 }
10780 return value; 10766 return value;
10781 } 10767 }
10782 }; 10768 };
10783 10769
10784 } } // namespace v8::internal 10770 } } // namespace v8::internal
10785 10771
10786 #endif // V8_OBJECTS_H_ 10772 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/object-observe.js ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698