From 57a88d4ac205874dc85d22f9f6a9ca3c4c373eeb Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Mon, 10 Nov 2014 15:09:21 +0000 Subject: 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 --- compiler/optimizing/builder.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'compiler/optimizing/builder.h') 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 -- cgit v1.2.3-59-g8ed1b