Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1056)

Side by Side Diff: src/ic/ic.cc

Issue 2624203002: Version 5.7.440.1 (cherry-pick) (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/ic/accessor-assembler.cc ('k') | src/ic/keyed-store-generic.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/ic/ic.h" 5 #include "src/ic/ic.h"
6 6
7 #include <iostream> 7 #include <iostream>
8 8
9 #include "src/accessors.h" 9 #include "src/accessors.h"
10 #include "src/api-arguments-inl.h" 10 #include "src/api-arguments-inl.h"
(...skipping 1560 matching lines...) Expand 10 before | Expand all | Expand 10 after
1571 if (std::isnan(value)) { 1571 if (std::isnan(value)) {
1572 key = isolate->factory()->nan_string(); 1572 key = isolate->factory()->nan_string();
1573 } else { 1573 } else {
1574 int int_value = FastD2I(value); 1574 int int_value = FastD2I(value);
1575 if (value == int_value && Smi::IsValid(int_value)) { 1575 if (value == int_value && Smi::IsValid(int_value)) {
1576 key = handle(Smi::FromInt(int_value), isolate); 1576 key = handle(Smi::FromInt(int_value), isolate);
1577 } 1577 }
1578 } 1578 }
1579 } else if (key->IsUndefined(isolate)) { 1579 } else if (key->IsUndefined(isolate)) {
1580 key = isolate->factory()->undefined_string(); 1580 key = isolate->factory()->undefined_string();
1581 } else if (key->IsString()) {
1582 key = isolate->factory()->InternalizeString(Handle<String>::cast(key));
1583 } 1581 }
1584 return key; 1582 return key;
1585 } 1583 }
1586 1584
1587 void KeyedLoadIC::UpdateLoadElement(Handle<HeapObject> receiver) { 1585 void KeyedLoadIC::UpdateLoadElement(Handle<HeapObject> receiver) {
1588 Handle<Map> receiver_map(receiver->map(), isolate()); 1586 Handle<Map> receiver_map(receiver->map(), isolate());
1589 DCHECK(receiver_map->instance_type() != JS_VALUE_TYPE && 1587 DCHECK(receiver_map->instance_type() != JS_VALUE_TYPE &&
1590 receiver_map->instance_type() != JS_PROXY_TYPE); // Checked by caller. 1588 receiver_map->instance_type() != JS_PROXY_TYPE); // Checked by caller.
1591 MapHandleList target_receiver_maps; 1589 MapHandleList target_receiver_maps;
1592 TargetMaps(&target_receiver_maps); 1590 TargetMaps(&target_receiver_maps);
(...skipping 1621 matching lines...) Expand 10 before | Expand all | Expand 10 after
3214 DCHECK_EQ(LookupIterator::INTERCEPTOR, it.state()); 3212 DCHECK_EQ(LookupIterator::INTERCEPTOR, it.state());
3215 it.Next(); 3213 it.Next();
3216 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, 3214 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result,
3217 Object::GetProperty(&it)); 3215 Object::GetProperty(&it));
3218 } 3216 }
3219 3217
3220 return *result; 3218 return *result;
3221 } 3219 }
3222 } // namespace internal 3220 } // namespace internal
3223 } // namespace v8 3221 } // namespace v8
OLDNEW
« no previous file with comments | « src/ic/accessor-assembler.cc ('k') | src/ic/keyed-store-generic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698