OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 // | 4 // |
5 // Review notes: | 5 // Review notes: |
6 // | 6 // |
7 // - The use of macros in these inline functions may seem superfluous | 7 // - The use of macros in these inline functions may seem superfluous |
8 // but it is absolutely needed to make sure gcc generates optimal | 8 // but it is absolutely needed to make sure gcc generates optimal |
9 // code. gcc is not happy when attempting to inline too deep. | 9 // code. gcc is not happy when attempting to inline too deep. |
10 // | 10 // |
(...skipping 4452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4463 set_bit_field(bit_field() & ~(1 << kHasNonInstancePrototype)); | 4463 set_bit_field(bit_field() & ~(1 << kHasNonInstancePrototype)); |
4464 } | 4464 } |
4465 } | 4465 } |
4466 | 4466 |
4467 | 4467 |
4468 bool Map::has_non_instance_prototype() { | 4468 bool Map::has_non_instance_prototype() { |
4469 return ((1 << kHasNonInstancePrototype) & bit_field()) != 0; | 4469 return ((1 << kHasNonInstancePrototype) & bit_field()) != 0; |
4470 } | 4470 } |
4471 | 4471 |
4472 | 4472 |
4473 void Map::set_is_constructor() { | 4473 void Map::set_is_constructor(bool value) { |
4474 set_bit_field(bit_field() | (1 << kIsConstructor)); | 4474 if (value) { |
| 4475 set_bit_field(bit_field() | (1 << kIsConstructor)); |
| 4476 } else { |
| 4477 set_bit_field(bit_field() & ~(1 << kIsConstructor)); |
| 4478 } |
4475 } | 4479 } |
4476 | 4480 |
4477 | 4481 |
4478 bool Map::is_constructor() const { | 4482 bool Map::is_constructor() const { |
4479 return ((1 << kIsConstructor) & bit_field()) != 0; | 4483 return ((1 << kIsConstructor) & bit_field()) != 0; |
4480 } | 4484 } |
4481 | 4485 |
4482 | 4486 |
4483 void Map::set_is_hidden_prototype() { | 4487 void Map::set_is_hidden_prototype() { |
4484 set_bit_field3(IsHiddenPrototype::update(bit_field3(), true)); | 4488 set_bit_field3(IsHiddenPrototype::update(bit_field3(), true)); |
(...skipping 3319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7804 #undef WRITE_INT64_FIELD | 7808 #undef WRITE_INT64_FIELD |
7805 #undef READ_BYTE_FIELD | 7809 #undef READ_BYTE_FIELD |
7806 #undef WRITE_BYTE_FIELD | 7810 #undef WRITE_BYTE_FIELD |
7807 #undef NOBARRIER_READ_BYTE_FIELD | 7811 #undef NOBARRIER_READ_BYTE_FIELD |
7808 #undef NOBARRIER_WRITE_BYTE_FIELD | 7812 #undef NOBARRIER_WRITE_BYTE_FIELD |
7809 | 7813 |
7810 } // namespace internal | 7814 } // namespace internal |
7811 } // namespace v8 | 7815 } // namespace v8 |
7812 | 7816 |
7813 #endif // V8_OBJECTS_INL_H_ | 7817 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |