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

Unified Diff: runtime/vm/flow_graph_compiler_ia32.cc

Issue 294223003: Last cross-platform cleanup in preparation of improved ARM code for indexed (Closed) Base URL: http://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/flow_graph_compiler_arm64.cc ('k') | runtime/vm/flow_graph_compiler_mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_compiler_ia32.cc
===================================================================
--- runtime/vm/flow_graph_compiler_ia32.cc (revision 36535)
+++ runtime/vm/flow_graph_compiler_ia32.cc (working copy)
@@ -1539,14 +1539,20 @@
}
-Address FlowGraphCompiler::ElementAddressForIntIndex(intptr_t cid,
+Address FlowGraphCompiler::ElementAddressForIntIndex(bool is_load,
Florian Schneider 2014/05/23 07:54:16 I don't see is_load used anywhere.
regis 2014/05/23 14:51:05 You will see it being used on ARM in my next cl. U
+ bool is_external,
+ intptr_t cid,
intptr_t index_scale,
Register array,
intptr_t index) {
- const int64_t disp =
- static_cast<int64_t>(index) * index_scale + DataOffsetFor(cid);
- ASSERT(Utils::IsInt(32, disp));
- return FieldAddress(array, static_cast<int32_t>(disp));
+ if (is_external) {
+ return Address(array, index * index_scale);
+ } else {
+ const int64_t disp =
+ static_cast<int64_t>(index) * index_scale + DataOffsetFor(cid);
+ ASSERT(Utils::IsInt(32, disp));
+ return FieldAddress(array, static_cast<int32_t>(disp));
+ }
}
@@ -1568,33 +1574,23 @@
}
-Address FlowGraphCompiler::ElementAddressForRegIndex(intptr_t cid,
+Address FlowGraphCompiler::ElementAddressForRegIndex(bool is_load,
+ bool is_external,
+ intptr_t cid,
intptr_t index_scale,
Register array,
Register index) {
- return FieldAddress(array,
- index,
- ToScaleFactor(index_scale),
- DataOffsetFor(cid));
+ if (is_external) {
+ return Address(array, index, ToScaleFactor(index_scale), 0);
+ } else {
+ return FieldAddress(array,
+ index,
+ ToScaleFactor(index_scale),
+ DataOffsetFor(cid));
+ }
}
-Address FlowGraphCompiler::ExternalElementAddressForIntIndex(
- intptr_t index_scale,
- Register array,
- intptr_t index) {
- return Address(array, index * index_scale);
-}
-
-
-Address FlowGraphCompiler::ExternalElementAddressForRegIndex(
- intptr_t index_scale,
- Register array,
- Register index) {
- return Address(array, index, ToScaleFactor(index_scale), 0);
-}
-
-
#undef __
#define __ compiler_->assembler()->
« no previous file with comments | « runtime/vm/flow_graph_compiler_arm64.cc ('k') | runtime/vm/flow_graph_compiler_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698