Skip to content

Commit

Permalink
Experimental Profiler: tweak type info threshold.
Browse files Browse the repository at this point in the history
Also included: simplify String.slice.

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9694033

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11021 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
  • Loading branch information
yangguo@chromium.org committed Mar 13, 2012
1 parent ea175d6 commit 235e9e2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/flag-definitions.h
Expand Up @@ -216,7 +216,7 @@ DEFINE_bool(weighted_back_edges, false,
"weight back edges by jump distance for interrupt triggering")
DEFINE_int(interrupt_budget, 5900,
"execution budget before interrupt is triggered")
DEFINE_int(type_info_threshold, 40,
DEFINE_int(type_info_threshold, 15,
"percentage of ICs that must have type info to allow optimization")
DEFINE_int(self_opt_count, 130, "call count before self-optimization")

Expand Down
11 changes: 5 additions & 6 deletions src/string.js
Expand Up @@ -554,27 +554,26 @@ function StringSlice(start, end) {
}
} else {
if (start_i > s_len) {
start_i = s_len;
return '';
}
}

if (end_i < 0) {
end_i += s_len;
if (end_i < 0) {
end_i = 0;
return '';
}
} else {
if (end_i > s_len) {
end_i = s_len;
}
}

var num_c = end_i - start_i;
if (num_c < 0) {
num_c = 0;
if (end_i <= start_i) {
return '';
}

return SubString(s, start_i, start_i + num_c);
return SubString(s, start_i, end_i);
}


Expand Down

0 comments on commit 235e9e2

Please sign in to comment.