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

Unified Diff: src/hydrogen.cc

Issue 1211333003: Make context register implicit for CallInterfaceDescriptors (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Platform ports Created 5 years, 6 months 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
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index 6f63b76ba97693cdea6946ec98e6004a191f7b37..80e8a3c73d62aa0392b796a082841c73cfeeb286 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -3490,8 +3490,8 @@ HGraph::HGraph(CompilationInfo* info)
if (info->IsStub()) {
CallInterfaceDescriptor descriptor =
info->code_stub()->GetCallInterfaceDescriptor();
- start_environment_ = new (zone_)
- HEnvironment(zone_, descriptor.GetEnvironmentParameterCount());
+ start_environment_ =
+ new (zone_) HEnvironment(zone_, descriptor.GetRegisterParameterCount());
} else {
if (info->is_tracking_positions()) {
info->TraceInlinedFunction(info->shared_info(), SourcePosition::Unknown(),
@@ -7692,9 +7692,8 @@ HInstruction* HOptimizedGraphBuilder::NewArgumentAdaptorCall(
isolate()->builtins()->ArgumentsAdaptorTrampoline();
HConstant* adaptor_value = Add<HConstant>(adaptor);
- return New<HCallWithDescriptor>(
- adaptor_value, argument_count, descriptor,
- Vector<HValue*>(op_vals, descriptor.GetEnvironmentLength()));
+ return New<HCallWithDescriptor>(adaptor_value, argument_count, descriptor,
+ Vector<HValue*>(op_vals, arraysize(op_vals)));
}
@@ -8950,19 +8949,17 @@ bool HOptimizedGraphBuilder::TryInlineApiCall(Handle<JSFunction> function,
Handle<Code> code = stub.GetCode();
HConstant* code_value = Add<HConstant>(code);
ApiAccessorDescriptor descriptor(isolate());
- DCHECK(arraysize(op_vals) - 1 == descriptor.GetEnvironmentLength());
call = New<HCallWithDescriptor>(
code_value, argc + 1, descriptor,
- Vector<HValue*>(op_vals, descriptor.GetEnvironmentLength()));
+ Vector<HValue*>(op_vals, arraysize(op_vals) - 1));
} else if (argc <= CallApiFunctionWithFixedArgsStub::kMaxFixedArgs) {
CallApiFunctionWithFixedArgsStub stub(isolate(), argc, call_data_undefined);
Handle<Code> code = stub.GetCode();
HConstant* code_value = Add<HConstant>(code);
ApiFunctionWithFixedArgsDescriptor descriptor(isolate());
- DCHECK(arraysize(op_vals) - 1 == descriptor.GetEnvironmentLength());
call = New<HCallWithDescriptor>(
code_value, argc + 1, descriptor,
- Vector<HValue*>(op_vals, descriptor.GetEnvironmentLength()));
+ Vector<HValue*>(op_vals, arraysize(op_vals) - 1));
Drop(1); // Drop function.
} else {
op_vals[arraysize(op_vals) - 1] = Add<HConstant>(argc);
@@ -8970,10 +8967,9 @@ bool HOptimizedGraphBuilder::TryInlineApiCall(Handle<JSFunction> function,
Handle<Code> code = stub.GetCode();
HConstant* code_value = Add<HConstant>(code);
ApiFunctionDescriptor descriptor(isolate());
- DCHECK(arraysize(op_vals) == descriptor.GetEnvironmentLength());
- call = New<HCallWithDescriptor>(
- code_value, argc + 1, descriptor,
- Vector<HValue*>(op_vals, descriptor.GetEnvironmentLength()));
+ call =
+ New<HCallWithDescriptor>(code_value, argc + 1, descriptor,
+ Vector<HValue*>(op_vals, arraysize(op_vals)));
Drop(1); // Drop function.
}
« src/code-stubs.h ('K') | « src/deoptimizer.cc ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698