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 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 } | 285 } |
286 return value; | 286 return value; |
287 } | 287 } |
288 case CONSTANT_FUNCTION: | 288 case CONSTANT_FUNCTION: |
289 return GetConstantFunction(); | 289 return GetConstantFunction(); |
290 default: | 290 default: |
291 return Smi::FromInt(0); | 291 return Smi::FromInt(0); |
292 } | 292 } |
293 } | 293 } |
294 | 294 |
| 295 |
295 Map* GetTransitionMap() { | 296 Map* GetTransitionMap() { |
296 ASSERT(lookup_type_ == DESCRIPTOR_TYPE); | 297 ASSERT(lookup_type_ == DESCRIPTOR_TYPE); |
297 ASSERT(type() == MAP_TRANSITION || type() == CONSTANT_TRANSITION || | 298 ASSERT(IsTransitionType(type())); |
298 type() == ELEMENTS_TRANSITION); | |
299 return Map::cast(GetValue()); | 299 return Map::cast(GetValue()); |
300 } | 300 } |
301 | 301 |
302 Map* GetTransitionMapFromMap(Map* map) { | 302 Map* GetTransitionMapFromMap(Map* map) { |
303 ASSERT(lookup_type_ == DESCRIPTOR_TYPE); | 303 ASSERT(lookup_type_ == DESCRIPTOR_TYPE); |
304 ASSERT(type() == MAP_TRANSITION); | 304 ASSERT(type() == MAP_TRANSITION); |
305 return Map::cast(map->instance_descriptors()->GetValue(number_)); | 305 return Map::cast(map->instance_descriptors()->GetValue(number_)); |
306 } | 306 } |
307 | 307 |
308 int GetFieldIndex() { | 308 int GetFieldIndex() { |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
376 JSReceiver* holder_; | 376 JSReceiver* holder_; |
377 int number_; | 377 int number_; |
378 bool cacheable_; | 378 bool cacheable_; |
379 PropertyDetails details_; | 379 PropertyDetails details_; |
380 }; | 380 }; |
381 | 381 |
382 | 382 |
383 } } // namespace v8::internal | 383 } } // namespace v8::internal |
384 | 384 |
385 #endif // V8_PROPERTY_H_ | 385 #endif // V8_PROPERTY_H_ |
OLD | NEW |