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

Side by Side Diff: src/compiler.cc

Issue 6681031: When aborting optimization attempts for a function, make sure... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 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 | « 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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 // non-optimizable information for the code. When the code is 165 // non-optimizable information for the code. When the code is
166 // regenerated and set on the shared function info it is marked as 166 // regenerated and set on the shared function info it is marked as
167 // non-optimizable if optimization is disabled for the shared 167 // non-optimizable if optimization is disabled for the shared
168 // function info. 168 // function info.
169 Handle<SharedFunctionInfo> shared = info->shared_info(); 169 Handle<SharedFunctionInfo> shared = info->shared_info();
170 shared->set_optimization_disabled(true); 170 shared->set_optimization_disabled(true);
171 Handle<Code> code = Handle<Code>(shared->code()); 171 Handle<Code> code = Handle<Code>(shared->code());
172 ASSERT(code->kind() == Code::FUNCTION); 172 ASSERT(code->kind() == Code::FUNCTION);
173 code->set_optimizable(false); 173 code->set_optimizable(false);
174 info->SetCode(code); 174 info->SetCode(code);
175 CompilationCache::MarkForLazyOptimizing(info->closure());
175 if (FLAG_trace_opt) { 176 if (FLAG_trace_opt) {
176 PrintF("[disabled optimization for: "); 177 PrintF("[disabled optimization for: ");
177 info->closure()->PrintName(); 178 info->closure()->PrintName();
178 PrintF(" / %" V8PRIxPTR "]\n", 179 PrintF(" / %" V8PRIxPTR "]\n",
179 reinterpret_cast<intptr_t>(*info->closure())); 180 reinterpret_cast<intptr_t>(*info->closure()));
180 } 181 }
181 } 182 }
182 183
183 184
184 static bool MakeCrankshaftCode(CompilationInfo* info) { 185 static bool MakeCrankshaftCode(CompilationInfo* info) {
(...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after
797 shared->DebugName())); 798 shared->DebugName()));
798 } 799 }
799 } 800 }
800 801
801 GDBJIT(AddCode(name, 802 GDBJIT(AddCode(name,
802 Handle<Script>(info->script()), 803 Handle<Script>(info->script()),
803 Handle<Code>(info->code()))); 804 Handle<Code>(info->code())));
804 } 805 }
805 806
806 } } // namespace v8::internal 807 } } // 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