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

Side by Side Diff: src/profile-generator.cc

Issue 7066004: Inline more zone stuff. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 7 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/parser.cc ('k') | src/runtime.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 1889 matching lines...) Expand 10 before | Expand all | Expand 10 after
1900 } 1900 }
1901 } 1901 }
1902 1902
1903 1903
1904 void V8HeapExplorer::ExtractClosureReferences(JSObject* js_obj, 1904 void V8HeapExplorer::ExtractClosureReferences(JSObject* js_obj,
1905 HeapEntry* entry) { 1905 HeapEntry* entry) {
1906 if (js_obj->IsJSFunction()) { 1906 if (js_obj->IsJSFunction()) {
1907 HandleScope hs; 1907 HandleScope hs;
1908 JSFunction* func = JSFunction::cast(js_obj); 1908 JSFunction* func = JSFunction::cast(js_obj);
1909 Context* context = func->context(); 1909 Context* context = func->context();
1910 ZoneScope zscope(DELETE_ON_EXIT); 1910 ZoneScope zscope(Isolate::Current(), DELETE_ON_EXIT);
1911 SerializedScopeInfo* serialized_scope_info = 1911 SerializedScopeInfo* serialized_scope_info =
1912 context->closure()->shared()->scope_info(); 1912 context->closure()->shared()->scope_info();
1913 ScopeInfo<ZoneListAllocationPolicy> zone_scope_info(serialized_scope_info); 1913 ScopeInfo<ZoneListAllocationPolicy> zone_scope_info(serialized_scope_info);
1914 int locals_number = zone_scope_info.NumberOfLocals(); 1914 int locals_number = zone_scope_info.NumberOfLocals();
1915 for (int i = 0; i < locals_number; ++i) { 1915 for (int i = 0; i < locals_number; ++i) {
1916 String* local_name = *zone_scope_info.LocalName(i); 1916 String* local_name = *zone_scope_info.LocalName(i);
1917 int idx = serialized_scope_info->ContextSlotIndex(local_name, NULL); 1917 int idx = serialized_scope_info->ContextSlotIndex(local_name, NULL);
1918 if (idx >= 0 && idx < context->length()) { 1918 if (idx >= 0 && idx < context->length()) {
1919 SetClosureReference(js_obj, entry, local_name, context->get(idx)); 1919 SetClosureReference(js_obj, entry, local_name, context->get(idx));
1920 } 1920 }
(...skipping 1168 matching lines...) Expand 10 before | Expand all | Expand 10 after
3089 3089
3090 3090
3091 String* GetConstructorNameForHeapProfile(JSObject* object) { 3091 String* GetConstructorNameForHeapProfile(JSObject* object) {
3092 if (object->IsJSFunction()) return HEAP->closure_symbol(); 3092 if (object->IsJSFunction()) return HEAP->closure_symbol();
3093 return object->constructor_name(); 3093 return object->constructor_name();
3094 } 3094 }
3095 3095
3096 } } // namespace v8::internal 3096 } } // namespace v8::internal
3097 3097
3098 #endif // ENABLE_LOGGING_AND_PROFILING 3098 #endif // ENABLE_LOGGING_AND_PROFILING
OLDNEW
« no previous file with comments | « src/parser.cc ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698