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

Unified Diff: src/compiler.cc

Issue 9320: Semi-weekly merge from bleeding_edge to the toiger branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/toiger/
Patch Set: Created 12 years, 1 month 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/codegen-ia32.cc ('k') | src/conversions.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler.cc
===================================================================
--- src/compiler.cc (revision 682)
+++ src/compiler.cc (working copy)
@@ -157,8 +157,9 @@
int line_offset, int column_offset,
v8::Extension* extension,
ScriptDataImpl* input_pre_data) {
- Counters::total_load_size.Increment(source->length());
- Counters::total_compile_size.Increment(source->length());
+ int source_length = source->length();
+ Counters::total_load_size.Increment(source_length);
+ Counters::total_compile_size.Increment(source_length);
// The VM is in the COMPILER state until exiting this function.
VMState state(COMPILER);
@@ -175,7 +176,7 @@
if (result.is_null()) {
// No cache entry found. Do pre-parsing and compile the script.
ScriptDataImpl* pre_data = input_pre_data;
- if (pre_data == NULL && source->length() >= FLAG_min_preparse_length) {
+ if (pre_data == NULL && source_length >= FLAG_min_preparse_length) {
Access<SafeStringInputBuffer> buf(&safe_string_input_buffer);
buf->Reset(source.location());
pre_data = PreParse(buf.value(), extension);
@@ -208,8 +209,10 @@
Handle<JSFunction> Compiler::CompileEval(Handle<String> source,
int line_offset,
bool is_global) {
- Counters::total_eval_size.Increment(source->length());
- Counters::total_compile_size.Increment(source->length());
+ StringShape source_shape(*source);
+ int source_length = source->length(source_shape);
+ Counters::total_eval_size.Increment(source_length);
+ Counters::total_compile_size.Increment(source_length);
// The VM is in the COMPILER state until exiting this function.
VMState state(COMPILER);
« no previous file with comments | « src/codegen-ia32.cc ('k') | src/conversions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698