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

Side by Side Diff: src/factory.cc

Issue 10615002: Track allocation info (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Diff with b_e 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 942 matching lines...) Expand 10 before | Expand all | Expand 10 after
953 PretenureFlag pretenure) { 953 PretenureFlag pretenure) {
954 CALL_HEAP_FUNCTION( 954 CALL_HEAP_FUNCTION(
955 isolate(), 955 isolate(),
956 isolate()->heap()->AllocateJSArrayWithElements(*elements, 956 isolate()->heap()->AllocateJSArrayWithElements(*elements,
957 elements_kind, 957 elements_kind,
958 pretenure), 958 pretenure),
959 JSArray); 959 JSArray);
960 } 960 }
961 961
962 962
963 Handle<JSArray> Factory::NewEmptyJSArray(ElementsKind elements_kind,
964 PretenureFlag pretenure) {
965 CALL_HEAP_FUNCTION(
966 isolate(),
967 isolate()->heap()->AllocateEmptyJSArray(elements_kind, pretenure),
968 JSArray);
969 }
970
971
963 void Factory::SetElementsCapacityAndLength(Handle<JSArray> array, 972 void Factory::SetElementsCapacityAndLength(Handle<JSArray> array,
964 int capacity, 973 int capacity,
965 int length) { 974 int length) {
966 ElementsAccessor* accessor = array->GetElementsAccessor(); 975 ElementsAccessor* accessor = array->GetElementsAccessor();
967 CALL_HEAP_FUNCTION_VOID( 976 CALL_HEAP_FUNCTION_VOID(
968 isolate(), 977 isolate(),
969 accessor->SetCapacityAndLength(*array, capacity, length)); 978 accessor->SetCapacityAndLength(*array, capacity, length));
970 } 979 }
971 980
972 981
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
1426 1435
1427 1436
1428 Handle<Object> Factory::ToBoolean(bool value) { 1437 Handle<Object> Factory::ToBoolean(bool value) {
1429 return Handle<Object>(value 1438 return Handle<Object>(value
1430 ? isolate()->heap()->true_value() 1439 ? isolate()->heap()->true_value()
1431 : isolate()->heap()->false_value()); 1440 : isolate()->heap()->false_value());
1432 } 1441 }
1433 1442
1434 1443
1435 } } // namespace v8::internal 1444 } } // 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