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

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

Issue 7551004: Properly handle FastDoubleArrays in Runtime_MoveArrayContents (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fix nit Created 9 years, 4 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 | « no previous file | src/runtime.cc » ('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 1321 matching lines...) Expand 10 before | Expand all | Expand 10 after
1332 Object* array = READ_FIELD(this, kElementsOffset); 1332 Object* array = READ_FIELD(this, kElementsOffset);
1333 ASSERT(array->HasValidElements()); 1333 ASSERT(array->HasValidElements());
1334 return reinterpret_cast<HeapObject*>(array); 1334 return reinterpret_cast<HeapObject*>(array);
1335 } 1335 }
1336 1336
1337 1337
1338 void JSObject::set_elements(HeapObject* value, WriteBarrierMode mode) { 1338 void JSObject::set_elements(HeapObject* value, WriteBarrierMode mode) {
1339 ASSERT(map()->has_fast_elements() == 1339 ASSERT(map()->has_fast_elements() ==
1340 (value->map() == GetHeap()->fixed_array_map() || 1340 (value->map() == GetHeap()->fixed_array_map() ||
1341 value->map() == GetHeap()->fixed_cow_array_map())); 1341 value->map() == GetHeap()->fixed_cow_array_map()));
1342 ASSERT(map()->has_fast_double_elements() ==
1343 value->IsFixedDoubleArray());
1342 ASSERT(value->HasValidElements()); 1344 ASSERT(value->HasValidElements());
1343 WRITE_FIELD(this, kElementsOffset, value); 1345 WRITE_FIELD(this, kElementsOffset, value);
1344 CONDITIONAL_WRITE_BARRIER(GetHeap(), this, kElementsOffset, mode); 1346 CONDITIONAL_WRITE_BARRIER(GetHeap(), this, kElementsOffset, mode);
1345 } 1347 }
1346 1348
1347 1349
1348 void JSObject::initialize_properties() { 1350 void JSObject::initialize_properties() {
1349 ASSERT(!GetHeap()->InNewSpace(GetHeap()->empty_fixed_array())); 1351 ASSERT(!GetHeap()->InNewSpace(GetHeap()->empty_fixed_array()));
1350 WRITE_FIELD(this, kPropertiesOffset, GetHeap()->empty_fixed_array()); 1352 WRITE_FIELD(this, kPropertiesOffset, GetHeap()->empty_fixed_array());
1351 } 1353 }
(...skipping 3189 matching lines...) Expand 10 before | Expand all | Expand 10 after
4541 #undef WRITE_INT_FIELD 4543 #undef WRITE_INT_FIELD
4542 #undef READ_SHORT_FIELD 4544 #undef READ_SHORT_FIELD
4543 #undef WRITE_SHORT_FIELD 4545 #undef WRITE_SHORT_FIELD
4544 #undef READ_BYTE_FIELD 4546 #undef READ_BYTE_FIELD
4545 #undef WRITE_BYTE_FIELD 4547 #undef WRITE_BYTE_FIELD
4546 4548
4547 4549
4548 } } // namespace v8::internal 4550 } } // namespace v8::internal
4549 4551
4550 #endif // V8_OBJECTS_INL_H_ 4552 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « no previous file | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698