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

Side by Side Diff: src/objects.h

Issue 149413010: A64: Synchronize with r16024. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/mips/macro-assembler-mips.cc ('k') | src/objects.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1030 matching lines...) Expand 10 before | Expand all | Expand 10 after
1041 V(MapCache) \ 1041 V(MapCache) \
1042 V(Primitive) \ 1042 V(Primitive) \
1043 V(GlobalObject) \ 1043 V(GlobalObject) \
1044 V(JSGlobalObject) \ 1044 V(JSGlobalObject) \
1045 V(JSBuiltinsObject) \ 1045 V(JSBuiltinsObject) \
1046 V(JSGlobalProxy) \ 1046 V(JSGlobalProxy) \
1047 V(UndetectableObject) \ 1047 V(UndetectableObject) \
1048 V(AccessCheckNeeded) \ 1048 V(AccessCheckNeeded) \
1049 V(Cell) \ 1049 V(Cell) \
1050 V(PropertyCell) \ 1050 V(PropertyCell) \
1051 V(ObjectHashTable) \ 1051 V(ObjectHashTable)
1052
1053
1054 #define ERROR_MESSAGES_LIST(V) \
1055 V(kNoReason, "no reason") \
1056 \
1057 V(k32BitValueInRegisterIsNotZeroExtended, \
1058 "32 bit value in register is not zero-extended") \
1059 V(kAlignmentMarkerExpected, "alignment marker expected") \
1060 V(kAllocationIsNotDoubleAligned, "Allocation is not double aligned") \
1061 V(kAPICallReturnedInvalidObject, "API call returned invalid object") \
1062 V(kArgumentsObjectValueInATestContext, \
1063 "arguments object value in a test context") \
1064 V(kArrayBoilerplateCreationFailed, "array boilerplate creation failed") \
1065 V(kArrayIndexConstantValueTooBig, "array index constant value too big") \
1066 V(kAssignmentToArguments, "assignment to arguments") \
1067 V(kAssignmentToLetVariableBeforeInitialization, \
1068 "assignment to let variable before initialization") \
1069 V(kAssignmentToLOOKUPVariable, "assignment to LOOKUP variable") \
1070 V(kAssignmentToParameterFunctionUsesArgumentsObject, \
1071 "assignment to parameter, function uses arguments object") \
1072 V(kAssignmentToParameterInArgumentsObject, \
1073 "assignment to parameter in arguments object") \
1074 V(kAttemptToUseUndefinedCache, "Attempt to use undefined cache") \
1075 V(kBadValueContextForArgumentsObjectValue, \
1076 "bad value context for arguments object value") \
1077 V(kBadValueContextForArgumentsValue, \
1078 "bad value context for arguments value") \
1079 V(kBailedOutDueToDependentMap, "bailed out due to dependent map") \
1080 V(kBailoutWasNotPrepared, "bailout was not prepared") \
1081 V(kBinaryStubGenerateFloatingPointCode, \
1082 "BinaryStub_GenerateFloatingPointCode") \
1083 V(kBothRegistersWereSmisInSelectNonSmi, \
1084 "Both registers were smis in SelectNonSmi") \
1085 V(kCallToAJavaScriptRuntimeFunction, \
1086 "call to a JavaScript runtime function") \
1087 V(kCannotTranslatePositionInChangedArea, \
1088 "Cannot translate position in changed area") \
1089 V(kCodeGenerationFailed, "code generation failed") \
1090 V(kCodeObjectNotProperlyPatched, "code object not properly patched") \
1091 V(kCompoundAssignmentToLookupSlot, "compound assignment to lookup slot") \
1092 V(kContextAllocatedArguments, "context-allocated arguments") \
1093 V(kCouldNotGenerateZero, "could not generate +0.0") \
1094 V(kCouldNotGenerateNegativeZero, "could not generate -0.0") \
1095 V(kDebuggerIsActive, "debugger is active") \
1096 V(kDebuggerStatement, "DebuggerStatement") \
1097 V(kDeclarationInCatchContext, "Declaration in catch context") \
1098 V(kDeclarationInWithContext, "Declaration in with context") \
1099 V(kDefaultNaNModeNotSet, "Default NaN mode not set") \
1100 V(kDeleteWithGlobalVariable, "delete with global variable") \
1101 V(kDeleteWithNonGlobalVariable, "delete with non-global variable") \
1102 V(kDestinationOfCopyNotAligned, "Destination of copy not aligned") \
1103 V(kDontDeleteCellsCannotContainTheHole, \
1104 "DontDelete cells can't contain the hole") \
1105 V(kDoPushArgumentNotImplementedForDoubleType, \
1106 "DoPushArgument not implemented for double type") \
1107 V(kEmitLoadRegisterUnsupportedDoubleImmediate, \
1108 "EmitLoadRegister: Unsupported double immediate") \
1109 V(kEval, "eval") \
1110 V(kExpected0AsASmiSentinel, "Expected 0 as a Smi sentinel") \
1111 V(kExpectedAlignmentMarker, "expected alignment marker") \
1112 V(kExpectedNonIdenticalObjects, "expected non-identical objects") \
1113 V(kExpectedPositiveZero, "expected +0.0") \
1114 V(kExpectedPropertyCellInTypeInfoCell, \
1115 "Expected property cell in type_info_cell") \
1116 V(kExpectedPropertyCellInRegisterA2, \
1117 "Expected property cell in register a2") \
1118 V(kExpectedPropertyCellInRegisterEbx, \
1119 "Expected property cell in register ebx") \
1120 V(kExpectedPropertyCellInRegisterRbx, \
1121 "Expected property cell in register rbx") \
1122 V(kExpectedSmiOrHeapNumber, "expected smi or HeapNumber") \
1123 V(kExpectingAlignmentForCopyBytes, \
1124 "Expecting alignment for CopyBytes") \
1125 V(kExternalStringExpectedButNotFound, \
1126 "external string expected, but not found") \
1127 V(kFailedBailedOutLastTime, "failed/bailed out last time") \
1128 V(kForInStatementIsNotFastCase, "ForInStatement is not fast case") \
1129 V(kForInStatementOptimizationIsDisabled, \
1130 "ForInStatement optimization is disabled") \
1131 V(kForInStatementWithNonLocalEachVariable, \
1132 "ForInStatement with non-local each variable") \
1133 V(kForOfStatement, "ForOfStatement") \
1134 V(kFrameIsExpectedToBeAligned, "frame is expected to be aligned") \
1135 V(kFunctionCallsEval, "function calls eval") \
1136 V(kFunctionIsAGenerator, "function is a generator") \
1137 V(kFunctionWithIllegalRedeclaration, "function with illegal redeclaration") \
1138 V(kGeneratedCodeIsTooLarge, "Generated code is too large") \
1139 V(kGeneratorFailedToResume, "Generator failed to resume") \
1140 V(kGenerator, "generator") \
1141 V(kGlobalFunctionsMustHaveInitialMap, \
1142 "Global functions must have initial map") \
1143 V(kHeapNumberMapRegisterClobbered, "HeapNumberMap register clobbered") \
1144 V(kImproperObjectOnPrototypeChainForStore, \
1145 "improper object on prototype chain for store") \
1146 V(kIndexIsNegative, "Index is negative") \
1147 V(kIndexIsTooLarge, "Index is too large") \
1148 V(kInlinedRuntimeFunctionClassOf, "inlined runtime function: ClassOf") \
1149 V(kInlinedRuntimeFunctionFastAsciiArrayJoin, \
1150 "inlined runtime function: FastAsciiArrayJoin") \
1151 V(kInlinedRuntimeFunctionGeneratorNext, \
1152 "inlined runtime function: GeneratorNext") \
1153 V(kInlinedRuntimeFunctionGeneratorThrow, \
1154 "inlined runtime function: GeneratorThrow") \
1155 V(kInlinedRuntimeFunctionGetFromCache, \
1156 "inlined runtime function: GetFromCache") \
1157 V(kInlinedRuntimeFunctionIsNonNegativeSmi, \
1158 "inlined runtime function: IsNonNegativeSmi") \
1159 V(kInlinedRuntimeFunctionIsRegExpEquivalent, \
1160 "inlined runtime function: IsRegExpEquivalent") \
1161 V(kInlinedRuntimeFunctionIsStringWrapperSafeForDefaultValueOf, \
1162 "inlined runtime function: IsStringWrapperSafeForDefaultValueOf") \
1163 V(kInliningBailedOut, "inlining bailed out") \
1164 V(kInputGPRIsExpectedToHaveUpper32Cleared, \
1165 "input GPR is expected to have upper32 cleared") \
1166 V(kInstanceofStubUnexpectedCallSiteCacheCheck, \
1167 "InstanceofStub unexpected call site cache (check)") \
1168 V(kInstanceofStubUnexpectedCallSiteCacheCmp1, \
1169 "InstanceofStub unexpected call site cache (cmp 1)") \
1170 V(kInstanceofStubUnexpectedCallSiteCacheCmp2, \
1171 "InstanceofStub unexpected call site cache (cmp 2)") \
1172 V(kInstanceofStubUnexpectedCallSiteCacheMov, \
1173 "InstanceofStub unexpected call site cache (mov)") \
1174 V(kInteger32ToSmiFieldWritingToNonSmiLocation, \
1175 "Integer32ToSmiField writing to non-smi location") \
1176 V(kInvalidCaptureReferenced, "Invalid capture referenced") \
1177 V(kInvalidElementsKindForInternalArrayOrInternalPackedArray, \
1178 "Invalid ElementsKind for InternalArray or InternalPackedArray") \
1179 V(kInvalidFullCodegenState, "invalid full-codegen state") \
1180 V(kInvalidHandleScopeLevel, "Invalid HandleScope level") \
1181 V(kInvalidLeftHandSideInAssignment, "invalid left-hand side in assignment") \
1182 V(kInvalidLhsInCompoundAssignment, "invalid lhs in compound assignment") \
1183 V(kInvalidLhsInCountOperation, "invalid lhs in count operation") \
1184 V(kInvalidMinLength, "Invalid min_length") \
1185 V(kJSGlobalObjectNativeContextShouldBeANativeContext, \
1186 "JSGlobalObject::native_context should be a native context") \
1187 V(kJSGlobalProxyContextShouldNotBeNull, \
1188 "JSGlobalProxy::context() should not be null") \
1189 V(kJSObjectWithFastElementsMapHasSlowElements, \
1190 "JSObject with fast elements map has slow elements") \
1191 V(kLetBindingReInitialization, "Let binding re-initialization") \
1192 V(kLhsHasBeenClobbered, "lhs has been clobbered") \
1193 V(kLiveBytesCountOverflowChunkSize, "Live Bytes Count overflow chunk size") \
1194 V(kLiveEditFrameDroppingIsNotSupportedOnA64, \
1195 "LiveEdit frame dropping is not supported on a64") \
1196 V(kLiveEditFrameDroppingIsNotSupportedOnArm, \
1197 "LiveEdit frame dropping is not supported on arm") \
1198 V(kLiveEditFrameDroppingIsNotSupportedOnMips, \
1199 "LiveEdit frame dropping is not supported on mips") \
1200 V(kLiveEdit, "LiveEdit") \
1201 V(kLookupVariableInCountOperation, \
1202 "lookup variable in count operation") \
1203 V(kMapIsNoLongerInEax, "Map is no longer in eax") \
1204 V(kNoCasesLeft, "no cases left") \
1205 V(kNoEmptyArraysHereInEmitFastAsciiArrayJoin, \
1206 "No empty arrays here in EmitFastAsciiArrayJoin") \
1207 V(kNonInitializerAssignmentToConst, \
1208 "non-initializer assignment to const") \
1209 V(kNonSmiIndex, "Non-smi index") \
1210 V(kNonSmiKeyInArrayLiteral, "Non-smi key in array literal") \
1211 V(kNonSmiValue, "Non-smi value") \
1212 V(kNotEnoughVirtualRegistersForValues, \
1213 "not enough virtual registers for values") \
1214 V(kNotEnoughVirtualRegistersRegalloc, \
1215 "not enough virtual registers (regalloc)") \
1216 V(kObjectFoundInSmiOnlyArray, "object found in smi-only array") \
1217 V(kObjectLiteralWithComplexProperty, \
1218 "Object literal with complex property") \
1219 V(kOddballInStringTableIsNotUndefinedOrTheHole, \
1220 "oddball in string table is not undefined or the hole") \
1221 V(kOperandIsASmiAndNotAName, "Operand is a smi and not a name") \
1222 V(kOperandIsASmiAndNotAString, "Operand is a smi and not a string") \
1223 V(kOperandIsASmi, "Operand is a smi") \
1224 V(kOperandIsNotAName, "Operand is not a name") \
1225 V(kOperandIsNotANumber, "Operand is not a number") \
1226 V(kOperandIsNotASmi, "Operand is not a smi") \
1227 V(kOperandIsNotAString, "Operand is not a string") \
1228 V(kOperandIsNotSmi, "Operand is not smi") \
1229 V(kOperandNotANumber, "Operand not a number") \
1230 V(kOptimizedTooManyTimes, "optimized too many times") \
1231 V(kOutOfVirtualRegistersWhileTryingToAllocateTempRegister, \
1232 "Out of virtual registers while trying to allocate temp register") \
1233 V(kParseScopeError, "parse/scope error") \
1234 V(kPossibleDirectCallToEval, "possible direct call to eval") \
1235 V(kPreconditionsWereNotMet, "preconditions were not met") \
1236 V(kPropertyAllocationCountFailed, "Property allocation count failed") \
1237 V(kReceivedInvalidReturnAddress, "Received invalid return address") \
1238 V(kReferenceToAVariableWhichRequiresDynamicLookup, \
1239 "reference to a variable which requires dynamic lookup") \
1240 V(kReferenceToGlobalLexicalVariable, \
1241 "reference to global lexical variable") \
1242 V(kReferenceToUninitializedVariable, "reference to uninitialized variable") \
1243 V(kRegisterDidNotMatchExpectedRoot, "Register did not match expected root") \
1244 V(kRegisterWasClobbered, "register was clobbered") \
1245 V(kReturnAddressNotFoundInFrame, "return address not found in frame") \
1246 V(kRhsHasBeenClobbered, "rhs has been clobbered") \
1247 V(kScopedBlock, "ScopedBlock") \
1248 V(kSharedFunctionInfoLiteral, "SharedFunctionInfoLiteral") \
1249 V(kSmiAdditionOverflow, "Smi addition overflow") \
1250 V(kSmiSubtractionOverflow, "Smi subtraction overflow") \
1251 V(kStackAccessBelowStackPointer, "stack access below stack pointer") \
1252 V(kStackFrameTypesMustMatch, "stack frame types must match") \
1253 V(kSwitchStatementMixedOrNonLiteralSwitchLabels, \
1254 "SwitchStatement: mixed or non-literal switch labels") \
1255 V(kSwitchStatementTooManyClauses, "SwitchStatement: too many clauses") \
1256 V(kTheCurrentStackPointerIsBelowCsp, \
1257 "the current stack pointer is below csp") \
1258 V(kTheInstructionShouldBeALui, "The instruction should be a lui") \
1259 V(kTheInstructionShouldBeAnOri, "The instruction should be an ori") \
1260 V(kTheInstructionToPatchShouldBeALoadFromPc, \
1261 "The instruction to patch should be a load from pc") \
1262 V(kTheInstructionToPatchShouldBeALui, \
1263 "The instruction to patch should be a lui") \
1264 V(kTheInstructionToPatchShouldBeAnOri, \
1265 "The instruction to patch should be an ori") \
1266 V(kTheSourceAndDestinationAreTheSame, \
1267 "the source and destination are the same") \
1268 V(kTheStackWasCorruptedByMacroAssemblerCall, \
1269 "the stack was corrupted by MacroAssembler::Call()") \
1270 V(kTooManyParametersLocals, "too many parameters/locals") \
1271 V(kTooManyParameters, "too many parameters") \
1272 V(kTooManySpillSlotsNeededForOSR, "Too many spill slots needed for OSR") \
1273 V(kToOperandIsDoubleRegisterUnimplemented, \
1274 "ToOperand IsDoubleRegister unimplemented") \
1275 V(kToOperandUnsupportedDoubleImmediate, \
1276 "ToOperand Unsupported double immediate") \
1277 V(kTryCatchStatement, "TryCatchStatement") \
1278 V(kTryFinallyStatement, "TryFinallyStatement") \
1279 V(kUnableToEncodeValueAsSmi, "Unable to encode value as smi") \
1280 V(kUnalignedAllocationInNewSpace, "Unaligned allocation in new space") \
1281 V(kUndefinedValueNotLoaded, "Undefined value not loaded") \
1282 V(kUndoAllocationOfNonAllocatedMemory, \
1283 "Undo allocation of non allocated memory") \
1284 V(kUnexpectedAllocationTop, "Unexpected allocation top") \
1285 V(kUnexpectedElementsKindInArrayConstructor, \
1286 "Unexpected ElementsKind in array constructor") \
1287 V(kUnexpectedFallthroughFromCharCodeAtSlowCase, \
1288 "Unexpected fallthrough from CharCodeAt slow case") \
1289 V(kUnexpectedFallthroughFromCharFromCodeSlowCase, \
1290 "Unexpected fallthrough from CharFromCode slow case") \
1291 V(kUnexpectedFallThroughFromStringComparison, \
1292 "Unexpected fall-through from string comparison") \
1293 V(kUnexpectedFallThroughInBinaryStubGenerateFloatingPointCode, \
1294 "Unexpected fall-through in BinaryStub_GenerateFloatingPointCode") \
1295 V(kUnexpectedFallthroughToCharCodeAtSlowCase, \
1296 "Unexpected fallthrough to CharCodeAt slow case") \
1297 V(kUnexpectedFallthroughToCharFromCodeSlowCase, \
1298 "Unexpected fallthrough to CharFromCode slow case") \
1299 V(kUnexpectedFPUStackDepthAfterInstruction, \
1300 "Unexpected FPU stack depth after instruction") \
1301 V(kUnexpectedInitialMapForArrayFunction1, \
1302 "Unexpected initial map for Array function (1)") \
1303 V(kUnexpectedInitialMapForArrayFunction2, \
1304 "Unexpected initial map for Array function (2)") \
1305 V(kUnexpectedInitialMapForArrayFunction, \
1306 "Unexpected initial map for Array function") \
1307 V(kUnexpectedInitialMapForInternalArrayFunction, \
1308 "Unexpected initial map for InternalArray function") \
1309 V(kUnexpectedLevelAfterReturnFromApiCall, \
1310 "Unexpected level after return from api call") \
1311 V(kUnexpectedNumberOfPreAllocatedPropertyFields, \
1312 "Unexpected number of pre-allocated property fields") \
1313 V(kUnexpectedStringFunction, "Unexpected String function") \
1314 V(kUnexpectedStringType, "Unexpected string type") \
1315 V(kUnexpectedStringWrapperInstanceSize, \
1316 "Unexpected string wrapper instance size") \
1317 V(kUnexpectedTypeForRegExpDataFixedArrayExpected, \
1318 "Unexpected type for RegExp data, FixedArray expected") \
1319 V(kUnexpectedUnusedPropertiesOfStringWrapper, \
1320 "Unexpected unused properties of string wrapper") \
1321 V(kUnimplementedHydrogenInstruction, \
1322 "unimplemented Hydrogen instruction") \
1323 V(kUninitializedKSmiConstantRegister, "Uninitialized kSmiConstantRegister") \
1324 V(kUnknown, "unknown") \
1325 V(kUnsupportedConstCompoundAssignment, \
1326 "unsupported const compound assignment") \
1327 V(kUnsupportedCountOperationWithConst, \
1328 "unsupported count operation with const") \
1329 V(kUnsupportedDoubleImmediate, "unsupported double immediate") \
1330 V(kUnsupportedLetCompoundAssignment, "unsupported let compound assignment") \
1331 V(kUnsupportedLookupSlotInDeclaration, \
1332 "unsupported lookup slot in declaration") \
1333 V(kUnsupportedNonPrimitiveCompare, "Unsupported non-primitive compare") \
1334 V(kUnsupportedPhiUseOfArguments, "Unsupported phi use of arguments") \
1335 V(kUnsupportedPhiUseOfConstVariable, \
1336 "Unsupported phi use of const variable") \
1337 V(kUnsupportedTaggedImmediate, "unsupported tagged immediate") \
1338 V(kVariableResolvedToWithContext, "Variable resolved to with context") \
1339 V(kWeShouldNotHaveAnEmptyLexicalContext, \
1340 "we should not have an empty lexical context") \
1341 V(kWithStatement, "WithStatement") \
1342 V(kWrongAddressOrValuePassedToRecordWrite, \
1343 "Wrong address or value passed to RecordWrite")
1344
1345
1346 #define ERROR_MESSAGES_CONSTANTS(C, T) C,
1347 enum BailoutReason {
1348 ERROR_MESSAGES_LIST(ERROR_MESSAGES_CONSTANTS)
1349 kLastErrorMessage
1350 };
1351 #undef ERROR_MESSAGES_CONSTANTS
1352
1353
1354 const char* GetBailoutReason(BailoutReason reason);
1052 1355
1053 1356
1054 // Object is the abstract superclass for all classes in the 1357 // Object is the abstract superclass for all classes in the
1055 // object hierarchy. 1358 // object hierarchy.
1056 // Object does not use any virtual functions to avoid the 1359 // Object does not use any virtual functions to avoid the
1057 // allocation of the C++ vtable. 1360 // allocation of the C++ vtable.
1058 // Since Smi and Failure are subclasses of Object no 1361 // Since Smi and Failure are subclasses of Object no
1059 // data members can be present in Object. 1362 // data members can be present in Object.
1060 class Object : public MaybeObject { 1363 class Object : public MaybeObject {
1061 public: 1364 public:
(...skipping 4121 matching lines...) Expand 10 before | Expand all | Expand 10 after
5183 5486
5184 class EnumLengthBits: public BitField<int, 0, 11> {}; 5487 class EnumLengthBits: public BitField<int, 0, 11> {};
5185 class NumberOfOwnDescriptorsBits: public BitField<int, 11, 11> {}; 5488 class NumberOfOwnDescriptorsBits: public BitField<int, 11, 11> {};
5186 class IsShared: public BitField<bool, 22, 1> {}; 5489 class IsShared: public BitField<bool, 22, 1> {};
5187 class FunctionWithPrototype: public BitField<bool, 23, 1> {}; 5490 class FunctionWithPrototype: public BitField<bool, 23, 1> {};
5188 class DictionaryMap: public BitField<bool, 24, 1> {}; 5491 class DictionaryMap: public BitField<bool, 24, 1> {};
5189 class OwnsDescriptors: public BitField<bool, 25, 1> {}; 5492 class OwnsDescriptors: public BitField<bool, 25, 1> {};
5190 class IsObserved: public BitField<bool, 26, 1> {}; 5493 class IsObserved: public BitField<bool, 26, 1> {};
5191 class Deprecated: public BitField<bool, 27, 1> {}; 5494 class Deprecated: public BitField<bool, 27, 1> {};
5192 class IsFrozen: public BitField<bool, 28, 1> {}; 5495 class IsFrozen: public BitField<bool, 28, 1> {};
5496 class IsUnstable: public BitField<bool, 29, 1> {};
5193 5497
5194 // Tells whether the object in the prototype property will be used 5498 // Tells whether the object in the prototype property will be used
5195 // for instances created from this function. If the prototype 5499 // for instances created from this function. If the prototype
5196 // property is set to a value that is not a JSObject, the prototype 5500 // property is set to a value that is not a JSObject, the prototype
5197 // property will not be used to create instances of the function. 5501 // property will not be used to create instances of the function.
5198 // See ECMA-262, 13.2.2. 5502 // See ECMA-262, 13.2.2.
5199 inline void set_non_instance_prototype(bool value); 5503 inline void set_non_instance_prototype(bool value);
5200 inline bool has_non_instance_prototype(); 5504 inline bool has_non_instance_prototype();
5201 5505
5202 // Tells whether function has special prototype property. If not, prototype 5506 // Tells whether function has special prototype property. If not, prototype
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
5487 set_bit_field3(EnumLengthBits::update(bit_field3(), length)); 5791 set_bit_field3(EnumLengthBits::update(bit_field3(), length));
5488 } 5792 }
5489 5793
5490 inline bool CanTrackAllocationSite(); 5794 inline bool CanTrackAllocationSite();
5491 inline bool owns_descriptors(); 5795 inline bool owns_descriptors();
5492 inline void set_owns_descriptors(bool is_shared); 5796 inline void set_owns_descriptors(bool is_shared);
5493 inline bool is_observed(); 5797 inline bool is_observed();
5494 inline void set_is_observed(bool is_observed); 5798 inline void set_is_observed(bool is_observed);
5495 inline void freeze(); 5799 inline void freeze();
5496 inline bool is_frozen(); 5800 inline bool is_frozen();
5801 inline void mark_unstable();
5802 inline bool is_stable();
5497 inline void deprecate(); 5803 inline void deprecate();
5498 inline bool is_deprecated(); 5804 inline bool is_deprecated();
5499 inline bool CanBeDeprecated(); 5805 inline bool CanBeDeprecated();
5500 // Returns a non-deprecated version of the input. If the input was not 5806 // Returns a non-deprecated version of the input. If the input was not
5501 // deprecated, it is directly returned. Otherwise, the non-deprecated version 5807 // deprecated, it is directly returned. Otherwise, the non-deprecated version
5502 // is found by re-transitioning from the root of the transition tree using the 5808 // is found by re-transitioning from the root of the transition tree using the
5503 // descriptor array of the map. Returns NULL if no updated map is found. 5809 // descriptor array of the map. Returns NULL if no updated map is found.
5504 Map* CurrentMapForDeprecated(); 5810 Map* CurrentMapForDeprecated();
5505 5811
5506 MUST_USE_RESULT MaybeObject* RawCopy(int instance_size); 5812 MUST_USE_RESULT MaybeObject* RawCopy(int instance_size);
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
5844 6150
5845 // [context_data]: context data for the context this script was compiled in. 6151 // [context_data]: context data for the context this script was compiled in.
5846 DECL_ACCESSORS(context_data, Object) 6152 DECL_ACCESSORS(context_data, Object)
5847 6153
5848 // [wrapper]: the wrapper cache. 6154 // [wrapper]: the wrapper cache.
5849 DECL_ACCESSORS(wrapper, Foreign) 6155 DECL_ACCESSORS(wrapper, Foreign)
5850 6156
5851 // [type]: the script type. 6157 // [type]: the script type.
5852 DECL_ACCESSORS(type, Smi) 6158 DECL_ACCESSORS(type, Smi)
5853 6159
5854 // [compilation]: how the the script was compiled.
5855 DECL_ACCESSORS(compilation_type, Smi)
5856
5857 // [is_compiled]: determines whether the script has already been compiled.
5858 DECL_ACCESSORS(compilation_state, Smi)
5859
5860 // [line_ends]: FixedArray of line ends positions. 6160 // [line_ends]: FixedArray of line ends positions.
5861 DECL_ACCESSORS(line_ends, Object) 6161 DECL_ACCESSORS(line_ends, Object)
5862 6162
5863 // [eval_from_shared]: for eval scripts the shared funcion info for the 6163 // [eval_from_shared]: for eval scripts the shared funcion info for the
5864 // function from which eval was called. 6164 // function from which eval was called.
5865 DECL_ACCESSORS(eval_from_shared, Object) 6165 DECL_ACCESSORS(eval_from_shared, Object)
5866 6166
5867 // [eval_from_instructions_offset]: the instruction offset in the code for the 6167 // [eval_from_instructions_offset]: the instruction offset in the code for the
5868 // function from which eval was called where eval was called. 6168 // function from which eval was called where eval was called.
5869 DECL_ACCESSORS(eval_from_instructions_offset, Smi) 6169 DECL_ACCESSORS(eval_from_instructions_offset, Smi)
5870 6170
6171 // [flags]: Holds an exciting bitfield.
6172 DECL_ACCESSORS(flags, Smi)
6173
6174 // [compilation_type]: how the the script was compiled. Encoded in the
6175 // 'flags' field.
6176 inline CompilationType compilation_type();
6177 inline void set_compilation_type(CompilationType type);
6178
6179 // [compilation_state]: determines whether the script has already been
6180 // compiled. Encoded in the 'flags' field.
6181 inline CompilationState compilation_state();
6182 inline void set_compilation_state(CompilationState state);
6183
6184 // [is_shared_cross_origin]: An opaque boolean set by the embedder via
6185 // ScriptOrigin, and used by the embedder to make decisions about the
6186 // script's level of privilege. V8 just passes this through. Encoded in
6187 // the 'flags' field.
6188 DECL_BOOLEAN_ACCESSORS(is_shared_cross_origin)
6189
5871 static inline Script* cast(Object* obj); 6190 static inline Script* cast(Object* obj);
5872 6191
5873 // If script source is an external string, check that the underlying 6192 // If script source is an external string, check that the underlying
5874 // resource is accessible. Otherwise, always return true. 6193 // resource is accessible. Otherwise, always return true.
5875 inline bool HasValidSource(); 6194 inline bool HasValidSource();
5876 6195
5877 // Dispatched behavior. 6196 // Dispatched behavior.
5878 DECLARE_PRINTER(Script) 6197 DECLARE_PRINTER(Script)
5879 DECLARE_VERIFIER(Script) 6198 DECLARE_VERIFIER(Script)
5880 6199
5881 static const int kSourceOffset = HeapObject::kHeaderSize; 6200 static const int kSourceOffset = HeapObject::kHeaderSize;
5882 static const int kNameOffset = kSourceOffset + kPointerSize; 6201 static const int kNameOffset = kSourceOffset + kPointerSize;
5883 static const int kLineOffsetOffset = kNameOffset + kPointerSize; 6202 static const int kLineOffsetOffset = kNameOffset + kPointerSize;
5884 static const int kColumnOffsetOffset = kLineOffsetOffset + kPointerSize; 6203 static const int kColumnOffsetOffset = kLineOffsetOffset + kPointerSize;
5885 static const int kDataOffset = kColumnOffsetOffset + kPointerSize; 6204 static const int kDataOffset = kColumnOffsetOffset + kPointerSize;
5886 static const int kContextOffset = kDataOffset + kPointerSize; 6205 static const int kContextOffset = kDataOffset + kPointerSize;
5887 static const int kWrapperOffset = kContextOffset + kPointerSize; 6206 static const int kWrapperOffset = kContextOffset + kPointerSize;
5888 static const int kTypeOffset = kWrapperOffset + kPointerSize; 6207 static const int kTypeOffset = kWrapperOffset + kPointerSize;
5889 static const int kCompilationTypeOffset = kTypeOffset + kPointerSize; 6208 static const int kLineEndsOffset = kTypeOffset + kPointerSize;
5890 static const int kCompilationStateOffset =
5891 kCompilationTypeOffset + kPointerSize;
5892 static const int kLineEndsOffset = kCompilationStateOffset + kPointerSize;
5893 static const int kIdOffset = kLineEndsOffset + kPointerSize; 6209 static const int kIdOffset = kLineEndsOffset + kPointerSize;
5894 static const int kEvalFromSharedOffset = kIdOffset + kPointerSize; 6210 static const int kEvalFromSharedOffset = kIdOffset + kPointerSize;
5895 static const int kEvalFrominstructionsOffsetOffset = 6211 static const int kEvalFrominstructionsOffsetOffset =
5896 kEvalFromSharedOffset + kPointerSize; 6212 kEvalFromSharedOffset + kPointerSize;
5897 static const int kSize = kEvalFrominstructionsOffsetOffset + kPointerSize; 6213 static const int kFlagsOffset =
6214 kEvalFrominstructionsOffsetOffset + kPointerSize;
6215 static const int kSize = kFlagsOffset + kPointerSize;
5898 6216
5899 private: 6217 private:
6218 // Bit positions in the flags field.
6219 static const int kCompilationTypeBit = 0;
6220 static const int kCompilationStateBit = 1;
6221 static const int kIsSharedCrossOriginBit = 2;
6222
5900 DISALLOW_IMPLICIT_CONSTRUCTORS(Script); 6223 DISALLOW_IMPLICIT_CONSTRUCTORS(Script);
5901 }; 6224 };
5902 6225
5903 6226
5904 // List of builtin functions we want to identify to improve code 6227 // List of builtin functions we want to identify to improve code
5905 // generation. 6228 // generation.
5906 // 6229 //
5907 // Each entry has a name of a global object property holding an object 6230 // Each entry has a name of a global object property holding an object
5908 // optionally followed by ".prototype", a name of a builtin function 6231 // optionally followed by ".prototype", a name of a builtin function
5909 // on the object (the one the id is set for), and a label. 6232 // on the object (the one the id is set for), and a label.
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
6280 6603
6281 // Indicates whether or not the code in the shared function support 6604 // Indicates whether or not the code in the shared function support
6282 // deoptimization. 6605 // deoptimization.
6283 inline bool has_deoptimization_support(); 6606 inline bool has_deoptimization_support();
6284 6607
6285 // Enable deoptimization support through recompiled code. 6608 // Enable deoptimization support through recompiled code.
6286 void EnableDeoptimizationSupport(Code* recompiled); 6609 void EnableDeoptimizationSupport(Code* recompiled);
6287 6610
6288 // Disable (further) attempted optimization of all functions sharing this 6611 // Disable (further) attempted optimization of all functions sharing this
6289 // shared function info. 6612 // shared function info.
6290 void DisableOptimization(const char* reason); 6613 void DisableOptimization(BailoutReason reason);
6291 6614
6292 // Lookup the bailout ID and ASSERT that it exists in the non-optimized 6615 // Lookup the bailout ID and ASSERT that it exists in the non-optimized
6293 // code, returns whether it asserted (i.e., always true if assertions are 6616 // code, returns whether it asserted (i.e., always true if assertions are
6294 // disabled). 6617 // disabled).
6295 bool VerifyBailoutId(BailoutId id); 6618 bool VerifyBailoutId(BailoutId id);
6296 6619
6297 // [source code]: Source code for the function. 6620 // [source code]: Source code for the function.
6298 bool HasSourceCode(); 6621 bool HasSourceCode();
6299 Handle<Object> GetSourceCode(); 6622 Handle<Object> GetSourceCode();
6300 6623
(...skipping 3580 matching lines...) Expand 10 before | Expand all | Expand 10 after
9881 } else { 10204 } else {
9882 value &= ~(1 << bit_position); 10205 value &= ~(1 << bit_position);
9883 } 10206 }
9884 return value; 10207 return value;
9885 } 10208 }
9886 }; 10209 };
9887 10210
9888 } } // namespace v8::internal 10211 } } // namespace v8::internal
9889 10212
9890 #endif // V8_OBJECTS_H_ 10213 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/mips/macro-assembler-mips.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698