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

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: 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..eaac5a6687a616cec58181a3120be6c3087563c8 100644
--- a/src/compiler/linkage-impl.h
+++ b/src/compiler/linkage-impl.h
@@ -6,6 +6,7 @@
#define V8_COMPILER_LINKAGE_IMPL_H_
#include "src/code-stubs.h"
+#include "src/compiler/interpreter-assembler.h"
#include "src/compiler/osr.h"
namespace v8 {
@@ -233,18 +234,31 @@ 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,
+ bool needs_return) {
+ int return_count = needs_return ? 1 : 0;
+ MachineSignature::Builder types(zone, return_count, 2);
+ LocationSignature::Builder locations(zone, return_count, 2);
+
+ DCHECK_EQ(0, InterpreterAssembler::kBytecodePointerParameter);
oth 2015/07/15 13:22:01 One line comment explaining types purpose (reservi
rmcilroy 2015/07/15 16:55:58 Done.
+ types.AddParam(kMachPtr);
+ locations.AddParam(regloc(LinkageTraits::InterpreterBytecodePointerReg()));
+
+ DCHECK_EQ(1, InterpreterAssembler::kDispatchTablePointerParameter);
+ types.AddParam(kMachPtr);
+ locations.AddParam(regloc(LinkageTraits::InterpreterDispatchTableReg()));
+
+ if (needs_return) {
+ types.AddReturn(kMachAnyTagged);
+ AddReturnLocations(&locations);
+ }
+
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