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

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

Issue 1943323002: Reland 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 = {kTaggedBase, field_index.offset(), name, 282 FieldAccess field_access = {
283 field_type, MachineType::AnyTagged()}; 283 kTaggedBase, field_index.offset(), name,
284 field_type, MachineType::AnyTagged(), kFullWriteBarrier};
284 if (access_mode == AccessMode::kLoad) { 285 if (access_mode == AccessMode::kLoad) {
285 if (field_type->Is(Type::UntaggedFloat64())) { 286 if (field_type->Is(Type::UntaggedFloat64())) {
286 if (!field_index.is_inobject() || field_index.is_hidden_field() || 287 if (!field_index.is_inobject() || field_index.is_hidden_field() ||
287 !FLAG_unbox_double_fields) { 288 !FLAG_unbox_double_fields) {
288 this_storage = this_effect = 289 this_storage = this_effect =
289 graph()->NewNode(simplified()->LoadField(field_access), 290 graph()->NewNode(simplified()->LoadField(field_access),
290 this_storage, this_effect, this_control); 291 this_storage, this_effect, this_control);
291 field_access.offset = HeapNumber::kValueOffset; 292 field_access.offset = HeapNumber::kValueOffset;
292 field_access.name = MaybeHandle<Name>(); 293 field_access.name = MaybeHandle<Name>();
293 } 294 }
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
716 // Compute the element access. 717 // Compute the element access.
717 Type* element_type = Type::Any(); 718 Type* element_type = Type::Any();
718 MachineType element_machine_type = MachineType::AnyTagged(); 719 MachineType element_machine_type = MachineType::AnyTagged();
719 if (IsFastDoubleElementsKind(elements_kind)) { 720 if (IsFastDoubleElementsKind(elements_kind)) {
720 element_type = Type::Number(); 721 element_type = Type::Number();
721 element_machine_type = MachineType::Float64(); 722 element_machine_type = MachineType::Float64();
722 } else if (IsFastSmiElementsKind(elements_kind)) { 723 } else if (IsFastSmiElementsKind(elements_kind)) {
723 element_type = type_cache_.kSmi; 724 element_type = type_cache_.kSmi;
724 } 725 }
725 ElementAccess element_access = {kTaggedBase, FixedArray::kHeaderSize, 726 ElementAccess element_access = {kTaggedBase, FixedArray::kHeaderSize,
726 element_type, element_machine_type}; 727 element_type, element_machine_type,
728 kFullWriteBarrier};
727 729
728 // Access the actual element. 730 // Access the actual element.
729 // TODO(bmeurer): Refactor this into separate methods or even a separate 731 // TODO(bmeurer): Refactor this into separate methods or even a separate
730 // class that deals with the elements access. 732 // class that deals with the elements access.
731 if (access_mode == AccessMode::kLoad) { 733 if (access_mode == AccessMode::kLoad) {
732 // Compute the real element access type, which includes the hole in case 734 // Compute the real element access type, which includes the hole in case
733 // of holey backing stores. 735 // of holey backing stores.
734 if (elements_kind == FAST_HOLEY_ELEMENTS || 736 if (elements_kind == FAST_HOLEY_ELEMENTS ||
735 elements_kind == FAST_HOLEY_SMI_ELEMENTS) { 737 elements_kind == FAST_HOLEY_SMI_ELEMENTS) {
736 element_access.type = Type::Union( 738 element_access.type = Type::Union(
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
1028 } 1030 }
1029 1031
1030 1032
1031 SimplifiedOperatorBuilder* JSNativeContextSpecialization::simplified() const { 1033 SimplifiedOperatorBuilder* JSNativeContextSpecialization::simplified() const {
1032 return jsgraph()->simplified(); 1034 return jsgraph()->simplified();
1033 } 1035 }
1034 1036
1035 } // namespace compiler 1037 } // namespace compiler
1036 } // namespace internal 1038 } // namespace internal
1037 } // namespace v8 1039 } // 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