summaryrefslogtreecommitdiffstats
path: root/compiler/optimizing/builder.h
diff options
context:
space:
mode:
authorNicolas Geoffray <ngeoffray@google.com>2014-11-10 15:09:21 +0000
committerNicolas Geoffray <ngeoffray@google.com>2014-11-12 09:18:41 +0000
commit57a88d4ac205874dc85d22f9f6a9ca3c4c373eeb (patch)
treeaf321a2f2d4555f56e0ffcbe31cb4e313b8d35c7 /compiler/optimizing/builder.h
parent401da919c67ceb8fbcac81596327ecc10b73389b (diff)
downloadandroid_art-57a88d4ac205874dc85d22f9f6a9ca3c4c373eeb.tar.gz
android_art-57a88d4ac205874dc85d22f9f6a9ca3c4c373eeb.tar.bz2
android_art-57a88d4ac205874dc85d22f9f6a9ca3c4c373eeb.zip
Implement checkcast for optimizing.
- Ended up not using HTypeCheck because of how instanceof and checkcast end up having different logic for code generation. - Fix a x86_64 assembler bug triggered by now enabling more methods to be compiled. Difficult to test today without b/18117217. Change-Id: I3022e7ae03befb1d10bea9637ad21fadc430abe0
Diffstat (limited to 'compiler/optimizing/builder.h')
-rw-r--r--compiler/optimizing/builder.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler/optimizing/builder.h b/compiler/optimizing/builder.h
index 09c9a51260..9cf83055b2 100644
--- a/compiler/optimizing/builder.h
+++ b/compiler/optimizing/builder.h
@@ -173,6 +173,14 @@ class HGraphBuilder : public ValueObject {
uint32_t element_count,
uint32_t dex_offset);
+ // Builds a `HInstanceOf`, or a `HCheckCast` instruction.
+ // Returns whether we succeeded in building the instruction.
+ bool BuildTypeCheck(const Instruction& instruction,
+ uint8_t destination,
+ uint8_t reference,
+ uint16_t type_index,
+ uint32_t dex_offset);
+
ArenaAllocator* const arena_;
// A list of the size of the dex code holding block information for