Reviewers: Jakob,

Description:
Merged r19500 into 3.23 branch.

MIPS: Fix performance regression on sunspider string-unpack-code.

[email protected]
BUG=

Please review this at https://codereview.chromium.org/173703003/

SVN Base: https://v8.googlecode.com/svn/branches/3.23

Affected files (+8, -4 lines):
  M src/mips/stub-cache-mips.cc
  M src/version.cc


Index: src/mips/stub-cache-mips.cc
diff --git a/src/mips/stub-cache-mips.cc b/src/mips/stub-cache-mips.cc
index 621753064bbe3a518a64bdbcd832d7f4f4705785..9f5089d55d9e852e0c3fa5e2968105a99d3c1238 100644
--- a/src/mips/stub-cache-mips.cc
+++ b/src/mips/stub-cache-mips.cc
@@ -2778,10 +2778,11 @@ Handle<Code> BaseLoadStoreStubCompiler::CompilePolymorphicIC(
   }

   Label number_case;
+  Register match = scratch1();
   Label* smi_target = IncludesNumberType(types) ? &number_case : &miss;
-  __ JumpIfSmi(receiver(), smi_target);
+  __ JumpIfSmi(receiver(), smi_target, match);  // Reg match is 0 if Smi.

-  Register map_reg = scratch1();
+  Register map_reg = scratch2();

   int receiver_count = types->length();
   int number_of_handled_maps = 0;
@@ -2791,12 +2792,15 @@ Handle<Code> BaseLoadStoreStubCompiler::CompilePolymorphicIC(
     Handle<Map> map = IC::TypeToMap(*type, isolate());
     if (!map->is_deprecated()) {
       number_of_handled_maps++;
+      // Check map and tail call if there's a match.
+ // Separate compare from branch, to provide path for above JumpIfSmi().
+      __ Subu(match, map_reg, Operand(map));
       if (type->Is(Type::Number())) {
         ASSERT(!number_case.is_unused());
         __ bind(&number_case);
       }
       __ Jump(handlers->at(current), RelocInfo::CODE_TARGET,
-          eq, map_reg, Operand(map));
+          eq, match, Operand(zero_reg));
     }
   }
   ASSERT(number_of_handled_maps != 0);
Index: src/version.cc
diff --git a/src/version.cc b/src/version.cc
index fe045f36477f053f0fff99807bd562d3a500832c..d0570ba75b7234914938b7b97f8f5776d7771e28 100644
--- a/src/version.cc
+++ b/src/version.cc
@@ -35,7 +35,7 @@
 #define MAJOR_VERSION     3
 #define MINOR_VERSION     23
 #define BUILD_NUMBER      17
-#define PATCH_LEVEL       13
+#define PATCH_LEVEL       14
 // Use 1 for candidates and 0 otherwise.
 // (Boolean macro values are not supported by all preprocessors.)
 #define IS_CANDIDATE_VERSION 0


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to