Mips fix instruction memory view#104
Conversation
…ow long it took to find)
…iple steps at a time (PC_DE, PC_EX and PC_DM are not updated correctly, nor does their unclock work as intended)
| pub fn update_dynamic_symbols(&self, new_pc: u32) { | ||
| let pc_history = self.pc_history.borrow(); | ||
| let mut new_dynamic_symbols = self.dynamic_symbols.borrow_mut().clone(); | ||
| if new_dynamic_symbols.contains_key("PC_IM") { |
There was a problem hiding this comment.
There seams to be a lot of nested if statments, is there a better way to write this
There was a problem hiding this comment.
yes, it is now improved. Thank you
| } | ||
| pub fn update_dynamic_symbols(&self, new_pc: u32) { | ||
| let pc_history = self.pc_history.borrow(); | ||
| let mut new_dynamic_symbols = self.dynamic_symbols.borrow_mut().clone(); |
There was a problem hiding this comment.
why borrow_mut when we clone?
There was a problem hiding this comment.
is it even necceasy to do it this way? can't we modify it inplace?
There was a problem hiding this comment.
You are right, I have now successfully fixed it (commit: 35e8e7e)
| pub mem_view: RefCell<MemViewWindow>, | ||
|
|
||
| #[serde(skip)] | ||
| pub pc_history: RefCell<Vec<u32>>, |
There was a problem hiding this comment.
i understand why this is necessary, since we don't get a data when unclocking. But does there exist a better way?
There was a problem hiding this comment.
Yes and I have replaced pc_history with pc_dm_history. I have also atleast made the situation better by only relying on pc_dm_history when it comes to the dynamic symbol PC_DM
+ and fix Combobox deprecation
…tion_memory_thisResultOfSpookinessAndGithubNotWantingToFollowInstructions
…sResultOfSpookinessAndGithubNotWantingToFollowInstructions hope++ also, it seems like I don't understand github, but it seems to still work
How: I don't know, perhaps everything will be revealed in my dreams
…tory: RefCell<Vec<u32>>" may be necessary
Spooky-Firefox
left a comment
There was a problem hiding this comment.
Added some comments but they are nitpicks and don't need to be resolved, except not clearing pc history vec on reset.
another thing that might be good for learning is to rebase the branch to squash all "cleaning" "removed row" commits into one.
otherwise LGTM
889be68 to
464bf35
Compare
Fixed:
Added: