Chromium Code Reviews| OLD | NEW | 
|---|---|
| 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 1239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1250 // SharedFunctionInfo is passed separately, because if CompilationInfo | 1250 // SharedFunctionInfo is passed separately, because if CompilationInfo | 
| 1251 // was created using Script object, it will not have it. | 1251 // was created using Script object, it will not have it. | 
| 1252 | 1252 | 
| 1253 // Log the code generation. If source information is available include | 1253 // Log the code generation. If source information is available include | 
| 1254 // script name and line number. Check explicitly whether logging is | 1254 // script name and line number. Check explicitly whether logging is | 
| 1255 // enabled as finding the line number is not free. | 1255 // enabled as finding the line number is not free. | 
| 1256 if (info->isolate()->logger()->is_logging_code_events() || | 1256 if (info->isolate()->logger()->is_logging_code_events() || | 
| 1257 info->isolate()->cpu_profiler()->is_profiling()) { | 1257 info->isolate()->cpu_profiler()->is_profiling()) { | 
| 1258 Handle<Script> script = info->script(); | 1258 Handle<Script> script = info->script(); | 
| 1259 Handle<Code> code = info->code(); | 1259 Handle<Code> code = info->code(); | 
| 1260 if (code.is_identical_to(info->isolate()->builtins()->CompileUnoptimized())) | 1260 if (code.is_identical_to( | 
| 1261 info->isolate()->builtins()->CompileUnoptimized())) { | |
| 
 
mvstanton
2014/04/16 11:09:00
thank you for the {}, it's gud. :)
 
 | |
| 1261 return; | 1262 return; | 
| 1262 int line_num = GetScriptLineNumber(script, shared->start_position()) + 1; | 1263 } | 
| 1263 int column_num = | |
| 1264 GetScriptColumnNumber(script, shared->start_position()) + 1; | |
| 1265 USE(line_num); | |
| 1266 String* script_name = script->name()->IsString() | |
| 1267 ? String::cast(script->name()) | |
| 1268 : info->isolate()->heap()->empty_string(); | |
| 1269 Logger::LogEventsAndTags log_tag = Logger::ToNativeByScript(tag, *script); | 1264 Logger::LogEventsAndTags log_tag = Logger::ToNativeByScript(tag, *script); | 
| 1270 PROFILE(info->isolate(), CodeCreateEvent( | 1265 PROFILE(info->isolate(), CodeCreateEvent( | 
| 1271 log_tag, *code, *shared, info, script_name, line_num, column_num)); | 1266 log_tag, | 
| 1267 *code, | |
| 1268 *shared, | |
| 1269 info, | |
| 1270 script->name()->IsString() | |
| 1271 ? String::cast(script->name()) | |
| 1272 : info->isolate()->heap()->empty_string(), | |
| 1273 Script::GetLineNumber(script, shared->start_position()) + 1, | |
| 1274 Script::GetColumnNumber(script, shared->start_position()) + 1)); | |
| 1272 } | 1275 } | 
| 1273 | 1276 | 
| 1274 GDBJIT(AddCode(Handle<String>(shared->DebugName()), | 1277 GDBJIT(AddCode(Handle<String>(shared->DebugName()), | 
| 1275 Handle<Script>(info->script()), | 1278 Handle<Script>(info->script()), | 
| 1276 Handle<Code>(info->code()), | 1279 Handle<Code>(info->code()), | 
| 1277 info)); | 1280 info)); | 
| 1278 } | 1281 } | 
| 1279 | 1282 | 
| 1280 | 1283 | 
| 1281 CompilationPhase::CompilationPhase(const char* name, CompilationInfo* info) | 1284 CompilationPhase::CompilationPhase(const char* name, CompilationInfo* info) | 
| (...skipping 20 matching lines...) Expand all Loading... | |
| 1302 AllowHandleDereference allow_deref; | 1305 AllowHandleDereference allow_deref; | 
| 1303 bool tracing_on = info()->IsStub() | 1306 bool tracing_on = info()->IsStub() | 
| 1304 ? FLAG_trace_hydrogen_stubs | 1307 ? FLAG_trace_hydrogen_stubs | 
| 1305 : (FLAG_trace_hydrogen && | 1308 : (FLAG_trace_hydrogen && | 
| 1306 info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter)); | 1309 info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter)); | 
| 1307 return (tracing_on && | 1310 return (tracing_on && | 
| 1308 OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL); | 1311 OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL); | 
| 1309 } | 1312 } | 
| 1310 | 1313 | 
| 1311 } } // namespace v8::internal | 1314 } } // namespace v8::internal | 
| OLD | NEW |