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

Side by Side Diff: src/compiler.cc

Issue 9691042: Change --hydrogen-filter to allow specifying a negative filter for optimized functions. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 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/codegen.cc ('k') | src/flag-definitions.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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 (info->osr_ast_id() != AstNode::kNoNumber && 237 (info->osr_ast_id() != AstNode::kNoNumber &&
238 scope->num_parameters() + 1 + scope->num_stack_slots() > locals_limit)) { 238 scope->num_parameters() + 1 + scope->num_stack_slots() > locals_limit)) {
239 info->AbortOptimization(); 239 info->AbortOptimization();
240 info->shared_info()->DisableOptimization(); 240 info->shared_info()->DisableOptimization();
241 // True indicates the compilation pipeline is still going, not 241 // True indicates the compilation pipeline is still going, not
242 // necessarily that we optimized the code. 242 // necessarily that we optimized the code.
243 return true; 243 return true;
244 } 244 }
245 245
246 // Take --hydrogen-filter into account. 246 // Take --hydrogen-filter into account.
247 Vector<const char> filter = CStrVector(FLAG_hydrogen_filter);
248 Handle<String> name = info->function()->debug_name(); 247 Handle<String> name = info->function()->debug_name();
249 bool match = filter.is_empty() || name->IsEqualTo(filter); 248 if (*FLAG_hydrogen_filter != '\0') {
250 if (!match) { 249 Vector<const char> filter = CStrVector(FLAG_hydrogen_filter);
251 info->SetCode(code); 250 if ((filter[0] == '-'
252 return true; 251 && name->IsEqualTo(filter.SubVector(1, filter.length())))
252 || (filter[0] != '-' && !name->IsEqualTo(filter))) {
253 info->SetCode(code);
254 return true;
255 }
253 } 256 }
254 257
255 // Recompile the unoptimized version of the code if the current version 258 // Recompile the unoptimized version of the code if the current version
256 // doesn't have deoptimization support. Alternatively, we may decide to 259 // doesn't have deoptimization support. Alternatively, we may decide to
257 // run the full code generator to get a baseline for the compile-time 260 // run the full code generator to get a baseline for the compile-time
258 // performance of the hydrogen-based compiler. 261 // performance of the hydrogen-based compiler.
259 int64_t start = OS::Ticks(); 262 int64_t start = OS::Ticks();
260 bool should_recompile = !info->shared_info()->has_deoptimization_support(); 263 bool should_recompile = !info->shared_info()->has_deoptimization_support();
261 if (should_recompile || FLAG_hydrogen_stats) { 264 if (should_recompile || FLAG_hydrogen_stats) {
262 HPhase phase(HPhase::kFullCodeGen); 265 HPhase phase(HPhase::kFullCodeGen);
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after
802 } 805 }
803 } 806 }
804 807
805 GDBJIT(AddCode(Handle<String>(shared->DebugName()), 808 GDBJIT(AddCode(Handle<String>(shared->DebugName()),
806 Handle<Script>(info->script()), 809 Handle<Script>(info->script()),
807 Handle<Code>(info->code()), 810 Handle<Code>(info->code()),
808 info)); 811 info));
809 } 812 }
810 813
811 } } // namespace v8::internal 814 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/codegen.cc ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698