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

Unified Diff: vm/code_patcher_ia32.cc

Issue 8379013: Implement new inline cache. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: '' Created 9 years, 2 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 | « vm/code_patcher_arm.cc ('k') | vm/code_patcher_ia32_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/code_patcher_ia32.cc
===================================================================
--- vm/code_patcher_ia32.cc (revision 700)
+++ vm/code_patcher_ia32.cc (working copy)
@@ -49,7 +49,7 @@
void set_immediate_one(uint32_t value) {
uint32_t* target_addr = reinterpret_cast<uint32_t*>(start_ + 1);
*target_addr = value;
- CPU::FlushICache(call_address(), kInstructionSize);
+ CPU::FlushICache(start_, kInstructionSize);
}
uint32_t immediate_two() const {
@@ -154,30 +154,6 @@
}
-static void InsertCallOrJump(uword at_addr,
- const ExternalLabel* label,
- uint8_t op) {
- const int kInstructionSize = 5;
- *reinterpret_cast<uint8_t*>(at_addr) = op; // Call.
- uword* target_addr = reinterpret_cast<uword*>(at_addr + 1);
- uword offset = label->address() - (at_addr + kInstructionSize);
- *target_addr = offset;
- CPU::FlushICache(at_addr, kInstructionSize);
-}
-
-
-void CodePatcher::InsertCall(uword at_addr, const ExternalLabel* label) {
- const uint8_t kCallOp = 0xE8;
- InsertCallOrJump(at_addr, label, kCallOp);
-}
-
-
-void CodePatcher::InsertJump(uword at_addr, const ExternalLabel* label) {
- const uint8_t kJumpOp = 0xE9;
- InsertCallOrJump(at_addr, label, kJumpOp);
-}
-
-
static void SwapCode(intptr_t num_bytes, char* a, char* b) {
for (intptr_t i = 0; i < num_bytes; i++) {
char tmp = *a;
@@ -259,12 +235,6 @@
}
-void CodePatcher::PatchInstanceCallAt(uword return_address, uword new_target) {
- InstanceCall call(return_address);
- call.set_target(new_target);
-}
-
-
RawArray* CodePatcher::GetInstanceCallIcDataAt(uword return_address) {
InstanceCall call(return_address);
return call.ic_data();
« no previous file with comments | « vm/code_patcher_arm.cc ('k') | vm/code_patcher_ia32_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698