MIPS: Fixing performance regression in issue 1787.
authoryangguo@chromium.org <yangguo@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 28 Oct 2011 08:03:13 +0000 (08:03 +0000)
committeryangguo@chromium.org <yangguo@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 28 Oct 2011 08:03:13 +0000 (08:03 +0000)
Port r9812 (c1644a9d)

Note: MIPS already had the fix for this regression.
This commit only adds the extra assertions.

BUG=
TEST=

Review URL: http://codereview.chromium.org/8343030
Patch from Gergely Kis <gergely@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9827 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/mips/code-stubs-mips.cc

index 85e929d39acd7f6c7ac98c89679cbeed04863c3e..16461ec7d7f6726efeddad9587ceab9bc5f36d18 100644 (file)
@@ -7112,6 +7112,11 @@ void StringDictionaryLookupStub::GeneratePositiveLookup(MacroAssembler* masm,
                                                         Register name,
                                                         Register scratch1,
                                                         Register scratch2) {
+  ASSERT(!elements.is(scratch1));
+  ASSERT(!elements.is(scratch2));
+  ASSERT(!name.is(scratch1));
+  ASSERT(!name.is(scratch2));
+
   // Assert that name contains a string.
   if (FLAG_debug_code) __ AbortIfNotString(name);