http://codereview.chromium.org/2817018/diff/1/6
File src/compilation-cache.cc (right):
http://codereview.chromium.org/2817018/diff/1/6#newcode190
src/compilation-cache.cc:190: script_histogram_ =
stats_table_->CreateHistogram(
On 2010/06/21 21:48:01, Maxim.Mossienko wrote:
Because script_histogram has static scope with initialized once value,
please,
see explanation above
You're right, script_histogram_ should be a class member :-)
I guess you want to use stats_table_ as a flag to avoid multiple callas
to CreateHistogram if there is no external function or external function
actually returns NULL, to preserve current behavior.
It could be way more readable if instead of using stats_table_ as a flag
there was actual script_histogram_initialized_ bool for that.
if (!script_histogram_initialized_)
script_histogram_ =
Isolate::Current()->stats_table()->CreateHistogram(...)
script_histogram_initialized_ = true;
}
http://codereview.chromium.org/2817018/show
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev