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

Side by Side Diff: src/compiler/simplified-operator.cc

Issue 2218703003: [turbofan] Add support for copy-on-write element stores. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix off-by-one loop iteration count. 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/compiler/simplified-operator.h ('k') | src/compiler/typer.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/compiler/simplified-operator.h" 5 #include "src/compiler/simplified-operator.h"
6 6
7 #include "src/base/lazy-instance.h" 7 #include "src/base/lazy-instance.h"
8 #include "src/compiler/opcodes.h" 8 #include "src/compiler/opcodes.h"
9 #include "src/compiler/operator.h" 9 #include "src/compiler/operator.h"
10 #include "src/types.h" 10 #include "src/types.h"
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 struct AllocateOperator final : public Operator1<PretenureFlag> { 496 struct AllocateOperator final : public Operator1<PretenureFlag> {
497 AllocateOperator() 497 AllocateOperator()
498 : Operator1<PretenureFlag>( 498 : Operator1<PretenureFlag>(
499 IrOpcode::kAllocate, 499 IrOpcode::kAllocate,
500 Operator::kNoDeopt | Operator::kNoThrow | Operator::kNoWrite, 500 Operator::kNoDeopt | Operator::kNoThrow | Operator::kNoWrite,
501 "Allocate", 1, 1, 1, 1, 1, 0, kPretenure) {} 501 "Allocate", 1, 1, 1, 1, 1, 0, kPretenure) {}
502 }; 502 };
503 AllocateOperator<NOT_TENURED> kAllocateNotTenuredOperator; 503 AllocateOperator<NOT_TENURED> kAllocateNotTenuredOperator;
504 AllocateOperator<TENURED> kAllocateTenuredOperator; 504 AllocateOperator<TENURED> kAllocateTenuredOperator;
505 505
506 struct EnsureWritableFastElementsOperator final : public Operator {
507 EnsureWritableFastElementsOperator()
508 : Operator( // --
509 IrOpcode::kEnsureWritableFastElements, // opcode
510 Operator::kNoDeopt | Operator::kNoThrow, // flags
511 "EnsureWritableFastElements", // name
512 2, 1, 1, 1, 1, 0) {} // counts
513 };
514 EnsureWritableFastElementsOperator kEnsureWritableFastElements;
515
506 #define BUFFER_ACCESS(Type, type, TYPE, ctype, size) \ 516 #define BUFFER_ACCESS(Type, type, TYPE, ctype, size) \
507 struct LoadBuffer##Type##Operator final : public Operator1<BufferAccess> { \ 517 struct LoadBuffer##Type##Operator final : public Operator1<BufferAccess> { \
508 LoadBuffer##Type##Operator() \ 518 LoadBuffer##Type##Operator() \
509 : Operator1<BufferAccess>( \ 519 : Operator1<BufferAccess>( \
510 IrOpcode::kLoadBuffer, \ 520 IrOpcode::kLoadBuffer, \
511 Operator::kNoDeopt | Operator::kNoThrow | Operator::kNoWrite, \ 521 Operator::kNoDeopt | Operator::kNoThrow | Operator::kNoWrite, \
512 "LoadBuffer", 3, 1, 1, 1, 1, 0, \ 522 "LoadBuffer", 3, 1, 1, 1, 1, 0, \
513 BufferAccess(kExternal##Type##Array)) {} \ 523 BufferAccess(kExternal##Type##Array)) {} \
514 }; \ 524 }; \
515 struct StoreBuffer##Type##Operator final : public Operator1<BufferAccess> { \ 525 struct StoreBuffer##Type##Operator final : public Operator1<BufferAccess> { \
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
611 UNREACHABLE(); 621 UNREACHABLE();
612 return nullptr; 622 return nullptr;
613 } 623 }
614 624
615 const Operator* SimplifiedOperatorBuilder::ReferenceEqual(Type* type) { 625 const Operator* SimplifiedOperatorBuilder::ReferenceEqual(Type* type) {
616 return new (zone()) Operator(IrOpcode::kReferenceEqual, 626 return new (zone()) Operator(IrOpcode::kReferenceEqual,
617 Operator::kCommutative | Operator::kPure, 627 Operator::kCommutative | Operator::kPure,
618 "ReferenceEqual", 2, 0, 0, 1, 0, 0); 628 "ReferenceEqual", 2, 0, 0, 1, 0, 0);
619 } 629 }
620 630
631 const Operator* SimplifiedOperatorBuilder::EnsureWritableFastElements() {
632 return &cache_.kEnsureWritableFastElements;
633 }
634
621 const Operator* SimplifiedOperatorBuilder::TransitionElementsKind( 635 const Operator* SimplifiedOperatorBuilder::TransitionElementsKind(
622 ElementsTransition transition) { 636 ElementsTransition transition) {
623 return new (zone()) Operator1<ElementsTransition>( // -- 637 return new (zone()) Operator1<ElementsTransition>( // --
624 IrOpcode::kTransitionElementsKind, // opcode 638 IrOpcode::kTransitionElementsKind, // opcode
625 Operator::kNoDeopt | Operator::kNoThrow, // flags 639 Operator::kNoDeopt | Operator::kNoThrow, // flags
626 "TransitionElementsKind", // name 640 "TransitionElementsKind", // name
627 3, 1, 1, 0, 1, 0, // counts 641 3, 1, 1, 0, 1, 0, // counts
628 transition); // parameter 642 transition); // parameter
629 } 643 }
630 644
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
715 Operator::kNoDeopt | Operator::kNoThrow | properties, \ 729 Operator::kNoDeopt | Operator::kNoThrow | properties, \
716 #Name, value_input_count, 1, control_input_count, \ 730 #Name, value_input_count, 1, control_input_count, \
717 output_count, 1, 0, access); \ 731 output_count, 1, 0, access); \
718 } 732 }
719 ACCESS_OP_LIST(ACCESS) 733 ACCESS_OP_LIST(ACCESS)
720 #undef ACCESS 734 #undef ACCESS
721 735
722 } // namespace compiler 736 } // namespace compiler
723 } // namespace internal 737 } // namespace internal
724 } // namespace v8 738 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/simplified-operator.h ('k') | src/compiler/typer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698