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

Unified Diff: runtime/vm/native_arguments.h

Issue 2226893002: Optimize AOT's switchable calls for the monomorphic case. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: . Created 4 years, 4 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
Index: runtime/vm/native_arguments.h
diff --git a/runtime/vm/native_arguments.h b/runtime/vm/native_arguments.h
index 7035a50b53cfc1c87b2203d711f328c16343390b..67b1f72773b775237316342674247658d0327b8f 100644
--- a/runtime/vm/native_arguments.h
+++ b/runtime/vm/native_arguments.h
@@ -107,6 +107,18 @@ class NativeArguments {
return *arg_ptr;
}
+ void SetArgAt(int index, const Object& value) const {
+ ASSERT((index >= 0) && (index < ArgCount()));
+#if defined(TARGET_ARCH_DBC)
+ // On DBC stack is growing upwards, in reverse direction from all other
+ // architectures.
+ RawObject** arg_ptr = &(argv_[index]);
Florian Schneider 2016/08/10 02:32:14 Since this is not used on DBC, maybe rather make i
rmacnak 2016/08/11 00:17:49 Remove altogether after removing monomorphic case
+#else
+ RawObject** arg_ptr = &(argv_[-index]);
+#endif
+ *arg_ptr = value.raw();
+ }
+
bool IsNativeAutoSetupScope() const {
return AutoSetupScopeBits::decode(argc_tag_);
}

Powered by Google App Engine
This is Rietveld 408576698