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

Unified Diff: src/compiler/linkage-impl.h

Issue 1239793002: [interpreter] Add basic framework for bytecode handler code generation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Review comments Created 5 years, 5 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/compiler/linkage-impl.h
diff --git a/src/compiler/linkage-impl.h b/src/compiler/linkage-impl.h
index 5b638034c8cbeaf7e141eda55d0d71150ba3bdcf..4fa40241366a51977a4ef7c69fde6cd26d5216be 100644
--- a/src/compiler/linkage-impl.h
+++ b/src/compiler/linkage-impl.h
@@ -233,18 +233,25 @@ class LinkageHelper {
"c-call");
}
- static CallDescriptor* GetInterpreterDispatchDescriptor(
- Zone* zone, const MachineSignature* msig) {
- DCHECK_EQ(0, msig->parameter_count());
- LocationSignature::Builder locations(zone, msig->return_count(),
- msig->parameter_count());
- AddReturnLocations(&locations);
+ static CallDescriptor* GetInterpreterDispatchDescriptor(Zone* zone) {
+ MachineSignature::Builder types(zone, 0, 2);
+ LocationSignature::Builder locations(zone, 0, 2);
+
+ // Add registers for fixed parameters passed via interpreter dispatch.
+ DCHECK_EQ(0, Linkage::kInterpreterBytecodeParameter);
Michael Starzinger 2015/07/21 13:51:45 nit: Can this be made a STATIC_ASSERT?
rmcilroy 2015/07/23 10:43:54 Done.
+ types.AddParam(kMachPtr);
+ locations.AddParam(regloc(LinkageTraits::InterpreterBytecodePointerReg()));
+
+ DCHECK_EQ(1, Linkage::kInterpreterDispatchTableParameter);
Michael Starzinger 2015/07/21 13:51:45 nit: Can this be made a STATIC_ASSERT?
rmcilroy 2015/07/23 10:43:54 Done (also in interpreter-assembler.cc).
+ types.AddParam(kMachPtr);
+ locations.AddParam(regloc(LinkageTraits::InterpreterDispatchTableReg()));
+
LinkageLocation target_loc = LinkageLocation::AnyRegister();
return new (zone) CallDescriptor( // --
CallDescriptor::kInterpreterDispatch, // kind
kMachNone, // target MachineType
target_loc, // target location
- msig, // machine_sig
+ types.Build(), // machine_sig
locations.Build(), // location_sig
0, // js_parameter_count
Operator::kNoProperties, // properties

Powered by Google App Engine
This is Rietveld 408576698