}
private:
- bool IsMatch(Object* other) {
- return number_ == ToUint32(other);
+ bool IsMatch(Object* number) {
+ return number_ == ToUint32(number);
}
// Thomas Wang, Integer Hash Functions.
string_ = string;
}
- bool IsMatch(Object* other) {
- if (!other->IsString()) return false;
- return string_->Equals(String::cast(other));
+ bool IsMatch(Object* string) {
+ return string_->Equals(String::cast(string));
}
uint32_t Hash() { return StringHash(string_); }
explicit Utf8SymbolKey(Vector<const char> string)
: string_(string), length_field_(0) { }
- bool IsMatch(Object* other) {
- if (!other->IsString()) return false;
- return String::cast(other)->IsEqualTo(string_);
+ bool IsMatch(Object* string) {
+ return String::cast(string)->IsEqualTo(string_);
}
HashFunction GetHashFunction() {
return StringHash;
}
- bool IsMatch(Object* other) {
- if (!other->IsString()) return false;
- return String::cast(other)->Equals(string_);
+ bool IsMatch(Object* string) {
+ return String::cast(string)->Equals(string_);
}
uint32_t Hash() { return string_->Hash(); }
symbols_ = symbols;
}
- bool IsMatch(Object* other) {
- if (!other->IsFixedArray()) return false;
- FixedArray* o = FixedArray::cast(other);
+ bool IsMatch(Object* symbols) {
+ FixedArray* o = FixedArray::cast(symbols);
int len = symbols_->length();
if (o->length() != len) return false;
for (int i = 0; i < len; i++) {