| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 Object* callback_object = desc->GetCallbackObject(); | 166 Object* callback_object = desc->GetCallbackObject(); |
| 167 // Non-JavaScript (i.e. native) accessors are always a property, otherwise | 167 // Non-JavaScript (i.e. native) accessors are always a property, otherwise |
| 168 // either the getter or the setter must be an accessor. Put another way: | 168 // either the getter or the setter must be an accessor. Put another way: |
| 169 // If we only see map transitions and holes in a pair, this is not a | 169 // If we only see map transitions and holes in a pair, this is not a |
| 170 // property. | 170 // property. |
| 171 return (!callback_object->IsAccessorPair() || | 171 return (!callback_object->IsAccessorPair() || |
| 172 AccessorPair::cast(callback_object)->ContainsAccessor()); | 172 AccessorPair::cast(callback_object)->ContainsAccessor()); |
| 173 } | 173 } |
| 174 case MAP_TRANSITION: | 174 case MAP_TRANSITION: |
| 175 case CONSTANT_TRANSITION: | 175 case CONSTANT_TRANSITION: |
| 176 case NULL_DESCRIPTOR: | |
| 177 return false; | 176 return false; |
| 177 case NONEXISTENT: |
| 178 UNREACHABLE(); |
| 179 break; |
| 178 } | 180 } |
| 179 UNREACHABLE(); // keep the compiler happy | 181 UNREACHABLE(); // keep the compiler happy |
| 180 return false; | 182 return false; |
| 181 } | 183 } |
| 182 | 184 |
| 183 | 185 |
| 184 class LookupResult BASE_EMBEDDED { | 186 class LookupResult BASE_EMBEDDED { |
| 185 public: | 187 public: |
| 186 explicit LookupResult(Isolate* isolate) | 188 explicit LookupResult(Isolate* isolate) |
| 187 : isolate_(isolate), | 189 : isolate_(isolate), |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 JSReceiver* holder_; | 385 JSReceiver* holder_; |
| 384 int number_; | 386 int number_; |
| 385 bool cacheable_; | 387 bool cacheable_; |
| 386 PropertyDetails details_; | 388 PropertyDetails details_; |
| 387 }; | 389 }; |
| 388 | 390 |
| 389 | 391 |
| 390 } } // namespace v8::internal | 392 } } // namespace v8::internal |
| 391 | 393 |
| 392 #endif // V8_PROPERTY_H_ | 394 #endif // V8_PROPERTY_H_ |
| OLD | NEW |