Author: [email protected]
Date: Mon Jun 22 00:22:09 2009
New Revision: 2227
Modified:
branches/bleeding_edge/src/compiler.cc
branches/bleeding_edge/src/log.cc
Log:
Eliminate double offsetting of line numbers in profiler.
I didn't noticed that in r1481 GetScriptLineNumber was changed to perform
line numbers offsetting by itself.
Review URL: http://codereview.chromium.org/131102
Modified: branches/bleeding_edge/src/compiler.cc
==============================================================================
--- branches/bleeding_edge/src/compiler.cc (original)
+++ branches/bleeding_edge/src/compiler.cc Mon Jun 22 00:22:09 2009
@@ -380,10 +380,7 @@
Handle<String> func_name(name->length() > 0 ?
*name : shared->inferred_name());
if (script->name()->IsString()) {
- int line_num = GetScriptLineNumber(script, start_position);
- if (line_num > 0) {
- line_num += script->line_offset()->value() + 1;
- }
+ int line_num = GetScriptLineNumber(script, start_position) + 1;
LOG(CodeCreateEvent(Logger::LAZY_COMPILE_TAG, *code, *func_name,
String::cast(script->name()), line_num));
OProfileAgent::CreateNativeCodeRegion(*func_name,
Modified: branches/bleeding_edge/src/log.cc
==============================================================================
--- branches/bleeding_edge/src/log.cc (original)
+++ branches/bleeding_edge/src/log.cc Mon Jun 22 00:22:09 2009
@@ -1026,10 +1026,9 @@
Handle<String> script_name(String::cast(script->name()));
int line_num = GetScriptLineNumber(script,
shared->start_position());
if (line_num > 0) {
- line_num += script->line_offset()->value() + 1;
LOG(CodeCreateEvent(Logger::LAZY_COMPILE_TAG,
shared->code(), *func_name,
- *script_name, line_num));
+ *script_name, line_num + 1));
} else {
// Can't distinguish enum and script here, so always use Script.
LOG(CodeCreateEvent(Logger::SCRIPT_TAG,
--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---