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

Side by Side Diff: src/code-stub-assembler.h

Issue 2182103002: [KeyedLoadIC] Support Smi "handlers" for simple field loads (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebased Created 4 years, 4 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/code-factory.cc ('k') | src/code-stub-assembler.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 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 #ifndef V8_CODE_STUB_ASSEMBLER_H_ 5 #ifndef V8_CODE_STUB_ASSEMBLER_H_
6 #define V8_CODE_STUB_ASSEMBLER_H_ 6 #define V8_CODE_STUB_ASSEMBLER_H_
7 7
8 #include <functional> 8 #include <functional>
9 9
10 #include "src/compiler/code-assembler.h" 10 #include "src/compiler/code-assembler.h"
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 compiler::Node* TryMonomorphicCase(const LoadICParameters* p, 442 compiler::Node* TryMonomorphicCase(const LoadICParameters* p,
443 compiler::Node* receiver_map, 443 compiler::Node* receiver_map,
444 Label* if_handler, Variable* var_handler, 444 Label* if_handler, Variable* var_handler,
445 Label* if_miss); 445 Label* if_miss);
446 void HandlePolymorphicCase(const LoadICParameters* p, 446 void HandlePolymorphicCase(const LoadICParameters* p,
447 compiler::Node* receiver_map, 447 compiler::Node* receiver_map,
448 compiler::Node* feedback, Label* if_handler, 448 compiler::Node* feedback, Label* if_handler,
449 Variable* var_handler, Label* if_miss, 449 Variable* var_handler, Label* if_miss,
450 int unroll_count); 450 int unroll_count);
451 451
452 void HandleLoadICHandlerCase(const LoadICParameters* p,
453 compiler::Node* handler, Label* miss);
454
452 compiler::Node* StubCachePrimaryOffset(compiler::Node* name, 455 compiler::Node* StubCachePrimaryOffset(compiler::Node* name,
453 compiler::Node* map); 456 compiler::Node* map);
454 457
455 compiler::Node* StubCacheSecondaryOffset(compiler::Node* name, 458 compiler::Node* StubCacheSecondaryOffset(compiler::Node* name,
456 compiler::Node* seed); 459 compiler::Node* seed);
457 460
458 // This enum is used here as a replacement for StubCache::Table to avoid 461 // This enum is used here as a replacement for StubCache::Table to avoid
459 // including stub cache header. 462 // including stub cache header.
460 enum StubCacheTable : int; 463 enum StubCacheTable : int;
461 464
462 void TryProbeStubCacheTable(StubCache* stub_cache, StubCacheTable table_id, 465 void TryProbeStubCacheTable(StubCache* stub_cache, StubCacheTable table_id,
463 compiler::Node* entry_offset, 466 compiler::Node* entry_offset,
464 compiler::Node* name, compiler::Node* map, 467 compiler::Node* name, compiler::Node* map,
465 Label* if_handler, Variable* var_handler, 468 Label* if_handler, Variable* var_handler,
466 Label* if_miss); 469 Label* if_miss);
467 470
468 void TryProbeStubCache(StubCache* stub_cache, compiler::Node* receiver, 471 void TryProbeStubCache(StubCache* stub_cache, compiler::Node* receiver,
469 compiler::Node* name, Label* if_handler, 472 compiler::Node* name, Label* if_handler,
470 Variable* var_handler, Label* if_miss); 473 Variable* var_handler, Label* if_miss);
471 474
472 void LoadIC(const LoadICParameters* p); 475 void LoadIC(const LoadICParameters* p);
473 void LoadGlobalIC(const LoadICParameters* p); 476 void LoadGlobalIC(const LoadICParameters* p);
477 void KeyedLoadIC(const LoadICParameters* p);
474 478
475 // Get the enumerable length from |map| and return the result as a Smi. 479 // Get the enumerable length from |map| and return the result as a Smi.
476 compiler::Node* EnumLength(compiler::Node* map); 480 compiler::Node* EnumLength(compiler::Node* map);
477 481
478 // Check the cache validity for |receiver|. Branch to |use_cache| if 482 // Check the cache validity for |receiver|. Branch to |use_cache| if
479 // the cache is valid, otherwise branch to |use_runtime|. 483 // the cache is valid, otherwise branch to |use_runtime|.
480 void CheckEnumCache(compiler::Node* receiver, 484 void CheckEnumCache(compiler::Node* receiver,
481 CodeStubAssembler::Label* use_cache, 485 CodeStubAssembler::Label* use_cache,
482 CodeStubAssembler::Label* use_runtime); 486 CodeStubAssembler::Label* use_runtime);
483 487
(...skipping 10 matching lines...) Expand all
494 AllocationFlags flags, 498 AllocationFlags flags,
495 compiler::Node* top_adddress, 499 compiler::Node* top_adddress,
496 compiler::Node* limit_address); 500 compiler::Node* limit_address);
497 501
498 static const int kElementLoopUnrollThreshold = 8; 502 static const int kElementLoopUnrollThreshold = 8;
499 }; 503 };
500 504
501 } // namespace internal 505 } // namespace internal
502 } // namespace v8 506 } // namespace v8
503 #endif // V8_CODE_STUB_ASSEMBLER_H_ 507 #endif // V8_CODE_STUB_ASSEMBLER_H_
OLDNEW
« no previous file with comments | « src/code-factory.cc ('k') | src/code-stub-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698