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

Side by Side Diff: src/factory.cc

Issue 6546036: Combine typed and pixel arrays. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: feedback, propagate external array type Created 9 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
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 return NewProxy((Address) desc, TENURED); 243 return NewProxy((Address) desc, TENURED);
244 } 244 }
245 245
246 246
247 Handle<ByteArray> Factory::NewByteArray(int length, PretenureFlag pretenure) { 247 Handle<ByteArray> Factory::NewByteArray(int length, PretenureFlag pretenure) {
248 ASSERT(0 <= length); 248 ASSERT(0 <= length);
249 CALL_HEAP_FUNCTION(Heap::AllocateByteArray(length, pretenure), ByteArray); 249 CALL_HEAP_FUNCTION(Heap::AllocateByteArray(length, pretenure), ByteArray);
250 } 250 }
251 251
252 252
253 Handle<PixelArray> Factory::NewPixelArray(int length, 253 Handle<ExternalPixelArray> Factory::NewExternalPixelArray(
Kevin Millikin (Chromium) 2011/03/07 15:41:45 Is there a reason not to combine this with Factory
danno 2011/03/08 10:01:56 Done.
254 uint8_t* external_pointer, 254 int length,
255 PretenureFlag pretenure) { 255 uint8_t* external_pointer,
256 PretenureFlag pretenure) {
256 ASSERT(0 <= length); 257 ASSERT(0 <= length);
257 CALL_HEAP_FUNCTION(Heap::AllocatePixelArray(length, 258 CALL_HEAP_FUNCTION(
258 external_pointer, 259 Heap::AllocateExternalPixelArray(length,
259 pretenure), PixelArray); 260 external_pointer,
261 pretenure), ExternalPixelArray);
260 } 262 }
261 263
262 264
263 Handle<ExternalArray> Factory::NewExternalArray(int length, 265 Handle<ExternalArray> Factory::NewExternalArray(int length,
264 ExternalArrayType array_type, 266 ExternalArrayType array_type,
265 void* external_pointer, 267 void* external_pointer,
266 PretenureFlag pretenure) { 268 PretenureFlag pretenure) {
267 ASSERT(0 <= length); 269 ASSERT(0 <= length);
268 CALL_HEAP_FUNCTION(Heap::AllocateExternalArray(length, 270 CALL_HEAP_FUNCTION(Heap::AllocateExternalArray(length,
269 array_type, 271 array_type,
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 Handle<Map> Factory::GetFastElementsMap(Handle<Map> src) { 329 Handle<Map> Factory::GetFastElementsMap(Handle<Map> src) {
328 CALL_HEAP_FUNCTION(src->GetFastElementsMap(), Map); 330 CALL_HEAP_FUNCTION(src->GetFastElementsMap(), Map);
329 } 331 }
330 332
331 333
332 Handle<Map> Factory::GetSlowElementsMap(Handle<Map> src) { 334 Handle<Map> Factory::GetSlowElementsMap(Handle<Map> src) {
333 CALL_HEAP_FUNCTION(src->GetSlowElementsMap(), Map); 335 CALL_HEAP_FUNCTION(src->GetSlowElementsMap(), Map);
334 } 336 }
335 337
336 338
337 Handle<Map> Factory::GetPixelArrayElementsMap(Handle<Map> src) { 339 Handle<Map> Factory::NewExternalArrayElementsMap(Handle<Map> src) {
338 CALL_HEAP_FUNCTION(src->GetPixelArrayElementsMap(), Map); 340 CALL_HEAP_FUNCTION(src->NewExternalArrayElementsMap(), Map);
339 } 341 }
340 342
341 343
342 Handle<FixedArray> Factory::CopyFixedArray(Handle<FixedArray> array) { 344 Handle<FixedArray> Factory::CopyFixedArray(Handle<FixedArray> array) {
343 CALL_HEAP_FUNCTION(array->Copy(), FixedArray); 345 CALL_HEAP_FUNCTION(array->Copy(), FixedArray);
344 } 346 }
345 347
346 348
347 Handle<JSFunction> Factory::BaseNewFunctionFromSharedFunctionInfo( 349 Handle<JSFunction> Factory::BaseNewFunctionFromSharedFunctionInfo(
348 Handle<SharedFunctionInfo> function_info, 350 Handle<SharedFunctionInfo> function_info,
(...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after
1078 Execution::ConfigureInstance(instance, 1080 Execution::ConfigureInstance(instance,
1079 instance_template, 1081 instance_template,
1080 pending_exception); 1082 pending_exception);
1081 } else { 1083 } else {
1082 *pending_exception = false; 1084 *pending_exception = false;
1083 } 1085 }
1084 } 1086 }
1085 1087
1086 1088
1087 } } // namespace v8::internal 1089 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698