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

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

Issue 3140: Use null instead of undefined for deleted elements in code caches.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 years, 3 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
« src/objects.cc ('K') | « src/objects.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 959 matching lines...) Expand 10 before | Expand all | Expand 10 after
970 970
971 971
972 void FixedArray::set_undefined(int index) { 972 void FixedArray::set_undefined(int index) {
973 ASSERT(index >= 0 && index < this->length()); 973 ASSERT(index >= 0 && index < this->length());
974 ASSERT(!Heap::InNewSpace(Heap::undefined_value())); 974 ASSERT(!Heap::InNewSpace(Heap::undefined_value()));
975 WRITE_FIELD(this, kHeaderSize + index * kPointerSize, 975 WRITE_FIELD(this, kHeaderSize + index * kPointerSize,
976 Heap::undefined_value()); 976 Heap::undefined_value());
977 } 977 }
978 978
979 979
980 void FixedArray::set_null(int index) {
981 ASSERT(index >= 0 && index < this->length());
982 ASSERT(!Heap::InNewSpace(Heap::null_value()));
983 WRITE_FIELD(this, kHeaderSize + index * kPointerSize, Heap::null_value());
984 }
985
986
980 void FixedArray::set_the_hole(int index) { 987 void FixedArray::set_the_hole(int index) {
981 ASSERT(index >= 0 && index < this->length()); 988 ASSERT(index >= 0 && index < this->length());
982 ASSERT(!Heap::InNewSpace(Heap::the_hole_value())); 989 ASSERT(!Heap::InNewSpace(Heap::the_hole_value()));
983 WRITE_FIELD(this, kHeaderSize + index * kPointerSize, Heap::the_hole_value()); 990 WRITE_FIELD(this, kHeaderSize + index * kPointerSize, Heap::the_hole_value());
984 } 991 }
985 992
986 993
987 bool DescriptorArray::IsEmpty() { 994 bool DescriptorArray::IsEmpty() {
988 ASSERT(this == Heap::empty_descriptor_array() || 995 ASSERT(this == Heap::empty_descriptor_array() ||
989 this->length() > 2); 996 this->length() > 2);
(...skipping 1135 matching lines...) Expand 10 before | Expand all | Expand 10 after
2125 #undef WRITE_INT_FIELD 2132 #undef WRITE_INT_FIELD
2126 #undef READ_SHORT_FIELD 2133 #undef READ_SHORT_FIELD
2127 #undef WRITE_SHORT_FIELD 2134 #undef WRITE_SHORT_FIELD
2128 #undef READ_BYTE_FIELD 2135 #undef READ_BYTE_FIELD
2129 #undef WRITE_BYTE_FIELD 2136 #undef WRITE_BYTE_FIELD
2130 2137
2131 2138
2132 } } // namespace v8::internal 2139 } } // namespace v8::internal
2133 2140
2134 #endif // V8_OBJECTS_INL_H_ 2141 #endif // V8_OBJECTS_INL_H_
OLDNEW
« src/objects.cc ('K') | « src/objects.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698