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

Side by Side Diff: src/compiler/js-native-context-specialization.cc

Issue 1943743003: Revert of [turbofan] Restore basic write barrier elimination. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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 | « src/compiler/change-lowering.cc ('k') | src/compiler/machine-operator.h » ('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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/js-native-context-specialization.h" 5 #include "src/compiler/js-native-context-specialization.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/compilation-dependencies.h" 9 #include "src/compilation-dependencies.h"
10 #include "src/compiler/access-builder.h" 10 #include "src/compiler/access-builder.h"
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 if (access_mode == AccessMode::kLoad && 272 if (access_mode == AccessMode::kLoad &&
273 access_info.holder().ToHandle(&holder)) { 273 access_info.holder().ToHandle(&holder)) {
274 this_receiver = jsgraph()->Constant(holder); 274 this_receiver = jsgraph()->Constant(holder);
275 } 275 }
276 Node* this_storage = this_receiver; 276 Node* this_storage = this_receiver;
277 if (!field_index.is_inobject()) { 277 if (!field_index.is_inobject()) {
278 this_storage = this_effect = graph()->NewNode( 278 this_storage = this_effect = graph()->NewNode(
279 simplified()->LoadField(AccessBuilder::ForJSObjectProperties()), 279 simplified()->LoadField(AccessBuilder::ForJSObjectProperties()),
280 this_storage, this_effect, this_control); 280 this_storage, this_effect, this_control);
281 } 281 }
282 FieldAccess field_access = { 282 FieldAccess field_access = {kTaggedBase, field_index.offset(), name,
283 kTaggedBase, field_index.offset(), name, 283 field_type, MachineType::AnyTagged()};
284 field_type, MachineType::AnyTagged(), kFullWriteBarrier};
285 if (access_mode == AccessMode::kLoad) { 284 if (access_mode == AccessMode::kLoad) {
286 if (field_type->Is(Type::UntaggedFloat64())) { 285 if (field_type->Is(Type::UntaggedFloat64())) {
287 if (!field_index.is_inobject() || field_index.is_hidden_field() || 286 if (!field_index.is_inobject() || field_index.is_hidden_field() ||
288 !FLAG_unbox_double_fields) { 287 !FLAG_unbox_double_fields) {
289 this_storage = this_effect = 288 this_storage = this_effect =
290 graph()->NewNode(simplified()->LoadField(field_access), 289 graph()->NewNode(simplified()->LoadField(field_access),
291 this_storage, this_effect, this_control); 290 this_storage, this_effect, this_control);
292 field_access.offset = HeapNumber::kValueOffset; 291 field_access.offset = HeapNumber::kValueOffset;
293 field_access.name = MaybeHandle<Name>(); 292 field_access.name = MaybeHandle<Name>();
294 } 293 }
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
717 // Compute the element access. 716 // Compute the element access.
718 Type* element_type = Type::Any(); 717 Type* element_type = Type::Any();
719 MachineType element_machine_type = MachineType::AnyTagged(); 718 MachineType element_machine_type = MachineType::AnyTagged();
720 if (IsFastDoubleElementsKind(elements_kind)) { 719 if (IsFastDoubleElementsKind(elements_kind)) {
721 element_type = Type::Number(); 720 element_type = Type::Number();
722 element_machine_type = MachineType::Float64(); 721 element_machine_type = MachineType::Float64();
723 } else if (IsFastSmiElementsKind(elements_kind)) { 722 } else if (IsFastSmiElementsKind(elements_kind)) {
724 element_type = type_cache_.kSmi; 723 element_type = type_cache_.kSmi;
725 } 724 }
726 ElementAccess element_access = {kTaggedBase, FixedArray::kHeaderSize, 725 ElementAccess element_access = {kTaggedBase, FixedArray::kHeaderSize,
727 element_type, element_machine_type, 726 element_type, element_machine_type};
728 kFullWriteBarrier};
729 727
730 // Access the actual element. 728 // Access the actual element.
731 // TODO(bmeurer): Refactor this into separate methods or even a separate 729 // TODO(bmeurer): Refactor this into separate methods or even a separate
732 // class that deals with the elements access. 730 // class that deals with the elements access.
733 if (access_mode == AccessMode::kLoad) { 731 if (access_mode == AccessMode::kLoad) {
734 // Compute the real element access type, which includes the hole in case 732 // Compute the real element access type, which includes the hole in case
735 // of holey backing stores. 733 // of holey backing stores.
736 if (elements_kind == FAST_HOLEY_ELEMENTS || 734 if (elements_kind == FAST_HOLEY_ELEMENTS ||
737 elements_kind == FAST_HOLEY_SMI_ELEMENTS) { 735 elements_kind == FAST_HOLEY_SMI_ELEMENTS) {
738 element_access.type = Type::Union( 736 element_access.type = Type::Union(
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
1030 } 1028 }
1031 1029
1032 1030
1033 SimplifiedOperatorBuilder* JSNativeContextSpecialization::simplified() const { 1031 SimplifiedOperatorBuilder* JSNativeContextSpecialization::simplified() const {
1034 return jsgraph()->simplified(); 1032 return jsgraph()->simplified();
1035 } 1033 }
1036 1034
1037 } // namespace compiler 1035 } // namespace compiler
1038 } // namespace internal 1036 } // namespace internal
1039 } // namespace v8 1037 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/change-lowering.cc ('k') | src/compiler/machine-operator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698