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

Side by Side Diff: src/runtime-profiler.cc

Issue 6344006: Do not optimize functions which are in new space. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 11 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 function_= Handle<Object>::null(); 127 function_= Handle<Object>::null();
128 } 128 }
129 129
130 130
131 void PendingListNode::WeakCallback(v8::Persistent<v8::Value>, void* data) { 131 void PendingListNode::WeakCallback(v8::Persistent<v8::Value>, void* data) {
132 reinterpret_cast<PendingListNode*>(data)->Destroy(); 132 reinterpret_cast<PendingListNode*>(data)->Destroy();
133 } 133 }
134 134
135 135
136 static bool IsOptimizable(JSFunction* function) { 136 static bool IsOptimizable(JSFunction* function) {
137 if (Heap::InNewSpace(function)) return false;
137 Code* code = function->code(); 138 Code* code = function->code();
138 return code->kind() == Code::FUNCTION && code->optimizable(); 139 return code->kind() == Code::FUNCTION && code->optimizable();
139 } 140 }
140 141
141 142
142 static void Optimize(JSFunction* function, bool eager, int delay) { 143 static void Optimize(JSFunction* function, bool eager, int delay) {
143 ASSERT(IsOptimizable(function)); 144 ASSERT(IsOptimizable(function));
144 if (FLAG_trace_opt) { 145 if (FLAG_trace_opt) {
145 PrintF("[marking (%s) ", eager ? "eagerly" : "lazily"); 146 PrintF("[marking (%s) ", eager ? "eagerly" : "lazily");
146 function->PrintName(); 147 function->PrintName();
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 if (Top::WaitForJSState()) return true; 452 if (Top::WaitForJSState()) return true;
452 } 453 }
453 } 454 }
454 } 455 }
455 #endif 456 #endif
456 return false; 457 return false;
457 } 458 }
458 459
459 460
460 } } // namespace v8::internal 461 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698