Chromium Code Reviews| 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 1103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1114 V(kExpected0AsASmiSentinel, "Expected 0 as a Smi sentinel") \ | 1114 V(kExpected0AsASmiSentinel, "Expected 0 as a Smi sentinel") \ |
| 1115 V(kExpectedAlignmentMarker, "expected alignment marker") \ | 1115 V(kExpectedAlignmentMarker, "expected alignment marker") \ |
| 1116 V(kExpectedPropertyCellInRegisterA2, \ | 1116 V(kExpectedPropertyCellInRegisterA2, \ |
| 1117 "Expected property cell in register a2") \ | 1117 "Expected property cell in register a2") \ |
| 1118 V(kExpectedPropertyCellInRegisterEbx, \ | 1118 V(kExpectedPropertyCellInRegisterEbx, \ |
| 1119 "Expected property cell in register ebx") \ | 1119 "Expected property cell in register ebx") \ |
| 1120 V(kExpectedPropertyCellInRegisterRbx, \ | 1120 V(kExpectedPropertyCellInRegisterRbx, \ |
| 1121 "Expected property cell in register rbx") \ | 1121 "Expected property cell in register rbx") \ |
| 1122 V(kExpectingAlignmentForCopyBytes, \ | 1122 V(kExpectingAlignmentForCopyBytes, \ |
| 1123 "Expecting alignment for CopyBytes") \ | 1123 "Expecting alignment for CopyBytes") \ |
| 1124 V(kExportDeclaration, "Export declaration") \ | |
| 1124 V(kExternalStringExpectedButNotFound, \ | 1125 V(kExternalStringExpectedButNotFound, \ |
| 1125 "external string expected, but not found") \ | 1126 "external string expected, but not found") \ |
| 1126 V(kFailedBailedOutLastTime, "failed/bailed out last time") \ | 1127 V(kFailedBailedOutLastTime, "failed/bailed out last time") \ |
| 1127 V(kForInStatementIsNotFastCase, "ForInStatement is not fast case") \ | 1128 V(kForInStatementIsNotFastCase, "ForInStatement is not fast case") \ |
| 1128 V(kForInStatementOptimizationIsDisabled, \ | 1129 V(kForInStatementOptimizationIsDisabled, \ |
| 1129 "ForInStatement optimization is disabled") \ | 1130 "ForInStatement optimization is disabled") \ |
| 1130 V(kForInStatementWithNonLocalEachVariable, \ | 1131 V(kForInStatementWithNonLocalEachVariable, \ |
| 1131 "ForInStatement with non-local each variable") \ | 1132 "ForInStatement with non-local each variable") \ |
| 1132 V(kForOfStatement, "ForOfStatement") \ | 1133 V(kForOfStatement, "ForOfStatement") \ |
| 1133 V(kFrameIsExpectedToBeAligned, "frame is expected to be aligned") \ | 1134 V(kFrameIsExpectedToBeAligned, "frame is expected to be aligned") \ |
| 1134 V(kFunctionCallsEval, "function calls eval") \ | 1135 V(kFunctionCallsEval, "function calls eval") \ |
| 1135 V(kFunctionIsAGenerator, "function is a generator") \ | 1136 V(kFunctionIsAGenerator, "function is a generator") \ |
| 1136 V(kFunctionWithIllegalRedeclaration, "function with illegal redeclaration") \ | 1137 V(kFunctionWithIllegalRedeclaration, "function with illegal redeclaration") \ |
| 1137 V(kGeneratedCodeIsTooLarge, "Generated code is too large") \ | 1138 V(kGeneratedCodeIsTooLarge, "Generated code is too large") \ |
| 1138 V(kGeneratorFailedToResume, "Generator failed to resume") \ | 1139 V(kGeneratorFailedToResume, "Generator failed to resume") \ |
| 1139 V(kGenerator, "generator") \ | 1140 V(kGenerator, "generator") \ |
| 1140 V(kGlobalFunctionsMustHaveInitialMap, \ | 1141 V(kGlobalFunctionsMustHaveInitialMap, \ |
| 1141 "Global functions must have initial map") \ | 1142 "Global functions must have initial map") \ |
| 1142 V(kHeapNumberMapRegisterClobbered, "HeapNumberMap register clobbered") \ | 1143 V(kHeapNumberMapRegisterClobbered, "HeapNumberMap register clobbered") \ |
| 1144 V(kImportDeclaration, "Import declaration") \ | |
| 1143 V(kImproperObjectOnPrototypeChainForStore, \ | 1145 V(kImproperObjectOnPrototypeChainForStore, \ |
| 1144 "improper object on prototype chain for store") \ | 1146 "improper object on prototype chain for store") \ |
| 1145 V(kIndexIsNegative, "Index is negative") \ | 1147 V(kIndexIsNegative, "Index is negative") \ |
| 1146 V(kIndexIsTooLarge, "Index is too large") \ | 1148 V(kIndexIsTooLarge, "Index is too large") \ |
| 1147 V(kInlinedRuntimeFunctionClassOf, "inlined runtime function: ClassOf") \ | 1149 V(kInlinedRuntimeFunctionClassOf, "inlined runtime function: ClassOf") \ |
| 1148 V(kInlinedRuntimeFunctionFastAsciiArrayJoin, \ | 1150 V(kInlinedRuntimeFunctionFastAsciiArrayJoin, \ |
| 1149 "inlined runtime function: FastAsciiArrayJoin") \ | 1151 "inlined runtime function: FastAsciiArrayJoin") \ |
| 1150 V(kInlinedRuntimeFunctionGeneratorNext, \ | 1152 V(kInlinedRuntimeFunctionGeneratorNext, \ |
| 1151 "inlined runtime function: GeneratorNext") \ | 1153 "inlined runtime function: GeneratorNext") \ |
| 1152 V(kInlinedRuntimeFunctionGeneratorThrow, \ | 1154 V(kInlinedRuntimeFunctionGeneratorThrow, \ |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1189 V(kLetBindingReInitialization, "Let binding re-initialization") \ | 1191 V(kLetBindingReInitialization, "Let binding re-initialization") \ |
| 1190 V(kLiveBytesCountOverflowChunkSize, "Live Bytes Count overflow chunk size") \ | 1192 V(kLiveBytesCountOverflowChunkSize, "Live Bytes Count overflow chunk size") \ |
| 1191 V(kLiveEditFrameDroppingIsNotSupportedOnArm, \ | 1193 V(kLiveEditFrameDroppingIsNotSupportedOnArm, \ |
| 1192 "LiveEdit frame dropping is not supported on arm") \ | 1194 "LiveEdit frame dropping is not supported on arm") \ |
| 1193 V(kLiveEditFrameDroppingIsNotSupportedOnMips, \ | 1195 V(kLiveEditFrameDroppingIsNotSupportedOnMips, \ |
| 1194 "LiveEdit frame dropping is not supported on mips") \ | 1196 "LiveEdit frame dropping is not supported on mips") \ |
| 1195 V(kLiveEdit, "LiveEdit") \ | 1197 V(kLiveEdit, "LiveEdit") \ |
| 1196 V(kLookupVariableInCountOperation, \ | 1198 V(kLookupVariableInCountOperation, \ |
| 1197 "lookup variable in count operation") \ | 1199 "lookup variable in count operation") \ |
| 1198 V(kMapIsNoLongerInEax, "Map is no longer in eax") \ | 1200 V(kMapIsNoLongerInEax, "Map is no longer in eax") \ |
| 1201 V(kModuleDeclaration, "Module declaration") \ | |
| 1202 V(kModuleLiteral, "Module literal") \ | |
| 1203 V(kModulePath, "Module path") \ | |
| 1204 V(kModuleStatement, "Module statement") \ | |
| 1205 V(kModuleVariable, "Module variable") \ | |
| 1206 V(kModuleUrl, "Module url") \ | |
| 1199 V(kNoCasesLeft, "no cases left") \ | 1207 V(kNoCasesLeft, "no cases left") \ |
| 1200 V(kNoEmptyArraysHereInEmitFastAsciiArrayJoin, \ | 1208 V(kNoEmptyArraysHereInEmitFastAsciiArrayJoin, \ |
| 1201 "No empty arrays here in EmitFastAsciiArrayJoin") \ | 1209 "No empty arrays here in EmitFastAsciiArrayJoin") \ |
| 1202 V(kNonInitializerAssignmentToConst, \ | 1210 V(kNonInitializerAssignmentToConst, \ |
| 1203 "non-initializer assignment to const") \ | 1211 "non-initializer assignment to const") \ |
| 1204 V(kNonSmiIndex, "Non-smi index") \ | 1212 V(kNonSmiIndex, "Non-smi index") \ |
| 1205 V(kNonSmiKeyInArrayLiteral, "Non-smi key in array literal") \ | 1213 V(kNonSmiKeyInArrayLiteral, "Non-smi key in array literal") \ |
| 1206 V(kNonSmiValue, "Non-smi value") \ | 1214 V(kNonSmiValue, "Non-smi value") \ |
| 1207 V(kNotEnoughVirtualRegistersForValues, \ | 1215 V(kNotEnoughVirtualRegistersForValues, \ |
| 1208 "not enough virtual registers for values") \ | 1216 "not enough virtual registers for values") \ |
| (...skipping 21 matching lines...) Expand all Loading... | |
| 1230 V(kPropertyAllocationCountFailed, "Property allocation count failed") \ | 1238 V(kPropertyAllocationCountFailed, "Property allocation count failed") \ |
| 1231 V(kReceivedInvalidReturnAddress, "Received invalid return address") \ | 1239 V(kReceivedInvalidReturnAddress, "Received invalid return address") \ |
| 1232 V(kReferenceToAVariableWhichRequiresDynamicLookup, \ | 1240 V(kReferenceToAVariableWhichRequiresDynamicLookup, \ |
| 1233 "reference to a variable which requires dynamic lookup") \ | 1241 "reference to a variable which requires dynamic lookup") \ |
| 1234 V(kReferenceToGlobalLexicalVariable, \ | 1242 V(kReferenceToGlobalLexicalVariable, \ |
| 1235 "reference to global lexical variable") \ | 1243 "reference to global lexical variable") \ |
| 1236 V(kReferenceToUninitializedVariable, "reference to uninitialized variable") \ | 1244 V(kReferenceToUninitializedVariable, "reference to uninitialized variable") \ |
| 1237 V(kRegisterDidNotMatchExpectedRoot, "Register did not match expected root") \ | 1245 V(kRegisterDidNotMatchExpectedRoot, "Register did not match expected root") \ |
| 1238 V(kRegisterWasClobbered, "register was clobbered") \ | 1246 V(kRegisterWasClobbered, "register was clobbered") \ |
| 1239 V(kScopedBlock, "ScopedBlock") \ | 1247 V(kScopedBlock, "ScopedBlock") \ |
| 1240 V(kSharedFunctionInfoLiteral, "SharedFunctionInfoLiteral") \ | 1248 V(kSharedFunctionInfoLiteral, "Shared function info literal") \ |
| 1241 V(kSmiAdditionOverflow, "Smi addition overflow") \ | 1249 V(kSmiAdditionOverflow, "Smi addition overflow") \ |
| 1242 V(kSmiSubtractionOverflow, "Smi subtraction overflow") \ | 1250 V(kSmiSubtractionOverflow, "Smi subtraction overflow") \ |
| 1243 V(kStackFrameTypesMustMatch, "stack frame types must match") \ | 1251 V(kStackFrameTypesMustMatch, "stack frame types must match") \ |
| 1244 V(kSwitchStatementMixedOrNonLiteralSwitchLabels, \ | 1252 V(kSwitchStatementMixedOrNonLiteralSwitchLabels, \ |
| 1245 "SwitchStatement: mixed or non-literal switch labels") \ | 1253 "SwitchStatement: mixed or non-literal switch labels") \ |
| 1246 V(kSwitchStatementTooManyClauses, "SwitchStatement: too many clauses") \ | 1254 V(kSwitchStatementTooManyClauses, "SwitchStatement: too many clauses") \ |
| 1247 V(kTheInstructionShouldBeALui, "The instruction should be a lui") \ | 1255 V(kTheInstructionShouldBeALui, "The instruction should be a lui") \ |
| 1248 V(kTheInstructionShouldBeAnOri, "The instruction should be an ori") \ | 1256 V(kTheInstructionShouldBeAnOri, "The instruction should be an ori") \ |
| 1249 V(kTheInstructionToPatchShouldBeALoadFromPc, \ | 1257 V(kTheInstructionToPatchShouldBeALoadFromPc, \ |
| 1250 "The instruction to patch should be a load from pc") \ | 1258 "The instruction to patch should be a load from pc") \ |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1316 V(kUnsupportedNonPrimitiveCompare, "Unsupported non-primitive compare") \ | 1324 V(kUnsupportedNonPrimitiveCompare, "Unsupported non-primitive compare") \ |
| 1317 V(kUnsupportedPhiUseOfArguments, "Unsupported phi use of arguments") \ | 1325 V(kUnsupportedPhiUseOfArguments, "Unsupported phi use of arguments") \ |
| 1318 V(kUnsupportedPhiUseOfConstVariable, \ | 1326 V(kUnsupportedPhiUseOfConstVariable, \ |
| 1319 "Unsupported phi use of const variable") \ | 1327 "Unsupported phi use of const variable") \ |
| 1320 V(kUnsupportedTaggedImmediate, "unsupported tagged immediate") \ | 1328 V(kUnsupportedTaggedImmediate, "unsupported tagged immediate") \ |
| 1321 V(kVariableResolvedToWithContext, "Variable resolved to with context") \ | 1329 V(kVariableResolvedToWithContext, "Variable resolved to with context") \ |
| 1322 V(kWeShouldNotHaveAnEmptyLexicalContext, \ | 1330 V(kWeShouldNotHaveAnEmptyLexicalContext, \ |
| 1323 "we should not have an empty lexical context") \ | 1331 "we should not have an empty lexical context") \ |
| 1324 V(kWithStatement, "WithStatement") \ | 1332 V(kWithStatement, "WithStatement") \ |
| 1325 V(kWrongAddressOrValuePassedToRecordWrite, \ | 1333 V(kWrongAddressOrValuePassedToRecordWrite, \ |
| 1326 "Wrong address or value passed to RecordWrite") | 1334 "Wrong address or value passed to RecordWrite") \ |
| 1335 V(kYield, "Yeld") \ | |
|
yurys
2013/09/02 14:40:05
No need in \ after the last line
loislo
2013/09/02 16:03:45
Done.
| |
| 1327 | 1336 |
| 1328 | 1337 |
| 1329 #define ERROR_MESSAGES_CONSTANTS(C, T) C, | 1338 #define ERROR_MESSAGES_CONSTANTS(C, T) C, |
| 1330 enum BailoutReason { | 1339 enum BailoutReason { |
| 1331 ERROR_MESSAGES_LIST(ERROR_MESSAGES_CONSTANTS) | 1340 ERROR_MESSAGES_LIST(ERROR_MESSAGES_CONSTANTS) |
| 1332 kLastErrorMessage | 1341 kLastErrorMessage |
| 1333 }; | 1342 }; |
| 1334 #undef ERROR_MESSAGES_CONSTANTS | 1343 #undef ERROR_MESSAGES_CONSTANTS |
| 1335 | 1344 |
| 1336 | 1345 |
| (...skipping 5210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6547 // deoptimization. | 6556 // deoptimization. |
| 6548 inline bool has_deoptimization_support(); | 6557 inline bool has_deoptimization_support(); |
| 6549 | 6558 |
| 6550 // Enable deoptimization support through recompiled code. | 6559 // Enable deoptimization support through recompiled code. |
| 6551 void EnableDeoptimizationSupport(Code* recompiled); | 6560 void EnableDeoptimizationSupport(Code* recompiled); |
| 6552 | 6561 |
| 6553 // Disable (further) attempted optimization of all functions sharing this | 6562 // Disable (further) attempted optimization of all functions sharing this |
| 6554 // shared function info. | 6563 // shared function info. |
| 6555 void DisableOptimization(BailoutReason reason); | 6564 void DisableOptimization(BailoutReason reason); |
| 6556 | 6565 |
| 6566 inline BailoutReason DisableOptimizationReason(); | |
| 6567 | |
| 6557 // Lookup the bailout ID and ASSERT that it exists in the non-optimized | 6568 // Lookup the bailout ID and ASSERT that it exists in the non-optimized |
| 6558 // code, returns whether it asserted (i.e., always true if assertions are | 6569 // code, returns whether it asserted (i.e., always true if assertions are |
| 6559 // disabled). | 6570 // disabled). |
| 6560 bool VerifyBailoutId(BailoutId id); | 6571 bool VerifyBailoutId(BailoutId id); |
| 6561 | 6572 |
| 6562 // [source code]: Source code for the function. | 6573 // [source code]: Source code for the function. |
| 6563 bool HasSourceCode(); | 6574 bool HasSourceCode(); |
| 6564 Handle<Object> GetSourceCode(); | 6575 Handle<Object> GetSourceCode(); |
| 6565 | 6576 |
| 6566 // Number of times the function was optimized. | 6577 // Number of times the function was optimized. |
| 6567 inline int opt_count(); | 6578 inline int opt_count(); |
| 6568 inline void set_opt_count(int opt_count); | 6579 inline void set_opt_count(int opt_count); |
| 6569 | 6580 |
| 6570 // Number of times the function was deoptimized. | 6581 // Number of times the function was deoptimized. |
| 6571 inline void set_deopt_count(int value); | 6582 inline void set_deopt_count(int value); |
| 6572 inline int deopt_count(); | 6583 inline int deopt_count(); |
| 6573 inline void increment_deopt_count(); | 6584 inline void increment_deopt_count(); |
| 6574 | 6585 |
| 6575 // Number of time we tried to re-enable optimization after it | 6586 // Number of time we tried to re-enable optimization after it |
| 6576 // was disabled due to high number of deoptimizations. | 6587 // was disabled due to high number of deoptimizations. |
| 6577 inline void set_opt_reenable_tries(int value); | 6588 inline void set_opt_reenable_tries(int value); |
| 6578 inline int opt_reenable_tries(); | 6589 inline int opt_reenable_tries(); |
| 6579 | 6590 |
| 6580 inline void TryReenableOptimization(); | 6591 inline void TryReenableOptimization(); |
| 6581 | 6592 |
| 6582 // Stores deopt_count, opt_reenable_tries and ic_age as bit-fields. | 6593 // Stores deopt_count, opt_reenable_tries and ic_age as bit-fields. |
| 6583 inline void set_counters(int value); | 6594 inline void set_counters(int value); |
| 6584 inline int counters(); | 6595 inline int counters(); |
| 6585 | 6596 |
| 6597 // Stores opt_count and bailout_reason as bit-fields. | |
| 6598 inline void set_opt_count_and_bailout_reason(int value); | |
| 6599 inline int opt_count_and_bailout_reason(); | |
| 6600 | |
| 6601 inline void set_bailout_reason(BailoutReason reason) { | |
|
yurys
2013/09/02 14:40:05
excessive 'inline'
loislo
2013/09/02 16:03:45
Done.
| |
| 6602 set_opt_count_and_bailout_reason( | |
| 6603 DisabledOptimizationReasonBits::update(opt_count_and_bailout_reason(), | |
| 6604 reason)); | |
| 6605 } | |
| 6606 | |
| 6607 inline void set_dont_optimize_reason(BailoutReason reason) { | |
| 6608 set_bailout_reason(reason); | |
| 6609 set_dont_optimize(reason != kNoReason); | |
| 6610 } | |
| 6611 | |
| 6586 // Source size of this function. | 6612 // Source size of this function. |
| 6587 int SourceSize(); | 6613 int SourceSize(); |
| 6588 | 6614 |
| 6589 // Calculate the instance size. | 6615 // Calculate the instance size. |
| 6590 int CalculateInstanceSize(); | 6616 int CalculateInstanceSize(); |
| 6591 | 6617 |
| 6592 // Calculate the number of in-object properties. | 6618 // Calculate the number of in-object properties. |
| 6593 int CalculateInObjectProperties(); | 6619 int CalculateInObjectProperties(); |
| 6594 | 6620 |
| 6595 // Dispatched behavior. | 6621 // Dispatched behavior. |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6642 static const int kNumLiteralsOffset = | 6668 static const int kNumLiteralsOffset = |
| 6643 kExpectedNofPropertiesOffset + kPointerSize; | 6669 kExpectedNofPropertiesOffset + kPointerSize; |
| 6644 static const int kStartPositionAndTypeOffset = | 6670 static const int kStartPositionAndTypeOffset = |
| 6645 kNumLiteralsOffset + kPointerSize; | 6671 kNumLiteralsOffset + kPointerSize; |
| 6646 static const int kEndPositionOffset = | 6672 static const int kEndPositionOffset = |
| 6647 kStartPositionAndTypeOffset + kPointerSize; | 6673 kStartPositionAndTypeOffset + kPointerSize; |
| 6648 static const int kFunctionTokenPositionOffset = | 6674 static const int kFunctionTokenPositionOffset = |
| 6649 kEndPositionOffset + kPointerSize; | 6675 kEndPositionOffset + kPointerSize; |
| 6650 static const int kCompilerHintsOffset = | 6676 static const int kCompilerHintsOffset = |
| 6651 kFunctionTokenPositionOffset + kPointerSize; | 6677 kFunctionTokenPositionOffset + kPointerSize; |
| 6652 static const int kOptCountOffset = kCompilerHintsOffset + kPointerSize; | 6678 static const int kOptCountAndBailoutReasonOffset = |
| 6653 static const int kCountersOffset = kOptCountOffset + kPointerSize; | 6679 kCompilerHintsOffset + kPointerSize; |
| 6680 static const int kCountersOffset = | |
| 6681 kOptCountAndBailoutReasonOffset + kPointerSize; | |
| 6654 | 6682 |
| 6655 // Total size. | 6683 // Total size. |
| 6656 static const int kSize = kCountersOffset + kPointerSize; | 6684 static const int kSize = kCountersOffset + kPointerSize; |
| 6657 #else | 6685 #else |
| 6658 // The only reason to use smi fields instead of int fields | 6686 // The only reason to use smi fields instead of int fields |
| 6659 // is to allow iteration without maps decoding during | 6687 // is to allow iteration without maps decoding during |
| 6660 // garbage collections. | 6688 // garbage collections. |
| 6661 // To avoid wasting space on 64-bit architectures we use | 6689 // To avoid wasting space on 64-bit architectures we use |
| 6662 // the following trick: we group integer fields into pairs | 6690 // the following trick: we group integer fields into pairs |
| 6663 // First integer in each pair is shifted left by 1. | 6691 // First integer in each pair is shifted left by 1. |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 6677 static const int kEndPositionOffset = | 6705 static const int kEndPositionOffset = |
| 6678 kNumLiteralsOffset + kIntSize; | 6706 kNumLiteralsOffset + kIntSize; |
| 6679 static const int kStartPositionAndTypeOffset = | 6707 static const int kStartPositionAndTypeOffset = |
| 6680 kEndPositionOffset + kIntSize; | 6708 kEndPositionOffset + kIntSize; |
| 6681 | 6709 |
| 6682 static const int kFunctionTokenPositionOffset = | 6710 static const int kFunctionTokenPositionOffset = |
| 6683 kStartPositionAndTypeOffset + kIntSize; | 6711 kStartPositionAndTypeOffset + kIntSize; |
| 6684 static const int kCompilerHintsOffset = | 6712 static const int kCompilerHintsOffset = |
| 6685 kFunctionTokenPositionOffset + kIntSize; | 6713 kFunctionTokenPositionOffset + kIntSize; |
| 6686 | 6714 |
| 6687 static const int kOptCountOffset = kCompilerHintsOffset + kIntSize; | 6715 static const int kOptCountAndBailoutReasonOffset = |
| 6716 kCompilerHintsOffset + kIntSize; | |
| 6688 | 6717 |
| 6689 static const int kCountersOffset = kOptCountOffset + kIntSize; | 6718 static const int kCountersOffset = |
| 6719 kOptCountAndBailoutReasonOffset + kIntSize; | |
| 6690 | 6720 |
| 6691 // Total size. | 6721 // Total size. |
| 6692 static const int kSize = kCountersOffset + kIntSize; | 6722 static const int kSize = kCountersOffset + kIntSize; |
| 6693 | 6723 |
| 6694 #endif | 6724 #endif |
| 6695 | 6725 |
| 6696 // The construction counter for inobject slack tracking is stored in the | 6726 // The construction counter for inobject slack tracking is stored in the |
| 6697 // most significant byte of compiler_hints which is otherwise unused. | 6727 // most significant byte of compiler_hints which is otherwise unused. |
| 6698 // Its offset depends on the endian-ness of the architecture. | 6728 // Its offset depends on the endian-ness of the architecture. |
| 6699 #if __BYTE_ORDER == __LITTLE_ENDIAN | 6729 #if __BYTE_ORDER == __LITTLE_ENDIAN |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6738 kDontCache, | 6768 kDontCache, |
| 6739 kDontFlush, | 6769 kDontFlush, |
| 6740 kIsGenerator, | 6770 kIsGenerator, |
| 6741 kCompilerHintsCount // Pseudo entry | 6771 kCompilerHintsCount // Pseudo entry |
| 6742 }; | 6772 }; |
| 6743 | 6773 |
| 6744 class DeoptCountBits: public BitField<int, 0, 4> {}; | 6774 class DeoptCountBits: public BitField<int, 0, 4> {}; |
| 6745 class OptReenableTriesBits: public BitField<int, 4, 18> {}; | 6775 class OptReenableTriesBits: public BitField<int, 4, 18> {}; |
| 6746 class ICAgeBits: public BitField<int, 22, 8> {}; | 6776 class ICAgeBits: public BitField<int, 22, 8> {}; |
| 6747 | 6777 |
| 6778 class OptCountBits: public BitField<int, 0, 22> {}; | |
| 6779 class DisabledOptimizationReasonBits: public BitField<int, 22, 8> {}; | |
| 6780 | |
| 6748 private: | 6781 private: |
| 6749 #if V8_HOST_ARCH_32_BIT | 6782 #if V8_HOST_ARCH_32_BIT |
| 6750 // On 32 bit platforms, compiler hints is a smi. | 6783 // On 32 bit platforms, compiler hints is a smi. |
| 6751 static const int kCompilerHintsSmiTagSize = kSmiTagSize; | 6784 static const int kCompilerHintsSmiTagSize = kSmiTagSize; |
| 6752 static const int kCompilerHintsSize = kPointerSize; | 6785 static const int kCompilerHintsSize = kPointerSize; |
| 6753 #else | 6786 #else |
| 6754 // On 64 bit platforms, compiler hints is not a smi, see comment above. | 6787 // On 64 bit platforms, compiler hints is not a smi, see comment above. |
| 6755 static const int kCompilerHintsSmiTagSize = 0; | 6788 static const int kCompilerHintsSmiTagSize = 0; |
| 6756 static const int kCompilerHintsSize = kIntSize; | 6789 static const int kCompilerHintsSize = kIntSize; |
| 6757 #endif | 6790 #endif |
| (...skipping 3401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 10159 } else { | 10192 } else { |
| 10160 value &= ~(1 << bit_position); | 10193 value &= ~(1 << bit_position); |
| 10161 } | 10194 } |
| 10162 return value; | 10195 return value; |
| 10163 } | 10196 } |
| 10164 }; | 10197 }; |
| 10165 | 10198 |
| 10166 } } // namespace v8::internal | 10199 } } // namespace v8::internal |
| 10167 | 10200 |
| 10168 #endif // V8_OBJECTS_H_ | 10201 #endif // V8_OBJECTS_H_ |
| OLD | NEW |