Revision: 20579
Author:   [email protected]
Date:     Tue Apr  8 13:14:03 2014 UTC
Log:      Handlify RegExpKey.

This fixed mjsunit/unicode-case-overoptimization after r20578.

BUG=
[email protected]

Review URL: https://codereview.chromium.org/228483004
http://code.google.com/p/v8/source/detail?r=20579

Modified:
 /branches/bleeding_edge/src/objects.cc

=======================================
--- /branches/bleeding_edge/src/objects.cc      Tue Apr  8 12:33:08 2014 UTC
+++ /branches/bleeding_edge/src/objects.cc      Tue Apr  8 13:14:03 2014 UTC
@@ -13831,7 +13831,7 @@
 // RegExpKey carries the source and flags of a regular expression as key.
 class RegExpKey : public HashTableKey {
  public:
-  RegExpKey(String* string, JSRegExp::Flags flags)
+  RegExpKey(Handle<String> string, JSRegExp::Flags flags)
       : string_(string),
         flags_(Smi::FromInt(flags.value())) { }

@@ -13845,7 +13845,7 @@
         && (flags_ == val->get(JSRegExp::kFlagsIndex));
   }

-  uint32_t Hash() { return RegExpHash(string_, flags_); }
+  uint32_t Hash() { return RegExpHash(*string_, flags_); }

   Object* AsObject(Heap* heap) {
     // Plain hash maps, which is where regexp keys are used, don't
@@ -13864,7 +13864,7 @@
     return string->Hash() + flags->value();
   }

-  String* string_;
+  Handle<String> string_;
   Smi* flags_;
 };

@@ -15048,7 +15048,7 @@
                                                    JSRegExp::Flags flags) {
   Isolate* isolate = GetIsolate();
   DisallowHeapAllocation no_allocation;
-  RegExpKey key(*src, flags);
+  RegExpKey key(src, flags);
   int entry = FindEntry(&key);
   if (entry == kNotFound) return isolate->factory()->undefined_value();
   return Handle<Object>(get(EntryToIndex(entry) + 1), isolate);
@@ -15092,7 +15092,7 @@
 Handle<CompilationCacheTable> CompilationCacheTable::PutRegExp(
       Handle<CompilationCacheTable> cache, Handle<String> src,
       JSRegExp::Flags flags, Handle<FixedArray> value) {
-  RegExpKey key(*src, flags);
+  RegExpKey key(src, flags);
   cache = EnsureCapacityFor(cache, 1, &key);
   int entry = cache->FindInsertionEntry(key.Hash());
   // We store the value in the key slot, and compare the search key

--
--
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/d/optout.

Reply via email to