| 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 4792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4803 enum StubType { | 4803 enum StubType { |
| 4804 NORMAL, | 4804 NORMAL, |
| 4805 FIELD, | 4805 FIELD, |
| 4806 CONSTANT, | 4806 CONSTANT, |
| 4807 CALLBACKS, | 4807 CALLBACKS, |
| 4808 INTERCEPTOR, | 4808 INTERCEPTOR, |
| 4809 TRANSITION, | 4809 TRANSITION, |
| 4810 NONEXISTENT | 4810 NONEXISTENT |
| 4811 }; | 4811 }; |
| 4812 | 4812 |
| 4813 enum StubHolder { | |
| 4814 OWN_STUB, | |
| 4815 PROTOTYPE_STUB | |
| 4816 }; | |
| 4817 | |
| 4818 typedef int ExtraICState; | 4813 typedef int ExtraICState; |
| 4819 | 4814 |
| 4820 static const ExtraICState kNoExtraICState = 0; | 4815 static const ExtraICState kNoExtraICState = 0; |
| 4821 | 4816 |
| 4822 #ifdef ENABLE_DISASSEMBLER | 4817 #ifdef ENABLE_DISASSEMBLER |
| 4823 // Printing | 4818 // Printing |
| 4824 static const char* ICState2String(InlineCacheState state); | 4819 static const char* ICState2String(InlineCacheState state); |
| 4825 static const char* StubType2String(StubType type); | 4820 static const char* StubType2String(StubType type); |
| 4826 static void PrintExtraICState(FILE* out, Kind kind, ExtraICState extra); | 4821 static void PrintExtraICState(FILE* out, Kind kind, ExtraICState extra); |
| 4827 void Disassemble(const char* name, FILE* out = stdout); | 4822 void Disassemble(const char* name, FILE* out = stdout); |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5012 | 5007 |
| 5013 // Find the first name in an IC stub. | 5008 // Find the first name in an IC stub. |
| 5014 Name* FindFirstName(); | 5009 Name* FindFirstName(); |
| 5015 | 5010 |
| 5016 void ReplaceNthCell(int n, Cell* replace_with); | 5011 void ReplaceNthCell(int n, Cell* replace_with); |
| 5017 | 5012 |
| 5018 class ExtraICStateStrictMode: public BitField<StrictModeFlag, 0, 1> {}; | 5013 class ExtraICStateStrictMode: public BitField<StrictModeFlag, 0, 1> {}; |
| 5019 class ExtraICStateKeyedAccessStoreMode: | 5014 class ExtraICStateKeyedAccessStoreMode: |
| 5020 public BitField<KeyedAccessStoreMode, 1, 4> {}; // NOLINT | 5015 public BitField<KeyedAccessStoreMode, 1, 4> {}; // NOLINT |
| 5021 | 5016 |
| 5022 class ExtraICStateStubHolder: public BitField<StubHolder, 0, 1> {}; | |
| 5023 | |
| 5024 static inline StrictModeFlag GetStrictMode(ExtraICState extra_ic_state) { | 5017 static inline StrictModeFlag GetStrictMode(ExtraICState extra_ic_state) { |
| 5025 return ExtraICStateStrictMode::decode(extra_ic_state); | 5018 return ExtraICStateStrictMode::decode(extra_ic_state); |
| 5026 } | 5019 } |
| 5027 | 5020 |
| 5028 static inline KeyedAccessStoreMode GetKeyedAccessStoreMode( | 5021 static inline KeyedAccessStoreMode GetKeyedAccessStoreMode( |
| 5029 ExtraICState extra_ic_state) { | 5022 ExtraICState extra_ic_state) { |
| 5030 return ExtraICStateKeyedAccessStoreMode::decode(extra_ic_state); | 5023 return ExtraICStateKeyedAccessStoreMode::decode(extra_ic_state); |
| 5031 } | 5024 } |
| 5032 | 5025 |
| 5033 static inline ExtraICState ComputeExtraICState( | 5026 static inline ExtraICState ComputeExtraICState( |
| 5034 KeyedAccessStoreMode store_mode, | 5027 KeyedAccessStoreMode store_mode, |
| 5035 StrictModeFlag strict_mode) { | 5028 StrictModeFlag strict_mode) { |
| 5036 return ExtraICStateKeyedAccessStoreMode::encode(store_mode) | | 5029 return ExtraICStateKeyedAccessStoreMode::encode(store_mode) | |
| 5037 ExtraICStateStrictMode::encode(strict_mode); | 5030 ExtraICStateStrictMode::encode(strict_mode); |
| 5038 } | 5031 } |
| 5039 | 5032 |
| 5040 static inline ExtraICState ComputeExtraICState(StubHolder stub_holder) { | |
| 5041 return ExtraICStateStubHolder::encode(stub_holder); | |
| 5042 } | |
| 5043 | |
| 5044 // Flags operations. | 5033 // Flags operations. |
| 5045 static inline Flags ComputeFlags( | 5034 static inline Flags ComputeFlags( |
| 5046 Kind kind, | 5035 Kind kind, |
| 5047 InlineCacheState ic_state = UNINITIALIZED, | 5036 InlineCacheState ic_state = UNINITIALIZED, |
| 5048 ExtraICState extra_ic_state = kNoExtraICState, | 5037 ExtraICState extra_ic_state = kNoExtraICState, |
| 5049 StubType type = NORMAL, | 5038 StubType type = NORMAL, |
| 5050 int argc = -1, | 5039 int argc = -1, |
| 5051 InlineCacheHolderFlag holder = OWN_MAP); | 5040 InlineCacheHolderFlag holder = OWN_MAP); |
| 5052 | 5041 |
| 5053 static inline Flags ComputeMonomorphicFlags( | 5042 static inline Flags ComputeMonomorphicFlags( |
| (...skipping 5189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10243 } else { | 10232 } else { |
| 10244 value &= ~(1 << bit_position); | 10233 value &= ~(1 << bit_position); |
| 10245 } | 10234 } |
| 10246 return value; | 10235 return value; |
| 10247 } | 10236 } |
| 10248 }; | 10237 }; |
| 10249 | 10238 |
| 10250 } } // namespace v8::internal | 10239 } } // namespace v8::internal |
| 10251 | 10240 |
| 10252 #endif // V8_OBJECTS_H_ | 10241 #endif // V8_OBJECTS_H_ |
| OLD | NEW |