Index: src/code-stubs-hydrogen.cc |
diff --git a/src/code-stubs-hydrogen.cc b/src/code-stubs-hydrogen.cc |
index 1a6ae007ba6278701313b8e68bc29e229d92dd12..23d4269c849fa6cbd517b6f1d64deccb582fd570 100644 |
--- a/src/code-stubs-hydrogen.cc |
+++ b/src/code-stubs-hydrogen.cc |
@@ -357,45 +357,40 @@ HValue* CodeStubGraphBuilder<FastCloneShallowArrayStub>::BuildCodeStub() { |
HObjectAccess access = HObjectAccess::ForAllocationSiteTransitionInfo(); |
HInstruction* boilerplate = Add<HLoadNamedField>(allocation_site, access); |
- HValue* push_value; |
if (mode == FastCloneShallowArrayStub::CLONE_ANY_ELEMENTS) { |
HValue* elements = AddLoadElements(boilerplate); |
IfBuilder if_fixed_cow(this); |
if_fixed_cow.If<HCompareMap>(elements, factory->fixed_cow_array_map()); |
if_fixed_cow.Then(); |
- push_value = BuildCloneShallowArray(boilerplate, |
- allocation_site, |
- alloc_site_mode, |
- FAST_ELEMENTS, |
- 0/*copy-on-write*/); |
- environment()->Push(push_value); |
+ environment()->Push(BuildCloneShallowArray(boilerplate, |
+ allocation_site, |
+ alloc_site_mode, |
+ FAST_ELEMENTS, |
+ 0/*copy-on-write*/)); |
if_fixed_cow.Else(); |
IfBuilder if_fixed(this); |
if_fixed.If<HCompareMap>(elements, factory->fixed_array_map()); |
if_fixed.Then(); |
- push_value = BuildCloneShallowArray(boilerplate, |
- allocation_site, |
- alloc_site_mode, |
- FAST_ELEMENTS, |
- length); |
- environment()->Push(push_value); |
+ environment()->Push(BuildCloneShallowArray(boilerplate, |
+ allocation_site, |
+ alloc_site_mode, |
+ FAST_ELEMENTS, |
+ length)); |
if_fixed.Else(); |
- push_value = BuildCloneShallowArray(boilerplate, |
- allocation_site, |
- alloc_site_mode, |
- FAST_DOUBLE_ELEMENTS, |
- length); |
- environment()->Push(push_value); |
+ environment()->Push(BuildCloneShallowArray(boilerplate, |
+ allocation_site, |
+ alloc_site_mode, |
+ FAST_DOUBLE_ELEMENTS, |
+ length)); |
} else { |
ElementsKind elements_kind = casted_stub()->ComputeElementsKind(); |
- push_value = BuildCloneShallowArray(boilerplate, |
- allocation_site, |
- alloc_site_mode, |
- elements_kind, |
- length); |
- environment()->Push(push_value); |
+ environment()->Push(BuildCloneShallowArray(boilerplate, |
+ allocation_site, |
+ alloc_site_mode, |
+ elements_kind, |
+ length)); |
} |
checker.ElseDeopt("Uninitialized boilerplate literals"); |
@@ -923,7 +918,8 @@ void CodeStubGraphBuilderBase::BuildInstallOptimizedCode( |
HValue* native_context, |
HValue* code_object) { |
Counters* counters = isolate()->counters(); |
- AddIncrementCounter(counters->fast_new_closure_install_optimized()); |
+ AddIncrementCounter(counters->fast_new_closure_install_optimized(), |
+ context()); |
// 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 |
@@ -971,7 +967,7 @@ void CodeStubGraphBuilderBase::BuildInstallFromOptimizedCodeMap( |
} |
is_optimized.Else(); |
{ |
- AddIncrementCounter(counters->fast_new_closure_try_optimized()); |
+ AddIncrementCounter(counters->fast_new_closure_try_optimized(), context()); |
// 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. |
@@ -1060,7 +1056,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()); |
+ AddIncrementCounter(counters->fast_new_closure_total(), context()); |
int map_index = Context::FunctionMapIndex(casted_stub()->language_mode(), |
casted_stub()->is_generator()); |