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

Side by Side Diff: src/runtime.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/objects-inl.h ('k') | src/type-info.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 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 655 matching lines...) Expand 10 before | Expand all | Expand 10 after
666 literals->set(literals_index, *boilerplate); 666 literals->set(literals_index, *boilerplate);
667 } 667 }
668 if (JSObject::cast(*boilerplate)->elements()->map() == 668 if (JSObject::cast(*boilerplate)->elements()->map() ==
669 isolate->heap()->fixed_cow_array_map()) { 669 isolate->heap()->fixed_cow_array_map()) {
670 isolate->counters()->cow_arrays_created_runtime()->Increment(); 670 isolate->counters()->cow_arrays_created_runtime()->Increment();
671 } 671 }
672 672
673 JSObject* boilerplate_object = JSObject::cast(*boilerplate); 673 JSObject* boilerplate_object = JSObject::cast(*boilerplate);
674 AllocationSiteMode mode = AllocationSiteInfo::GetMode( 674 AllocationSiteMode mode = AllocationSiteInfo::GetMode(
675 boilerplate_object->GetElementsKind()); 675 boilerplate_object->GetElementsKind());
676 return isolate->heap()->CopyJSObject(boilerplate_object, mode); 676 if (mode == TRACK_ALLOCATION_SITE) {
677 return isolate->heap()->CopyJSObjectWithAllocationSite(boilerplate_object);
678 }
679
680 return isolate->heap()->CopyJSObject(boilerplate_object);
677 } 681 }
678 682
679 683
680 RUNTIME_FUNCTION(MaybeObject*, Runtime_CreateJSProxy) { 684 RUNTIME_FUNCTION(MaybeObject*, Runtime_CreateJSProxy) {
681 ASSERT(args.length() == 2); 685 ASSERT(args.length() == 2);
682 CONVERT_ARG_CHECKED(JSReceiver, handler, 0); 686 CONVERT_ARG_CHECKED(JSReceiver, handler, 0);
683 Object* prototype = args[1]; 687 Object* prototype = args[1];
684 Object* used_prototype = 688 Object* used_prototype =
685 prototype->IsJSReceiver() ? prototype : isolate->heap()->null_value(); 689 prototype->IsJSReceiver() ? prototype : isolate->heap()->null_value();
686 return isolate->heap()->AllocateJSProxy(handler, used_prototype); 690 return isolate->heap()->AllocateJSProxy(handler, used_prototype);
(...skipping 12610 matching lines...) Expand 10 before | Expand all | Expand 10 after
13297 // Handle last resort GC and make sure to allow future allocations 13301 // Handle last resort GC and make sure to allow future allocations
13298 // to grow the heap without causing GCs (if possible). 13302 // to grow the heap without causing GCs (if possible).
13299 isolate->counters()->gc_last_resort_from_js()->Increment(); 13303 isolate->counters()->gc_last_resort_from_js()->Increment();
13300 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, 13304 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags,
13301 "Runtime::PerformGC"); 13305 "Runtime::PerformGC");
13302 } 13306 }
13303 } 13307 }
13304 13308
13305 13309
13306 } } // namespace v8::internal 13310 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | src/type-info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698