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

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

Issue 212573007: ElementsAccessor::CopyElements() and its callers handlified. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 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/builtins.cc ('K') | « src/objects.h ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 2172 matching lines...) Expand 10 before | Expand all | Expand 10 after
2183 2183
2184 MaybeObject* FixedDoubleArray::get(int index) { 2184 MaybeObject* FixedDoubleArray::get(int index) {
2185 if (is_the_hole(index)) { 2185 if (is_the_hole(index)) {
2186 return GetHeap()->the_hole_value(); 2186 return GetHeap()->the_hole_value();
2187 } else { 2187 } else {
2188 return GetHeap()->NumberFromDouble(get_scalar(index)); 2188 return GetHeap()->NumberFromDouble(get_scalar(index));
2189 } 2189 }
2190 } 2190 }
2191 2191
2192 2192
2193 Handle<Object> FixedDoubleArray::get_as_handle(int index) {
2194 if (is_the_hole(index)) {
2195 return GetIsolate()->factory()->the_hole_value();
2196 } else {
2197 return GetIsolate()->factory()->NewNumber(get_scalar(index));
2198 }
2199 }
2200
2201
2193 void FixedDoubleArray::set(int index, double value) { 2202 void FixedDoubleArray::set(int index, double value) {
2194 ASSERT(map() != GetHeap()->fixed_cow_array_map() && 2203 ASSERT(map() != GetHeap()->fixed_cow_array_map() &&
2195 map() != GetHeap()->fixed_array_map()); 2204 map() != GetHeap()->fixed_array_map());
2196 int offset = kHeaderSize + index * kDoubleSize; 2205 int offset = kHeaderSize + index * kDoubleSize;
2197 if (std::isnan(value)) value = canonical_not_the_hole_nan_as_double(); 2206 if (std::isnan(value)) value = canonical_not_the_hole_nan_as_double();
2198 WRITE_DOUBLE_FIELD(this, offset, value); 2207 WRITE_DOUBLE_FIELD(this, offset, value);
2199 } 2208 }
2200 2209
2201 2210
2202 void FixedDoubleArray::set_the_hole(int index) { 2211 void FixedDoubleArray::set_the_hole(int index) {
(...skipping 4675 matching lines...) Expand 10 before | Expand all | Expand 10 after
6878 #undef READ_UINT32_FIELD 6887 #undef READ_UINT32_FIELD
6879 #undef WRITE_UINT32_FIELD 6888 #undef WRITE_UINT32_FIELD
6880 #undef READ_SHORT_FIELD 6889 #undef READ_SHORT_FIELD
6881 #undef WRITE_SHORT_FIELD 6890 #undef WRITE_SHORT_FIELD
6882 #undef READ_BYTE_FIELD 6891 #undef READ_BYTE_FIELD
6883 #undef WRITE_BYTE_FIELD 6892 #undef WRITE_BYTE_FIELD
6884 6893
6885 } } // namespace v8::internal 6894 } } // namespace v8::internal
6886 6895
6887 #endif // V8_OBJECTS_INL_H_ 6896 #endif // V8_OBJECTS_INL_H_
OLDNEW
« src/builtins.cc ('K') | « src/objects.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698