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

Side by Side Diff: src/factory.cc

Issue 11818021: Allocation Info Tracking, continued. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: A partial delta against Toon's previous review Created 7 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
« 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 915 matching lines...) Expand 10 before | Expand all | Expand 10 after
926 926
927 927
928 Handle<JSObject> Factory::NewJSObject(Handle<JSFunction> constructor, 928 Handle<JSObject> Factory::NewJSObject(Handle<JSFunction> constructor,
929 PretenureFlag pretenure) { 929 PretenureFlag pretenure) {
930 CALL_HEAP_FUNCTION( 930 CALL_HEAP_FUNCTION(
931 isolate(), 931 isolate(),
932 isolate()->heap()->AllocateJSObject(*constructor, pretenure), JSObject); 932 isolate()->heap()->AllocateJSObject(*constructor, pretenure), JSObject);
933 } 933 }
934 934
935 935
936 Handle<JSObject> Factory::NewJSObjectWithAllocationSiteInfo(
937 Handle<JSFunction> constructor,
938 Handle<Object> payload) {
939 CALL_HEAP_FUNCTION(
940 isolate(),
941 isolate()->heap()->AllocateJSObject(*constructor,
942 NOT_TENURED,
943 TRACK_ALLOCATION_SITE,
944 &payload), JSObject);
945 }
946
947
948 Handle<JSModule> Factory::NewJSModule(Handle<Context> context, 936 Handle<JSModule> Factory::NewJSModule(Handle<Context> context,
949 Handle<ScopeInfo> scope_info) { 937 Handle<ScopeInfo> scope_info) {
950 CALL_HEAP_FUNCTION( 938 CALL_HEAP_FUNCTION(
951 isolate(), 939 isolate(),
952 isolate()->heap()->AllocateJSModule(*context, *scope_info), JSModule); 940 isolate()->heap()->AllocateJSModule(*context, *scope_info), JSModule);
953 } 941 }
954 942
955 943
956 Handle<GlobalObject> Factory::NewGlobalObject( 944 Handle<GlobalObject> Factory::NewGlobalObject(
957 Handle<JSFunction> constructor) { 945 Handle<JSFunction> constructor) {
(...skipping 17 matching lines...) Expand all
975 ElementsKind elements_kind, 963 ElementsKind elements_kind,
976 PretenureFlag pretenure) { 964 PretenureFlag pretenure) {
977 if (capacity != 0) { 965 if (capacity != 0) {
978 elements_kind = GetHoleyElementsKind(elements_kind); 966 elements_kind = GetHoleyElementsKind(elements_kind);
979 } 967 }
980 CALL_HEAP_FUNCTION(isolate(), 968 CALL_HEAP_FUNCTION(isolate(),
981 isolate()->heap()->AllocateJSArrayAndStorage( 969 isolate()->heap()->AllocateJSArrayAndStorage(
982 elements_kind, 970 elements_kind,
983 0, 971 0,
984 capacity, 972 capacity,
985 DONT_TRACK_ALLOCATION_SITE,
986 NULL,
987 INITIALIZE_ARRAY_ELEMENTS_WITH_HOLE, 973 INITIALIZE_ARRAY_ELEMENTS_WITH_HOLE,
988 pretenure), 974 pretenure),
989 JSArray); 975 JSArray);
990 } 976 }
991 977
992 978
993 Handle<JSArray> Factory::NewJSArrayWithElements(Handle<FixedArrayBase> elements, 979 Handle<JSArray> Factory::NewJSArrayWithElements(Handle<FixedArrayBase> elements,
994 ElementsKind elements_kind, 980 ElementsKind elements_kind,
995 PretenureFlag pretenure) { 981 PretenureFlag pretenure) {
996 CALL_HEAP_FUNCTION( 982 CALL_HEAP_FUNCTION(
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
1472 return Handle<Object>::null(); 1458 return Handle<Object>::null();
1473 } 1459 }
1474 1460
1475 1461
1476 Handle<Object> Factory::ToBoolean(bool value) { 1462 Handle<Object> Factory::ToBoolean(bool value) {
1477 return value ? true_value() : false_value(); 1463 return value ? true_value() : false_value();
1478 } 1464 }
1479 1465
1480 1466
1481 } } // namespace v8::internal 1467 } } // 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