From 78b2a18d028a2361d73bd51d98cc5910afb15517 Mon Sep 17 00:00:00 2001 From: "baptiste.afsa@arm.com" Date: Wed, 19 Feb 2014 09:38:45 +0000 Subject: [PATCH] A64: Remove early_exit unused mechanism in CompareMap. R=jochen@chromium.org, ulan@chromium.org Review URL: https://codereview.chromium.org/169733003 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19473 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/a64/lithium-codegen-a64.cc | 2 +- src/a64/macro-assembler-a64.cc | 19 ++++++------------- src/a64/macro-assembler-a64.h | 12 ++++-------- 3 files changed, 11 insertions(+), 22 deletions(-) diff --git a/src/a64/lithium-codegen-a64.cc b/src/a64/lithium-codegen-a64.cc index b4b875f..62a3b76 100644 --- a/src/a64/lithium-codegen-a64.cc +++ b/src/a64/lithium-codegen-a64.cc @@ -2109,7 +2109,7 @@ void LCodeGen::DoCheckMaps(LCheckMaps* instr) { Label success; for (int i = 0; i < map_set.size(); i++) { Handle map = map_set.at(i).handle(); - __ CompareMap(map_reg, map, &success); + __ CompareMap(map_reg, map); __ B(eq, &success); } diff --git a/src/a64/macro-assembler-a64.cc b/src/a64/macro-assembler-a64.cc index 14fb2fd..d3183fb 100644 --- a/src/a64/macro-assembler-a64.cc +++ b/src/a64/macro-assembler-a64.cc @@ -3441,18 +3441,14 @@ void MacroAssembler::CompareInstanceType(Register map, void MacroAssembler::CompareMap(Register obj, Register scratch, - Handle map, - Label* early_success) { - // TODO(jbramley): The early_success label isn't used. Remove it. + Handle map) { Ldr(scratch, FieldMemOperand(obj, HeapObject::kMapOffset)); - CompareMap(scratch, map, early_success); + CompareMap(scratch, map); } void MacroAssembler::CompareMap(Register obj_map, - Handle map, - Label* early_success) { - // TODO(jbramley): The early_success label isn't used. Remove it. + Handle map) { Cmp(obj_map, Operand(map)); } @@ -3466,10 +3462,8 @@ void MacroAssembler::CheckMap(Register obj, JumpIfSmi(obj, fail); } - Label success; - CompareMap(obj, scratch, map, &success); + CompareMap(obj, scratch, map); B(ne, fail); - Bind(&success); } @@ -3493,10 +3487,9 @@ void MacroAssembler::CheckMap(Register obj_map, if (smi_check_type == DO_SMI_CHECK) { JumpIfSmi(obj_map, fail); } - Label success; - CompareMap(obj_map, map, &success); + + CompareMap(obj_map, map); B(ne, fail); - Bind(&success); } diff --git a/src/a64/macro-assembler-a64.h b/src/a64/macro-assembler-a64.h index 7b8dd3f..6c3582d 100644 --- a/src/a64/macro-assembler-a64.h +++ b/src/a64/macro-assembler-a64.h @@ -1307,20 +1307,16 @@ class MacroAssembler : public Assembler { Register type_reg, InstanceType type); - // Compare an object's map with the specified map and its transitioned - // elements maps if mode is ALLOW_ELEMENT_TRANSITION_MAPS. Condition flags are - // set with result of map compare. If multiple map compares are required, the - // compare sequences branches to early_success. + // Compare an object's map with the specified map. Condition flags are set + // with result of map compare. void CompareMap(Register obj, Register scratch, - Handle map, - Label* early_success = NULL); + Handle map); // As above, but the map of the object is already loaded into the register // which is preserved by the code generated. void CompareMap(Register obj_map, - Handle map, - Label* early_success = NULL); + Handle map); // Check if the map of an object is equal to a specified map and branch to // label if not. Skip the smi check if not required (object is known to be a -- 2.7.4