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

Side by Side Diff: src/heap.cc

Issue 6879009: Support Float64Arrays (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: address comments Created 9 years, 8 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/heap.h ('k') | src/hydrogen-instructions.h » ('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 1782 matching lines...) Expand 10 before | Expand all | Expand 10 after
1793 if (!maybe_obj->ToObject(&obj)) return false; 1793 if (!maybe_obj->ToObject(&obj)) return false;
1794 } 1794 }
1795 set_external_unsigned_int_array_map(Map::cast(obj)); 1795 set_external_unsigned_int_array_map(Map::cast(obj));
1796 1796
1797 { MaybeObject* maybe_obj = AllocateMap(EXTERNAL_FLOAT_ARRAY_TYPE, 1797 { MaybeObject* maybe_obj = AllocateMap(EXTERNAL_FLOAT_ARRAY_TYPE,
1798 ExternalArray::kAlignedSize); 1798 ExternalArray::kAlignedSize);
1799 if (!maybe_obj->ToObject(&obj)) return false; 1799 if (!maybe_obj->ToObject(&obj)) return false;
1800 } 1800 }
1801 set_external_float_array_map(Map::cast(obj)); 1801 set_external_float_array_map(Map::cast(obj));
1802 1802
1803 { MaybeObject* maybe_obj = AllocateMap(EXTERNAL_DOUBLE_ARRAY_TYPE,
1804 ExternalArray::kAlignedSize);
1805 if (!maybe_obj->ToObject(&obj)) return false;
1806 }
1807 set_external_double_array_map(Map::cast(obj));
1808
1803 { MaybeObject* maybe_obj = AllocateMap(CODE_TYPE, kVariableSizeSentinel); 1809 { MaybeObject* maybe_obj = AllocateMap(CODE_TYPE, kVariableSizeSentinel);
1804 if (!maybe_obj->ToObject(&obj)) return false; 1810 if (!maybe_obj->ToObject(&obj)) return false;
1805 } 1811 }
1806 set_code_map(Map::cast(obj)); 1812 set_code_map(Map::cast(obj));
1807 1813
1808 { MaybeObject* maybe_obj = AllocateMap(JS_GLOBAL_PROPERTY_CELL_TYPE, 1814 { MaybeObject* maybe_obj = AllocateMap(JS_GLOBAL_PROPERTY_CELL_TYPE,
1809 JSGlobalPropertyCell::kSize); 1815 JSGlobalPropertyCell::kSize);
1810 if (!maybe_obj->ToObject(&obj)) return false; 1816 if (!maybe_obj->ToObject(&obj)) return false;
1811 } 1817 }
1812 set_global_property_cell_map(Map::cast(obj)); 1818 set_global_property_cell_map(Map::cast(obj));
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after
2281 case kExternalShortArray: 2287 case kExternalShortArray:
2282 return kExternalShortArrayMapRootIndex; 2288 return kExternalShortArrayMapRootIndex;
2283 case kExternalUnsignedShortArray: 2289 case kExternalUnsignedShortArray:
2284 return kExternalUnsignedShortArrayMapRootIndex; 2290 return kExternalUnsignedShortArrayMapRootIndex;
2285 case kExternalIntArray: 2291 case kExternalIntArray:
2286 return kExternalIntArrayMapRootIndex; 2292 return kExternalIntArrayMapRootIndex;
2287 case kExternalUnsignedIntArray: 2293 case kExternalUnsignedIntArray:
2288 return kExternalUnsignedIntArrayMapRootIndex; 2294 return kExternalUnsignedIntArrayMapRootIndex;
2289 case kExternalFloatArray: 2295 case kExternalFloatArray:
2290 return kExternalFloatArrayMapRootIndex; 2296 return kExternalFloatArrayMapRootIndex;
2297 case kExternalDoubleArray:
2298 return kExternalDoubleArrayMapRootIndex;
2291 case kExternalPixelArray: 2299 case kExternalPixelArray:
2292 return kExternalPixelArrayMapRootIndex; 2300 return kExternalPixelArrayMapRootIndex;
2293 default: 2301 default:
2294 UNREACHABLE(); 2302 UNREACHABLE();
2295 return kUndefinedValueRootIndex; 2303 return kUndefinedValueRootIndex;
2296 } 2304 }
2297 } 2305 }
2298 2306
2299 2307
2300 MaybeObject* Heap::NumberFromDouble(double value, PretenureFlag pretenure) { 2308 MaybeObject* Heap::NumberFromDouble(double value, PretenureFlag pretenure) {
(...skipping 3546 matching lines...) Expand 10 before | Expand all | Expand 10 after
5847 } 5855 }
5848 5856
5849 5857
5850 void ExternalStringTable::TearDown() { 5858 void ExternalStringTable::TearDown() {
5851 new_space_strings_.Free(); 5859 new_space_strings_.Free();
5852 old_space_strings_.Free(); 5860 old_space_strings_.Free();
5853 } 5861 }
5854 5862
5855 5863
5856 } } // namespace v8::internal 5864 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap.h ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698