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

Unified Diff: runtime/vm/code_patcher_ia32.cc

Issue 12646012: Improve code (less code, slightly faster) for polymorphic calls, by loading the argument descriptor… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 9 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 | « no previous file | runtime/vm/code_patcher_x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/code_patcher_ia32.cc
===================================================================
--- runtime/vm/code_patcher_ia32.cc (revision 20234)
+++ runtime/vm/code_patcher_ia32.cc (working copy)
@@ -93,7 +93,7 @@
// The expected pattern of a dart static call:
-// mov EDX, arguments_descriptor_array
+// mov EDX, arguments_descriptor_array (optional in polymorphic calls)
// call target_address
// <- return address
class StaticCall : public ValueObject {
@@ -108,8 +108,7 @@
uint8_t* code_bytes =
reinterpret_cast<uint8_t*>(
return_address - (kNumInstructions * kInstructionSize));
- return (code_bytes[0] == 0xBA) &&
- (code_bytes[1 * kInstructionSize] == 0xE8);
+ return (code_bytes[0] == 0xE8);
}
uword target() const {
@@ -124,7 +123,7 @@
CPU::FlushICache(call_address(), kInstructionSize);
}
- static const int kNumInstructions = 2;
+ static const int kNumInstructions = 1;
static const int kInstructionSize = 5; // All instructions have same length.
private:
@@ -133,7 +132,7 @@
}
uword call_address() const {
- return start_ + 1 * kInstructionSize;
+ return start_;
}
uword start_;
« no previous file with comments | « no previous file | runtime/vm/code_patcher_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698