| 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 3988 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3999 return map()->has_named_interceptor(); | 3999 return map()->has_named_interceptor(); |
| 4000 } | 4000 } |
| 4001 | 4001 |
| 4002 | 4002 |
| 4003 bool JSObject::HasIndexedInterceptor() { | 4003 bool JSObject::HasIndexedInterceptor() { |
| 4004 return map()->has_indexed_interceptor(); | 4004 return map()->has_indexed_interceptor(); |
| 4005 } | 4005 } |
| 4006 | 4006 |
| 4007 | 4007 |
| 4008 bool JSObject::AllowsSetElementsLength() { | 4008 bool JSObject::AllowsSetElementsLength() { |
| 4009 bool result = elements()->IsFixedArray(); | 4009 bool result = elements()->IsFixedArray() || |
| 4010 elements()->IsFixedDoubleArray(); |
| 4010 ASSERT(result == !HasExternalArrayElements()); | 4011 ASSERT(result == !HasExternalArrayElements()); |
| 4011 return result; | 4012 return result; |
| 4012 } | 4013 } |
| 4013 | 4014 |
| 4014 | 4015 |
| 4015 MaybeObject* JSObject::EnsureWritableFastElements() { | 4016 MaybeObject* JSObject::EnsureWritableFastElements() { |
| 4016 ASSERT(HasFastElements()); | 4017 ASSERT(HasFastElements()); |
| 4017 FixedArray* elems = FixedArray::cast(elements()); | 4018 FixedArray* elems = FixedArray::cast(elements()); |
| 4018 Isolate* isolate = GetIsolate(); | 4019 Isolate* isolate = GetIsolate(); |
| 4019 if (elems->map() != isolate->heap()->fixed_cow_array_map()) return elems; | 4020 if (elems->map() != isolate->heap()->fixed_cow_array_map()) return elems; |
| (...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4463 #undef WRITE_INT_FIELD | 4464 #undef WRITE_INT_FIELD |
| 4464 #undef READ_SHORT_FIELD | 4465 #undef READ_SHORT_FIELD |
| 4465 #undef WRITE_SHORT_FIELD | 4466 #undef WRITE_SHORT_FIELD |
| 4466 #undef READ_BYTE_FIELD | 4467 #undef READ_BYTE_FIELD |
| 4467 #undef WRITE_BYTE_FIELD | 4468 #undef WRITE_BYTE_FIELD |
| 4468 | 4469 |
| 4469 | 4470 |
| 4470 } } // namespace v8::internal | 4471 } } // namespace v8::internal |
| 4471 | 4472 |
| 4472 #endif // V8_OBJECTS_INL_H_ | 4473 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |