| Index: src/ic.cc
|
| diff --git a/src/ic.cc b/src/ic.cc
|
| index a00df8537c0724e5c1726d127f76641989809850..06e68ec091f083eaf8b99b1a08b31673cf5d0ad3 100644
|
| --- a/src/ic.cc
|
| +++ b/src/ic.cc
|
| @@ -547,7 +547,7 @@ MaybeObject* LoadIC::Load(Handle<Object> object,
|
| if (FLAG_use_ic) {
|
| // Use specialized code for getting prototype of functions.
|
| if (object->IsJSFunction() &&
|
| - name->Equals(isolate()->heap()->prototype_string()) &&
|
| + String::Equals(isolate()->factory()->prototype_string(), name) &&
|
| Handle<JSFunction>::cast(object)->should_have_prototype()) {
|
| Handle<Code> stub;
|
| if (state() == UNINITIALIZED) {
|
| @@ -889,13 +889,14 @@ Handle<Code> LoadIC::CompileHandler(LookupResult* lookup,
|
| Handle<String> name,
|
| Handle<Object> unused,
|
| InlineCacheHolderFlag cache_holder) {
|
| - if (object->IsString() && name->Equals(isolate()->heap()->length_string())) {
|
| + if (object->IsString() &&
|
| + String::Equals(isolate()->factory()->length_string(), name)) {
|
| int length_index = String::kLengthOffset / kPointerSize;
|
| return SimpleFieldLoad(length_index);
|
| }
|
|
|
| if (object->IsStringWrapper() &&
|
| - name->Equals(isolate()->heap()->length_string())) {
|
| + String::Equals(isolate()->factory()->length_string(), name)) {
|
| if (kind() == Code::LOAD_IC) {
|
| StringLengthStub string_length_stub;
|
| return string_length_stub.GetCode(isolate());
|
| @@ -1213,7 +1214,7 @@ MaybeObject* StoreIC::Store(Handle<Object> object,
|
|
|
| // The length property of string values is read-only. Throw in strict mode.
|
| if (strict_mode() == STRICT && object->IsString() &&
|
| - name->Equals(isolate()->heap()->length_string())) {
|
| + String::Equals(isolate()->factory()->length_string(), name)) {
|
| return TypeError("strict_read_only_property", object, name);
|
| }
|
|
|
| @@ -1400,7 +1401,7 @@ Handle<Code> StoreIC::CompileHandler(LookupResult* lookup,
|
| // properties. Slow properties might indicate redefinition of the length
|
| // property.
|
| if (receiver->IsJSArray() &&
|
| - name->Equals(isolate()->heap()->length_string()) &&
|
| + String::Equals(isolate()->factory()->length_string(), name) &&
|
| Handle<JSArray>::cast(receiver)->AllowsSetElementsLength() &&
|
| receiver->HasFastProperties()) {
|
| return compiler.CompileStoreArrayLength(receiver, lookup, name);
|
|
|