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

Unified Diff: runtime/vm/code_patcher_ia32.cc

Issue 10010029: When checking against non-parametrized types use a cache to hold result tuples (class, result). Tha… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 8 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 | « runtime/vm/code_patcher_arm.cc ('k') | 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 6277)
+++ runtime/vm/code_patcher_ia32.cc (working copy)
@@ -259,6 +259,22 @@
return DartCallPattern::kNumInstructions * DartCallPattern::kInstructionSize;
}
+
+RawArray* CodePatcher::GetTypeTestArray(uword instruction_address) {
+ Array& result = Array::Handle();
+ uint32_t* target_addr = reinterpret_cast<uint32_t*>(instruction_address + 1);
+ result ^= reinterpret_cast<RawObject*>(*target_addr);
+ return result.raw();
+}
+
+
+void CodePatcher::SetTypeTestArray(uword instruction_address,
+ const Array& value) {
+ uint32_t* target_addr = reinterpret_cast<uint32_t*>(instruction_address + 1);
+ *target_addr = reinterpret_cast<uint32_t>(value.raw());
+}
+
+
} // namespace dart
#endif // defined TARGET_ARCH_IA32
« no previous file with comments | « runtime/vm/code_patcher_arm.cc ('k') | runtime/vm/code_patcher_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698