Reviewers: mvstanton,
Message:
Hey Michael,
The context is now implicitly provided by the graph builder. This is just
cleanup. PTAL
-- Benedikt
Description:
Remove unused context parameter from AddIncrementCounter().
Please review this at https://codereview.chromium.org/23622033/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+5, -8 lines):
M src/code-stubs-hydrogen.cc
M src/hydrogen.h
M src/hydrogen.cc
Index: src/code-stubs-hydrogen.cc
diff --git a/src/code-stubs-hydrogen.cc b/src/code-stubs-hydrogen.cc
index
23d5442f0e2f4d5ce9e0ee3344d5ff96e4f2da5a..1a6ae007ba6278701313b8e68bc29e229d92dd12
100644
--- a/src/code-stubs-hydrogen.cc
+++ b/src/code-stubs-hydrogen.cc
@@ -923,8 +923,7 @@ void
CodeStubGraphBuilderBase::BuildInstallOptimizedCode(
HValue* native_context,
HValue* code_object) {
Counters* counters = isolate()->counters();
- AddIncrementCounter(counters->fast_new_closure_install_optimized(),
- context());
+ AddIncrementCounter(counters->fast_new_closure_install_optimized());
// TODO(fschneider): Idea: store proper code pointers in the optimized
code
// map and either unmangle them on marking or do nothing as the whole
map is
@@ -972,7 +971,7 @@ void
CodeStubGraphBuilderBase::BuildInstallFromOptimizedCodeMap(
}
is_optimized.Else();
{
- AddIncrementCounter(counters->fast_new_closure_try_optimized(),
context());
+ AddIncrementCounter(counters->fast_new_closure_try_optimized());
// optimized_map points to fixed array of 3-element entries
// (native context, optimized code, literals).
// Map must never be empty, so check the first elements.
@@ -1061,7 +1060,7 @@ HValue*
CodeStubGraphBuilder<FastNewClosureStub>::BuildCodeStub() {
HValue* size = Add<HConstant>(JSFunction::kSize);
HInstruction* js_function = Add<HAllocate>(size, HType::JSObject(),
NOT_TENURED,
JS_FUNCTION_TYPE);
- AddIncrementCounter(counters->fast_new_closure_total(), context());
+ AddIncrementCounter(counters->fast_new_closure_total());
int map_index = Context::FunctionMapIndex(casted_stub()->language_mode(),
casted_stub()->is_generator());
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index
e1b89a41a9c9751d79e9a4736c5befa5c399c4f5..bf51aa7f3a5aefd9ff345b53eb855563f1265b7e
100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -1032,8 +1032,7 @@ HInstruction*
HGraphBuilder::AddInstruction(HInstruction* instr) {
}
-void HGraphBuilder::AddIncrementCounter(StatsCounter* counter,
- HValue* context) {
+void HGraphBuilder::AddIncrementCounter(StatsCounter* counter) {
if (FLAG_native_code_counters && counter->Enabled()) {
HValue* reference = Add<HConstant>(ExternalReference(counter));
HValue* old_value = Add<HLoadNamedField>(reference,
Index: src/hydrogen.h
diff --git a/src/hydrogen.h b/src/hydrogen.h
index
c1dafa8b5a7a73171c3c6c693f60210656ccac27..af36c508a421080b9ebc8b302425b57f9d1c53ee
100644
--- a/src/hydrogen.h
+++ b/src/hydrogen.h
@@ -1271,8 +1271,7 @@ class HGraphBuilder {
void FinishExitWithHardDeoptimization(const char* reason,
HBasicBlock* continuation);
- void AddIncrementCounter(StatsCounter* counter,
- HValue* context);
+ void AddIncrementCounter(StatsCounter* counter);
class IfBuilder V8_FINAL {
public:
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.