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

Unified Diff: src/codegen.cc

Issue 17203: Periodic merge from bleeding_edge to experimental code generator... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/toiger/
Patch Set: Created 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/builtins-ia32.cc ('k') | src/codegen-arm.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codegen.cc
===================================================================
--- src/codegen.cc (revision 1032)
+++ src/codegen.cc (working copy)
@@ -159,6 +159,19 @@
}
+bool CodeGenerator::ShouldGenerateLog(Expression* type) {
+ ASSERT(type != NULL);
+ if (!Logger::is_enabled()) return false;
+ Handle<String> name = Handle<String>::cast(type->AsLiteral()->handle());
+ if (FLAG_log_regexp) {
+ static Vector<const char> kRegexp = CStrVector("regexp");
+ if (name->IsEqualTo(kRegexp))
+ return true;
+ }
+ return false;
+}
+
+
// Sets the function info on a function.
// The start_position points to the first '(' character after the function name
// in the full script source. When counting characters in the script source the
@@ -334,7 +347,9 @@
{&v8::internal::CodeGenerator::GenerateFastCharCodeAt,
"_FastCharCodeAt"},
{&v8::internal::CodeGenerator::GenerateObjectEquals,
- "_ObjectEquals"}
+ "_ObjectEquals"},
+ {&v8::internal::CodeGenerator::GenerateLog,
+ "_Log"}
};
Handle<String> name = node->name();
StringShape shape(*name);
« no previous file with comments | « src/builtins-ia32.cc ('k') | src/codegen-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698