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") \ | |
|
Yang
2013/09/05 12:19:42
What do you need this for? Same for the lines belo
loislo
2013/09/05 12:44:45
when v8 parses the js function it may disable opti
| |
| 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, "Yield") | |
| 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 5216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6553 // deoptimization. | 6562 // deoptimization. |
| 6554 inline bool has_deoptimization_support(); | 6563 inline bool has_deoptimization_support(); |
| 6555 | 6564 |
| 6556 // Enable deoptimization support through recompiled code. | 6565 // Enable deoptimization support through recompiled code. |
| 6557 void EnableDeoptimizationSupport(Code* recompiled); | 6566 void EnableDeoptimizationSupport(Code* recompiled); |
| 6558 | 6567 |
| 6559 // Disable (further) attempted optimization of all functions sharing this | 6568 // Disable (further) attempted optimization of all functions sharing this |
| 6560 // shared function info. | 6569 // shared function info. |
| 6561 void DisableOptimization(BailoutReason reason); | 6570 void DisableOptimization(BailoutReason reason); |
| 6562 | 6571 |
| 6572 inline BailoutReason DisableOptimizationReason(); | |
| 6573 | |
| 6563 // Lookup the bailout ID and ASSERT that it exists in the non-optimized | 6574 // Lookup the bailout ID and ASSERT that it exists in the non-optimized |
| 6564 // code, returns whether it asserted (i.e., always true if assertions are | 6575 // code, returns whether it asserted (i.e., always true if assertions are |
| 6565 // disabled). | 6576 // disabled). |
| 6566 bool VerifyBailoutId(BailoutId id); | 6577 bool VerifyBailoutId(BailoutId id); |
| 6567 | 6578 |
| 6568 // [source code]: Source code for the function. | 6579 // [source code]: Source code for the function. |
| 6569 bool HasSourceCode(); | 6580 bool HasSourceCode(); |
| 6570 Handle<Object> GetSourceCode(); | 6581 Handle<Object> GetSourceCode(); |
| 6571 | 6582 |
| 6572 // Number of times the function was optimized. | 6583 // Number of times the function was optimized. |
| 6573 inline int opt_count(); | 6584 inline int opt_count(); |
| 6574 inline void set_opt_count(int opt_count); | 6585 inline void set_opt_count(int opt_count); |
| 6575 | 6586 |
| 6576 // Number of times the function was deoptimized. | 6587 // Number of times the function was deoptimized. |
| 6577 inline void set_deopt_count(int value); | 6588 inline void set_deopt_count(int value); |
| 6578 inline int deopt_count(); | 6589 inline int deopt_count(); |
| 6579 inline void increment_deopt_count(); | 6590 inline void increment_deopt_count(); |
| 6580 | 6591 |
| 6581 // Number of time we tried to re-enable optimization after it | 6592 // Number of time we tried to re-enable optimization after it |
| 6582 // was disabled due to high number of deoptimizations. | 6593 // was disabled due to high number of deoptimizations. |
| 6583 inline void set_opt_reenable_tries(int value); | 6594 inline void set_opt_reenable_tries(int value); |
| 6584 inline int opt_reenable_tries(); | 6595 inline int opt_reenable_tries(); |
| 6585 | 6596 |
| 6586 inline void TryReenableOptimization(); | 6597 inline void TryReenableOptimization(); |
| 6587 | 6598 |
| 6588 // Stores deopt_count, opt_reenable_tries and ic_age as bit-fields. | 6599 // Stores deopt_count, opt_reenable_tries and ic_age as bit-fields. |
| 6589 inline void set_counters(int value); | 6600 inline void set_counters(int value); |
| 6590 inline int counters(); | 6601 inline int counters(); |
| 6591 | 6602 |
| 6603 // Stores opt_count and bailout_reason as bit-fields. | |
| 6604 inline void set_opt_count_and_bailout_reason(int value); | |
| 6605 inline int opt_count_and_bailout_reason(); | |
| 6606 | |
| 6607 void set_bailout_reason(BailoutReason reason) { | |
| 6608 set_opt_count_and_bailout_reason( | |
| 6609 DisabledOptimizationReasonBits::update(opt_count_and_bailout_reason(), | |
| 6610 reason)); | |
| 6611 } | |
| 6612 | |
| 6613 void set_dont_optimize_reason(BailoutReason reason) { | |
| 6614 set_bailout_reason(reason); | |
| 6615 set_dont_optimize(reason != kNoReason); | |
| 6616 } | |
| 6617 | |
| 6592 // Source size of this function. | 6618 // Source size of this function. |
| 6593 int SourceSize(); | 6619 int SourceSize(); |
| 6594 | 6620 |
| 6595 // Calculate the instance size. | 6621 // Calculate the instance size. |
| 6596 int CalculateInstanceSize(); | 6622 int CalculateInstanceSize(); |
| 6597 | 6623 |
| 6598 // Calculate the number of in-object properties. | 6624 // Calculate the number of in-object properties. |
| 6599 int CalculateInObjectProperties(); | 6625 int CalculateInObjectProperties(); |
| 6600 | 6626 |
| 6601 // Dispatched behavior. | 6627 // Dispatched behavior. |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6648 static const int kNumLiteralsOffset = | 6674 static const int kNumLiteralsOffset = |
| 6649 kExpectedNofPropertiesOffset + kPointerSize; | 6675 kExpectedNofPropertiesOffset + kPointerSize; |
| 6650 static const int kStartPositionAndTypeOffset = | 6676 static const int kStartPositionAndTypeOffset = |
| 6651 kNumLiteralsOffset + kPointerSize; | 6677 kNumLiteralsOffset + kPointerSize; |
| 6652 static const int kEndPositionOffset = | 6678 static const int kEndPositionOffset = |
| 6653 kStartPositionAndTypeOffset + kPointerSize; | 6679 kStartPositionAndTypeOffset + kPointerSize; |
| 6654 static const int kFunctionTokenPositionOffset = | 6680 static const int kFunctionTokenPositionOffset = |
| 6655 kEndPositionOffset + kPointerSize; | 6681 kEndPositionOffset + kPointerSize; |
| 6656 static const int kCompilerHintsOffset = | 6682 static const int kCompilerHintsOffset = |
| 6657 kFunctionTokenPositionOffset + kPointerSize; | 6683 kFunctionTokenPositionOffset + kPointerSize; |
| 6658 static const int kOptCountOffset = kCompilerHintsOffset + kPointerSize; | 6684 static const int kOptCountAndBailoutReasonOffset = |
| 6659 static const int kCountersOffset = kOptCountOffset + kPointerSize; | 6685 kCompilerHintsOffset + kPointerSize; |
| 6686 static const int kCountersOffset = | |
| 6687 kOptCountAndBailoutReasonOffset + kPointerSize; | |
| 6660 | 6688 |
| 6661 // Total size. | 6689 // Total size. |
| 6662 static const int kSize = kCountersOffset + kPointerSize; | 6690 static const int kSize = kCountersOffset + kPointerSize; |
| 6663 #else | 6691 #else |
| 6664 // The only reason to use smi fields instead of int fields | 6692 // The only reason to use smi fields instead of int fields |
| 6665 // is to allow iteration without maps decoding during | 6693 // is to allow iteration without maps decoding during |
| 6666 // garbage collections. | 6694 // garbage collections. |
| 6667 // To avoid wasting space on 64-bit architectures we use | 6695 // To avoid wasting space on 64-bit architectures we use |
| 6668 // the following trick: we group integer fields into pairs | 6696 // the following trick: we group integer fields into pairs |
| 6669 // First integer in each pair is shifted left by 1. | 6697 // First integer in each pair is shifted left by 1. |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 6683 static const int kEndPositionOffset = | 6711 static const int kEndPositionOffset = |
| 6684 kNumLiteralsOffset + kIntSize; | 6712 kNumLiteralsOffset + kIntSize; |
| 6685 static const int kStartPositionAndTypeOffset = | 6713 static const int kStartPositionAndTypeOffset = |
| 6686 kEndPositionOffset + kIntSize; | 6714 kEndPositionOffset + kIntSize; |
| 6687 | 6715 |
| 6688 static const int kFunctionTokenPositionOffset = | 6716 static const int kFunctionTokenPositionOffset = |
| 6689 kStartPositionAndTypeOffset + kIntSize; | 6717 kStartPositionAndTypeOffset + kIntSize; |
| 6690 static const int kCompilerHintsOffset = | 6718 static const int kCompilerHintsOffset = |
| 6691 kFunctionTokenPositionOffset + kIntSize; | 6719 kFunctionTokenPositionOffset + kIntSize; |
| 6692 | 6720 |
| 6693 static const int kOptCountOffset = kCompilerHintsOffset + kIntSize; | 6721 static const int kOptCountAndBailoutReasonOffset = |
| 6722 kCompilerHintsOffset + kIntSize; | |
| 6694 | 6723 |
| 6695 static const int kCountersOffset = kOptCountOffset + kIntSize; | 6724 static const int kCountersOffset = |
| 6725 kOptCountAndBailoutReasonOffset + kIntSize; | |
| 6696 | 6726 |
| 6697 // Total size. | 6727 // Total size. |
| 6698 static const int kSize = kCountersOffset + kIntSize; | 6728 static const int kSize = kCountersOffset + kIntSize; |
| 6699 | 6729 |
| 6700 #endif | 6730 #endif |
| 6701 | 6731 |
| 6702 // The construction counter for inobject slack tracking is stored in the | 6732 // The construction counter for inobject slack tracking is stored in the |
| 6703 // most significant byte of compiler_hints which is otherwise unused. | 6733 // most significant byte of compiler_hints which is otherwise unused. |
| 6704 // Its offset depends on the endian-ness of the architecture. | 6734 // Its offset depends on the endian-ness of the architecture. |
| 6705 #if __BYTE_ORDER == __LITTLE_ENDIAN | 6735 #if __BYTE_ORDER == __LITTLE_ENDIAN |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6744 kDontCache, | 6774 kDontCache, |
| 6745 kDontFlush, | 6775 kDontFlush, |
| 6746 kIsGenerator, | 6776 kIsGenerator, |
| 6747 kCompilerHintsCount // Pseudo entry | 6777 kCompilerHintsCount // Pseudo entry |
| 6748 }; | 6778 }; |
| 6749 | 6779 |
| 6750 class DeoptCountBits: public BitField<int, 0, 4> {}; | 6780 class DeoptCountBits: public BitField<int, 0, 4> {}; |
| 6751 class OptReenableTriesBits: public BitField<int, 4, 18> {}; | 6781 class OptReenableTriesBits: public BitField<int, 4, 18> {}; |
| 6752 class ICAgeBits: public BitField<int, 22, 8> {}; | 6782 class ICAgeBits: public BitField<int, 22, 8> {}; |
| 6753 | 6783 |
| 6784 class OptCountBits: public BitField<int, 0, 22> {}; | |
| 6785 class DisabledOptimizationReasonBits: public BitField<int, 22, 8> {}; | |
| 6786 | |
| 6754 private: | 6787 private: |
| 6755 #if V8_HOST_ARCH_32_BIT | 6788 #if V8_HOST_ARCH_32_BIT |
| 6756 // On 32 bit platforms, compiler hints is a smi. | 6789 // On 32 bit platforms, compiler hints is a smi. |
| 6757 static const int kCompilerHintsSmiTagSize = kSmiTagSize; | 6790 static const int kCompilerHintsSmiTagSize = kSmiTagSize; |
| 6758 static const int kCompilerHintsSize = kPointerSize; | 6791 static const int kCompilerHintsSize = kPointerSize; |
| 6759 #else | 6792 #else |
| 6760 // On 64 bit platforms, compiler hints is not a smi, see comment above. | 6793 // On 64 bit platforms, compiler hints is not a smi, see comment above. |
| 6761 static const int kCompilerHintsSmiTagSize = 0; | 6794 static const int kCompilerHintsSmiTagSize = 0; |
| 6762 static const int kCompilerHintsSize = kIntSize; | 6795 static const int kCompilerHintsSize = kIntSize; |
| 6763 #endif | 6796 #endif |
| (...skipping 3413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 10177 } else { | 10210 } else { |
| 10178 value &= ~(1 << bit_position); | 10211 value &= ~(1 << bit_position); |
| 10179 } | 10212 } |
| 10180 return value; | 10213 return value; |
| 10181 } | 10214 } |
| 10182 }; | 10215 }; |
| 10183 | 10216 |
| 10184 } } // namespace v8::internal | 10217 } } // namespace v8::internal |
| 10185 | 10218 |
| 10186 #endif // V8_OBJECTS_H_ | 10219 #endif // V8_OBJECTS_H_ |
| OLD | NEW |