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 1037 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1048 V(PropertyCell) \ | 1048 V(PropertyCell) \ |
1049 V(ObjectHashTable) \ | 1049 V(ObjectHashTable) \ |
1050 V(WeakHashTable) | 1050 V(WeakHashTable) |
1051 | 1051 |
1052 | 1052 |
1053 #define ERROR_MESSAGES_LIST(V) \ | 1053 #define ERROR_MESSAGES_LIST(V) \ |
1054 V(kNoReason, "no reason") \ | 1054 V(kNoReason, "no reason") \ |
1055 \ | 1055 \ |
1056 V(k32BitValueInRegisterIsNotZeroExtended, \ | 1056 V(k32BitValueInRegisterIsNotZeroExtended, \ |
1057 "32 bit value in register is not zero-extended") \ | 1057 "32 bit value in register is not zero-extended") \ |
1058 V(kAlignmentMarkerExpected, "alignment marker expected") \ | 1058 V(kAlignmentMarkerExpected, "Alignment marker expected") \ |
1059 V(kAllocationIsNotDoubleAligned, "Allocation is not double aligned") \ | 1059 V(kAllocationIsNotDoubleAligned, "Allocation is not double aligned") \ |
1060 V(kAPICallReturnedInvalidObject, "API call returned invalid object") \ | 1060 V(kAPICallReturnedInvalidObject, "API call returned invalid object") \ |
1061 V(kArgumentsObjectValueInATestContext, \ | 1061 V(kArgumentsObjectValueInATestContext, \ |
1062 "arguments object value in a test context") \ | 1062 "Arguments object value in a test context") \ |
1063 V(kArrayBoilerplateCreationFailed, "array boilerplate creation failed") \ | 1063 V(kArrayBoilerplateCreationFailed, "Array boilerplate creation failed") \ |
1064 V(kArrayIndexConstantValueTooBig, "array index constant value too big") \ | 1064 V(kArrayIndexConstantValueTooBig, "Array index constant value too big") \ |
1065 V(kAssignmentToArguments, "assignment to arguments") \ | 1065 V(kAssignmentToArguments, "Assignment to arguments") \ |
1066 V(kAssignmentToLetVariableBeforeInitialization, \ | 1066 V(kAssignmentToLetVariableBeforeInitialization, \ |
1067 "assignment to let variable before initialization") \ | 1067 "Assignment to let variable before initialization") \ |
1068 V(kAssignmentToLOOKUPVariable, "assignment to LOOKUP variable") \ | 1068 V(kAssignmentToLOOKUPVariable, "Assignment to LOOKUP variable") \ |
1069 V(kAssignmentToParameterFunctionUsesArgumentsObject, \ | 1069 V(kAssignmentToParameterFunctionUsesArgumentsObject, \ |
1070 "assignment to parameter, function uses arguments object") \ | 1070 "Assignment to parameter, function uses arguments object") \ |
1071 V(kAssignmentToParameterInArgumentsObject, \ | 1071 V(kAssignmentToParameterInArgumentsObject, \ |
1072 "assignment to parameter in arguments object") \ | 1072 "Assignment to parameter in arguments object") \ |
1073 V(kAttemptToUseUndefinedCache, "Attempt to use undefined cache") \ | 1073 V(kAttemptToUseUndefinedCache, "Attempt to use undefined cache") \ |
1074 V(kBadValueContextForArgumentsObjectValue, \ | 1074 V(kBadValueContextForArgumentsObjectValue, \ |
1075 "bad value context for arguments object value") \ | 1075 "Bad value context for arguments object value") \ |
1076 V(kBadValueContextForArgumentsValue, \ | 1076 V(kBadValueContextForArgumentsValue, \ |
1077 "bad value context for arguments value") \ | 1077 "Bad value context for arguments value") \ |
1078 V(kBailedOutDueToDependencyChange, "bailed out due to dependency change") \ | 1078 V(kBailedOutDueToDependencyChange, "Bailed out due to dependency change") \ |
1079 V(kBailoutWasNotPrepared, "bailout was not prepared") \ | 1079 V(kBailoutWasNotPrepared, "Bailout was not prepared") \ |
1080 V(kBinaryStubGenerateFloatingPointCode, \ | 1080 V(kBinaryStubGenerateFloatingPointCode, \ |
1081 "BinaryStub_GenerateFloatingPointCode") \ | 1081 "BinaryStub_GenerateFloatingPointCode") \ |
1082 V(kBothRegistersWereSmisInSelectNonSmi, \ | 1082 V(kBothRegistersWereSmisInSelectNonSmi, \ |
1083 "Both registers were smis in SelectNonSmi") \ | 1083 "Both registers were smis in SelectNonSmi") \ |
1084 V(kCallToAJavaScriptRuntimeFunction, \ | 1084 V(kCallToAJavaScriptRuntimeFunction, \ |
1085 "call to a JavaScript runtime function") \ | 1085 "Call to a JavaScript runtime function") \ |
1086 V(kCannotTranslatePositionInChangedArea, \ | 1086 V(kCannotTranslatePositionInChangedArea, \ |
1087 "Cannot translate position in changed area") \ | 1087 "Cannot translate position in changed area") \ |
1088 V(kCodeGenerationFailed, "code generation failed") \ | 1088 V(kCodeGenerationFailed, "Code generation failed") \ |
1089 V(kCodeObjectNotProperlyPatched, "code object not properly patched") \ | 1089 V(kCodeObjectNotProperlyPatched, "Code object not properly patched") \ |
1090 V(kCompoundAssignmentToLookupSlot, "compound assignment to lookup slot") \ | 1090 V(kCompoundAssignmentToLookupSlot, "Compound assignment to lookup slot") \ |
1091 V(kContextAllocatedArguments, "context-allocated arguments") \ | 1091 V(kContextAllocatedArguments, "Context-allocated arguments") \ |
1092 V(kDebuggerIsActive, "debugger is active") \ | 1092 V(kDebuggerIsActive, "Debugger is active") \ |
1093 V(kDebuggerStatement, "DebuggerStatement") \ | 1093 V(kDebuggerStatement, "DebuggerStatement") \ |
1094 V(kDeclarationInCatchContext, "Declaration in catch context") \ | 1094 V(kDeclarationInCatchContext, "Declaration in catch context") \ |
1095 V(kDeclarationInWithContext, "Declaration in with context") \ | 1095 V(kDeclarationInWithContext, "Declaration in with context") \ |
1096 V(kDefaultNaNModeNotSet, "Default NaN mode not set") \ | 1096 V(kDefaultNaNModeNotSet, "Default NaN mode not set") \ |
1097 V(kDeleteWithGlobalVariable, "delete with global variable") \ | 1097 V(kDeleteWithGlobalVariable, "Delete with global variable") \ |
1098 V(kDeleteWithNonGlobalVariable, "delete with non-global variable") \ | 1098 V(kDeleteWithNonGlobalVariable, "Delete with non-global variable") \ |
1099 V(kDestinationOfCopyNotAligned, "Destination of copy not aligned") \ | 1099 V(kDestinationOfCopyNotAligned, "Destination of copy not aligned") \ |
1100 V(kDontDeleteCellsCannotContainTheHole, \ | 1100 V(kDontDeleteCellsCannotContainTheHole, \ |
1101 "DontDelete cells can't contain the hole") \ | 1101 "DontDelete cells can't contain the hole") \ |
1102 V(kDoPushArgumentNotImplementedForDoubleType, \ | 1102 V(kDoPushArgumentNotImplementedForDoubleType, \ |
1103 "DoPushArgument not implemented for double type") \ | 1103 "DoPushArgument not implemented for double type") \ |
1104 V(kEmitLoadRegisterUnsupportedDoubleImmediate, \ | 1104 V(kEmitLoadRegisterUnsupportedDoubleImmediate, \ |
1105 "EmitLoadRegister: Unsupported double immediate") \ | 1105 "EmitLoadRegister: Unsupported double immediate") \ |
1106 V(kEval, "eval") \ | 1106 V(kEval, "Eval") \ |
1107 V(kExpected0AsASmiSentinel, "Expected 0 as a Smi sentinel") \ | 1107 V(kExpected0AsASmiSentinel, "Expected 0 as a Smi sentinel") \ |
1108 V(kExpectedAlignmentMarker, "expected alignment marker") \ | 1108 V(kExpectedAlignmentMarker, "Expected alignment marker") \ |
1109 V(kExpectedAllocationSiteInCell, \ | 1109 V(kExpectedAllocationSiteInCell, \ |
1110 "Expected AllocationSite in property cell") \ | 1110 "Expected AllocationSite in property cell") \ |
1111 V(kExpectedPropertyCellInRegisterA2, \ | 1111 V(kExpectedPropertyCellInRegisterA2, \ |
1112 "Expected property cell in register a2") \ | 1112 "Expected property cell in register a2") \ |
1113 V(kExpectedPropertyCellInRegisterEbx, \ | 1113 V(kExpectedPropertyCellInRegisterEbx, \ |
1114 "Expected property cell in register ebx") \ | 1114 "Expected property cell in register ebx") \ |
1115 V(kExpectedPropertyCellInRegisterRbx, \ | 1115 V(kExpectedPropertyCellInRegisterRbx, \ |
1116 "Expected property cell in register rbx") \ | 1116 "Expected property cell in register rbx") \ |
1117 V(kExpectingAlignmentForCopyBytes, \ | 1117 V(kExpectingAlignmentForCopyBytes, \ |
1118 "Expecting alignment for CopyBytes") \ | 1118 "Expecting alignment for CopyBytes") \ |
1119 V(kExportDeclaration, "Export declaration") \ | 1119 V(kExportDeclaration, "Export declaration") \ |
1120 V(kExternalStringExpectedButNotFound, \ | 1120 V(kExternalStringExpectedButNotFound, \ |
1121 "external string expected, but not found") \ | 1121 "External string expected, but not found") \ |
1122 V(kFailedBailedOutLastTime, "failed/bailed out last time") \ | 1122 V(kFailedBailedOutLastTime, "Failed/bailed out last time") \ |
1123 V(kForInStatementIsNotFastCase, "ForInStatement is not fast case") \ | 1123 V(kForInStatementIsNotFastCase, "ForInStatement is not fast case") \ |
1124 V(kForInStatementOptimizationIsDisabled, \ | 1124 V(kForInStatementOptimizationIsDisabled, \ |
1125 "ForInStatement optimization is disabled") \ | 1125 "ForInStatement optimization is disabled") \ |
1126 V(kForInStatementWithNonLocalEachVariable, \ | 1126 V(kForInStatementWithNonLocalEachVariable, \ |
1127 "ForInStatement with non-local each variable") \ | 1127 "ForInStatement with non-local each variable") \ |
1128 V(kForOfStatement, "ForOfStatement") \ | 1128 V(kForOfStatement, "ForOfStatement") \ |
1129 V(kFrameIsExpectedToBeAligned, "frame is expected to be aligned") \ | 1129 V(kFrameIsExpectedToBeAligned, "Frame is expected to be aligned") \ |
1130 V(kFunctionCallsEval, "function calls eval") \ | 1130 V(kFunctionCallsEval, "Function calls eval") \ |
1131 V(kFunctionIsAGenerator, "function is a generator") \ | 1131 V(kFunctionIsAGenerator, "Function is a generator") \ |
1132 V(kFunctionWithIllegalRedeclaration, "function with illegal redeclaration") \ | 1132 V(kFunctionWithIllegalRedeclaration, "Function with illegal redeclaration") \ |
1133 V(kGeneratedCodeIsTooLarge, "Generated code is too large") \ | 1133 V(kGeneratedCodeIsTooLarge, "Generated code is too large") \ |
1134 V(kGeneratorFailedToResume, "Generator failed to resume") \ | 1134 V(kGeneratorFailedToResume, "Generator failed to resume") \ |
1135 V(kGenerator, "generator") \ | 1135 V(kGenerator, "Generator") \ |
1136 V(kGlobalFunctionsMustHaveInitialMap, \ | 1136 V(kGlobalFunctionsMustHaveInitialMap, \ |
1137 "Global functions must have initial map") \ | 1137 "Global functions must have initial map") \ |
1138 V(kHeapNumberMapRegisterClobbered, "HeapNumberMap register clobbered") \ | 1138 V(kHeapNumberMapRegisterClobbered, "HeapNumberMap register clobbered") \ |
| 1139 V(kHydrogenFilter, "Optimization disabled by filter") \ |
1139 V(kImportDeclaration, "Import declaration") \ | 1140 V(kImportDeclaration, "Import declaration") \ |
1140 V(kImproperObjectOnPrototypeChainForStore, \ | 1141 V(kImproperObjectOnPrototypeChainForStore, \ |
1141 "improper object on prototype chain for store") \ | 1142 "Improper object on prototype chain for store") \ |
1142 V(kIndexIsNegative, "Index is negative") \ | 1143 V(kIndexIsNegative, "Index is negative") \ |
1143 V(kIndexIsTooLarge, "Index is too large") \ | 1144 V(kIndexIsTooLarge, "Index is too large") \ |
1144 V(kInlinedRuntimeFunctionClassOf, "inlined runtime function: ClassOf") \ | 1145 V(kInlinedRuntimeFunctionClassOf, "Inlined runtime function: ClassOf") \ |
1145 V(kInlinedRuntimeFunctionFastAsciiArrayJoin, \ | 1146 V(kInlinedRuntimeFunctionFastAsciiArrayJoin, \ |
1146 "inlined runtime function: FastAsciiArrayJoin") \ | 1147 "Inlined runtime function: FastAsciiArrayJoin") \ |
1147 V(kInlinedRuntimeFunctionGeneratorNext, \ | 1148 V(kInlinedRuntimeFunctionGeneratorNext, \ |
1148 "inlined runtime function: GeneratorNext") \ | 1149 "Inlined runtime function: GeneratorNext") \ |
1149 V(kInlinedRuntimeFunctionGeneratorThrow, \ | 1150 V(kInlinedRuntimeFunctionGeneratorThrow, \ |
1150 "inlined runtime function: GeneratorThrow") \ | 1151 "Inlined runtime function: GeneratorThrow") \ |
1151 V(kInlinedRuntimeFunctionGetFromCache, \ | 1152 V(kInlinedRuntimeFunctionGetFromCache, \ |
1152 "inlined runtime function: GetFromCache") \ | 1153 "Inlined runtime function: GetFromCache") \ |
1153 V(kInlinedRuntimeFunctionIsNonNegativeSmi, \ | 1154 V(kInlinedRuntimeFunctionIsNonNegativeSmi, \ |
1154 "inlined runtime function: IsNonNegativeSmi") \ | 1155 "Inlined runtime function: IsNonNegativeSmi") \ |
1155 V(kInlinedRuntimeFunctionIsRegExpEquivalent, \ | 1156 V(kInlinedRuntimeFunctionIsRegExpEquivalent, \ |
1156 "inlined runtime function: IsRegExpEquivalent") \ | 1157 "Inlined runtime function: IsRegExpEquivalent") \ |
1157 V(kInlinedRuntimeFunctionIsStringWrapperSafeForDefaultValueOf, \ | 1158 V(kInlinedRuntimeFunctionIsStringWrapperSafeForDefaultValueOf, \ |
1158 "inlined runtime function: IsStringWrapperSafeForDefaultValueOf") \ | 1159 "Inlined runtime function: IsStringWrapperSafeForDefaultValueOf") \ |
1159 V(kInliningBailedOut, "inlining bailed out") \ | 1160 V(kInliningBailedOut, "Inlining bailed out") \ |
1160 V(kInputGPRIsExpectedToHaveUpper32Cleared, \ | 1161 V(kInputGPRIsExpectedToHaveUpper32Cleared, \ |
1161 "input GPR is expected to have upper32 cleared") \ | 1162 "Input GPR is expected to have upper32 cleared") \ |
1162 V(kInstanceofStubUnexpectedCallSiteCacheCheck, \ | 1163 V(kInstanceofStubUnexpectedCallSiteCacheCheck, \ |
1163 "InstanceofStub unexpected call site cache (check)") \ | 1164 "InstanceofStub unexpected call site cache (check)") \ |
1164 V(kInstanceofStubUnexpectedCallSiteCacheCmp1, \ | 1165 V(kInstanceofStubUnexpectedCallSiteCacheCmp1, \ |
1165 "InstanceofStub unexpected call site cache (cmp 1)") \ | 1166 "InstanceofStub unexpected call site cache (cmp 1)") \ |
1166 V(kInstanceofStubUnexpectedCallSiteCacheCmp2, \ | 1167 V(kInstanceofStubUnexpectedCallSiteCacheCmp2, \ |
1167 "InstanceofStub unexpected call site cache (cmp 2)") \ | 1168 "InstanceofStub unexpected call site cache (cmp 2)") \ |
1168 V(kInstanceofStubUnexpectedCallSiteCacheMov, \ | 1169 V(kInstanceofStubUnexpectedCallSiteCacheMov, \ |
1169 "InstanceofStub unexpected call site cache (mov)") \ | 1170 "InstanceofStub unexpected call site cache (mov)") \ |
1170 V(kInteger32ToSmiFieldWritingToNonSmiLocation, \ | 1171 V(kInteger32ToSmiFieldWritingToNonSmiLocation, \ |
1171 "Integer32ToSmiField writing to non-smi location") \ | 1172 "Integer32ToSmiField writing to non-smi location") \ |
1172 V(kInvalidCaptureReferenced, "Invalid capture referenced") \ | 1173 V(kInvalidCaptureReferenced, "Invalid capture referenced") \ |
1173 V(kInvalidElementsKindForInternalArrayOrInternalPackedArray, \ | 1174 V(kInvalidElementsKindForInternalArrayOrInternalPackedArray, \ |
1174 "Invalid ElementsKind for InternalArray or InternalPackedArray") \ | 1175 "Invalid ElementsKind for InternalArray or InternalPackedArray") \ |
1175 V(kInvalidHandleScopeLevel, "Invalid HandleScope level") \ | 1176 V(kInvalidHandleScopeLevel, "Invalid HandleScope level") \ |
1176 V(kInvalidLeftHandSideInAssignment, "invalid left-hand side in assignment") \ | 1177 V(kInvalidLeftHandSideInAssignment, "Invalid left-hand side in assignment") \ |
1177 V(kInvalidLhsInCompoundAssignment, "invalid lhs in compound assignment") \ | 1178 V(kInvalidLhsInCompoundAssignment, "Invalid lhs in compound assignment") \ |
1178 V(kInvalidLhsInCountOperation, "invalid lhs in count operation") \ | 1179 V(kInvalidLhsInCountOperation, "Invalid lhs in count operation") \ |
1179 V(kInvalidMinLength, "Invalid min_length") \ | 1180 V(kInvalidMinLength, "Invalid min_length") \ |
1180 V(kJSGlobalObjectNativeContextShouldBeANativeContext, \ | 1181 V(kJSGlobalObjectNativeContextShouldBeANativeContext, \ |
1181 "JSGlobalObject::native_context should be a native context") \ | 1182 "JSGlobalObject::native_context should be a native context") \ |
1182 V(kJSGlobalProxyContextShouldNotBeNull, \ | 1183 V(kJSGlobalProxyContextShouldNotBeNull, \ |
1183 "JSGlobalProxy::context() should not be null") \ | 1184 "JSGlobalProxy::context() should not be null") \ |
1184 V(kJSObjectWithFastElementsMapHasSlowElements, \ | 1185 V(kJSObjectWithFastElementsMapHasSlowElements, \ |
1185 "JSObject with fast elements map has slow elements") \ | 1186 "JSObject with fast elements map has slow elements") \ |
1186 V(kLetBindingReInitialization, "Let binding re-initialization") \ | 1187 V(kLetBindingReInitialization, "Let binding re-initialization") \ |
1187 V(kLiveBytesCountOverflowChunkSize, "Live Bytes Count overflow chunk size") \ | 1188 V(kLiveBytesCountOverflowChunkSize, "Live Bytes Count overflow chunk size") \ |
1188 V(kLiveEditFrameDroppingIsNotSupportedOnArm, \ | 1189 V(kLiveEditFrameDroppingIsNotSupportedOnArm, \ |
1189 "LiveEdit frame dropping is not supported on arm") \ | 1190 "LiveEdit frame dropping is not supported on arm") \ |
1190 V(kLiveEditFrameDroppingIsNotSupportedOnMips, \ | 1191 V(kLiveEditFrameDroppingIsNotSupportedOnMips, \ |
1191 "LiveEdit frame dropping is not supported on mips") \ | 1192 "LiveEdit frame dropping is not supported on mips") \ |
1192 V(kLiveEdit, "LiveEdit") \ | 1193 V(kLiveEdit, "LiveEdit") \ |
1193 V(kLookupVariableInCountOperation, \ | 1194 V(kLookupVariableInCountOperation, \ |
1194 "lookup variable in count operation") \ | 1195 "Lookup variable in count operation") \ |
1195 V(kMapIsNoLongerInEax, "Map is no longer in eax") \ | 1196 V(kMapIsNoLongerInEax, "Map is no longer in eax") \ |
1196 V(kModuleDeclaration, "Module declaration") \ | 1197 V(kModuleDeclaration, "Module declaration") \ |
1197 V(kModuleLiteral, "Module literal") \ | 1198 V(kModuleLiteral, "Module literal") \ |
1198 V(kModulePath, "Module path") \ | 1199 V(kModulePath, "Module path") \ |
1199 V(kModuleStatement, "Module statement") \ | 1200 V(kModuleStatement, "Module statement") \ |
1200 V(kModuleVariable, "Module variable") \ | 1201 V(kModuleVariable, "Module variable") \ |
1201 V(kModuleUrl, "Module url") \ | 1202 V(kModuleUrl, "Module url") \ |
1202 V(kNativeFunctionLiteral, "Native function literal") \ | 1203 V(kNativeFunctionLiteral, "Native function literal") \ |
1203 V(kNoCasesLeft, "no cases left") \ | 1204 V(kNoCasesLeft, "No cases left") \ |
1204 V(kNoEmptyArraysHereInEmitFastAsciiArrayJoin, \ | 1205 V(kNoEmptyArraysHereInEmitFastAsciiArrayJoin, \ |
1205 "No empty arrays here in EmitFastAsciiArrayJoin") \ | 1206 "No empty arrays here in EmitFastAsciiArrayJoin") \ |
1206 V(kNonInitializerAssignmentToConst, \ | 1207 V(kNonInitializerAssignmentToConst, \ |
1207 "non-initializer assignment to const") \ | 1208 "Non-initializer assignment to const") \ |
1208 V(kNonSmiIndex, "Non-smi index") \ | 1209 V(kNonSmiIndex, "Non-smi index") \ |
1209 V(kNonSmiKeyInArrayLiteral, "Non-smi key in array literal") \ | 1210 V(kNonSmiKeyInArrayLiteral, "Non-smi key in array literal") \ |
1210 V(kNonSmiValue, "Non-smi value") \ | 1211 V(kNonSmiValue, "Non-smi value") \ |
1211 V(kNonObject, "Non-object value") \ | 1212 V(kNonObject, "Non-object value") \ |
1212 V(kNotEnoughVirtualRegistersForValues, \ | 1213 V(kNotEnoughVirtualRegistersForValues, \ |
1213 "not enough virtual registers for values") \ | 1214 "Not enough virtual registers for values") \ |
1214 V(kNotEnoughSpillSlotsForOsr, \ | 1215 V(kNotEnoughSpillSlotsForOsr, \ |
1215 "not enough spill slots for OSR") \ | 1216 "Not enough spill slots for OSR") \ |
1216 V(kNotEnoughVirtualRegistersRegalloc, \ | 1217 V(kNotEnoughVirtualRegistersRegalloc, \ |
1217 "not enough virtual registers (regalloc)") \ | 1218 "Not enough virtual registers (regalloc)") \ |
1218 V(kObjectFoundInSmiOnlyArray, "object found in smi-only array") \ | 1219 V(kObjectFoundInSmiOnlyArray, "Object found in smi-only array") \ |
1219 V(kObjectLiteralWithComplexProperty, \ | 1220 V(kObjectLiteralWithComplexProperty, \ |
1220 "Object literal with complex property") \ | 1221 "Object literal with complex property") \ |
1221 V(kOddballInStringTableIsNotUndefinedOrTheHole, \ | 1222 V(kOddballInStringTableIsNotUndefinedOrTheHole, \ |
1222 "oddball in string table is not undefined or the hole") \ | 1223 "Oddball in string table is not undefined or the hole") \ |
1223 V(kOperandIsASmiAndNotAName, "Operand is a smi and not a name") \ | 1224 V(kOperandIsASmiAndNotAName, "Operand is a smi and not a name") \ |
1224 V(kOperandIsASmiAndNotAString, "Operand is a smi and not a string") \ | 1225 V(kOperandIsASmiAndNotAString, "Operand is a smi and not a string") \ |
1225 V(kOperandIsASmi, "Operand is a smi") \ | 1226 V(kOperandIsASmi, "Operand is a smi") \ |
1226 V(kOperandIsNotAName, "Operand is not a name") \ | 1227 V(kOperandIsNotAName, "Operand is not a name") \ |
1227 V(kOperandIsNotANumber, "Operand is not a number") \ | 1228 V(kOperandIsNotANumber, "Operand is not a number") \ |
1228 V(kOperandIsNotASmi, "Operand is not a smi") \ | 1229 V(kOperandIsNotASmi, "Operand is not a smi") \ |
1229 V(kOperandIsNotAString, "Operand is not a string") \ | 1230 V(kOperandIsNotAString, "Operand is not a string") \ |
1230 V(kOperandIsNotSmi, "Operand is not smi") \ | 1231 V(kOperandIsNotSmi, "Operand is not smi") \ |
1231 V(kOperandNotANumber, "Operand not a number") \ | 1232 V(kOperandNotANumber, "Operand not a number") \ |
1232 V(kOptimizedTooManyTimes, "optimized too many times") \ | 1233 V(kOptimizationDisabled, "Optimization is disabled") \ |
| 1234 V(kOptimizedTooManyTimes, "Optimized too many times") \ |
1233 V(kOutOfVirtualRegistersWhileTryingToAllocateTempRegister, \ | 1235 V(kOutOfVirtualRegistersWhileTryingToAllocateTempRegister, \ |
1234 "Out of virtual registers while trying to allocate temp register") \ | 1236 "Out of virtual registers while trying to allocate temp register") \ |
1235 V(kParseScopeError, "parse/scope error") \ | 1237 V(kParseScopeError, "Parse/scope error") \ |
1236 V(kPossibleDirectCallToEval, "possible direct call to eval") \ | 1238 V(kPossibleDirectCallToEval, "Possible direct call to eval") \ |
1237 V(kPropertyAllocationCountFailed, "Property allocation count failed") \ | 1239 V(kPropertyAllocationCountFailed, "Property allocation count failed") \ |
1238 V(kReceivedInvalidReturnAddress, "Received invalid return address") \ | 1240 V(kReceivedInvalidReturnAddress, "Received invalid return address") \ |
1239 V(kReferenceToAVariableWhichRequiresDynamicLookup, \ | 1241 V(kReferenceToAVariableWhichRequiresDynamicLookup, \ |
1240 "reference to a variable which requires dynamic lookup") \ | 1242 "Reference to a variable which requires dynamic lookup") \ |
1241 V(kReferenceToGlobalLexicalVariable, \ | 1243 V(kReferenceToGlobalLexicalVariable, \ |
1242 "reference to global lexical variable") \ | 1244 "Reference to global lexical variable") \ |
1243 V(kReferenceToUninitializedVariable, "reference to uninitialized variable") \ | 1245 V(kReferenceToUninitializedVariable, "Reference to uninitialized variable") \ |
1244 V(kRegisterDidNotMatchExpectedRoot, "Register did not match expected root") \ | 1246 V(kRegisterDidNotMatchExpectedRoot, "Register did not match expected root") \ |
1245 V(kRegisterWasClobbered, "register was clobbered") \ | 1247 V(kRegisterWasClobbered, "Register was clobbered") \ |
1246 V(kScopedBlock, "ScopedBlock") \ | 1248 V(kScopedBlock, "ScopedBlock") \ |
1247 V(kSmiAdditionOverflow, "Smi addition overflow") \ | 1249 V(kSmiAdditionOverflow, "Smi addition overflow") \ |
1248 V(kSmiSubtractionOverflow, "Smi subtraction overflow") \ | 1250 V(kSmiSubtractionOverflow, "Smi subtraction overflow") \ |
1249 V(kStackFrameTypesMustMatch, "stack frame types must match") \ | 1251 V(kStackFrameTypesMustMatch, "Stack frame types must match") \ |
1250 V(kSwitchStatementMixedOrNonLiteralSwitchLabels, \ | 1252 V(kSwitchStatementMixedOrNonLiteralSwitchLabels, \ |
1251 "SwitchStatement: mixed or non-literal switch labels") \ | 1253 "SwitchStatement: mixed or non-literal switch labels") \ |
1252 V(kSwitchStatementTooManyClauses, "SwitchStatement: too many clauses") \ | 1254 V(kSwitchStatementTooManyClauses, "SwitchStatement: too many clauses") \ |
1253 V(kTheInstructionShouldBeALui, "The instruction should be a lui") \ | 1255 V(kTheInstructionShouldBeALui, "The instruction should be a lui") \ |
1254 V(kTheInstructionShouldBeAnOri, "The instruction should be an ori") \ | 1256 V(kTheInstructionShouldBeAnOri, "The instruction should be an ori") \ |
1255 V(kTheInstructionToPatchShouldBeALoadFromPc, \ | 1257 V(kTheInstructionToPatchShouldBeALoadFromPc, \ |
1256 "The instruction to patch should be a load from pc") \ | 1258 "The instruction to patch should be a load from pc") \ |
1257 V(kTheInstructionToPatchShouldBeALui, \ | 1259 V(kTheInstructionToPatchShouldBeALui, \ |
1258 "The instruction to patch should be a lui") \ | 1260 "The instruction to patch should be a lui") \ |
1259 V(kTheInstructionToPatchShouldBeAnOri, \ | 1261 V(kTheInstructionToPatchShouldBeAnOri, \ |
1260 "The instruction to patch should be an ori") \ | 1262 "The instruction to patch should be an ori") \ |
1261 V(kTooManyParametersLocals, "too many parameters/locals") \ | 1263 V(kTooManyParametersLocals, "Too many parameters/locals") \ |
1262 V(kTooManyParameters, "too many parameters") \ | 1264 V(kTooManyParameters, "Too many parameters") \ |
1263 V(kTooManySpillSlotsNeededForOSR, "Too many spill slots needed for OSR") \ | 1265 V(kTooManySpillSlotsNeededForOSR, "Too many spill slots needed for OSR") \ |
1264 V(kToOperandIsDoubleRegisterUnimplemented, \ | 1266 V(kToOperandIsDoubleRegisterUnimplemented, \ |
1265 "ToOperand IsDoubleRegister unimplemented") \ | 1267 "ToOperand IsDoubleRegister unimplemented") \ |
1266 V(kToOperandUnsupportedDoubleImmediate, \ | 1268 V(kToOperandUnsupportedDoubleImmediate, \ |
1267 "ToOperand Unsupported double immediate") \ | 1269 "ToOperand Unsupported double immediate") \ |
1268 V(kTryCatchStatement, "TryCatchStatement") \ | 1270 V(kTryCatchStatement, "TryCatchStatement") \ |
1269 V(kTryFinallyStatement, "TryFinallyStatement") \ | 1271 V(kTryFinallyStatement, "TryFinallyStatement") \ |
1270 V(kUnableToEncodeValueAsSmi, "Unable to encode value as smi") \ | 1272 V(kUnableToEncodeValueAsSmi, "Unable to encode value as smi") \ |
1271 V(kUnalignedAllocationInNewSpace, "Unaligned allocation in new space") \ | 1273 V(kUnalignedAllocationInNewSpace, "Unaligned allocation in new space") \ |
1272 V(kUndefinedValueNotLoaded, "Undefined value not loaded") \ | 1274 V(kUndefinedValueNotLoaded, "Undefined value not loaded") \ |
(...skipping 30 matching lines...) Expand all Loading... |
1303 "Unexpected number of pre-allocated property fields") \ | 1305 "Unexpected number of pre-allocated property fields") \ |
1304 V(kUnexpectedStringFunction, "Unexpected String function") \ | 1306 V(kUnexpectedStringFunction, "Unexpected String function") \ |
1305 V(kUnexpectedStringType, "Unexpected string type") \ | 1307 V(kUnexpectedStringType, "Unexpected string type") \ |
1306 V(kUnexpectedStringWrapperInstanceSize, \ | 1308 V(kUnexpectedStringWrapperInstanceSize, \ |
1307 "Unexpected string wrapper instance size") \ | 1309 "Unexpected string wrapper instance size") \ |
1308 V(kUnexpectedTypeForRegExpDataFixedArrayExpected, \ | 1310 V(kUnexpectedTypeForRegExpDataFixedArrayExpected, \ |
1309 "Unexpected type for RegExp data, FixedArray expected") \ | 1311 "Unexpected type for RegExp data, FixedArray expected") \ |
1310 V(kUnexpectedUnusedPropertiesOfStringWrapper, \ | 1312 V(kUnexpectedUnusedPropertiesOfStringWrapper, \ |
1311 "Unexpected unused properties of string wrapper") \ | 1313 "Unexpected unused properties of string wrapper") \ |
1312 V(kUninitializedKSmiConstantRegister, "Uninitialized kSmiConstantRegister") \ | 1314 V(kUninitializedKSmiConstantRegister, "Uninitialized kSmiConstantRegister") \ |
1313 V(kUnknown, "unknown") \ | 1315 V(kUnknown, "Unknown") \ |
1314 V(kUnsupportedConstCompoundAssignment, \ | 1316 V(kUnsupportedConstCompoundAssignment, \ |
1315 "unsupported const compound assignment") \ | 1317 "Unsupported const compound assignment") \ |
1316 V(kUnsupportedCountOperationWithConst, \ | 1318 V(kUnsupportedCountOperationWithConst, \ |
1317 "unsupported count operation with const") \ | 1319 "Unsupported count operation with const") \ |
1318 V(kUnsupportedDoubleImmediate, "unsupported double immediate") \ | 1320 V(kUnsupportedDoubleImmediate, "Unsupported double immediate") \ |
1319 V(kUnsupportedLetCompoundAssignment, "unsupported let compound assignment") \ | 1321 V(kUnsupportedLetCompoundAssignment, "Unsupported let compound assignment") \ |
1320 V(kUnsupportedLookupSlotInDeclaration, \ | 1322 V(kUnsupportedLookupSlotInDeclaration, \ |
1321 "unsupported lookup slot in declaration") \ | 1323 "Unsupported lookup slot in declaration") \ |
1322 V(kUnsupportedNonPrimitiveCompare, "Unsupported non-primitive compare") \ | 1324 V(kUnsupportedNonPrimitiveCompare, "Unsupported non-primitive compare") \ |
1323 V(kUnsupportedPhiUseOfArguments, "Unsupported phi use of arguments") \ | 1325 V(kUnsupportedPhiUseOfArguments, "Unsupported phi use of arguments") \ |
1324 V(kUnsupportedPhiUseOfConstVariable, \ | 1326 V(kUnsupportedPhiUseOfConstVariable, \ |
1325 "Unsupported phi use of const variable") \ | 1327 "Unsupported phi use of const variable") \ |
1326 V(kUnsupportedTaggedImmediate, "unsupported tagged immediate") \ | 1328 V(kUnsupportedTaggedImmediate, "Unsupported tagged immediate") \ |
1327 V(kVariableResolvedToWithContext, "Variable resolved to with context") \ | 1329 V(kVariableResolvedToWithContext, "Variable resolved to with context") \ |
1328 V(kWeShouldNotHaveAnEmptyLexicalContext, \ | 1330 V(kWeShouldNotHaveAnEmptyLexicalContext, \ |
1329 "we should not have an empty lexical context") \ | 1331 "We should not have an empty lexical context") \ |
1330 V(kWithStatement, "WithStatement") \ | 1332 V(kWithStatement, "WithStatement") \ |
1331 V(kWrongAddressOrValuePassedToRecordWrite, \ | 1333 V(kWrongAddressOrValuePassedToRecordWrite, \ |
1332 "Wrong address or value passed to RecordWrite") \ | 1334 "Wrong address or value passed to RecordWrite") \ |
1333 V(kYield, "Yield") | 1335 V(kYield, "Yield") |
1334 | 1336 |
1335 | 1337 |
1336 #define ERROR_MESSAGES_CONSTANTS(C, T) C, | 1338 #define ERROR_MESSAGES_CONSTANTS(C, T) C, |
1337 enum BailoutReason { | 1339 enum BailoutReason { |
1338 ERROR_MESSAGES_LIST(ERROR_MESSAGES_CONSTANTS) | 1340 ERROR_MESSAGES_LIST(ERROR_MESSAGES_CONSTANTS) |
1339 kLastErrorMessage | 1341 kLastErrorMessage |
(...skipping 4009 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5349 | 5351 |
5350 DECLARE_PRINTER(Code) | 5352 DECLARE_PRINTER(Code) |
5351 DECLARE_VERIFIER(Code) | 5353 DECLARE_VERIFIER(Code) |
5352 | 5354 |
5353 void ClearInlineCaches(); | 5355 void ClearInlineCaches(); |
5354 void ClearInlineCaches(Kind kind); | 5356 void ClearInlineCaches(Kind kind); |
5355 | 5357 |
5356 void ClearTypeFeedbackCells(Heap* heap); | 5358 void ClearTypeFeedbackCells(Heap* heap); |
5357 | 5359 |
5358 BailoutId TranslatePcOffsetToAstId(uint32_t pc_offset); | 5360 BailoutId TranslatePcOffsetToAstId(uint32_t pc_offset); |
| 5361 uint32_t TranslateAstIdToPcOffset(BailoutId ast_id); |
5359 | 5362 |
5360 #define DECLARE_CODE_AGE_ENUM(X) k##X##CodeAge, | 5363 #define DECLARE_CODE_AGE_ENUM(X) k##X##CodeAge, |
5361 enum Age { | 5364 enum Age { |
5362 kNotExecutedCodeAge = -2, | 5365 kNotExecutedCodeAge = -2, |
5363 kExecutedOnceCodeAge = -1, | 5366 kExecutedOnceCodeAge = -1, |
5364 kNoAgeCodeAge = 0, | 5367 kNoAgeCodeAge = 0, |
5365 CODE_AGE_LIST(DECLARE_CODE_AGE_ENUM) | 5368 CODE_AGE_LIST(DECLARE_CODE_AGE_ENUM) |
5366 kAfterLastCodeAge, | 5369 kAfterLastCodeAge, |
5367 kFirstCodeAge = kNotExecutedCodeAge, | 5370 kFirstCodeAge = kNotExecutedCodeAge, |
5368 kLastCodeAge = kAfterLastCodeAge - 1, | 5371 kLastCodeAge = kAfterLastCodeAge - 1, |
(...skipping 1159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6528 // and a shared literals array or Smi(0) if none. | 6531 // and a shared literals array or Smi(0) if none. |
6529 DECL_ACCESSORS(optimized_code_map, Object) | 6532 DECL_ACCESSORS(optimized_code_map, Object) |
6530 | 6533 |
6531 // Returns index i of the entry with the specified context. At position | 6534 // Returns index i of the entry with the specified context. At position |
6532 // i - 1 is the context, position i the code, and i + 1 the literals array. | 6535 // i - 1 is the context, position i the code, and i + 1 the literals array. |
6533 // Returns -1 when no matching entry is found. | 6536 // Returns -1 when no matching entry is found. |
6534 int SearchOptimizedCodeMap(Context* native_context); | 6537 int SearchOptimizedCodeMap(Context* native_context); |
6535 | 6538 |
6536 // Installs optimized code from the code map on the given closure. The | 6539 // Installs optimized code from the code map on the given closure. The |
6537 // index has to be consistent with a search result as defined above. | 6540 // index has to be consistent with a search result as defined above. |
6538 void InstallFromOptimizedCodeMap(JSFunction* function, int index); | 6541 FixedArray* GetLiteralsFromOptimizedCodeMap(int index); |
| 6542 |
| 6543 Code* GetCodeFromOptimizedCodeMap(int index); |
6539 | 6544 |
6540 // Clear optimized code map. | 6545 // Clear optimized code map. |
6541 void ClearOptimizedCodeMap(); | 6546 void ClearOptimizedCodeMap(); |
6542 | 6547 |
6543 // Removed a specific optimized code object from the optimized code map. | 6548 // Removed a specific optimized code object from the optimized code map. |
6544 void EvictFromOptimizedCodeMap(Code* optimized_code, const char* reason); | 6549 void EvictFromOptimizedCodeMap(Code* optimized_code, const char* reason); |
6545 | 6550 |
6546 // Trims the optimized code map after entries have been removed. | 6551 // Trims the optimized code map after entries have been removed. |
6547 void TrimOptimizedCodeMap(int shrink_by); | 6552 void TrimOptimizedCodeMap(int shrink_by); |
6548 | 6553 |
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6912 int CalculateInObjectProperties(); | 6917 int CalculateInObjectProperties(); |
6913 | 6918 |
6914 // Dispatched behavior. | 6919 // Dispatched behavior. |
6915 // Set max_length to -1 for unlimited length. | 6920 // Set max_length to -1 for unlimited length. |
6916 void SourceCodePrint(StringStream* accumulator, int max_length); | 6921 void SourceCodePrint(StringStream* accumulator, int max_length); |
6917 DECLARE_PRINTER(SharedFunctionInfo) | 6922 DECLARE_PRINTER(SharedFunctionInfo) |
6918 DECLARE_VERIFIER(SharedFunctionInfo) | 6923 DECLARE_VERIFIER(SharedFunctionInfo) |
6919 | 6924 |
6920 void ResetForNewContext(int new_ic_age); | 6925 void ResetForNewContext(int new_ic_age); |
6921 | 6926 |
6922 // Helper to compile the shared code. Returns true on success, false on | |
6923 // failure (e.g., stack overflow during compilation). This is only used by | |
6924 // the debugger, it is not possible to compile without a context otherwise. | |
6925 static bool CompileLazy(Handle<SharedFunctionInfo> shared, | |
6926 ClearExceptionFlag flag); | |
6927 | |
6928 // Casting. | 6927 // Casting. |
6929 static inline SharedFunctionInfo* cast(Object* obj); | 6928 static inline SharedFunctionInfo* cast(Object* obj); |
6930 | 6929 |
6931 // Constants. | 6930 // Constants. |
6932 static const int kDontAdaptArgumentsSentinel = -1; | 6931 static const int kDontAdaptArgumentsSentinel = -1; |
6933 | 6932 |
6934 // Layout description. | 6933 // Layout description. |
6935 // Pointer fields. | 6934 // Pointer fields. |
6936 static const int kNameOffset = HeapObject::kHeaderSize; | 6935 static const int kNameOffset = HeapObject::kHeaderSize; |
6937 static const int kCodeOffset = kNameOffset + kPointerSize; | 6936 static const int kCodeOffset = kNameOffset + kPointerSize; |
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7248 inline bool NeedsArgumentsAdaption(); | 7247 inline bool NeedsArgumentsAdaption(); |
7249 | 7248 |
7250 // Tells whether or not this function has been optimized. | 7249 // Tells whether or not this function has been optimized. |
7251 inline bool IsOptimized(); | 7250 inline bool IsOptimized(); |
7252 | 7251 |
7253 // Tells whether or not this function can be optimized. | 7252 // Tells whether or not this function can be optimized. |
7254 inline bool IsOptimizable(); | 7253 inline bool IsOptimizable(); |
7255 | 7254 |
7256 // Mark this function for lazy recompilation. The function will be | 7255 // Mark this function for lazy recompilation. The function will be |
7257 // recompiled the next time it is executed. | 7256 // recompiled the next time it is executed. |
7258 void MarkForLazyRecompilation(); | 7257 void MarkForOptimization(); |
7259 void MarkForConcurrentRecompilation(); | 7258 void MarkForConcurrentOptimization(); |
7260 void MarkInRecompileQueue(); | 7259 void MarkInOptimizationQueue(); |
7261 | 7260 |
7262 // Helpers to compile this function. Returns true on success, false on | |
7263 // failure (e.g., stack overflow during compilation). | |
7264 static bool EnsureCompiled(Handle<JSFunction> function, | |
7265 ClearExceptionFlag flag); | |
7266 static bool CompileLazy(Handle<JSFunction> function, | |
7267 ClearExceptionFlag flag); | |
7268 static Handle<Code> CompileOsr(Handle<JSFunction> function, | |
7269 BailoutId osr_ast_id, | |
7270 ClearExceptionFlag flag); | |
7271 static bool CompileOptimized(Handle<JSFunction> function, | 7261 static bool CompileOptimized(Handle<JSFunction> function, |
7272 ClearExceptionFlag flag); | 7262 ClearExceptionFlag flag); |
7273 | 7263 |
7274 // Tells whether or not the function is already marked for lazy | 7264 // Tells whether or not the function is already marked for lazy |
7275 // recompilation. | 7265 // recompilation. |
7276 inline bool IsMarkedForLazyRecompilation(); | 7266 inline bool IsMarkedForOptimization(); |
7277 inline bool IsMarkedForConcurrentRecompilation(); | 7267 inline bool IsMarkedForConcurrentOptimization(); |
7278 | 7268 |
7279 // Tells whether or not the function is on the concurrent recompilation queue. | 7269 // Tells whether or not the function is on the concurrent recompilation queue. |
7280 inline bool IsInRecompileQueue(); | 7270 inline bool IsInOptimizationQueue(); |
7281 | 7271 |
7282 // [literals_or_bindings]: Fixed array holding either | 7272 // [literals_or_bindings]: Fixed array holding either |
7283 // the materialized literals or the bindings of a bound function. | 7273 // the materialized literals or the bindings of a bound function. |
7284 // | 7274 // |
7285 // If the function contains object, regexp or array literals, the | 7275 // If the function contains object, regexp or array literals, the |
7286 // literals array prefix contains the object, regexp, and array | 7276 // literals array prefix contains the object, regexp, and array |
7287 // function to be used when creating these literals. This is | 7277 // function to be used when creating these literals. This is |
7288 // necessary so that we do not dynamically lookup the object, regexp | 7278 // necessary so that we do not dynamically lookup the object, regexp |
7289 // or array functions. Performing a dynamic lookup, we might end up | 7279 // or array functions. Performing a dynamic lookup, we might end up |
7290 // using the functions from a new context that we should not have | 7280 // using the functions from a new context that we should not have |
(...skipping 3315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10606 } else { | 10596 } else { |
10607 value &= ~(1 << bit_position); | 10597 value &= ~(1 << bit_position); |
10608 } | 10598 } |
10609 return value; | 10599 return value; |
10610 } | 10600 } |
10611 }; | 10601 }; |
10612 | 10602 |
10613 } } // namespace v8::internal | 10603 } } // namespace v8::internal |
10614 | 10604 |
10615 #endif // V8_OBJECTS_H_ | 10605 #endif // V8_OBJECTS_H_ |
OLD | NEW |