| OLD | NEW |
| 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 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 }; | 306 }; |
| 307 | 307 |
| 308 // ICs store extra state in a Code object. The default extra state is | 308 // ICs store extra state in a Code object. The default extra state is |
| 309 // kNoExtraICState. | 309 // kNoExtraICState. |
| 310 typedef int ExtraICState; | 310 typedef int ExtraICState; |
| 311 static const ExtraICState kNoExtraICState = 0; | 311 static const ExtraICState kNoExtraICState = 0; |
| 312 | 312 |
| 313 // Instance size sentinel for objects of variable size. | 313 // Instance size sentinel for objects of variable size. |
| 314 const int kVariableSizeSentinel = 0; | 314 const int kVariableSizeSentinel = 0; |
| 315 | 315 |
| 316 const int kStubMajorKeyBits = 6; | 316 const int kStubMajorKeyBits = 7; |
| 317 const int kStubMinorKeyBits = kBitsPerInt - kSmiTagSize - kStubMajorKeyBits; | 317 const int kStubMinorKeyBits = kBitsPerInt - kSmiTagSize - kStubMajorKeyBits; |
| 318 | 318 |
| 319 // All Maps have a field instance_type containing a InstanceType. | 319 // All Maps have a field instance_type containing a InstanceType. |
| 320 // It describes the type of the instances. | 320 // It describes the type of the instances. |
| 321 // | 321 // |
| 322 // As an example, a JavaScript object is a heap object and its map | 322 // As an example, a JavaScript object is a heap object and its map |
| 323 // instance_type is JS_OBJECT_TYPE. | 323 // instance_type is JS_OBJECT_TYPE. |
| 324 // | 324 // |
| 325 // The names of the string instance types are intended to systematically | 325 // The names of the string instance types are intended to systematically |
| 326 // mirror their encoding in the instance_type field of the map. The default | 326 // mirror their encoding in the instance_type field of the map. The default |
| (...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 873 WriteBarrierMode mode = UPDATE_WRITE_BARRIER); \ | 873 WriteBarrierMode mode = UPDATE_WRITE_BARRIER); \ |
| 874 | 874 |
| 875 class AccessorPair; | 875 class AccessorPair; |
| 876 class AllocationSite; | 876 class AllocationSite; |
| 877 class AllocationSiteCreationContext; | 877 class AllocationSiteCreationContext; |
| 878 class AllocationSiteUsageContext; | 878 class AllocationSiteUsageContext; |
| 879 class DictionaryElementsAccessor; | 879 class DictionaryElementsAccessor; |
| 880 class ElementsAccessor; | 880 class ElementsAccessor; |
| 881 class Failure; | 881 class Failure; |
| 882 class FixedArrayBase; | 882 class FixedArrayBase; |
| 883 class GlobalObject; |
| 883 class ObjectVisitor; | 884 class ObjectVisitor; |
| 884 class StringStream; | 885 class StringStream; |
| 885 class Type; | 886 class Type; |
| 886 | 887 |
| 887 | 888 |
| 888 // A template-ized version of the IsXXX functions. | 889 // A template-ized version of the IsXXX functions. |
| 889 template <class C> inline bool Is(Object* obj); | 890 template <class C> inline bool Is(Object* obj); |
| 890 | 891 |
| 891 #ifdef VERIFY_HEAP | 892 #ifdef VERIFY_HEAP |
| 892 #define DECLARE_VERIFIER(Name) void Name##Verify(); | 893 #define DECLARE_VERIFIER(Name) void Name##Verify(); |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1050 V(PropertyCell) \ | 1051 V(PropertyCell) \ |
| 1051 V(ObjectHashTable) \ | 1052 V(ObjectHashTable) \ |
| 1052 V(WeakHashTable) | 1053 V(WeakHashTable) |
| 1053 | 1054 |
| 1054 | 1055 |
| 1055 #define ERROR_MESSAGES_LIST(V) \ | 1056 #define ERROR_MESSAGES_LIST(V) \ |
| 1056 V(kNoReason, "no reason") \ | 1057 V(kNoReason, "no reason") \ |
| 1057 \ | 1058 \ |
| 1058 V(k32BitValueInRegisterIsNotZeroExtended, \ | 1059 V(k32BitValueInRegisterIsNotZeroExtended, \ |
| 1059 "32 bit value in register is not zero-extended") \ | 1060 "32 bit value in register is not zero-extended") \ |
| 1060 V(kAlignmentMarkerExpected, "alignment marker expected") \ | 1061 V(kAlignmentMarkerExpected, "Alignment marker expected") \ |
| 1061 V(kAllocationIsNotDoubleAligned, "Allocation is not double aligned") \ | 1062 V(kAllocationIsNotDoubleAligned, "Allocation is not double aligned") \ |
| 1062 V(kAPICallReturnedInvalidObject, "API call returned invalid object") \ | 1063 V(kAPICallReturnedInvalidObject, "API call returned invalid object") \ |
| 1063 V(kArgumentsObjectValueInATestContext, \ | 1064 V(kArgumentsObjectValueInATestContext, \ |
| 1064 "arguments object value in a test context") \ | 1065 "Arguments object value in a test context") \ |
| 1065 V(kArrayBoilerplateCreationFailed, "array boilerplate creation failed") \ | 1066 V(kArrayBoilerplateCreationFailed, "Array boilerplate creation failed") \ |
| 1066 V(kArrayIndexConstantValueTooBig, "array index constant value too big") \ | 1067 V(kArrayIndexConstantValueTooBig, "Array index constant value too big") \ |
| 1067 V(kAssignmentToArguments, "assignment to arguments") \ | 1068 V(kAssignmentToArguments, "Assignment to arguments") \ |
| 1068 V(kAssignmentToLetVariableBeforeInitialization, \ | 1069 V(kAssignmentToLetVariableBeforeInitialization, \ |
| 1069 "assignment to let variable before initialization") \ | 1070 "Assignment to let variable before initialization") \ |
| 1070 V(kAssignmentToLOOKUPVariable, "assignment to LOOKUP variable") \ | 1071 V(kAssignmentToLOOKUPVariable, "Assignment to LOOKUP variable") \ |
| 1071 V(kAssignmentToParameterFunctionUsesArgumentsObject, \ | 1072 V(kAssignmentToParameterFunctionUsesArgumentsObject, \ |
| 1072 "assignment to parameter, function uses arguments object") \ | 1073 "Assignment to parameter, function uses arguments object") \ |
| 1073 V(kAssignmentToParameterInArgumentsObject, \ | 1074 V(kAssignmentToParameterInArgumentsObject, \ |
| 1074 "assignment to parameter in arguments object") \ | 1075 "Assignment to parameter in arguments object") \ |
| 1075 V(kAttemptToUseUndefinedCache, "Attempt to use undefined cache") \ | 1076 V(kAttemptToUseUndefinedCache, "Attempt to use undefined cache") \ |
| 1076 V(kBadValueContextForArgumentsObjectValue, \ | 1077 V(kBadValueContextForArgumentsObjectValue, \ |
| 1077 "bad value context for arguments object value") \ | 1078 "Bad value context for arguments object value") \ |
| 1078 V(kBadValueContextForArgumentsValue, \ | 1079 V(kBadValueContextForArgumentsValue, \ |
| 1079 "bad value context for arguments value") \ | 1080 "Bad value context for arguments value") \ |
| 1080 V(kBailedOutDueToDependencyChange, "bailed out due to dependency change") \ | 1081 V(kBailedOutDueToDependencyChange, "Bailed out due to dependency change") \ |
| 1081 V(kBailoutWasNotPrepared, "bailout was not prepared") \ | 1082 V(kBailoutWasNotPrepared, "Bailout was not prepared") \ |
| 1082 V(kBinaryStubGenerateFloatingPointCode, \ | 1083 V(kBinaryStubGenerateFloatingPointCode, \ |
| 1083 "BinaryStub_GenerateFloatingPointCode") \ | 1084 "BinaryStub_GenerateFloatingPointCode") \ |
| 1084 V(kBothRegistersWereSmisInSelectNonSmi, \ | 1085 V(kBothRegistersWereSmisInSelectNonSmi, \ |
| 1085 "Both registers were smis in SelectNonSmi") \ | 1086 "Both registers were smis in SelectNonSmi") \ |
| 1086 V(kCallToAJavaScriptRuntimeFunction, \ | 1087 V(kCallToAJavaScriptRuntimeFunction, \ |
| 1087 "call to a JavaScript runtime function") \ | 1088 "Call to a JavaScript runtime function") \ |
| 1088 V(kCannotTranslatePositionInChangedArea, \ | 1089 V(kCannotTranslatePositionInChangedArea, \ |
| 1089 "Cannot translate position in changed area") \ | 1090 "Cannot translate position in changed area") \ |
| 1090 V(kCodeGenerationFailed, "code generation failed") \ | 1091 V(kCodeGenerationFailed, "Code generation failed") \ |
| 1091 V(kCodeObjectNotProperlyPatched, "code object not properly patched") \ | 1092 V(kCodeObjectNotProperlyPatched, "Code object not properly patched") \ |
| 1092 V(kCompoundAssignmentToLookupSlot, "compound assignment to lookup slot") \ | 1093 V(kCompoundAssignmentToLookupSlot, "Compound assignment to lookup slot") \ |
| 1093 V(kContextAllocatedArguments, "context-allocated arguments") \ | 1094 V(kContextAllocatedArguments, "Context-allocated arguments") \ |
| 1094 V(kCopyBuffersOverlap, "copy buffers overlap") \ | 1095 V(kCopyBuffersOverlap, "Copy buffers overlap") \ |
| 1095 V(kCouldNotGenerateZero, "could not generate +0.0") \ | 1096 V(kCouldNotGenerateZero, "Could not generate +0.0") \ |
| 1096 V(kCouldNotGenerateNegativeZero, "could not generate -0.0") \ | 1097 V(kCouldNotGenerateNegativeZero, "Could not generate -0.0") \ |
| 1097 V(kDebuggerIsActive, "debugger is active") \ | 1098 V(kDebuggerIsActive, "Debugger is active") \ |
| 1098 V(kDebuggerStatement, "DebuggerStatement") \ | 1099 V(kDebuggerStatement, "DebuggerStatement") \ |
| 1099 V(kDeclarationInCatchContext, "Declaration in catch context") \ | 1100 V(kDeclarationInCatchContext, "Declaration in catch context") \ |
| 1100 V(kDeclarationInWithContext, "Declaration in with context") \ | 1101 V(kDeclarationInWithContext, "Declaration in with context") \ |
| 1101 V(kDefaultNaNModeNotSet, "Default NaN mode not set") \ | 1102 V(kDefaultNaNModeNotSet, "Default NaN mode not set") \ |
| 1102 V(kDeleteWithGlobalVariable, "delete with global variable") \ | 1103 V(kDeleteWithGlobalVariable, "Delete with global variable") \ |
| 1103 V(kDeleteWithNonGlobalVariable, "delete with non-global variable") \ | 1104 V(kDeleteWithNonGlobalVariable, "Delete with non-global variable") \ |
| 1104 V(kDestinationOfCopyNotAligned, "Destination of copy not aligned") \ | 1105 V(kDestinationOfCopyNotAligned, "Destination of copy not aligned") \ |
| 1105 V(kDontDeleteCellsCannotContainTheHole, \ | 1106 V(kDontDeleteCellsCannotContainTheHole, \ |
| 1106 "DontDelete cells can't contain the hole") \ | 1107 "DontDelete cells can't contain the hole") \ |
| 1107 V(kDoPushArgumentNotImplementedForDoubleType, \ | 1108 V(kDoPushArgumentNotImplementedForDoubleType, \ |
| 1108 "DoPushArgument not implemented for double type") \ | 1109 "DoPushArgument not implemented for double type") \ |
| 1109 V(kEliminatedBoundsCheckFailed, "eliminated bounds check failed") \ | 1110 V(kEliminatedBoundsCheckFailed, "Eliminated bounds check failed") \ |
| 1110 V(kEmitLoadRegisterUnsupportedDoubleImmediate, \ | 1111 V(kEmitLoadRegisterUnsupportedDoubleImmediate, \ |
| 1111 "EmitLoadRegister: Unsupported double immediate") \ | 1112 "EmitLoadRegister: Unsupported double immediate") \ |
| 1112 V(kEval, "eval") \ | 1113 V(kEval, "eval") \ |
| 1113 V(kExpected0AsASmiSentinel, "Expected 0 as a Smi sentinel") \ | 1114 V(kExpected0AsASmiSentinel, "Expected 0 as a Smi sentinel") \ |
| 1114 V(kExpectedAlignmentMarker, "expected alignment marker") \ | 1115 V(kExpectedAlignmentMarker, "Expected alignment marker") \ |
| 1115 V(kExpectedFunctionObject, "expected function object in register") \ | 1116 V(kExpectedAllocationSite, "Expected allocation site") \ |
| 1116 V(kExpectedHeapNumber, "expected HeapNumber") \ | 1117 V(kExpectedFunctionObject, "Expected function object in register") \ |
| 1117 V(kExpectedNativeContext, "expected native context") \ | 1118 V(kExpectedHeapNumber, "Expected HeapNumber") \ |
| 1118 V(kExpectedNonIdenticalObjects, "expected non-identical objects") \ | 1119 V(kExpectedNativeContext, "Expected native context") \ |
| 1119 V(kExpectedNonNullContext, "expected non-null context") \ | 1120 V(kExpectedNonIdenticalObjects, "Expected non-identical objects") \ |
| 1120 V(kExpectedPositiveZero, "expected +0.0") \ | 1121 V(kExpectedNonNullContext, "Expected non-null context") \ |
| 1122 V(kExpectedPositiveZero, "Expected +0.0") \ |
| 1121 V(kExpectedPropertyCellInTypeInfoCell, \ | 1123 V(kExpectedPropertyCellInTypeInfoCell, \ |
| 1122 "Expected property cell in type_info_cell") \ | 1124 "Expected property cell in type_info_cell") \ |
| 1123 V(kExpectedAllocationSiteInCell, \ | 1125 V(kExpectedAllocationSiteInCell, \ |
| 1124 "Expected AllocationSite in property cell") \ | 1126 "Expected AllocationSite in property cell") \ |
| 1125 V(kExpectedPropertyCellInRegisterA2, \ | 1127 V(kExpectedPropertyCellInRegisterA2, \ |
| 1126 "Expected property cell in register a2") \ | 1128 "Expected property cell in register a2") \ |
| 1127 V(kExpectedPropertyCellInRegisterEbx, \ | 1129 V(kExpectedPropertyCellInRegisterEbx, \ |
| 1128 "Expected property cell in register ebx") \ | 1130 "Expected property cell in register ebx") \ |
| 1129 V(kExpectedPropertyCellInRegisterRbx, \ | 1131 V(kExpectedPropertyCellInRegisterRbx, \ |
| 1130 "Expected property cell in register rbx") \ | 1132 "Expected property cell in register rbx") \ |
| 1131 V(kExpectedSmiOrHeapNumber, "expected smi or HeapNumber") \ | 1133 V(kExpectedSmiOrHeapNumber, "Expected smi or HeapNumber") \ |
| 1132 V(kExpectingAlignmentForCopyBytes, \ | 1134 V(kExpectingAlignmentForCopyBytes, \ |
| 1133 "Expecting alignment for CopyBytes") \ | 1135 "Expecting alignment for CopyBytes") \ |
| 1134 V(kExportDeclaration, "Export declaration") \ | 1136 V(kExportDeclaration, "Export declaration") \ |
| 1135 V(kExternalStringExpectedButNotFound, \ | 1137 V(kExternalStringExpectedButNotFound, \ |
| 1136 "external string expected, but not found") \ | 1138 "External string expected, but not found") \ |
| 1137 V(kFailedBailedOutLastTime, "failed/bailed out last time") \ | 1139 V(kFailedBailedOutLastTime, "Failed/bailed out last time") \ |
| 1138 V(kForInStatementIsNotFastCase, "ForInStatement is not fast case") \ | 1140 V(kForInStatementIsNotFastCase, "ForInStatement is not fast case") \ |
| 1139 V(kForInStatementOptimizationIsDisabled, \ | 1141 V(kForInStatementOptimizationIsDisabled, \ |
| 1140 "ForInStatement optimization is disabled") \ | 1142 "ForInStatement optimization is disabled") \ |
| 1141 V(kForInStatementWithNonLocalEachVariable, \ | 1143 V(kForInStatementWithNonLocalEachVariable, \ |
| 1142 "ForInStatement with non-local each variable") \ | 1144 "ForInStatement with non-local each variable") \ |
| 1143 V(kForOfStatement, "ForOfStatement") \ | 1145 V(kForOfStatement, "ForOfStatement") \ |
| 1144 V(kFrameIsExpectedToBeAligned, "frame is expected to be aligned") \ | 1146 V(kFrameIsExpectedToBeAligned, "Frame is expected to be aligned") \ |
| 1145 V(kFunctionCallsEval, "function calls eval") \ | 1147 V(kFunctionCallsEval, "Function calls eval") \ |
| 1146 V(kFunctionIsAGenerator, "function is a generator") \ | 1148 V(kFunctionIsAGenerator, "Function is a generator") \ |
| 1147 V(kFunctionWithIllegalRedeclaration, "function with illegal redeclaration") \ | 1149 V(kFunctionWithIllegalRedeclaration, "Function with illegal redeclaration") \ |
| 1148 V(kGeneratedCodeIsTooLarge, "Generated code is too large") \ | 1150 V(kGeneratedCodeIsTooLarge, "Generated code is too large") \ |
| 1149 V(kGeneratorFailedToResume, "Generator failed to resume") \ | 1151 V(kGeneratorFailedToResume, "Generator failed to resume") \ |
| 1150 V(kGenerator, "generator") \ | 1152 V(kGenerator, "Generator") \ |
| 1151 V(kGlobalFunctionsMustHaveInitialMap, \ | 1153 V(kGlobalFunctionsMustHaveInitialMap, \ |
| 1152 "Global functions must have initial map") \ | 1154 "Global functions must have initial map") \ |
| 1153 V(kHeapNumberMapRegisterClobbered, "HeapNumberMap register clobbered") \ | 1155 V(kHeapNumberMapRegisterClobbered, "HeapNumberMap register clobbered") \ |
| 1156 V(kHydrogenFilter, "Optimization disabled by filter") \ |
| 1154 V(kImportDeclaration, "Import declaration") \ | 1157 V(kImportDeclaration, "Import declaration") \ |
| 1155 V(kImproperObjectOnPrototypeChainForStore, \ | 1158 V(kImproperObjectOnPrototypeChainForStore, \ |
| 1156 "improper object on prototype chain for store") \ | 1159 "Improper object on prototype chain for store") \ |
| 1157 V(kIndexIsNegative, "Index is negative") \ | 1160 V(kIndexIsNegative, "Index is negative") \ |
| 1158 V(kIndexIsTooLarge, "Index is too large") \ | 1161 V(kIndexIsTooLarge, "Index is too large") \ |
| 1159 V(kInlinedRuntimeFunctionClassOf, "inlined runtime function: ClassOf") \ | 1162 V(kInlinedRuntimeFunctionClassOf, "Inlined runtime function: ClassOf") \ |
| 1160 V(kInlinedRuntimeFunctionFastAsciiArrayJoin, \ | 1163 V(kInlinedRuntimeFunctionFastAsciiArrayJoin, \ |
| 1161 "inlined runtime function: FastAsciiArrayJoin") \ | 1164 "Inlined runtime function: FastAsciiArrayJoin") \ |
| 1162 V(kInlinedRuntimeFunctionGeneratorNext, \ | 1165 V(kInlinedRuntimeFunctionGeneratorNext, \ |
| 1163 "inlined runtime function: GeneratorNext") \ | 1166 "Inlined runtime function: GeneratorNext") \ |
| 1164 V(kInlinedRuntimeFunctionGeneratorThrow, \ | 1167 V(kInlinedRuntimeFunctionGeneratorThrow, \ |
| 1165 "inlined runtime function: GeneratorThrow") \ | 1168 "Inlined runtime function: GeneratorThrow") \ |
| 1166 V(kInlinedRuntimeFunctionGetFromCache, \ | 1169 V(kInlinedRuntimeFunctionGetFromCache, \ |
| 1167 "inlined runtime function: GetFromCache") \ | 1170 "Inlined runtime function: GetFromCache") \ |
| 1168 V(kInlinedRuntimeFunctionIsNonNegativeSmi, \ | 1171 V(kInlinedRuntimeFunctionIsNonNegativeSmi, \ |
| 1169 "inlined runtime function: IsNonNegativeSmi") \ | 1172 "Inlined runtime function: IsNonNegativeSmi") \ |
| 1170 V(kInlinedRuntimeFunctionIsRegExpEquivalent, \ | 1173 V(kInlinedRuntimeFunctionIsRegExpEquivalent, \ |
| 1171 "inlined runtime function: IsRegExpEquivalent") \ | 1174 "Inlined runtime function: IsRegExpEquivalent") \ |
| 1172 V(kInlinedRuntimeFunctionIsStringWrapperSafeForDefaultValueOf, \ | 1175 V(kInlinedRuntimeFunctionIsStringWrapperSafeForDefaultValueOf, \ |
| 1173 "inlined runtime function: IsStringWrapperSafeForDefaultValueOf") \ | 1176 "Inlined runtime function: IsStringWrapperSafeForDefaultValueOf") \ |
| 1174 V(kInliningBailedOut, "inlining bailed out") \ | 1177 V(kInliningBailedOut, "Inlining bailed out") \ |
| 1175 V(kInputGPRIsExpectedToHaveUpper32Cleared, \ | 1178 V(kInputGPRIsExpectedToHaveUpper32Cleared, \ |
| 1176 "input GPR is expected to have upper32 cleared") \ | 1179 "Input GPR is expected to have upper32 cleared") \ |
| 1177 V(kInputStringTooLong, "input string too long") \ | 1180 V(kInputStringTooLong, "Input string too long") \ |
| 1178 V(kInstanceofStubUnexpectedCallSiteCacheCheck, \ | 1181 V(kInstanceofStubUnexpectedCallSiteCacheCheck, \ |
| 1179 "InstanceofStub unexpected call site cache (check)") \ | 1182 "InstanceofStub unexpected call site cache (check)") \ |
| 1180 V(kInstanceofStubUnexpectedCallSiteCacheCmp1, \ | 1183 V(kInstanceofStubUnexpectedCallSiteCacheCmp1, \ |
| 1181 "InstanceofStub unexpected call site cache (cmp 1)") \ | 1184 "InstanceofStub unexpected call site cache (cmp 1)") \ |
| 1182 V(kInstanceofStubUnexpectedCallSiteCacheCmp2, \ | 1185 V(kInstanceofStubUnexpectedCallSiteCacheCmp2, \ |
| 1183 "InstanceofStub unexpected call site cache (cmp 2)") \ | 1186 "InstanceofStub unexpected call site cache (cmp 2)") \ |
| 1184 V(kInstanceofStubUnexpectedCallSiteCacheMov, \ | 1187 V(kInstanceofStubUnexpectedCallSiteCacheMov, \ |
| 1185 "InstanceofStub unexpected call site cache (mov)") \ | 1188 "InstanceofStub unexpected call site cache (mov)") \ |
| 1186 V(kInteger32ToSmiFieldWritingToNonSmiLocation, \ | 1189 V(kInteger32ToSmiFieldWritingToNonSmiLocation, \ |
| 1187 "Integer32ToSmiField writing to non-smi location") \ | 1190 "Integer32ToSmiField writing to non-smi location") \ |
| 1188 V(kInvalidCaptureReferenced, "Invalid capture referenced") \ | 1191 V(kInvalidCaptureReferenced, "Invalid capture referenced") \ |
| 1189 V(kInvalidElementsKindForInternalArrayOrInternalPackedArray, \ | 1192 V(kInvalidElementsKindForInternalArrayOrInternalPackedArray, \ |
| 1190 "Invalid ElementsKind for InternalArray or InternalPackedArray") \ | 1193 "Invalid ElementsKind for InternalArray or InternalPackedArray") \ |
| 1191 V(kInvalidFullCodegenState, "invalid full-codegen state") \ | 1194 V(kInvalidFullCodegenState, "invalid full-codegen state") \ |
| 1192 V(kInvalidHandleScopeLevel, "Invalid HandleScope level") \ | 1195 V(kInvalidHandleScopeLevel, "Invalid HandleScope level") \ |
| 1193 V(kInvalidLeftHandSideInAssignment, "invalid left-hand side in assignment") \ | 1196 V(kInvalidLeftHandSideInAssignment, "Invalid left-hand side in assignment") \ |
| 1194 V(kInvalidLhsInCompoundAssignment, "invalid lhs in compound assignment") \ | 1197 V(kInvalidLhsInCompoundAssignment, "Invalid lhs in compound assignment") \ |
| 1195 V(kInvalidLhsInCountOperation, "invalid lhs in count operation") \ | 1198 V(kInvalidLhsInCountOperation, "Invalid lhs in count operation") \ |
| 1196 V(kInvalidMinLength, "Invalid min_length") \ | 1199 V(kInvalidMinLength, "Invalid min_length") \ |
| 1197 V(kJSGlobalObjectNativeContextShouldBeANativeContext, \ | 1200 V(kJSGlobalObjectNativeContextShouldBeANativeContext, \ |
| 1198 "JSGlobalObject::native_context should be a native context") \ | 1201 "JSGlobalObject::native_context should be a native context") \ |
| 1199 V(kJSGlobalProxyContextShouldNotBeNull, \ | 1202 V(kJSGlobalProxyContextShouldNotBeNull, \ |
| 1200 "JSGlobalProxy::context() should not be null") \ | 1203 "JSGlobalProxy::context() should not be null") \ |
| 1201 V(kJSObjectWithFastElementsMapHasSlowElements, \ | 1204 V(kJSObjectWithFastElementsMapHasSlowElements, \ |
| 1202 "JSObject with fast elements map has slow elements") \ | 1205 "JSObject with fast elements map has slow elements") \ |
| 1203 V(kLetBindingReInitialization, "Let binding re-initialization") \ | 1206 V(kLetBindingReInitialization, "Let binding re-initialization") \ |
| 1204 V(kLhsHasBeenClobbered, "lhs has been clobbered") \ | 1207 V(kLhsHasBeenClobbered, "lhs has been clobbered") \ |
| 1205 V(kLiveBytesCountOverflowChunkSize, "Live Bytes Count overflow chunk size") \ | 1208 V(kLiveBytesCountOverflowChunkSize, "Live Bytes Count overflow chunk size") \ |
| 1206 V(kLiveEditFrameDroppingIsNotSupportedOnA64, \ | 1209 V(kLiveEditFrameDroppingIsNotSupportedOnA64, \ |
| 1207 "LiveEdit frame dropping is not supported on a64") \ | 1210 "LiveEdit frame dropping is not supported on a64") \ |
| 1208 V(kLiveEditFrameDroppingIsNotSupportedOnArm, \ | 1211 V(kLiveEditFrameDroppingIsNotSupportedOnArm, \ |
| 1209 "LiveEdit frame dropping is not supported on arm") \ | 1212 "LiveEdit frame dropping is not supported on arm") \ |
| 1210 V(kLiveEditFrameDroppingIsNotSupportedOnMips, \ | 1213 V(kLiveEditFrameDroppingIsNotSupportedOnMips, \ |
| 1211 "LiveEdit frame dropping is not supported on mips") \ | 1214 "LiveEdit frame dropping is not supported on mips") \ |
| 1212 V(kLiveEdit, "LiveEdit") \ | 1215 V(kLiveEdit, "LiveEdit") \ |
| 1213 V(kLookupVariableInCountOperation, \ | 1216 V(kLookupVariableInCountOperation, \ |
| 1214 "lookup variable in count operation") \ | 1217 "Lookup variable in count operation") \ |
| 1215 V(kMapIsNoLongerInEax, "Map is no longer in eax") \ | 1218 V(kMapIsNoLongerInEax, "Map is no longer in eax") \ |
| 1216 V(kModuleDeclaration, "Module declaration") \ | 1219 V(kModuleDeclaration, "Module declaration") \ |
| 1217 V(kModuleLiteral, "Module literal") \ | 1220 V(kModuleLiteral, "Module literal") \ |
| 1218 V(kModulePath, "Module path") \ | 1221 V(kModulePath, "Module path") \ |
| 1219 V(kModuleStatement, "Module statement") \ | 1222 V(kModuleStatement, "Module statement") \ |
| 1220 V(kModuleVariable, "Module variable") \ | 1223 V(kModuleVariable, "Module variable") \ |
| 1221 V(kModuleUrl, "Module url") \ | 1224 V(kModuleUrl, "Module url") \ |
| 1222 V(kNativeFunctionLiteral, "Native function literal") \ | 1225 V(kNativeFunctionLiteral, "Native function literal") \ |
| 1223 V(kNoCasesLeft, "no cases left") \ | 1226 V(kNoCasesLeft, "No cases left") \ |
| 1224 V(kNoEmptyArraysHereInEmitFastAsciiArrayJoin, \ | 1227 V(kNoEmptyArraysHereInEmitFastAsciiArrayJoin, \ |
| 1225 "No empty arrays here in EmitFastAsciiArrayJoin") \ | 1228 "No empty arrays here in EmitFastAsciiArrayJoin") \ |
| 1226 V(kNonInitializerAssignmentToConst, \ | 1229 V(kNonInitializerAssignmentToConst, \ |
| 1227 "non-initializer assignment to const") \ | 1230 "Non-initializer assignment to const") \ |
| 1228 V(kNonSmiIndex, "Non-smi index") \ | 1231 V(kNonSmiIndex, "Non-smi index") \ |
| 1229 V(kNonSmiKeyInArrayLiteral, "Non-smi key in array literal") \ | 1232 V(kNonSmiKeyInArrayLiteral, "Non-smi key in array literal") \ |
| 1230 V(kNonSmiValue, "Non-smi value") \ | 1233 V(kNonSmiValue, "Non-smi value") \ |
| 1231 V(kNonObject, "Non-object value") \ | 1234 V(kNonObject, "Non-object value") \ |
| 1232 V(kNotEnoughVirtualRegistersForValues, \ | 1235 V(kNotEnoughVirtualRegistersForValues, \ |
| 1233 "not enough virtual registers for values") \ | 1236 "Not enough virtual registers for values") \ |
| 1234 V(kNotEnoughSpillSlotsForOsr, \ | 1237 V(kNotEnoughSpillSlotsForOsr, \ |
| 1235 "not enough spill slots for OSR") \ | 1238 "Not enough spill slots for OSR") \ |
| 1236 V(kNotEnoughVirtualRegistersRegalloc, \ | 1239 V(kNotEnoughVirtualRegistersRegalloc, \ |
| 1237 "not enough virtual registers (regalloc)") \ | 1240 "Not enough virtual registers (regalloc)") \ |
| 1238 V(kObjectFoundInSmiOnlyArray, "object found in smi-only array") \ | 1241 V(kObjectFoundInSmiOnlyArray, "Object found in smi-only array") \ |
| 1239 V(kObjectLiteralWithComplexProperty, \ | 1242 V(kObjectLiteralWithComplexProperty, \ |
| 1240 "Object literal with complex property") \ | 1243 "Object literal with complex property") \ |
| 1241 V(kOddballInStringTableIsNotUndefinedOrTheHole, \ | 1244 V(kOddballInStringTableIsNotUndefinedOrTheHole, \ |
| 1242 "oddball in string table is not undefined or the hole") \ | 1245 "Oddball in string table is not undefined or the hole") \ |
| 1243 V(kOffsetOutOfRange, "offset out of range") \ | 1246 V(kOffsetOutOfRange, "Offset out of range") \ |
| 1244 V(kOperandIsASmiAndNotAName, "Operand is a smi and not a name") \ | 1247 V(kOperandIsASmiAndNotAName, "Operand is a smi and not a name") \ |
| 1245 V(kOperandIsASmiAndNotAString, "Operand is a smi and not a string") \ | 1248 V(kOperandIsASmiAndNotAString, "Operand is a smi and not a string") \ |
| 1246 V(kOperandIsASmi, "Operand is a smi") \ | 1249 V(kOperandIsASmi, "Operand is a smi") \ |
| 1247 V(kOperandIsNotAName, "Operand is not a name") \ | 1250 V(kOperandIsNotAName, "Operand is not a name") \ |
| 1248 V(kOperandIsNotANumber, "Operand is not a number") \ | 1251 V(kOperandIsNotANumber, "Operand is not a number") \ |
| 1249 V(kOperandIsNotASmi, "Operand is not a smi") \ | 1252 V(kOperandIsNotASmi, "Operand is not a smi") \ |
| 1250 V(kOperandIsNotAString, "Operand is not a string") \ | 1253 V(kOperandIsNotAString, "Operand is not a string") \ |
| 1251 V(kOperandIsNotSmi, "Operand is not smi") \ | 1254 V(kOperandIsNotSmi, "Operand is not smi") \ |
| 1252 V(kOperandNotANumber, "Operand not a number") \ | 1255 V(kOperandNotANumber, "Operand not a number") \ |
| 1253 V(kOptimizedTooManyTimes, "optimized too many times") \ | 1256 V(kOptimizationDisabled, "Optimization is disabled") \ |
| 1257 V(kOptimizedTooManyTimes, "Optimized too many times") \ |
| 1254 V(kOutOfVirtualRegistersWhileTryingToAllocateTempRegister, \ | 1258 V(kOutOfVirtualRegistersWhileTryingToAllocateTempRegister, \ |
| 1255 "Out of virtual registers while trying to allocate temp register") \ | 1259 "Out of virtual registers while trying to allocate temp register") \ |
| 1256 V(kParseScopeError, "parse/scope error") \ | 1260 V(kParseScopeError, "Parse/scope error") \ |
| 1257 V(kPossibleDirectCallToEval, "possible direct call to eval") \ | 1261 V(kPossibleDirectCallToEval, "Possible direct call to eval") \ |
| 1258 V(kPreconditionsWereNotMet, "preconditions were not met") \ | 1262 V(kPreconditionsWereNotMet, "Preconditions were not met") \ |
| 1259 V(kPropertyAllocationCountFailed, "Property allocation count failed") \ | 1263 V(kPropertyAllocationCountFailed, "Property allocation count failed") \ |
| 1260 V(kReceivedInvalidReturnAddress, "Received invalid return address") \ | 1264 V(kReceivedInvalidReturnAddress, "Received invalid return address") \ |
| 1261 V(kReferenceToAVariableWhichRequiresDynamicLookup, \ | 1265 V(kReferenceToAVariableWhichRequiresDynamicLookup, \ |
| 1262 "reference to a variable which requires dynamic lookup") \ | 1266 "Reference to a variable which requires dynamic lookup") \ |
| 1263 V(kReferenceToGlobalLexicalVariable, \ | 1267 V(kReferenceToGlobalLexicalVariable, \ |
| 1264 "reference to global lexical variable") \ | 1268 "Reference to global lexical variable") \ |
| 1265 V(kReferenceToUninitializedVariable, "reference to uninitialized variable") \ | 1269 V(kReferenceToUninitializedVariable, "Reference to uninitialized variable") \ |
| 1266 V(kRegisterDidNotMatchExpectedRoot, "Register did not match expected root") \ | 1270 V(kRegisterDidNotMatchExpectedRoot, "Register did not match expected root") \ |
| 1267 V(kRegisterWasClobbered, "register was clobbered") \ | 1271 V(kRegisterWasClobbered, "Register was clobbered") \ |
| 1268 V(kRememberedSetPointerInNewSpace, "remembered set pointer is in new space") \ | 1272 V(kRememberedSetPointerInNewSpace, "Remembered set pointer is in new space") \ |
| 1269 V(kReturnAddressNotFoundInFrame, "return address not found in frame") \ | 1273 V(kReturnAddressNotFoundInFrame, "Return address not found in frame") \ |
| 1270 V(kRhsHasBeenClobbered, "rhs has been clobbered") \ | 1274 V(kRhsHasBeenClobbered, "Rhs has been clobbered") \ |
| 1271 V(kScopedBlock, "ScopedBlock") \ | 1275 V(kScopedBlock, "ScopedBlock") \ |
| 1272 V(kSmiAdditionOverflow, "Smi addition overflow") \ | 1276 V(kSmiAdditionOverflow, "Smi addition overflow") \ |
| 1273 V(kSmiSubtractionOverflow, "Smi subtraction overflow") \ | 1277 V(kSmiSubtractionOverflow, "Smi subtraction overflow") \ |
| 1274 V(kStackAccessBelowStackPointer, "stack access below stack pointer") \ | 1278 V(kStackAccessBelowStackPointer, "Stack access below stack pointer") \ |
| 1275 V(kStackFrameTypesMustMatch, "stack frame types must match") \ | 1279 V(kStackFrameTypesMustMatch, "Stack frame types must match") \ |
| 1276 V(kSwitchStatementMixedOrNonLiteralSwitchLabels, \ | 1280 V(kSwitchStatementMixedOrNonLiteralSwitchLabels, \ |
| 1277 "SwitchStatement: mixed or non-literal switch labels") \ | 1281 "SwitchStatement: mixed or non-literal switch labels") \ |
| 1278 V(kSwitchStatementTooManyClauses, "SwitchStatement: too many clauses") \ | 1282 V(kSwitchStatementTooManyClauses, "SwitchStatement: too many clauses") \ |
| 1279 V(kTheCurrentStackPointerIsBelowCsp, \ | 1283 V(kTheCurrentStackPointerIsBelowCsp, \ |
| 1280 "the current stack pointer is below csp") \ | 1284 "The current stack pointer is below csp") \ |
| 1281 V(kTheInstructionShouldBeALui, "The instruction should be a lui") \ | 1285 V(kTheInstructionShouldBeALui, "The instruction should be a lui") \ |
| 1282 V(kTheInstructionShouldBeAnOri, "The instruction should be an ori") \ | 1286 V(kTheInstructionShouldBeAnOri, "The instruction should be an ori") \ |
| 1283 V(kTheInstructionToPatchShouldBeALoadFromPc, \ | 1287 V(kTheInstructionToPatchShouldBeALoadFromPc, \ |
| 1284 "The instruction to patch should be a load from pc") \ | 1288 "The instruction to patch should be a load from pc") \ |
| 1285 V(kTheInstructionToPatchShouldBeAnLdrLiteral, \ | 1289 V(kTheInstructionToPatchShouldBeAnLdrLiteral, \ |
| 1286 "The instruction to patch should be a ldr literal") \ | 1290 "The instruction to patch should be a ldr literal") \ |
| 1287 V(kTheInstructionToPatchShouldBeALui, \ | 1291 V(kTheInstructionToPatchShouldBeALui, \ |
| 1288 "The instruction to patch should be a lui") \ | 1292 "The instruction to patch should be a lui") \ |
| 1289 V(kTheInstructionToPatchShouldBeAnOri, \ | 1293 V(kTheInstructionToPatchShouldBeAnOri, \ |
| 1290 "The instruction to patch should be an ori") \ | 1294 "The instruction to patch should be an ori") \ |
| 1291 V(kTheSourceAndDestinationAreTheSame, \ | 1295 V(kTheSourceAndDestinationAreTheSame, \ |
| 1292 "the source and destination are the same") \ | 1296 "The source and destination are the same") \ |
| 1293 V(kTheStackWasCorruptedByMacroAssemblerCall, \ | 1297 V(kTheStackWasCorruptedByMacroAssemblerCall, \ |
| 1294 "the stack was corrupted by MacroAssembler::Call()") \ | 1298 "The stack was corrupted by MacroAssembler::Call()") \ |
| 1295 V(kTooManyParametersLocals, "too many parameters/locals") \ | 1299 V(kTooManyParametersLocals, "Too many parameters/locals") \ |
| 1296 V(kTooManyParameters, "too many parameters") \ | 1300 V(kTooManyParameters, "Too many parameters") \ |
| 1297 V(kTooManySpillSlotsNeededForOSR, "Too many spill slots needed for OSR") \ | 1301 V(kTooManySpillSlotsNeededForOSR, "Too many spill slots needed for OSR") \ |
| 1298 V(kToOperand32UnsupportedImmediate, "ToOperand32 unsupported immediate.") \ | 1302 V(kToOperand32UnsupportedImmediate, "ToOperand32 unsupported immediate.") \ |
| 1299 V(kToOperandIsDoubleRegisterUnimplemented, \ | 1303 V(kToOperandIsDoubleRegisterUnimplemented, \ |
| 1300 "ToOperand IsDoubleRegister unimplemented") \ | 1304 "ToOperand IsDoubleRegister unimplemented") \ |
| 1301 V(kToOperandUnsupportedDoubleImmediate, \ | 1305 V(kToOperandUnsupportedDoubleImmediate, \ |
| 1302 "ToOperand Unsupported double immediate") \ | 1306 "ToOperand Unsupported double immediate") \ |
| 1303 V(kTryCatchStatement, "TryCatchStatement") \ | 1307 V(kTryCatchStatement, "TryCatchStatement") \ |
| 1304 V(kTryFinallyStatement, "TryFinallyStatement") \ | 1308 V(kTryFinallyStatement, "TryFinallyStatement") \ |
| 1305 V(kUnableToEncodeValueAsSmi, "Unable to encode value as smi") \ | 1309 V(kUnableToEncodeValueAsSmi, "Unable to encode value as smi") \ |
| 1306 V(kUnalignedAllocationInNewSpace, "Unaligned allocation in new space") \ | 1310 V(kUnalignedAllocationInNewSpace, "Unaligned allocation in new space") \ |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1344 V(kUnexpectedStringType, "Unexpected string type") \ | 1348 V(kUnexpectedStringType, "Unexpected string type") \ |
| 1345 V(kUnexpectedStringWrapperInstanceSize, \ | 1349 V(kUnexpectedStringWrapperInstanceSize, \ |
| 1346 "Unexpected string wrapper instance size") \ | 1350 "Unexpected string wrapper instance size") \ |
| 1347 V(kUnexpectedTypeForRegExpDataFixedArrayExpected, \ | 1351 V(kUnexpectedTypeForRegExpDataFixedArrayExpected, \ |
| 1348 "Unexpected type for RegExp data, FixedArray expected") \ | 1352 "Unexpected type for RegExp data, FixedArray expected") \ |
| 1349 V(kUnexpectedValue, "Unexpected value") \ | 1353 V(kUnexpectedValue, "Unexpected value") \ |
| 1350 V(kUnexpectedUnusedPropertiesOfStringWrapper, \ | 1354 V(kUnexpectedUnusedPropertiesOfStringWrapper, \ |
| 1351 "Unexpected unused properties of string wrapper") \ | 1355 "Unexpected unused properties of string wrapper") \ |
| 1352 V(kUnimplemented, "unimplemented") \ | 1356 V(kUnimplemented, "unimplemented") \ |
| 1353 V(kUninitializedKSmiConstantRegister, "Uninitialized kSmiConstantRegister") \ | 1357 V(kUninitializedKSmiConstantRegister, "Uninitialized kSmiConstantRegister") \ |
| 1354 V(kUnknown, "unknown") \ | 1358 V(kUnknown, "Unknown") \ |
| 1355 V(kUnsupportedConstCompoundAssignment, \ | 1359 V(kUnsupportedConstCompoundAssignment, \ |
| 1356 "unsupported const compound assignment") \ | 1360 "Unsupported const compound assignment") \ |
| 1357 V(kUnsupportedCountOperationWithConst, \ | 1361 V(kUnsupportedCountOperationWithConst, \ |
| 1358 "unsupported count operation with const") \ | 1362 "Unsupported count operation with const") \ |
| 1359 V(kUnsupportedDoubleImmediate, "unsupported double immediate") \ | 1363 V(kUnsupportedDoubleImmediate, "Unsupported double immediate") \ |
| 1360 V(kUnsupportedLetCompoundAssignment, "unsupported let compound assignment") \ | 1364 V(kUnsupportedLetCompoundAssignment, "Unsupported let compound assignment") \ |
| 1361 V(kUnsupportedLookupSlotInDeclaration, \ | 1365 V(kUnsupportedLookupSlotInDeclaration, \ |
| 1362 "unsupported lookup slot in declaration") \ | 1366 "Unsupported lookup slot in declaration") \ |
| 1363 V(kUnsupportedNonPrimitiveCompare, "Unsupported non-primitive compare") \ | 1367 V(kUnsupportedNonPrimitiveCompare, "Unsupported non-primitive compare") \ |
| 1364 V(kUnsupportedPhiUseOfArguments, "Unsupported phi use of arguments") \ | 1368 V(kUnsupportedPhiUseOfArguments, "Unsupported phi use of arguments") \ |
| 1365 V(kUnsupportedPhiUseOfConstVariable, \ | 1369 V(kUnsupportedPhiUseOfConstVariable, \ |
| 1366 "Unsupported phi use of const variable") \ | 1370 "Unsupported phi use of const variable") \ |
| 1367 V(kUnsupportedTaggedImmediate, "unsupported tagged immediate") \ | 1371 V(kUnsupportedTaggedImmediate, "Unsupported tagged immediate") \ |
| 1368 V(kVariableResolvedToWithContext, "Variable resolved to with context") \ | 1372 V(kVariableResolvedToWithContext, "Variable resolved to with context") \ |
| 1369 V(kWeShouldNotHaveAnEmptyLexicalContext, \ | 1373 V(kWeShouldNotHaveAnEmptyLexicalContext, \ |
| 1370 "we should not have an empty lexical context") \ | 1374 "We should not have an empty lexical context") \ |
| 1371 V(kWithStatement, "WithStatement") \ | 1375 V(kWithStatement, "WithStatement") \ |
| 1372 V(kWrongAddressOrValuePassedToRecordWrite, \ | 1376 V(kWrongAddressOrValuePassedToRecordWrite, \ |
| 1373 "Wrong address or value passed to RecordWrite") \ | 1377 "Wrong address or value passed to RecordWrite") \ |
| 1374 V(kYield, "Yield") | 1378 V(kYield, "Yield") |
| 1375 | 1379 |
| 1376 | 1380 |
| 1377 #define ERROR_MESSAGES_CONSTANTS(C, T) C, | 1381 #define ERROR_MESSAGES_CONSTANTS(C, T) C, |
| 1378 enum BailoutReason { | 1382 enum BailoutReason { |
| 1379 ERROR_MESSAGES_LIST(ERROR_MESSAGES_CONSTANTS) | 1383 ERROR_MESSAGES_LIST(ERROR_MESSAGES_CONSTANTS) |
| 1380 kLastErrorMessage | 1384 kLastErrorMessage |
| (...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2150 inline bool HasExternalShortElements(); | 2154 inline bool HasExternalShortElements(); |
| 2151 inline bool HasExternalUnsignedShortElements(); | 2155 inline bool HasExternalUnsignedShortElements(); |
| 2152 inline bool HasExternalIntElements(); | 2156 inline bool HasExternalIntElements(); |
| 2153 inline bool HasExternalUnsignedIntElements(); | 2157 inline bool HasExternalUnsignedIntElements(); |
| 2154 inline bool HasExternalFloatElements(); | 2158 inline bool HasExternalFloatElements(); |
| 2155 inline bool HasExternalDoubleElements(); | 2159 inline bool HasExternalDoubleElements(); |
| 2156 bool HasFastArgumentsElements(); | 2160 bool HasFastArgumentsElements(); |
| 2157 bool HasDictionaryArgumentsElements(); | 2161 bool HasDictionaryArgumentsElements(); |
| 2158 inline SeededNumberDictionary* element_dictionary(); // Gets slow elements. | 2162 inline SeededNumberDictionary* element_dictionary(); // Gets slow elements. |
| 2159 | 2163 |
| 2160 inline bool ShouldTrackAllocationInfo(); | |
| 2161 | |
| 2162 inline void set_map_and_elements( | 2164 inline void set_map_and_elements( |
| 2163 Map* map, | 2165 Map* map, |
| 2164 FixedArrayBase* value, | 2166 FixedArrayBase* value, |
| 2165 WriteBarrierMode mode = UPDATE_WRITE_BARRIER); | 2167 WriteBarrierMode mode = UPDATE_WRITE_BARRIER); |
| 2166 | 2168 |
| 2167 // Requires: HasFastElements(). | 2169 // Requires: HasFastElements(). |
| 2168 static Handle<FixedArray> EnsureWritableFastElements( | 2170 static Handle<FixedArray> EnsureWritableFastElements( |
| 2169 Handle<JSObject> object); | 2171 Handle<JSObject> object); |
| 2170 MUST_USE_RESULT inline MaybeObject* EnsureWritableFastElements(); | 2172 MUST_USE_RESULT inline MaybeObject* EnsureWritableFastElements(); |
| 2171 | 2173 |
| (...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2990 | 2992 |
| 2991 // Copy a sub array from the receiver to dest. | 2993 // Copy a sub array from the receiver to dest. |
| 2992 void CopyTo(int pos, FixedArray* dest, int dest_pos, int len); | 2994 void CopyTo(int pos, FixedArray* dest, int dest_pos, int len); |
| 2993 | 2995 |
| 2994 // Garbage collection support. | 2996 // Garbage collection support. |
| 2995 static int SizeFor(int length) { return kHeaderSize + length * kPointerSize; } | 2997 static int SizeFor(int length) { return kHeaderSize + length * kPointerSize; } |
| 2996 | 2998 |
| 2997 // Code Generation support. | 2999 // Code Generation support. |
| 2998 static int OffsetOfElementAt(int index) { return SizeFor(index); } | 3000 static int OffsetOfElementAt(int index) { return SizeFor(index); } |
| 2999 | 3001 |
| 3002 // Garbage collection support. |
| 3003 Object** RawFieldOfElementAt(int index) { |
| 3004 return HeapObject::RawField(this, OffsetOfElementAt(index)); |
| 3005 } |
| 3006 |
| 3000 // Casting. | 3007 // Casting. |
| 3001 static inline FixedArray* cast(Object* obj); | 3008 static inline FixedArray* cast(Object* obj); |
| 3002 | 3009 |
| 3003 // Maximal allowed size, in bytes, of a single FixedArray. | 3010 // Maximal allowed size, in bytes, of a single FixedArray. |
| 3004 // Prevents overflowing size computations, as well as extreme memory | 3011 // Prevents overflowing size computations, as well as extreme memory |
| 3005 // consumption. | 3012 // consumption. |
| 3006 static const int kMaxSize = 128 * MB * kPointerSize; | 3013 static const int kMaxSize = 128 * MB * kPointerSize; |
| 3007 // Maximally allowed length of a FixedArray. | 3014 // Maximally allowed length of a FixedArray. |
| 3008 static const int kMaxLength = (kMaxSize - kHeaderSize) / kPointerSize; | 3015 static const int kMaxLength = (kMaxSize - kHeaderSize) / kPointerSize; |
| 3009 | 3016 |
| (...skipping 2173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5183 inline bool is_store_stub() { return kind() == STORE_IC; } | 5190 inline bool is_store_stub() { return kind() == STORE_IC; } |
| 5184 inline bool is_keyed_store_stub() { return kind() == KEYED_STORE_IC; } | 5191 inline bool is_keyed_store_stub() { return kind() == KEYED_STORE_IC; } |
| 5185 inline bool is_call_stub() { return kind() == CALL_IC; } | 5192 inline bool is_call_stub() { return kind() == CALL_IC; } |
| 5186 inline bool is_keyed_call_stub() { return kind() == KEYED_CALL_IC; } | 5193 inline bool is_keyed_call_stub() { return kind() == KEYED_CALL_IC; } |
| 5187 inline bool is_binary_op_stub() { return kind() == BINARY_OP_IC; } | 5194 inline bool is_binary_op_stub() { return kind() == BINARY_OP_IC; } |
| 5188 inline bool is_compare_ic_stub() { return kind() == COMPARE_IC; } | 5195 inline bool is_compare_ic_stub() { return kind() == COMPARE_IC; } |
| 5189 inline bool is_compare_nil_ic_stub() { return kind() == COMPARE_NIL_IC; } | 5196 inline bool is_compare_nil_ic_stub() { return kind() == COMPARE_NIL_IC; } |
| 5190 inline bool is_to_boolean_ic_stub() { return kind() == TO_BOOLEAN_IC; } | 5197 inline bool is_to_boolean_ic_stub() { return kind() == TO_BOOLEAN_IC; } |
| 5191 inline bool is_keyed_stub(); | 5198 inline bool is_keyed_stub(); |
| 5192 | 5199 |
| 5200 inline void set_raw_kind_specific_flags1(int value); |
| 5201 inline void set_raw_kind_specific_flags2(int value); |
| 5202 |
| 5193 // [major_key]: For kind STUB or BINARY_OP_IC, the major key. | 5203 // [major_key]: For kind STUB or BINARY_OP_IC, the major key. |
| 5194 inline int major_key(); | 5204 inline int major_key(); |
| 5195 inline void set_major_key(int value); | 5205 inline void set_major_key(int value); |
| 5196 inline bool has_major_key(); | 5206 inline bool has_major_key(); |
| 5197 | 5207 |
| 5198 // For kind STUB or ICs, tells whether or not a code object was generated by | 5208 // For kind STUB or ICs, tells whether or not a code object was generated by |
| 5199 // the optimizing compiler (but it may not be an optimized function). | 5209 // the optimizing compiler (but it may not be an optimized function). |
| 5200 bool is_crankshafted(); | 5210 bool is_crankshafted(); |
| 5201 inline void set_is_crankshafted(bool value); | 5211 inline void set_is_crankshafted(bool value); |
| 5202 | 5212 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5261 // cache is passed to the stub. | 5271 // cache is passed to the stub. |
| 5262 inline bool has_function_cache(); | 5272 inline bool has_function_cache(); |
| 5263 inline void set_has_function_cache(bool flag); | 5273 inline void set_has_function_cache(bool flag); |
| 5264 | 5274 |
| 5265 | 5275 |
| 5266 // [marked_for_deoptimization]: For kind OPTIMIZED_FUNCTION tells whether | 5276 // [marked_for_deoptimization]: For kind OPTIMIZED_FUNCTION tells whether |
| 5267 // the code is going to be deoptimized because of dead embedded maps. | 5277 // the code is going to be deoptimized because of dead embedded maps. |
| 5268 inline bool marked_for_deoptimization(); | 5278 inline bool marked_for_deoptimization(); |
| 5269 inline void set_marked_for_deoptimization(bool flag); | 5279 inline void set_marked_for_deoptimization(bool flag); |
| 5270 | 5280 |
| 5281 // [constant_pool]: The constant pool for this function. |
| 5282 inline ConstantPoolArray* constant_pool(); |
| 5283 inline void set_constant_pool(Object* constant_pool); |
| 5284 |
| 5271 // Get the safepoint entry for the given pc. | 5285 // Get the safepoint entry for the given pc. |
| 5272 SafepointEntry GetSafepointEntry(Address pc); | 5286 SafepointEntry GetSafepointEntry(Address pc); |
| 5273 | 5287 |
| 5274 // Find an object in a stub with a specified map | 5288 // Find an object in a stub with a specified map |
| 5275 Object* FindNthObject(int n, Map* match_map); | 5289 Object* FindNthObject(int n, Map* match_map); |
| 5276 void ReplaceNthObject(int n, Map* match_map, Object* replace_with); | 5290 void ReplaceNthObject(int n, Map* match_map, Object* replace_with); |
| 5277 | 5291 |
| 5292 // Find the first allocation site in an IC stub. |
| 5293 AllocationSite* FindFirstAllocationSite(); |
| 5294 |
| 5278 // Find the first map in an IC stub. | 5295 // Find the first map in an IC stub. |
| 5279 Map* FindFirstMap(); | 5296 Map* FindFirstMap(); |
| 5280 void FindAllMaps(MapHandleList* maps); | 5297 void FindAllMaps(MapHandleList* maps); |
| 5281 void FindAllTypes(TypeHandleList* types); | 5298 void FindAllTypes(TypeHandleList* types); |
| 5282 void ReplaceFirstMap(Map* replace); | 5299 void ReplaceFirstMap(Map* replace); |
| 5283 | 5300 |
| 5284 // Find the first handler in an IC stub. | 5301 // Find the first handler in an IC stub. |
| 5285 Code* FindFirstHandler(); | 5302 Code* FindFirstHandler(); |
| 5286 | 5303 |
| 5287 // Find |length| handlers and put them into |code_list|. Returns false if not | 5304 // Find |length| handlers and put them into |code_list|. Returns false if not |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5390 | 5407 |
| 5391 DECLARE_PRINTER(Code) | 5408 DECLARE_PRINTER(Code) |
| 5392 DECLARE_VERIFIER(Code) | 5409 DECLARE_VERIFIER(Code) |
| 5393 | 5410 |
| 5394 void ClearInlineCaches(); | 5411 void ClearInlineCaches(); |
| 5395 void ClearInlineCaches(Kind kind); | 5412 void ClearInlineCaches(Kind kind); |
| 5396 | 5413 |
| 5397 void ClearTypeFeedbackCells(Heap* heap); | 5414 void ClearTypeFeedbackCells(Heap* heap); |
| 5398 | 5415 |
| 5399 BailoutId TranslatePcOffsetToAstId(uint32_t pc_offset); | 5416 BailoutId TranslatePcOffsetToAstId(uint32_t pc_offset); |
| 5417 uint32_t TranslateAstIdToPcOffset(BailoutId ast_id); |
| 5400 | 5418 |
| 5401 #define DECLARE_CODE_AGE_ENUM(X) k##X##CodeAge, | 5419 #define DECLARE_CODE_AGE_ENUM(X) k##X##CodeAge, |
| 5402 enum Age { | 5420 enum Age { |
| 5403 kNotExecutedCodeAge = -2, | 5421 kNotExecutedCodeAge = -2, |
| 5404 kExecutedOnceCodeAge = -1, | 5422 kExecutedOnceCodeAge = -1, |
| 5405 kNoAgeCodeAge = 0, | 5423 kNoAgeCodeAge = 0, |
| 5406 CODE_AGE_LIST(DECLARE_CODE_AGE_ENUM) | 5424 CODE_AGE_LIST(DECLARE_CODE_AGE_ENUM) |
| 5407 kAfterLastCodeAge, | 5425 kAfterLastCodeAge, |
| 5408 kFirstCodeAge = kNotExecutedCodeAge, | 5426 kFirstCodeAge = kNotExecutedCodeAge, |
| 5409 kLastCodeAge = kAfterLastCodeAge - 1, | 5427 kLastCodeAge = kAfterLastCodeAge - 1, |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5454 static const int kNextCodeLinkOffset = kTypeFeedbackInfoOffset; // Shared. | 5472 static const int kNextCodeLinkOffset = kTypeFeedbackInfoOffset; // Shared. |
| 5455 static const int kGCMetadataOffset = kTypeFeedbackInfoOffset + kPointerSize; | 5473 static const int kGCMetadataOffset = kTypeFeedbackInfoOffset + kPointerSize; |
| 5456 static const int kICAgeOffset = | 5474 static const int kICAgeOffset = |
| 5457 kGCMetadataOffset + kPointerSize; | 5475 kGCMetadataOffset + kPointerSize; |
| 5458 static const int kFlagsOffset = kICAgeOffset + kIntSize; | 5476 static const int kFlagsOffset = kICAgeOffset + kIntSize; |
| 5459 static const int kKindSpecificFlags1Offset = kFlagsOffset + kIntSize; | 5477 static const int kKindSpecificFlags1Offset = kFlagsOffset + kIntSize; |
| 5460 static const int kKindSpecificFlags2Offset = | 5478 static const int kKindSpecificFlags2Offset = |
| 5461 kKindSpecificFlags1Offset + kIntSize; | 5479 kKindSpecificFlags1Offset + kIntSize; |
| 5462 // Note: We might be able to squeeze this into the flags above. | 5480 // Note: We might be able to squeeze this into the flags above. |
| 5463 static const int kPrologueOffset = kKindSpecificFlags2Offset + kIntSize; | 5481 static const int kPrologueOffset = kKindSpecificFlags2Offset + kIntSize; |
| 5482 static const int kConstantPoolOffset = kPrologueOffset + kPointerSize; |
| 5464 | 5483 |
| 5465 static const int kHeaderPaddingStart = kPrologueOffset + kIntSize; | 5484 static const int kHeaderPaddingStart = kConstantPoolOffset + kIntSize; |
| 5466 | 5485 |
| 5467 // Add padding to align the instruction start following right after | 5486 // Add padding to align the instruction start following right after |
| 5468 // the Code object header. | 5487 // the Code object header. |
| 5469 static const int kHeaderSize = | 5488 static const int kHeaderSize = |
| 5470 (kHeaderPaddingStart + kCodeAlignmentMask) & ~kCodeAlignmentMask; | 5489 (kHeaderPaddingStart + kCodeAlignmentMask) & ~kCodeAlignmentMask; |
| 5471 | 5490 |
| 5472 // Byte offsets within kKindSpecificFlags1Offset. | 5491 // Byte offsets within kKindSpecificFlags1Offset. |
| 5473 static const int kOptimizableOffset = kKindSpecificFlags1Offset; | 5492 static const int kOptimizableOffset = kKindSpecificFlags1Offset; |
| 5474 static const int kCheckTypeOffset = kKindSpecificFlags1Offset; | 5493 static const int kCheckTypeOffset = kKindSpecificFlags1Offset; |
| 5475 | 5494 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5518 | 5537 |
| 5519 // KindSpecificFlags2 layout (ALL) | 5538 // KindSpecificFlags2 layout (ALL) |
| 5520 static const int kIsCrankshaftedBit = 0; | 5539 static const int kIsCrankshaftedBit = 0; |
| 5521 class IsCrankshaftedField: public BitField<bool, | 5540 class IsCrankshaftedField: public BitField<bool, |
| 5522 kIsCrankshaftedBit, 1> {}; // NOLINT | 5541 kIsCrankshaftedBit, 1> {}; // NOLINT |
| 5523 | 5542 |
| 5524 // KindSpecificFlags2 layout (STUB and OPTIMIZED_FUNCTION) | 5543 // KindSpecificFlags2 layout (STUB and OPTIMIZED_FUNCTION) |
| 5525 static const int kStubMajorKeyFirstBit = kIsCrankshaftedBit + 1; | 5544 static const int kStubMajorKeyFirstBit = kIsCrankshaftedBit + 1; |
| 5526 static const int kSafepointTableOffsetFirstBit = | 5545 static const int kSafepointTableOffsetFirstBit = |
| 5527 kStubMajorKeyFirstBit + kStubMajorKeyBits; | 5546 kStubMajorKeyFirstBit + kStubMajorKeyBits; |
| 5528 static const int kSafepointTableOffsetBitCount = 25; | 5547 static const int kSafepointTableOffsetBitCount = 24; |
| 5529 | 5548 |
| 5530 STATIC_ASSERT(kStubMajorKeyFirstBit + kStubMajorKeyBits <= 32); | 5549 STATIC_ASSERT(kStubMajorKeyFirstBit + kStubMajorKeyBits <= 32); |
| 5531 STATIC_ASSERT(kSafepointTableOffsetFirstBit + | 5550 STATIC_ASSERT(kSafepointTableOffsetFirstBit + |
| 5532 kSafepointTableOffsetBitCount <= 32); | 5551 kSafepointTableOffsetBitCount <= 32); |
| 5533 STATIC_ASSERT(1 + kStubMajorKeyBits + | 5552 STATIC_ASSERT(1 + kStubMajorKeyBits + |
| 5534 kSafepointTableOffsetBitCount <= 32); | 5553 kSafepointTableOffsetBitCount <= 32); |
| 5535 | 5554 |
| 5536 class SafepointTableOffsetField: public BitField<int, | 5555 class SafepointTableOffsetField: public BitField<int, |
| 5537 kSafepointTableOffsetFirstBit, | 5556 kSafepointTableOffsetFirstBit, |
| 5538 kSafepointTableOffsetBitCount> {}; // NOLINT | 5557 kSafepointTableOffsetBitCount> {}; // NOLINT |
| (...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6072 inline bool is_stable(); | 6091 inline bool is_stable(); |
| 6073 inline void set_migration_target(bool value); | 6092 inline void set_migration_target(bool value); |
| 6074 inline bool is_migration_target(); | 6093 inline bool is_migration_target(); |
| 6075 inline void deprecate(); | 6094 inline void deprecate(); |
| 6076 inline bool is_deprecated(); | 6095 inline bool is_deprecated(); |
| 6077 inline bool CanBeDeprecated(); | 6096 inline bool CanBeDeprecated(); |
| 6078 // Returns a non-deprecated version of the input. If the input was not | 6097 // Returns a non-deprecated version of the input. If the input was not |
| 6079 // deprecated, it is directly returned. Otherwise, the non-deprecated version | 6098 // deprecated, it is directly returned. Otherwise, the non-deprecated version |
| 6080 // is found by re-transitioning from the root of the transition tree using the | 6099 // is found by re-transitioning from the root of the transition tree using the |
| 6081 // descriptor array of the map. Returns NULL if no updated map is found. | 6100 // descriptor array of the map. Returns NULL if no updated map is found. |
| 6082 Map* CurrentMapForDeprecated(); | 6101 // This method also applies any pending migrations along the prototype chain. |
| 6102 static Handle<Map> CurrentMapForDeprecated(Handle<Map> map); |
| 6103 // Same as above, but does not touch the prototype chain. |
| 6104 static Handle<Map> CurrentMapForDeprecatedInternal(Handle<Map> map); |
| 6083 | 6105 |
| 6084 static Handle<Map> RawCopy(Handle<Map> map, int instance_size); | 6106 static Handle<Map> RawCopy(Handle<Map> map, int instance_size); |
| 6085 MUST_USE_RESULT MaybeObject* RawCopy(int instance_size); | 6107 MUST_USE_RESULT MaybeObject* RawCopy(int instance_size); |
| 6086 MUST_USE_RESULT MaybeObject* CopyWithPreallocatedFieldDescriptors(); | 6108 MUST_USE_RESULT MaybeObject* CopyWithPreallocatedFieldDescriptors(); |
| 6087 static Handle<Map> CopyDropDescriptors(Handle<Map> map); | 6109 static Handle<Map> CopyDropDescriptors(Handle<Map> map); |
| 6088 MUST_USE_RESULT MaybeObject* CopyDropDescriptors(); | 6110 MUST_USE_RESULT MaybeObject* CopyDropDescriptors(); |
| 6089 static Handle<Map> CopyReplaceDescriptors(Handle<Map> map, | 6111 static Handle<Map> CopyReplaceDescriptors(Handle<Map> map, |
| 6090 Handle<DescriptorArray> descriptors, | 6112 Handle<DescriptorArray> descriptors, |
| 6091 TransitionFlag flag, | 6113 TransitionFlag flag, |
| 6092 Handle<Name> name); | 6114 Handle<Name> name); |
| (...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6562 DECL_ACCESSORS(name, Object) | 6584 DECL_ACCESSORS(name, Object) |
| 6563 | 6585 |
| 6564 // [code]: Function code. | 6586 // [code]: Function code. |
| 6565 DECL_ACCESSORS(code, Code) | 6587 DECL_ACCESSORS(code, Code) |
| 6566 inline void ReplaceCode(Code* code); | 6588 inline void ReplaceCode(Code* code); |
| 6567 | 6589 |
| 6568 // [optimized_code_map]: Map from native context to optimized code | 6590 // [optimized_code_map]: Map from native context to optimized code |
| 6569 // and a shared literals array or Smi(0) if none. | 6591 // and a shared literals array or Smi(0) if none. |
| 6570 DECL_ACCESSORS(optimized_code_map, Object) | 6592 DECL_ACCESSORS(optimized_code_map, Object) |
| 6571 | 6593 |
| 6572 // Returns index i of the entry with the specified context. At position | 6594 // Returns index i of the entry with the specified context and OSR entry. |
| 6573 // i - 1 is the context, position i the code, and i + 1 the literals array. | 6595 // At position i - 1 is the context, position i the code, and i + 1 the |
| 6574 // Returns -1 when no matching entry is found. | 6596 // literals array. Returns -1 when no matching entry is found. |
| 6575 int SearchOptimizedCodeMap(Context* native_context); | 6597 int SearchOptimizedCodeMap(Context* native_context, BailoutId osr_ast_id); |
| 6576 | 6598 |
| 6577 // Installs optimized code from the code map on the given closure. The | 6599 // Installs optimized code from the code map on the given closure. The |
| 6578 // index has to be consistent with a search result as defined above. | 6600 // index has to be consistent with a search result as defined above. |
| 6579 void InstallFromOptimizedCodeMap(JSFunction* function, int index); | 6601 FixedArray* GetLiteralsFromOptimizedCodeMap(int index); |
| 6602 |
| 6603 Code* GetCodeFromOptimizedCodeMap(int index); |
| 6580 | 6604 |
| 6581 // Clear optimized code map. | 6605 // Clear optimized code map. |
| 6582 void ClearOptimizedCodeMap(); | 6606 void ClearOptimizedCodeMap(); |
| 6583 | 6607 |
| 6584 // Removed a specific optimized code object from the optimized code map. | 6608 // Removed a specific optimized code object from the optimized code map. |
| 6585 void EvictFromOptimizedCodeMap(Code* optimized_code, const char* reason); | 6609 void EvictFromOptimizedCodeMap(Code* optimized_code, const char* reason); |
| 6586 | 6610 |
| 6587 // Trims the optimized code map after entries have been removed. | 6611 // Trims the optimized code map after entries have been removed. |
| 6588 void TrimOptimizedCodeMap(int shrink_by); | 6612 void TrimOptimizedCodeMap(int shrink_by); |
| 6589 | 6613 |
| 6590 // Add a new entry to the optimized code map. | 6614 // Add a new entry to the optimized code map. |
| 6591 MUST_USE_RESULT MaybeObject* AddToOptimizedCodeMap(Context* native_context, | 6615 MUST_USE_RESULT MaybeObject* AddToOptimizedCodeMap(Context* native_context, |
| 6592 Code* code, | 6616 Code* code, |
| 6593 FixedArray* literals); | 6617 FixedArray* literals, |
| 6618 BailoutId osr_ast_id); |
| 6594 static void AddToOptimizedCodeMap(Handle<SharedFunctionInfo> shared, | 6619 static void AddToOptimizedCodeMap(Handle<SharedFunctionInfo> shared, |
| 6595 Handle<Context> native_context, | 6620 Handle<Context> native_context, |
| 6596 Handle<Code> code, | 6621 Handle<Code> code, |
| 6597 Handle<FixedArray> literals); | 6622 Handle<FixedArray> literals, |
| 6623 BailoutId osr_ast_id); |
| 6598 | 6624 |
| 6599 // Layout description of the optimized code map. | 6625 // Layout description of the optimized code map. |
| 6600 static const int kNextMapIndex = 0; | 6626 static const int kNextMapIndex = 0; |
| 6601 static const int kEntriesStart = 1; | 6627 static const int kEntriesStart = 1; |
| 6602 static const int kEntryLength = 3; | 6628 static const int kContextOffset = 0; |
| 6603 static const int kFirstContextSlot = FixedArray::kHeaderSize + kPointerSize; | 6629 static const int kCachedCodeOffset = 1; |
| 6604 static const int kFirstCodeSlot = FixedArray::kHeaderSize + 2 * kPointerSize; | 6630 static const int kLiteralsOffset = 2; |
| 6631 static const int kOsrAstIdOffset = 3; |
| 6632 static const int kEntryLength = 4; |
| 6633 static const int kFirstContextSlot = FixedArray::kHeaderSize + |
| 6634 (kEntriesStart + kContextOffset) * kPointerSize; |
| 6635 static const int kFirstCodeSlot = FixedArray::kHeaderSize + |
| 6636 (kEntriesStart + kCachedCodeOffset) * kPointerSize; |
| 6637 static const int kFirstOsrAstIdSlot = FixedArray::kHeaderSize + |
| 6638 (kEntriesStart + kOsrAstIdOffset) * kPointerSize; |
| 6605 static const int kSecondEntryIndex = kEntryLength + kEntriesStart; | 6639 static const int kSecondEntryIndex = kEntryLength + kEntriesStart; |
| 6606 static const int kInitialLength = kEntriesStart + kEntryLength; | 6640 static const int kInitialLength = kEntriesStart + kEntryLength; |
| 6607 | 6641 |
| 6608 // [scope_info]: Scope info. | 6642 // [scope_info]: Scope info. |
| 6609 DECL_ACCESSORS(scope_info, ScopeInfo) | 6643 DECL_ACCESSORS(scope_info, ScopeInfo) |
| 6610 | 6644 |
| 6611 // [construct stub]: Code stub for constructing instances of this function. | 6645 // [construct stub]: Code stub for constructing instances of this function. |
| 6612 DECL_ACCESSORS(construct_stub, Code) | 6646 DECL_ACCESSORS(construct_stub, Code) |
| 6613 | 6647 |
| 6614 // Returns if this function has been compiled to native code yet. | 6648 // Returns if this function has been compiled to native code yet. |
| (...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6953 int CalculateInObjectProperties(); | 6987 int CalculateInObjectProperties(); |
| 6954 | 6988 |
| 6955 // Dispatched behavior. | 6989 // Dispatched behavior. |
| 6956 // Set max_length to -1 for unlimited length. | 6990 // Set max_length to -1 for unlimited length. |
| 6957 void SourceCodePrint(StringStream* accumulator, int max_length); | 6991 void SourceCodePrint(StringStream* accumulator, int max_length); |
| 6958 DECLARE_PRINTER(SharedFunctionInfo) | 6992 DECLARE_PRINTER(SharedFunctionInfo) |
| 6959 DECLARE_VERIFIER(SharedFunctionInfo) | 6993 DECLARE_VERIFIER(SharedFunctionInfo) |
| 6960 | 6994 |
| 6961 void ResetForNewContext(int new_ic_age); | 6995 void ResetForNewContext(int new_ic_age); |
| 6962 | 6996 |
| 6963 // Helper to compile the shared code. Returns true on success, false on | |
| 6964 // failure (e.g., stack overflow during compilation). This is only used by | |
| 6965 // the debugger, it is not possible to compile without a context otherwise. | |
| 6966 static bool CompileLazy(Handle<SharedFunctionInfo> shared, | |
| 6967 ClearExceptionFlag flag); | |
| 6968 | |
| 6969 // Casting. | 6997 // Casting. |
| 6970 static inline SharedFunctionInfo* cast(Object* obj); | 6998 static inline SharedFunctionInfo* cast(Object* obj); |
| 6971 | 6999 |
| 6972 // Constants. | 7000 // Constants. |
| 6973 static const int kDontAdaptArgumentsSentinel = -1; | 7001 static const int kDontAdaptArgumentsSentinel = -1; |
| 6974 | 7002 |
| 6975 // Layout description. | 7003 // Layout description. |
| 6976 // Pointer fields. | 7004 // Pointer fields. |
| 6977 static const int kNameOffset = HeapObject::kHeaderSize; | 7005 static const int kNameOffset = HeapObject::kHeaderSize; |
| 6978 static const int kCodeOffset = kNameOffset + kPointerSize; | 7006 static const int kCodeOffset = kNameOffset + kPointerSize; |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7289 inline bool NeedsArgumentsAdaption(); | 7317 inline bool NeedsArgumentsAdaption(); |
| 7290 | 7318 |
| 7291 // Tells whether or not this function has been optimized. | 7319 // Tells whether or not this function has been optimized. |
| 7292 inline bool IsOptimized(); | 7320 inline bool IsOptimized(); |
| 7293 | 7321 |
| 7294 // Tells whether or not this function can be optimized. | 7322 // Tells whether or not this function can be optimized. |
| 7295 inline bool IsOptimizable(); | 7323 inline bool IsOptimizable(); |
| 7296 | 7324 |
| 7297 // Mark this function for lazy recompilation. The function will be | 7325 // Mark this function for lazy recompilation. The function will be |
| 7298 // recompiled the next time it is executed. | 7326 // recompiled the next time it is executed. |
| 7299 void MarkForLazyRecompilation(); | 7327 void MarkForOptimization(); |
| 7300 void MarkForConcurrentRecompilation(); | 7328 void MarkForConcurrentOptimization(); |
| 7301 void MarkInRecompileQueue(); | 7329 void MarkInOptimizationQueue(); |
| 7302 | 7330 |
| 7303 // Helpers to compile this function. Returns true on success, false on | |
| 7304 // failure (e.g., stack overflow during compilation). | |
| 7305 static bool EnsureCompiled(Handle<JSFunction> function, | |
| 7306 ClearExceptionFlag flag); | |
| 7307 static bool CompileLazy(Handle<JSFunction> function, | |
| 7308 ClearExceptionFlag flag); | |
| 7309 static Handle<Code> CompileOsr(Handle<JSFunction> function, | |
| 7310 BailoutId osr_ast_id, | |
| 7311 ClearExceptionFlag flag); | |
| 7312 static bool CompileOptimized(Handle<JSFunction> function, | 7331 static bool CompileOptimized(Handle<JSFunction> function, |
| 7313 ClearExceptionFlag flag); | 7332 ClearExceptionFlag flag); |
| 7314 | 7333 |
| 7315 // Tells whether or not the function is already marked for lazy | 7334 // Tells whether or not the function is already marked for lazy |
| 7316 // recompilation. | 7335 // recompilation. |
| 7317 inline bool IsMarkedForLazyRecompilation(); | 7336 inline bool IsMarkedForOptimization(); |
| 7318 inline bool IsMarkedForConcurrentRecompilation(); | 7337 inline bool IsMarkedForConcurrentOptimization(); |
| 7319 | 7338 |
| 7320 // Tells whether or not the function is on the concurrent recompilation queue. | 7339 // Tells whether or not the function is on the concurrent recompilation queue. |
| 7321 inline bool IsInRecompileQueue(); | 7340 inline bool IsInOptimizationQueue(); |
| 7322 | 7341 |
| 7323 // [literals_or_bindings]: Fixed array holding either | 7342 // [literals_or_bindings]: Fixed array holding either |
| 7324 // the materialized literals or the bindings of a bound function. | 7343 // the materialized literals or the bindings of a bound function. |
| 7325 // | 7344 // |
| 7326 // If the function contains object, regexp or array literals, the | 7345 // If the function contains object, regexp or array literals, the |
| 7327 // literals array prefix contains the object, regexp, and array | 7346 // literals array prefix contains the object, regexp, and array |
| 7328 // function to be used when creating these literals. This is | 7347 // function to be used when creating these literals. This is |
| 7329 // necessary so that we do not dynamically lookup the object, regexp | 7348 // necessary so that we do not dynamically lookup the object, regexp |
| 7330 // or array functions. Performing a dynamic lookup, we might end up | 7349 // or array functions. Performing a dynamic lookup, we might end up |
| 7331 // using the functions from a new context that we should not have | 7350 // using the functions from a new context that we should not have |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7446 | 7465 |
| 7447 class JSGlobalProxy : public JSObject { | 7466 class JSGlobalProxy : public JSObject { |
| 7448 public: | 7467 public: |
| 7449 // [native_context]: the owner native context of this global proxy object. | 7468 // [native_context]: the owner native context of this global proxy object. |
| 7450 // It is null value if this object is not used by any context. | 7469 // It is null value if this object is not used by any context. |
| 7451 DECL_ACCESSORS(native_context, Object) | 7470 DECL_ACCESSORS(native_context, Object) |
| 7452 | 7471 |
| 7453 // Casting. | 7472 // Casting. |
| 7454 static inline JSGlobalProxy* cast(Object* obj); | 7473 static inline JSGlobalProxy* cast(Object* obj); |
| 7455 | 7474 |
| 7475 inline bool IsDetachedFrom(GlobalObject* global); |
| 7476 |
| 7456 // Dispatched behavior. | 7477 // Dispatched behavior. |
| 7457 DECLARE_PRINTER(JSGlobalProxy) | 7478 DECLARE_PRINTER(JSGlobalProxy) |
| 7458 DECLARE_VERIFIER(JSGlobalProxy) | 7479 DECLARE_VERIFIER(JSGlobalProxy) |
| 7459 | 7480 |
| 7460 // Layout description. | 7481 // Layout description. |
| 7461 static const int kNativeContextOffset = JSObject::kHeaderSize; | 7482 static const int kNativeContextOffset = JSObject::kHeaderSize; |
| 7462 static const int kSize = kNativeContextOffset + kPointerSize; | 7483 static const int kSize = kNativeContextOffset + kPointerSize; |
| 7463 | 7484 |
| 7464 private: | 7485 private: |
| 7465 DISALLOW_IMPLICIT_CONSTRUCTORS(JSGlobalProxy); | 7486 DISALLOW_IMPLICIT_CONSTRUCTORS(JSGlobalProxy); |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7515 // JavaScript global object. | 7536 // JavaScript global object. |
| 7516 class JSGlobalObject: public GlobalObject { | 7537 class JSGlobalObject: public GlobalObject { |
| 7517 public: | 7538 public: |
| 7518 // Casting. | 7539 // Casting. |
| 7519 static inline JSGlobalObject* cast(Object* obj); | 7540 static inline JSGlobalObject* cast(Object* obj); |
| 7520 | 7541 |
| 7521 // Ensure that the global object has a cell for the given property name. | 7542 // Ensure that the global object has a cell for the given property name. |
| 7522 static Handle<PropertyCell> EnsurePropertyCell(Handle<JSGlobalObject> global, | 7543 static Handle<PropertyCell> EnsurePropertyCell(Handle<JSGlobalObject> global, |
| 7523 Handle<Name> name); | 7544 Handle<Name> name); |
| 7524 | 7545 |
| 7546 inline bool IsDetached(); |
| 7547 |
| 7525 // Dispatched behavior. | 7548 // Dispatched behavior. |
| 7526 DECLARE_PRINTER(JSGlobalObject) | 7549 DECLARE_PRINTER(JSGlobalObject) |
| 7527 DECLARE_VERIFIER(JSGlobalObject) | 7550 DECLARE_VERIFIER(JSGlobalObject) |
| 7528 | 7551 |
| 7529 // Layout description. | 7552 // Layout description. |
| 7530 static const int kSize = GlobalObject::kHeaderSize; | 7553 static const int kSize = GlobalObject::kHeaderSize; |
| 7531 | 7554 |
| 7532 private: | 7555 private: |
| 7533 DISALLOW_IMPLICIT_CONSTRUCTORS(JSGlobalObject); | 7556 DISALLOW_IMPLICIT_CONSTRUCTORS(JSGlobalObject); |
| 7534 }; | 7557 }; |
| (...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8161 | 8184 |
| 8162 inline void Initialize(); | 8185 inline void Initialize(); |
| 8163 | 8186 |
| 8164 // This method is expensive, it should only be called for reporting. | 8187 // This method is expensive, it should only be called for reporting. |
| 8165 bool IsNestedSite(); | 8188 bool IsNestedSite(); |
| 8166 | 8189 |
| 8167 class ElementsKindBits: public BitField<ElementsKind, 0, 15> {}; | 8190 class ElementsKindBits: public BitField<ElementsKind, 0, 15> {}; |
| 8168 class UnusedBits: public BitField<int, 15, 14> {}; | 8191 class UnusedBits: public BitField<int, 15, 14> {}; |
| 8169 class DoNotInlineBit: public BitField<bool, 29, 1> {}; | 8192 class DoNotInlineBit: public BitField<bool, 29, 1> {}; |
| 8170 | 8193 |
| 8171 inline void IncrementMementoFoundCount(); | 8194 // Increments the mementos found counter and returns true when the first |
| 8195 // memento was found for a given allocation site. |
| 8196 inline bool IncrementMementoFoundCount(); |
| 8172 | 8197 |
| 8173 inline void IncrementMementoCreateCount(); | 8198 inline void IncrementMementoCreateCount(); |
| 8174 | 8199 |
| 8175 PretenureFlag GetPretenureMode() { | 8200 PretenureFlag GetPretenureMode() { |
| 8176 int mode = pretenure_decision()->value(); | 8201 int mode = pretenure_decision()->value(); |
| 8177 // Zombie objects "decide" to be untenured. | 8202 // Zombie objects "decide" to be untenured. |
| 8178 return (mode == kTenure) ? TENURED : NOT_TENURED; | 8203 return (mode == kTenure) ? TENURED : NOT_TENURED; |
| 8179 } | 8204 } |
| 8180 | 8205 |
| 8181 // The pretenuring decision is made during gc, and the zombie state allows | 8206 // The pretenuring decision is made during gc, and the zombie state allows |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8284 } | 8309 } |
| 8285 AllocationSite* GetAllocationSite() { | 8310 AllocationSite* GetAllocationSite() { |
| 8286 ASSERT(IsValid()); | 8311 ASSERT(IsValid()); |
| 8287 return AllocationSite::cast(allocation_site()); | 8312 return AllocationSite::cast(allocation_site()); |
| 8288 } | 8313 } |
| 8289 | 8314 |
| 8290 DECLARE_PRINTER(AllocationMemento) | 8315 DECLARE_PRINTER(AllocationMemento) |
| 8291 DECLARE_VERIFIER(AllocationMemento) | 8316 DECLARE_VERIFIER(AllocationMemento) |
| 8292 | 8317 |
| 8293 // Returns NULL if no AllocationMemento is available for object. | 8318 // Returns NULL if no AllocationMemento is available for object. |
| 8294 static AllocationMemento* FindForJSObject(JSObject* object, | 8319 static AllocationMemento* FindForHeapObject(HeapObject* object, |
| 8295 bool in_GC = false); | 8320 bool in_GC = false); |
| 8296 static inline AllocationMemento* cast(Object* obj); | 8321 static inline AllocationMemento* cast(Object* obj); |
| 8297 | 8322 |
| 8298 private: | 8323 private: |
| 8299 DISALLOW_IMPLICIT_CONSTRUCTORS(AllocationMemento); | 8324 DISALLOW_IMPLICIT_CONSTRUCTORS(AllocationMemento); |
| 8300 }; | 8325 }; |
| 8301 | 8326 |
| 8302 | 8327 |
| 8303 // Representation of a slow alias as part of a non-strict arguments objects. | 8328 // Representation of a slow alias as part of a non-strict arguments objects. |
| 8304 // For fast aliases (if HasNonStrictArgumentsElements()): | 8329 // For fast aliases (if HasNonStrictArgumentsElements()): |
| 8305 // - the parameter map contains an index into the context | 8330 // - the parameter map contains an index into the context |
| (...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8670 FlatContent GetFlatContent(); | 8695 FlatContent GetFlatContent(); |
| 8671 | 8696 |
| 8672 // Returns the parent of a sliced string or first part of a flat cons string. | 8697 // Returns the parent of a sliced string or first part of a flat cons string. |
| 8673 // Requires: StringShape(this).IsIndirect() && this->IsFlat() | 8698 // Requires: StringShape(this).IsIndirect() && this->IsFlat() |
| 8674 inline String* GetUnderlying(); | 8699 inline String* GetUnderlying(); |
| 8675 | 8700 |
| 8676 // Mark the string as an undetectable object. It only applies to | 8701 // Mark the string as an undetectable object. It only applies to |
| 8677 // ASCII and two byte string types. | 8702 // ASCII and two byte string types. |
| 8678 bool MarkAsUndetectable(); | 8703 bool MarkAsUndetectable(); |
| 8679 | 8704 |
| 8680 // Return a substring. | |
| 8681 MUST_USE_RESULT MaybeObject* SubString(int from, | |
| 8682 int to, | |
| 8683 PretenureFlag pretenure = NOT_TENURED); | |
| 8684 | |
| 8685 // String equality operations. | 8705 // String equality operations. |
| 8686 inline bool Equals(String* other); | 8706 inline bool Equals(String* other); |
| 8687 bool IsUtf8EqualTo(Vector<const char> str, bool allow_prefix_match = false); | 8707 bool IsUtf8EqualTo(Vector<const char> str, bool allow_prefix_match = false); |
| 8688 bool IsOneByteEqualTo(Vector<const uint8_t> str); | 8708 bool IsOneByteEqualTo(Vector<const uint8_t> str); |
| 8689 bool IsTwoByteEqualTo(Vector<const uc16> str); | 8709 bool IsTwoByteEqualTo(Vector<const uc16> str); |
| 8690 | 8710 |
| 8691 // Return a UTF8 representation of the string. The string is null | 8711 // Return a UTF8 representation of the string. The string is null |
| 8692 // terminated but may optionally contain nulls. Length is returned | 8712 // terminated but may optionally contain nulls. Length is returned |
| 8693 // in length_output if length_output is not a null pointer The string | 8713 // in length_output if length_output is not a null pointer The string |
| 8694 // should be nearly flat, otherwise the performance of this method may | 8714 // should be nearly flat, otherwise the performance of this method may |
| (...skipping 1952 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10647 } else { | 10667 } else { |
| 10648 value &= ~(1 << bit_position); | 10668 value &= ~(1 << bit_position); |
| 10649 } | 10669 } |
| 10650 return value; | 10670 return value; |
| 10651 } | 10671 } |
| 10652 }; | 10672 }; |
| 10653 | 10673 |
| 10654 } } // namespace v8::internal | 10674 } } // namespace v8::internal |
| 10655 | 10675 |
| 10656 #endif // V8_OBJECTS_H_ | 10676 #endif // V8_OBJECTS_H_ |
| OLD | NEW |