Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(171)

Side by Side Diff: src/objects-inl.h

Issue 7460008: Reland 8636: Implement setting the length property for FixedDoubleArrays. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/objects.cc ('k') | test/mjsunit/unbox-double-arrays.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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();
4011 ASSERT(result == !HasExternalArrayElements()); 4012 ASSERT(result == !HasExternalArrayElements());
4012 return result; 4013 return result;
4013 } 4014 }
4014 4015
4015 4016
4016 MaybeObject* JSObject::EnsureWritableFastElements() { 4017 MaybeObject* JSObject::EnsureWritableFastElements() {
4017 ASSERT(HasFastElements()); 4018 ASSERT(HasFastElements());
4018 FixedArray* elems = FixedArray::cast(elements()); 4019 FixedArray* elems = FixedArray::cast(elements());
4019 Isolate* isolate = GetIsolate(); 4020 Isolate* isolate = GetIsolate();
4020 if (elems->map() != isolate->heap()->fixed_cow_array_map()) return elems; 4021 if (elems->map() != isolate->heap()->fixed_cow_array_map()) return elems;
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
4480 #undef WRITE_INT_FIELD 4481 #undef WRITE_INT_FIELD
4481 #undef READ_SHORT_FIELD 4482 #undef READ_SHORT_FIELD
4482 #undef WRITE_SHORT_FIELD 4483 #undef WRITE_SHORT_FIELD
4483 #undef READ_BYTE_FIELD 4484 #undef READ_BYTE_FIELD
4484 #undef WRITE_BYTE_FIELD 4485 #undef WRITE_BYTE_FIELD
4485 4486
4486 4487
4487 } } // namespace v8::internal 4488 } } // namespace v8::internal
4488 4489
4489 #endif // V8_OBJECTS_INL_H_ 4490 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | test/mjsunit/unbox-double-arrays.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698