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

Unified Diff: runtime/vm/intrinsifier_x64.cc

Issue 266913010: Refactor 'dart:profiler' UserTag API (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 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/intrinsifier_mips.cc ('k') | runtime/vm/isolate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intrinsifier_x64.cc
diff --git a/runtime/vm/intrinsifier_x64.cc b/runtime/vm/intrinsifier_x64.cc
index c0bbba57346a61b6826072bdd514451ac3072259..243d4a5d4deb238e1b4356788d3aceb1167e8fd6 100644
--- a/runtime/vm/intrinsifier_x64.cc
+++ b/runtime/vm/intrinsifier_x64.cc
@@ -1655,33 +1655,34 @@ void Intrinsifier::UserTag_makeCurrent(Assembler* assembler) {
const Immediate& isolate_address =
Immediate(reinterpret_cast<int64_t>(isolate));
__ movq(RBX, isolate_address);
- // RAX: UserTag.
- __ movq(RAX, Address(RSP, + 1 * kWordSize));
+ // RAX: Current user tag.
+ __ movq(RAX, Address(RBX, Isolate::current_tag_offset()));
+ // R10: UserTag.
+ __ movq(R10, Address(RSP, + 1 * kWordSize));
// Set Isolate::current_tag_.
- __ movq(Address(RBX, Isolate::current_tag_offset()), RAX);
- // RAX: UserTag's tag.
- __ movq(RAX, FieldAddress(RAX, UserTag::tag_offset()));
+ __ movq(Address(RBX, Isolate::current_tag_offset()), R10);
+ // R10: UserTag's tag.
+ __ movq(R10, FieldAddress(R10, UserTag::tag_offset()));
// Set Isolate::user_tag_.
- __ movq(Address(RBX, Isolate::user_tag_offset()), RAX);
- // Set return value.
- __ LoadObject(RAX, Object::null_object(), PP);
+ __ movq(Address(RBX, Isolate::user_tag_offset()), R10);
__ ret();
}
-void Intrinsifier::Profiler_getCurrentTag(Assembler* assembler) {
- // RBX: Isolate.
+void Intrinsifier::UserTag_defaultTag(Assembler* assembler) {
+ // RBX: Address of default tag.
Isolate* isolate = Isolate::Current();
- const Immediate& isolate_address =
- Immediate(reinterpret_cast<int64_t>(isolate));
- __ movq(RBX, isolate_address);
- // Set return value to Isolate::current_tag_.
- __ movq(RAX, Address(RBX, Isolate::current_tag_offset()));
+ const Immediate& default_tag_addr =
+ Immediate(reinterpret_cast<int64_t>(isolate->object_store()) +
+ ObjectStore::default_tag_offset());
+ __ movq(RBX, default_tag_addr);
+ // Set return value.
+ __ movq(RAX, Address(RBX, 0));
__ ret();
}
-void Intrinsifier::Profiler_clearCurrentTag(Assembler* assembler) {
+void Intrinsifier::Profiler_getCurrentTag(Assembler* assembler) {
// RBX: Isolate.
Isolate* isolate = Isolate::Current();
const Immediate& isolate_address =
@@ -1689,11 +1690,6 @@ void Intrinsifier::Profiler_clearCurrentTag(Assembler* assembler) {
__ movq(RBX, isolate_address);
// Set return value to Isolate::current_tag_.
__ movq(RAX, Address(RBX, Isolate::current_tag_offset()));
- // Clear Isolate::current_tag_.
- __ LoadObject(RCX, Object::null_object(), PP);
- __ movq(Address(RBX, Isolate::current_tag_offset()), RCX);
- // Clear Isolate::user_tag_.
- __ movq(Address(RBX, Isolate::user_tag_offset()), Immediate(0));
__ ret();
}
« no previous file with comments | « runtime/vm/intrinsifier_mips.cc ('k') | runtime/vm/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698