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

Unified Diff: runtime/vm/code_patcher_x64.cc

Issue 9395016: First part of new ICData infrastructure: use a wrapper object instead of an array. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 | « runtime/vm/code_patcher_ia32_test.cc ('k') | runtime/vm/code_patcher_x64_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/code_patcher_x64.cc
===================================================================
--- runtime/vm/code_patcher_x64.cc (revision 4412)
+++ runtime/vm/code_patcher_x64.cc (working copy)
@@ -8,7 +8,6 @@
#include "vm/assembler.h"
#include "vm/code_patcher.h"
#include "vm/cpu.h"
-#include "vm/ic_data.h"
#include "vm/instructions.h"
#include "vm/object.h"
#include "vm/raw_object.h"
@@ -105,19 +104,19 @@
};
-// A Dart instance call passes the ic-data array in RBX.
+// A Dart instance call passes the ic-data in RBX.
class InstanceCall : public DartCallPattern {
public:
explicit InstanceCall(uword return_address)
: DartCallPattern(return_address) {}
- RawArray* ic_data() const {
- Array& array = Array::Handle();
- array ^= reinterpret_cast<RawObject*>(immediate_one());
- return array.raw();
+ RawICData* ic_data() const {
+ ICData& ic_data = ICData::Handle();
+ ic_data ^= reinterpret_cast<RawObject*>(immediate_one());
+ return ic_data.raw();
}
- void SetIcData(const Array& value) {
+ void SetIcData(const ICData& value) {
set_immediate_one(reinterpret_cast<int64_t>(value.raw()));
}
@@ -230,24 +229,17 @@
*num_arguments = call.argument_count();
*num_named_arguments = call.named_argument_count();
*target = call.target();
- ICData ic_data(Array::ZoneHandle(call.ic_data()));
- *function_name = ic_data.FunctionName();
+ const ICData& ic_data = ICData::Handle(call.ic_data());
+ *function_name = ic_data.target_name();
}
-RawArray* CodePatcher::GetInstanceCallIcDataAt(uword return_address) {
+RawICData* CodePatcher::GetInstanceCallIcDataAt(uword return_address) {
InstanceCall call(return_address);
return call.ic_data();
}
-void CodePatcher::SetInstanceCallIcDataAt(uword return_address,
- const Array& ic_data) {
- InstanceCall call(return_address);
- call.SetIcData(ic_data);
-}
-
-
intptr_t CodePatcher::InstanceCallSizeInBytes() {
return DartCallPattern::kCallPatternSize;
}
« no previous file with comments | « runtime/vm/code_patcher_ia32_test.cc ('k') | runtime/vm/code_patcher_x64_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698