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

Side by Side Diff: src/factory.cc

Issue 11365224: Re-land rev. 12849 and 12868 (Heavy cleanup of the external pointer API + related fix). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 1 month 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/heap.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 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 507 matching lines...) Expand 10 before | Expand all | Expand 10 after
518 src->GetElementsTransitionMap(i, elements_kind), 518 src->GetElementsTransitionMap(i, elements_kind),
519 Map); 519 Map);
520 } 520 }
521 521
522 522
523 Handle<FixedArray> Factory::CopyFixedArray(Handle<FixedArray> array) { 523 Handle<FixedArray> Factory::CopyFixedArray(Handle<FixedArray> array) {
524 CALL_HEAP_FUNCTION(isolate(), array->Copy(), FixedArray); 524 CALL_HEAP_FUNCTION(isolate(), array->Copy(), FixedArray);
525 } 525 }
526 526
527 527
528 Handle<FixedArray> Factory::CopySizeFixedArray(Handle<FixedArray> array,
529 int new_length) {
530 CALL_HEAP_FUNCTION(isolate(), array->CopySize(new_length), FixedArray);
531 }
532
533
528 Handle<FixedDoubleArray> Factory::CopyFixedDoubleArray( 534 Handle<FixedDoubleArray> Factory::CopyFixedDoubleArray(
529 Handle<FixedDoubleArray> array) { 535 Handle<FixedDoubleArray> array) {
530 CALL_HEAP_FUNCTION(isolate(), array->Copy(), FixedDoubleArray); 536 CALL_HEAP_FUNCTION(isolate(), array->Copy(), FixedDoubleArray);
531 } 537 }
532 538
533 539
534 Handle<JSFunction> Factory::BaseNewFunctionFromSharedFunctionInfo( 540 Handle<JSFunction> Factory::BaseNewFunctionFromSharedFunctionInfo(
535 Handle<SharedFunctionInfo> function_info, 541 Handle<SharedFunctionInfo> function_info,
536 Handle<Map> function_map, 542 Handle<Map> function_map,
537 PretenureFlag pretenure) { 543 PretenureFlag pretenure) {
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
863 869
864 870
865 Handle<ScopeInfo> Factory::NewScopeInfo(int length) { 871 Handle<ScopeInfo> Factory::NewScopeInfo(int length) {
866 CALL_HEAP_FUNCTION( 872 CALL_HEAP_FUNCTION(
867 isolate(), 873 isolate(),
868 isolate()->heap()->AllocateScopeInfo(length), 874 isolate()->heap()->AllocateScopeInfo(length),
869 ScopeInfo); 875 ScopeInfo);
870 } 876 }
871 877
872 878
879 Handle<JSObject> Factory::NewExternal(void* value) {
880 CALL_HEAP_FUNCTION(isolate(),
881 isolate()->heap()->AllocateExternal(value),
882 JSObject);
883 }
884
885
873 Handle<Code> Factory::NewCode(const CodeDesc& desc, 886 Handle<Code> Factory::NewCode(const CodeDesc& desc,
874 Code::Flags flags, 887 Code::Flags flags,
875 Handle<Object> self_ref, 888 Handle<Object> self_ref,
876 bool immovable) { 889 bool immovable) {
877 CALL_HEAP_FUNCTION(isolate(), 890 CALL_HEAP_FUNCTION(isolate(),
878 isolate()->heap()->CreateCode( 891 isolate()->heap()->CreateCode(
879 desc, flags, self_ref, immovable), 892 desc, flags, self_ref, immovable),
880 Code); 893 Code);
881 } 894 }
882 895
(...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after
1426 1439
1427 1440
1428 Handle<Object> Factory::ToBoolean(bool value) { 1441 Handle<Object> Factory::ToBoolean(bool value) {
1429 return Handle<Object>(value 1442 return Handle<Object>(value
1430 ? isolate()->heap()->true_value() 1443 ? isolate()->heap()->true_value()
1431 : isolate()->heap()->false_value()); 1444 : isolate()->heap()->false_value());
1432 } 1445 }
1433 1446
1434 1447
1435 } } // namespace v8::internal 1448 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/factory.h ('k') | src/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698