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

Side by Side Diff: src/factory.cc

Issue 293023: Added infrastructure for optimizing new CanvasArray types in WebGL... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 2 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/factory.h ('k') | src/handles.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 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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 Handle<PixelArray> Factory::NewPixelArray(int length, 215 Handle<PixelArray> Factory::NewPixelArray(int length,
216 uint8_t* external_pointer, 216 uint8_t* external_pointer,
217 PretenureFlag pretenure) { 217 PretenureFlag pretenure) {
218 ASSERT(0 <= length); 218 ASSERT(0 <= length);
219 CALL_HEAP_FUNCTION(Heap::AllocatePixelArray(length, 219 CALL_HEAP_FUNCTION(Heap::AllocatePixelArray(length,
220 external_pointer, 220 external_pointer,
221 pretenure), PixelArray); 221 pretenure), PixelArray);
222 } 222 }
223 223
224 224
225 Handle<ExternalArray> Factory::NewExternalArray(int length,
226 ExternalArrayType array_type,
227 void* external_pointer,
228 PretenureFlag pretenure) {
229 ASSERT(0 <= length);
230 CALL_HEAP_FUNCTION(Heap::AllocateExternalArray(length,
231 array_type,
232 external_pointer,
233 pretenure), ExternalArray);
234 }
235
236
225 Handle<Map> Factory::NewMap(InstanceType type, int instance_size) { 237 Handle<Map> Factory::NewMap(InstanceType type, int instance_size) {
226 CALL_HEAP_FUNCTION(Heap::AllocateMap(type, instance_size), Map); 238 CALL_HEAP_FUNCTION(Heap::AllocateMap(type, instance_size), Map);
227 } 239 }
228 240
229 241
230 Handle<JSObject> Factory::NewFunctionPrototype(Handle<JSFunction> function) { 242 Handle<JSObject> Factory::NewFunctionPrototype(Handle<JSFunction> function) {
231 CALL_HEAP_FUNCTION(Heap::AllocateFunctionPrototype(*function), JSObject); 243 CALL_HEAP_FUNCTION(Heap::AllocateFunctionPrototype(*function), JSObject);
232 } 244 }
233 245
234 246
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 Vector< Handle<Object> > args) { 356 Vector< Handle<Object> > args) {
345 return NewError("MakeRangeError", type, args); 357 return NewError("MakeRangeError", type, args);
346 } 358 }
347 359
348 360
349 Handle<Object> Factory::NewRangeError(Handle<String> message) { 361 Handle<Object> Factory::NewRangeError(Handle<String> message) {
350 return NewError("$RangeError", message); 362 return NewError("$RangeError", message);
351 } 363 }
352 364
353 365
366 Handle<Object> Factory::NewIndexError(uint32_t index) {
367 Handle<Object> indexHandle = Handle<Object>(Heap::NumberFromUint32(index));
368 return NewRangeError("invalid_array_index",
369 HandleVector<Object>(&indexHandle,
370 1));
371 }
372
373
354 Handle<Object> Factory::NewSyntaxError(const char* type, Handle<JSArray> args) { 374 Handle<Object> Factory::NewSyntaxError(const char* type, Handle<JSArray> args) {
355 return NewError("MakeSyntaxError", type, args); 375 return NewError("MakeSyntaxError", type, args);
356 } 376 }
357 377
358 378
359 Handle<Object> Factory::NewSyntaxError(Handle<String> message) { 379 Handle<Object> Factory::NewSyntaxError(Handle<String> message) {
360 return NewError("$SyntaxError", message); 380 return NewError("$SyntaxError", message);
361 } 381 }
362 382
363 383
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
933 Execution::ConfigureInstance(instance, 953 Execution::ConfigureInstance(instance,
934 instance_template, 954 instance_template,
935 pending_exception); 955 pending_exception);
936 } else { 956 } else {
937 *pending_exception = false; 957 *pending_exception = false;
938 } 958 }
939 } 959 }
940 960
941 961
942 } } // namespace v8::internal 962 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/factory.h ('k') | src/handles.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698