OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 VariableMode mode() { return ModeField::decode(value_); } | 107 VariableMode mode() { return ModeField::decode(value_); } |
108 | 108 |
109 InitializationFlag initialization_flag() { | 109 InitializationFlag initialization_flag() { |
110 return InitField::decode(value_); | 110 return InitField::decode(value_); |
111 } | 111 } |
112 | 112 |
113 int index() { return IndexField::decode(value_); } | 113 int index() { return IndexField::decode(value_); } |
114 | 114 |
115 // Bit fields in value_ (type, shift, size). Must be public so the | 115 // Bit fields in value_ (type, shift, size). Must be public so the |
116 // constants can be embedded in generated code. | 116 // constants can be embedded in generated code. |
117 class ModeField: public BitField<VariableMode, 0, 3> {}; | 117 class ModeField: public BitField<VariableMode, 0, 4> {}; |
118 class InitField: public BitField<InitializationFlag, 3, 1> {}; | 118 class InitField: public BitField<InitializationFlag, 4, 1> {}; |
119 class IndexField: public BitField<int, 4, 32-4> {}; | 119 class IndexField: public BitField<int, 5, 32-5> {}; |
120 | 120 |
121 private: | 121 private: |
122 uint32_t value_; | 122 uint32_t value_; |
123 }; | 123 }; |
124 | 124 |
125 Key keys_[kLength]; | 125 Key keys_[kLength]; |
126 uint32_t values_[kLength]; | 126 uint32_t values_[kLength]; |
127 | 127 |
128 friend class Isolate; | 128 friend class Isolate; |
129 DISALLOW_COPY_AND_ASSIGN(ContextSlotCache); | 129 DISALLOW_COPY_AND_ASSIGN(ContextSlotCache); |
130 }; | 130 }; |
131 | 131 |
132 | 132 |
133 } } // namespace v8::internal | 133 } } // namespace v8::internal |
134 | 134 |
135 #endif // V8_SCOPEINFO_H_ | 135 #endif // V8_SCOPEINFO_H_ |
OLD | NEW |