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

Side by Side Diff: src/codegen.cc

Issue 125141: Attempt to reduce performance penalty for logging and profiling (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 6 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 | src/compiler.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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 } 218 }
219 219
220 return code; 220 return code;
221 } 221 }
222 222
223 223
224 #ifdef ENABLE_LOGGING_AND_PROFILING 224 #ifdef ENABLE_LOGGING_AND_PROFILING
225 225
226 bool CodeGenerator::ShouldGenerateLog(Expression* type) { 226 bool CodeGenerator::ShouldGenerateLog(Expression* type) {
227 ASSERT(type != NULL); 227 ASSERT(type != NULL);
228 if (!Logger::IsEnabled()) return false; 228 if (!Logger::is_logging()) return false;
229 Handle<String> name = Handle<String>::cast(type->AsLiteral()->handle()); 229 Handle<String> name = Handle<String>::cast(type->AsLiteral()->handle());
230 if (FLAG_log_regexp) { 230 if (FLAG_log_regexp) {
231 static Vector<const char> kRegexp = CStrVector("regexp"); 231 static Vector<const char> kRegexp = CStrVector("regexp");
232 if (name->IsEqualTo(kRegexp)) 232 if (name->IsEqualTo(kRegexp))
233 return true; 233 return true;
234 } 234 }
235 return false; 235 return false;
236 } 236 }
237 237
238 #endif 238 #endif
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 void ArgumentsAccessStub::Generate(MacroAssembler* masm) { 527 void ArgumentsAccessStub::Generate(MacroAssembler* masm) {
528 switch (type_) { 528 switch (type_) {
529 case READ_LENGTH: GenerateReadLength(masm); break; 529 case READ_LENGTH: GenerateReadLength(masm); break;
530 case READ_ELEMENT: GenerateReadElement(masm); break; 530 case READ_ELEMENT: GenerateReadElement(masm); break;
531 case NEW_OBJECT: GenerateNewObject(masm); break; 531 case NEW_OBJECT: GenerateNewObject(masm); break;
532 } 532 }
533 } 533 }
534 534
535 535
536 } } // namespace v8::internal 536 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698