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

Side by Side Diff: src/factory.cc

Issue 6664001: [Isolates] Merge (7083,7111] from bleeding_edge. (Closed)
Patch Set: 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
« no previous file with comments | « src/factory.h ('k') | src/frames.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 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 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 300
301 Handle<ByteArray> Factory::NewByteArray(int length, PretenureFlag pretenure) { 301 Handle<ByteArray> Factory::NewByteArray(int length, PretenureFlag pretenure) {
302 ASSERT(0 <= length); 302 ASSERT(0 <= length);
303 CALL_HEAP_FUNCTION( 303 CALL_HEAP_FUNCTION(
304 isolate(), 304 isolate(),
305 isolate()->heap()->AllocateByteArray(length, pretenure), 305 isolate()->heap()->AllocateByteArray(length, pretenure),
306 ByteArray); 306 ByteArray);
307 } 307 }
308 308
309 309
310 Handle<PixelArray> Factory::NewPixelArray(int length,
311 uint8_t* external_pointer,
312 PretenureFlag pretenure) {
313 ASSERT(0 <= length);
314 CALL_HEAP_FUNCTION(
315 isolate(),
316 isolate()->heap()->AllocatePixelArray(length,
317 external_pointer,
318 pretenure),
319 PixelArray);
320 }
321
322
323 Handle<ExternalArray> Factory::NewExternalArray(int length, 310 Handle<ExternalArray> Factory::NewExternalArray(int length,
324 ExternalArrayType array_type, 311 ExternalArrayType array_type,
325 void* external_pointer, 312 void* external_pointer,
326 PretenureFlag pretenure) { 313 PretenureFlag pretenure) {
327 ASSERT(0 <= length); 314 ASSERT(0 <= length);
328 CALL_HEAP_FUNCTION( 315 CALL_HEAP_FUNCTION(
329 isolate(), 316 isolate(),
330 isolate()->heap()->AllocateExternalArray(length, 317 isolate()->heap()->AllocateExternalArray(length,
331 array_type, 318 array_type,
332 external_pointer, 319 external_pointer,
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 Handle<Map> Factory::GetFastElementsMap(Handle<Map> src) { 385 Handle<Map> Factory::GetFastElementsMap(Handle<Map> src) {
399 CALL_HEAP_FUNCTION(isolate(), src->GetFastElementsMap(), Map); 386 CALL_HEAP_FUNCTION(isolate(), src->GetFastElementsMap(), Map);
400 } 387 }
401 388
402 389
403 Handle<Map> Factory::GetSlowElementsMap(Handle<Map> src) { 390 Handle<Map> Factory::GetSlowElementsMap(Handle<Map> src) {
404 CALL_HEAP_FUNCTION(isolate(), src->GetSlowElementsMap(), Map); 391 CALL_HEAP_FUNCTION(isolate(), src->GetSlowElementsMap(), Map);
405 } 392 }
406 393
407 394
408 Handle<Map> Factory::GetPixelArrayElementsMap(Handle<Map> src) { 395 Handle<Map> Factory::NewExternalArrayElementsMap(Handle<Map> src) {
409 CALL_HEAP_FUNCTION(isolate(), src->GetPixelArrayElementsMap(), Map); 396 CALL_HEAP_FUNCTION(isolate(), src->NewExternalArrayElementsMap(), Map);
410 } 397 }
411 398
412 399
413 Handle<FixedArray> Factory::CopyFixedArray(Handle<FixedArray> array) { 400 Handle<FixedArray> Factory::CopyFixedArray(Handle<FixedArray> array) {
414 CALL_HEAP_FUNCTION(isolate(), array->Copy(), FixedArray); 401 CALL_HEAP_FUNCTION(isolate(), array->Copy(), FixedArray);
415 } 402 }
416 403
417 404
418 Handle<JSFunction> Factory::BaseNewFunctionFromSharedFunctionInfo( 405 Handle<JSFunction> Factory::BaseNewFunctionFromSharedFunctionInfo(
419 Handle<SharedFunctionInfo> function_info, 406 Handle<SharedFunctionInfo> function_info,
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
671 function->shared()->set_code(*code); 658 function->shared()->set_code(*code);
672 function->set_code(*code); 659 function->set_code(*code);
673 ASSERT(!function->has_initial_map()); 660 ASSERT(!function->has_initial_map());
674 ASSERT(!function->has_prototype()); 661 ASSERT(!function->has_prototype());
675 return function; 662 return function;
676 } 663 }
677 664
678 665
679 Handle<Code> Factory::NewCode(const CodeDesc& desc, 666 Handle<Code> Factory::NewCode(const CodeDesc& desc,
680 Code::Flags flags, 667 Code::Flags flags,
681 Handle<Object> self_ref) { 668 Handle<Object> self_ref,
669 bool immovable) {
682 CALL_HEAP_FUNCTION(isolate(), 670 CALL_HEAP_FUNCTION(isolate(),
683 isolate()->heap()->CreateCode(desc, flags, self_ref), 671 isolate()->heap()->CreateCode(
672 desc, flags, self_ref, immovable),
684 Code); 673 Code);
685 } 674 }
686 675
687 676
688 Handle<Code> Factory::CopyCode(Handle<Code> code) { 677 Handle<Code> Factory::CopyCode(Handle<Code> code) {
689 CALL_HEAP_FUNCTION(isolate(), 678 CALL_HEAP_FUNCTION(isolate(),
690 isolate()->heap()->CopyCode(*code), 679 isolate()->heap()->CopyCode(*code),
691 Code); 680 Code);
692 } 681 }
693 682
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
1182 Execution::ConfigureInstance(instance, 1171 Execution::ConfigureInstance(instance,
1183 instance_template, 1172 instance_template,
1184 pending_exception); 1173 pending_exception);
1185 } else { 1174 } else {
1186 *pending_exception = false; 1175 *pending_exception = false;
1187 } 1176 }
1188 } 1177 }
1189 1178
1190 1179
1191 } } // namespace v8::internal 1180 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/factory.h ('k') | src/frames.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698