OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 2171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2182 set_bit_field(bit_field() & ~(1 << kIsAccessCheckNeeded)); | 2182 set_bit_field(bit_field() & ~(1 << kIsAccessCheckNeeded)); |
2183 } | 2183 } |
2184 } | 2184 } |
2185 | 2185 |
2186 | 2186 |
2187 bool Map::is_access_check_needed() { | 2187 bool Map::is_access_check_needed() { |
2188 return ((1 << kIsAccessCheckNeeded) & bit_field()) != 0; | 2188 return ((1 << kIsAccessCheckNeeded) & bit_field()) != 0; |
2189 } | 2189 } |
2190 | 2190 |
2191 | 2191 |
| 2192 void Map::set_is_extensible(bool value) { |
| 2193 if (value) { |
| 2194 set_bit_field2(bit_field2() | (1 << kIsExtensible)); |
| 2195 } else { |
| 2196 set_bit_field2(bit_field2() & ~(1 << kIsExtensible)); |
| 2197 } |
| 2198 } |
| 2199 |
| 2200 bool Map::is_extensible() { |
| 2201 return ((1 << kIsExtensible) & bit_field2()) != 0; |
| 2202 } |
| 2203 |
| 2204 |
| 2205 |
2192 Code::Flags Code::flags() { | 2206 Code::Flags Code::flags() { |
2193 return static_cast<Flags>(READ_INT_FIELD(this, kFlagsOffset)); | 2207 return static_cast<Flags>(READ_INT_FIELD(this, kFlagsOffset)); |
2194 } | 2208 } |
2195 | 2209 |
2196 | 2210 |
2197 void Code::set_flags(Code::Flags flags) { | 2211 void Code::set_flags(Code::Flags flags) { |
2198 STATIC_ASSERT(Code::NUMBER_OF_KINDS <= (kFlagsKindMask >> kFlagsKindShift)+1); | 2212 STATIC_ASSERT(Code::NUMBER_OF_KINDS <= (kFlagsKindMask >> kFlagsKindShift)+1); |
2199 // Make sure that all call stubs have an arguments count. | 2213 // Make sure that all call stubs have an arguments count. |
2200 ASSERT((ExtractKindFromFlags(flags) != CALL_IC && | 2214 ASSERT((ExtractKindFromFlags(flags) != CALL_IC && |
2201 ExtractKindFromFlags(flags) != KEYED_CALL_IC) || | 2215 ExtractKindFromFlags(flags) != KEYED_CALL_IC) || |
(...skipping 1052 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3254 #undef WRITE_INT_FIELD | 3268 #undef WRITE_INT_FIELD |
3255 #undef READ_SHORT_FIELD | 3269 #undef READ_SHORT_FIELD |
3256 #undef WRITE_SHORT_FIELD | 3270 #undef WRITE_SHORT_FIELD |
3257 #undef READ_BYTE_FIELD | 3271 #undef READ_BYTE_FIELD |
3258 #undef WRITE_BYTE_FIELD | 3272 #undef WRITE_BYTE_FIELD |
3259 | 3273 |
3260 | 3274 |
3261 } } // namespace v8::internal | 3275 } } // namespace v8::internal |
3262 | 3276 |
3263 #endif // V8_OBJECTS_INL_H_ | 3277 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |