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 4977 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4988 // | 4988 // |
4989 // It can be empty. | 4989 // It can be empty. |
4990 class DeoptimizationInputData: public FixedArray { | 4990 class DeoptimizationInputData: public FixedArray { |
4991 public: | 4991 public: |
4992 // Layout description. Indices in the array. | 4992 // Layout description. Indices in the array. |
4993 static const int kTranslationByteArrayIndex = 0; | 4993 static const int kTranslationByteArrayIndex = 0; |
4994 static const int kInlinedFunctionCountIndex = 1; | 4994 static const int kInlinedFunctionCountIndex = 1; |
4995 static const int kLiteralArrayIndex = 2; | 4995 static const int kLiteralArrayIndex = 2; |
4996 static const int kOsrAstIdIndex = 3; | 4996 static const int kOsrAstIdIndex = 3; |
4997 static const int kOsrPcOffsetIndex = 4; | 4997 static const int kOsrPcOffsetIndex = 4; |
4998 static const int kFirstDeoptEntryIndex = 5; | 4998 static const int kOptimizationIdIndex = 5; |
| 4999 static const int kFirstDeoptEntryIndex = 6; |
4999 | 5000 |
5000 // Offsets of deopt entry elements relative to the start of the entry. | 5001 // Offsets of deopt entry elements relative to the start of the entry. |
5001 static const int kAstIdRawOffset = 0; | 5002 static const int kAstIdRawOffset = 0; |
5002 static const int kTranslationIndexOffset = 1; | 5003 static const int kTranslationIndexOffset = 1; |
5003 static const int kArgumentsStackHeightOffset = 2; | 5004 static const int kArgumentsStackHeightOffset = 2; |
5004 static const int kPcOffset = 3; | 5005 static const int kPcOffset = 3; |
5005 static const int kDeoptEntrySize = 4; | 5006 static const int kDeoptEntrySize = 4; |
5006 | 5007 |
5007 // Simple element accessors. | 5008 // Simple element accessors. |
5008 #define DEFINE_ELEMENT_ACCESSORS(name, type) \ | 5009 #define DEFINE_ELEMENT_ACCESSORS(name, type) \ |
5009 type* name() { \ | 5010 type* name() { \ |
5010 return type::cast(get(k##name##Index)); \ | 5011 return type::cast(get(k##name##Index)); \ |
5011 } \ | 5012 } \ |
5012 void Set##name(type* value) { \ | 5013 void Set##name(type* value) { \ |
5013 set(k##name##Index, value); \ | 5014 set(k##name##Index, value); \ |
5014 } | 5015 } |
5015 | 5016 |
5016 DEFINE_ELEMENT_ACCESSORS(TranslationByteArray, ByteArray) | 5017 DEFINE_ELEMENT_ACCESSORS(TranslationByteArray, ByteArray) |
5017 DEFINE_ELEMENT_ACCESSORS(InlinedFunctionCount, Smi) | 5018 DEFINE_ELEMENT_ACCESSORS(InlinedFunctionCount, Smi) |
5018 DEFINE_ELEMENT_ACCESSORS(LiteralArray, FixedArray) | 5019 DEFINE_ELEMENT_ACCESSORS(LiteralArray, FixedArray) |
5019 DEFINE_ELEMENT_ACCESSORS(OsrAstId, Smi) | 5020 DEFINE_ELEMENT_ACCESSORS(OsrAstId, Smi) |
5020 DEFINE_ELEMENT_ACCESSORS(OsrPcOffset, Smi) | 5021 DEFINE_ELEMENT_ACCESSORS(OsrPcOffset, Smi) |
| 5022 DEFINE_ELEMENT_ACCESSORS(OptimizationId, Smi) |
5021 | 5023 |
5022 #undef DEFINE_ELEMENT_ACCESSORS | 5024 #undef DEFINE_ELEMENT_ACCESSORS |
5023 | 5025 |
5024 // Accessors for elements of the ith deoptimization entry. | 5026 // Accessors for elements of the ith deoptimization entry. |
5025 #define DEFINE_ENTRY_ACCESSORS(name, type) \ | 5027 #define DEFINE_ENTRY_ACCESSORS(name, type) \ |
5026 type* name(int i) { \ | 5028 type* name(int i) { \ |
5027 return type::cast(get(IndexForEntry(i) + k##name##Offset)); \ | 5029 return type::cast(get(IndexForEntry(i) + k##name##Offset)); \ |
5028 } \ | 5030 } \ |
5029 void Set##name(int i, type* value) { \ | 5031 void Set##name(int i, type* value) { \ |
5030 set(IndexForEntry(i) + k##name##Offset, value); \ | 5032 set(IndexForEntry(i) + k##name##Offset, value); \ |
(...skipping 5726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10757 } else { | 10759 } else { |
10758 value &= ~(1 << bit_position); | 10760 value &= ~(1 << bit_position); |
10759 } | 10761 } |
10760 return value; | 10762 return value; |
10761 } | 10763 } |
10762 }; | 10764 }; |
10763 | 10765 |
10764 } } // namespace v8::internal | 10766 } } // namespace v8::internal |
10765 | 10767 |
10766 #endif // V8_OBJECTS_H_ | 10768 #endif // V8_OBJECTS_H_ |
OLD | NEW |