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

Unified Diff: src/a64/simulator-a64.cc

Issue 181253002: A64: Make the Decoder a template (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 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
« no previous file with comments | « src/a64/simulator-a64.h ('k') | test/cctest/test-assembler-a64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/a64/simulator-a64.cc
diff --git a/src/a64/simulator-a64.cc b/src/a64/simulator-a64.cc
index 014b71477def993b76a8d1c6d953b8c0b67403fe..f33769079d66185c37aa2c41f55dfd94a2f7cca9 100644
--- a/src/a64/simulator-a64.cc
+++ b/src/a64/simulator-a64.cc
@@ -34,6 +34,7 @@
#include "disasm.h"
#include "assembler.h"
+#include "a64/decoder-a64-inl.h"
#include "a64/simulator-a64.h"
#include "macro-assembler.h"
@@ -105,7 +106,7 @@ Simulator* Simulator::current(Isolate* isolate) {
Simulator* sim = isolate_data->simulator();
if (sim == NULL) {
// TODO(146): delete the simulator object when a thread/isolate goes away.
- sim = new Simulator(new Decoder(), isolate);
+ sim = new Simulator(new Decoder<DispatchingDecoderVisitor>(), isolate);
isolate_data->set_simulator(sim);
}
return sim;
@@ -333,8 +334,11 @@ uintptr_t Simulator::StackLimit() const {
}
-Simulator::Simulator(Decoder* decoder, Isolate* isolate, FILE* stream)
- : decoder_(decoder), last_debugger_input_(NULL), log_parameters_(NO_PARAM),
+Simulator::Simulator(Decoder<DispatchingDecoderVisitor>* decoder,
+ Isolate* isolate, FILE* stream)
+ : decoder_(decoder),
+ last_debugger_input_(NULL),
+ log_parameters_(NO_PARAM),
isolate_(isolate) {
// Setup the decoder.
decoder_->AppendVisitor(this);
@@ -359,7 +363,7 @@ Simulator::Simulator(Decoder* decoder, Isolate* isolate, FILE* stream)
// The debugger needs to disassemble code without the simulator executing an
// instruction, so we create a dedicated decoder.
- disassembler_decoder_ = new Decoder();
+ disassembler_decoder_ = new Decoder<DispatchingDecoderVisitor>();
disassembler_decoder_->AppendVisitor(print_disasm_);
if (FLAG_log_instruction_stats) {
« no previous file with comments | « src/a64/simulator-a64.h ('k') | test/cctest/test-assembler-a64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698