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

Side by Side Diff: src/ic/accessor-assembler.cc

Issue 2864463004: [ic] Restore Function.prototype fast path for LoadIC_Uninitialized (Closed)
Patch Set: Created 3 years, 7 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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/accessor-assembler.h" 5 #include "src/ic/accessor-assembler.h"
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/counters.h" 9 #include "src/counters.h"
10 #include "src/ic/handler-configuration.h" 10 #include "src/ic/handler-configuration.h"
(...skipping 1859 matching lines...) Expand 10 before | Expand all | Expand 10 after
1870 Node* receiver = p->receiver; 1870 Node* receiver = p->receiver;
1871 GotoIf(TaggedIsSmi(receiver), &miss); 1871 GotoIf(TaggedIsSmi(receiver), &miss);
1872 Node* receiver_map = LoadMap(receiver); 1872 Node* receiver_map = LoadMap(receiver);
1873 Node* instance_type = LoadMapInstanceType(receiver_map); 1873 Node* instance_type = LoadMapInstanceType(receiver_map);
1874 1874
1875 // Optimistically write the state transition to the vector. 1875 // Optimistically write the state transition to the vector.
1876 StoreFixedArrayElement(p->vector, p->slot, 1876 StoreFixedArrayElement(p->vector, p->slot,
1877 LoadRoot(Heap::kpremonomorphic_symbolRootIndex), 1877 LoadRoot(Heap::kpremonomorphic_symbolRootIndex),
1878 SKIP_WRITE_BARRIER, 0, SMI_PARAMETERS); 1878 SKIP_WRITE_BARRIER, 0, SMI_PARAMETERS);
1879 1879
1880 {
1881 // Special case for Function.prototype load, because it's very common
1882 // for ICs that are only executed once (MyFunc.prototype.foo = ...).
1883 Label not_function_prototype(this);
1884 GotoIf(Word32NotEqual(instance_type, Int32Constant(JS_FUNCTION_TYPE)),
1885 &not_function_prototype);
1886 GotoIfNot(IsPrototypeString(p->name), &not_function_prototype);
1887 Node* bit_field = LoadMapBitField(receiver_map);
1888 GotoIf(IsSetWord32(bit_field, 1 << Map::kHasNonInstancePrototype),
1889 &not_function_prototype);
1890 Return(LoadJSFunctionPrototype(receiver, &miss));
1891 BIND(&not_function_prototype);
1892 }
1893
1880 GenericPropertyLoad(receiver, receiver_map, instance_type, p->name, p, &miss, 1894 GenericPropertyLoad(receiver, receiver_map, instance_type, p->name, p, &miss,
1881 kDontUseStubCache); 1895 kDontUseStubCache);
1882 1896
1883 BIND(&miss); 1897 BIND(&miss);
1884 { 1898 {
1885 // Undo the optimistic state transition. 1899 // Undo the optimistic state transition.
1886 StoreFixedArrayElement(p->vector, p->slot, 1900 StoreFixedArrayElement(p->vector, p->slot,
1887 LoadRoot(Heap::kuninitialized_symbolRootIndex), 1901 LoadRoot(Heap::kuninitialized_symbolRootIndex),
1888 SKIP_WRITE_BARRIER, 0, SMI_PARAMETERS); 1902 SKIP_WRITE_BARRIER, 0, SMI_PARAMETERS);
1889 1903
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after
2473 Node* context = Parameter(Descriptor::kContext); 2487 Node* context = Parameter(Descriptor::kContext);
2474 Node* vector = LoadFeedbackVectorForStub(); 2488 Node* vector = LoadFeedbackVectorForStub();
2475 2489
2476 Callable callable = 2490 Callable callable =
2477 CodeFactory::KeyedStoreICInOptimizedCode(isolate(), language_mode); 2491 CodeFactory::KeyedStoreICInOptimizedCode(isolate(), language_mode);
2478 TailCallStub(callable, context, receiver, name, value, slot, vector); 2492 TailCallStub(callable, context, receiver, name, value, slot, vector);
2479 } 2493 }
2480 2494
2481 } // namespace internal 2495 } // namespace internal
2482 } // namespace v8 2496 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698