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

Side by Side Diff: src/compiler/access-builder.cc

Issue 2489863003: [compiler,modules] Introduce JS operators for module loads and stores. (Closed)
Patch Set: Remove unused variable. Created 4 years, 1 month 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/compiler/access-builder.h ('k') | src/compiler/bytecode-graph-builder.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/compiler/access-builder.h" 5 #include "src/compiler/access-builder.h"
6 6
7 #include "src/compiler/type-cache.h" 7 #include "src/compiler/type-cache.h"
8 #include "src/contexts.h" 8 #include "src/contexts.h"
9 #include "src/frames.h" 9 #include "src/frames.h"
10 #include "src/handles-inl.h" 10 #include "src/handles-inl.h"
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 426
427 427
428 // static 428 // static
429 FieldAccess AccessBuilder::ForMapPrototype() { 429 FieldAccess AccessBuilder::ForMapPrototype() {
430 FieldAccess access = { 430 FieldAccess access = {
431 kTaggedBase, Map::kPrototypeOffset, Handle<Name>(), 431 kTaggedBase, Map::kPrototypeOffset, Handle<Name>(),
432 Type::Any(), MachineType::TaggedPointer(), kPointerWriteBarrier}; 432 Type::Any(), MachineType::TaggedPointer(), kPointerWriteBarrier};
433 return access; 433 return access;
434 } 434 }
435 435
436 // static
437 FieldAccess AccessBuilder::ForModuleRegularExports() {
438 FieldAccess access = {kTaggedBase,
439 Module::kRegularExportsOffset,
440 Handle<Name>(),
441 Type::OtherInternal(),
442 MachineType::TaggedPointer(),
443 kPointerWriteBarrier};
444 return access;
445 }
446
447 // static
448 FieldAccess AccessBuilder::ForModuleRegularImports() {
449 FieldAccess access = {kTaggedBase,
450 Module::kRegularImportsOffset,
451 Handle<Name>(),
452 Type::OtherInternal(),
453 MachineType::TaggedPointer(),
454 kPointerWriteBarrier};
455 return access;
456 }
436 457
437 // static 458 // static
438 FieldAccess AccessBuilder::ForNameHashField() { 459 FieldAccess AccessBuilder::ForNameHashField() {
439 FieldAccess access = {kTaggedBase, Name::kHashFieldOffset, 460 FieldAccess access = {kTaggedBase, Name::kHashFieldOffset,
440 Handle<Name>(), Type::Internal(), 461 Handle<Name>(), Type::Internal(),
441 MachineType::Uint32(), kNoWriteBarrier}; 462 MachineType::Uint32(), kNoWriteBarrier};
442 return access; 463 return access;
443 } 464 }
444 465
445 // static 466 // static
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 offset, 625 offset,
605 Handle<Name>(), 626 Handle<Name>(),
606 Type::NonInternal(), 627 Type::NonInternal(),
607 MachineType::AnyTagged(), 628 MachineType::AnyTagged(),
608 kFullWriteBarrier}; 629 kFullWriteBarrier};
609 return access; 630 return access;
610 } 631 }
611 632
612 633
613 // static 634 // static
635 FieldAccess AccessBuilder::ForCellValue() {
636 FieldAccess access = {
637 kTaggedBase, Cell::kValueOffset, Handle<Name>(),
638 Type::Any(), MachineType::AnyTagged(), kFullWriteBarrier};
639 return access;
640 }
641
642 // static
614 FieldAccess AccessBuilder::ForContextSlot(size_t index) { 643 FieldAccess AccessBuilder::ForContextSlot(size_t index) {
615 int offset = Context::kHeaderSize + static_cast<int>(index) * kPointerSize; 644 int offset = Context::kHeaderSize + static_cast<int>(index) * kPointerSize;
616 DCHECK_EQ(offset, 645 DCHECK_EQ(offset,
617 Context::SlotOffset(static_cast<int>(index)) + kHeapObjectTag); 646 Context::SlotOffset(static_cast<int>(index)) + kHeapObjectTag);
618 FieldAccess access = {kTaggedBase, 647 FieldAccess access = {kTaggedBase,
619 offset, 648 offset,
620 Handle<Name>(), 649 Handle<Name>(),
621 Type::Any(), 650 Type::Any(),
622 MachineType::AnyTagged(), 651 MachineType::AnyTagged(),
623 kFullWriteBarrier}; 652 kFullWriteBarrier};
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
744 } 773 }
745 UNREACHABLE(); 774 UNREACHABLE();
746 ElementAccess access = {kUntaggedBase, 0, Type::None(), MachineType::None(), 775 ElementAccess access = {kUntaggedBase, 0, Type::None(), MachineType::None(),
747 kNoWriteBarrier}; 776 kNoWriteBarrier};
748 return access; 777 return access;
749 } 778 }
750 779
751 } // namespace compiler 780 } // namespace compiler
752 } // namespace internal 781 } // namespace internal
753 } // namespace v8 782 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/access-builder.h ('k') | src/compiler/bytecode-graph-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698