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 3989 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4000 return map()->has_named_interceptor(); | 4000 return map()->has_named_interceptor(); |
4001 } | 4001 } |
4002 | 4002 |
4003 | 4003 |
4004 bool JSObject::HasIndexedInterceptor() { | 4004 bool JSObject::HasIndexedInterceptor() { |
4005 return map()->has_indexed_interceptor(); | 4005 return map()->has_indexed_interceptor(); |
4006 } | 4006 } |
4007 | 4007 |
4008 | 4008 |
4009 bool JSObject::AllowsSetElementsLength() { | 4009 bool JSObject::AllowsSetElementsLength() { |
4010 bool result = elements()->IsFixedArray() || | 4010 bool result = elements()->IsFixedArray(); |
4011 elements()->IsFixedDoubleArray(); | |
4012 ASSERT(result == !HasExternalArrayElements()); | 4011 ASSERT(result == !HasExternalArrayElements()); |
4013 return result; | 4012 return result; |
4014 } | 4013 } |
4015 | 4014 |
4016 | 4015 |
4017 MaybeObject* JSObject::EnsureWritableFastElements() { | 4016 MaybeObject* JSObject::EnsureWritableFastElements() { |
4018 ASSERT(HasFastElements()); | 4017 ASSERT(HasFastElements()); |
4019 FixedArray* elems = FixedArray::cast(elements()); | 4018 FixedArray* elems = FixedArray::cast(elements()); |
4020 Isolate* isolate = GetIsolate(); | 4019 Isolate* isolate = GetIsolate(); |
4021 if (elems->map() != isolate->heap()->fixed_cow_array_map()) return elems; | 4020 if (elems->map() != isolate->heap()->fixed_cow_array_map()) return elems; |
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4481 #undef WRITE_INT_FIELD | 4480 #undef WRITE_INT_FIELD |
4482 #undef READ_SHORT_FIELD | 4481 #undef READ_SHORT_FIELD |
4483 #undef WRITE_SHORT_FIELD | 4482 #undef WRITE_SHORT_FIELD |
4484 #undef READ_BYTE_FIELD | 4483 #undef READ_BYTE_FIELD |
4485 #undef WRITE_BYTE_FIELD | 4484 #undef WRITE_BYTE_FIELD |
4486 | 4485 |
4487 | 4486 |
4488 } } // namespace v8::internal | 4487 } } // namespace v8::internal |
4489 | 4488 |
4490 #endif // V8_OBJECTS_INL_H_ | 4489 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |