Chromium Code Reviews| 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 2249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2260 set_bit_field2(bit_field2() | (1 << kIsExtensible)); | 2260 set_bit_field2(bit_field2() | (1 << kIsExtensible)); |
| 2261 } else { | 2261 } else { |
| 2262 set_bit_field2(bit_field2() & ~(1 << kIsExtensible)); | 2262 set_bit_field2(bit_field2() & ~(1 << kIsExtensible)); |
| 2263 } | 2263 } |
| 2264 } | 2264 } |
| 2265 | 2265 |
| 2266 bool Map::is_extensible() { | 2266 bool Map::is_extensible() { |
| 2267 return ((1 << kIsExtensible) & bit_field2()) != 0; | 2267 return ((1 << kIsExtensible) & bit_field2()) != 0; |
| 2268 } | 2268 } |
| 2269 | 2269 |
| 2270 | 2270 |
|
Vyacheslav Egorov (Chromium)
2010/09/24 10:19:43
there is something odd with blank lines here.
Vladislav Kaznacheev
2010/09/24 10:24:46
Done.
| |
| 2271 | 2271 |
| 2272 void Map::set_is_shared(bool value) { | |
| 2273 if (value) { | |
| 2274 set_bit_field2(bit_field2() | (1 << kIsShared)); | |
| 2275 } else { | |
| 2276 set_bit_field2(bit_field2() & ~(1 << kIsShared)); | |
| 2277 } | |
| 2278 } | |
| 2279 | |
| 2280 bool Map::is_shared() { | |
| 2281 return ((1 << kIsShared) & bit_field2()) != 0; | |
| 2282 } | |
| 2283 | |
| 2284 | |
| 2272 Code::Flags Code::flags() { | 2285 Code::Flags Code::flags() { |
| 2273 return static_cast<Flags>(READ_INT_FIELD(this, kFlagsOffset)); | 2286 return static_cast<Flags>(READ_INT_FIELD(this, kFlagsOffset)); |
| 2274 } | 2287 } |
| 2275 | 2288 |
| 2276 | 2289 |
| 2277 void Code::set_flags(Code::Flags flags) { | 2290 void Code::set_flags(Code::Flags flags) { |
| 2278 STATIC_ASSERT(Code::NUMBER_OF_KINDS <= (kFlagsKindMask >> kFlagsKindShift)+1); | 2291 STATIC_ASSERT(Code::NUMBER_OF_KINDS <= (kFlagsKindMask >> kFlagsKindShift)+1); |
| 2279 // Make sure that all call stubs have an arguments count. | 2292 // Make sure that all call stubs have an arguments count. |
| 2280 ASSERT((ExtractKindFromFlags(flags) != CALL_IC && | 2293 ASSERT((ExtractKindFromFlags(flags) != CALL_IC && |
| 2281 ExtractKindFromFlags(flags) != KEYED_CALL_IC) || | 2294 ExtractKindFromFlags(flags) != KEYED_CALL_IC) || |
| (...skipping 1197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3479 #undef WRITE_INT_FIELD | 3492 #undef WRITE_INT_FIELD |
| 3480 #undef READ_SHORT_FIELD | 3493 #undef READ_SHORT_FIELD |
| 3481 #undef WRITE_SHORT_FIELD | 3494 #undef WRITE_SHORT_FIELD |
| 3482 #undef READ_BYTE_FIELD | 3495 #undef READ_BYTE_FIELD |
| 3483 #undef WRITE_BYTE_FIELD | 3496 #undef WRITE_BYTE_FIELD |
| 3484 | 3497 |
| 3485 | 3498 |
| 3486 } } // namespace v8::internal | 3499 } } // namespace v8::internal |
| 3487 | 3500 |
| 3488 #endif // V8_OBJECTS_INL_H_ | 3501 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |