| OLD | NEW |
| 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/js-typed-lowering.h" | 5 #include "src/compiler/js-typed-lowering.h" |
| 6 | 6 |
| 7 #include "src/ast/modules.h" | 7 #include "src/ast/modules.h" |
| 8 #include "src/builtins/builtins-utils.h" | 8 #include "src/builtins/builtins-utils.h" |
| 9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
| 10 #include "src/compilation-dependencies.h" | 10 #include "src/compilation-dependencies.h" |
| (...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 705 // TODO(turbofan): We currently just use the cons_string_map here for | 705 // TODO(turbofan): We currently just use the cons_string_map here for |
| 706 // the sake of simplicity; we could also try to be smarter here and | 706 // the sake of simplicity; we could also try to be smarter here and |
| 707 // use the one_byte_cons_string_map instead when the resulting ConsString | 707 // use the one_byte_cons_string_map instead when the resulting ConsString |
| 708 // contains only one byte characters. | 708 // contains only one byte characters. |
| 709 Node* value_map = jsgraph()->HeapConstant(factory()->cons_string_map()); | 709 Node* value_map = jsgraph()->HeapConstant(factory()->cons_string_map()); |
| 710 | 710 |
| 711 // Allocate the resulting ConsString. | 711 // Allocate the resulting ConsString. |
| 712 effect = graph()->NewNode( | 712 effect = graph()->NewNode( |
| 713 common()->BeginRegion(RegionObservability::kNotObservable), effect); | 713 common()->BeginRegion(RegionObservability::kNotObservable), effect); |
| 714 Node* value = effect = | 714 Node* value = effect = |
| 715 graph()->NewNode(simplified()->Allocate(NOT_TENURED), | 715 graph()->NewNode(simplified()->Allocate(Type::OtherString(), NOT_TENURED), |
| 716 jsgraph()->Constant(ConsString::kSize), effect, control); | 716 jsgraph()->Constant(ConsString::kSize), effect, control); |
| 717 NodeProperties::SetType(value, Type::OtherString()); | |
| 718 effect = graph()->NewNode(simplified()->StoreField(AccessBuilder::ForMap()), | 717 effect = graph()->NewNode(simplified()->StoreField(AccessBuilder::ForMap()), |
| 719 value, value_map, effect, control); | 718 value, value_map, effect, control); |
| 720 effect = graph()->NewNode( | 719 effect = graph()->NewNode( |
| 721 simplified()->StoreField(AccessBuilder::ForNameHashField()), value, | 720 simplified()->StoreField(AccessBuilder::ForNameHashField()), value, |
| 722 jsgraph()->Constant(Name::kEmptyHashField), effect, control); | 721 jsgraph()->Constant(Name::kEmptyHashField), effect, control); |
| 723 effect = graph()->NewNode( | 722 effect = graph()->NewNode( |
| 724 simplified()->StoreField(AccessBuilder::ForStringLength()), value, length, | 723 simplified()->StoreField(AccessBuilder::ForStringLength()), value, length, |
| 725 effect, control); | 724 effect, control); |
| 726 effect = graph()->NewNode( | 725 effect = graph()->NewNode( |
| 727 simplified()->StoreField(AccessBuilder::ForConsStringFirst()), value, | 726 simplified()->StoreField(AccessBuilder::ForConsStringFirst()), value, |
| (...skipping 1663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2391 } | 2390 } |
| 2392 | 2391 |
| 2393 | 2392 |
| 2394 CompilationDependencies* JSTypedLowering::dependencies() const { | 2393 CompilationDependencies* JSTypedLowering::dependencies() const { |
| 2395 return dependencies_; | 2394 return dependencies_; |
| 2396 } | 2395 } |
| 2397 | 2396 |
| 2398 } // namespace compiler | 2397 } // namespace compiler |
| 2399 } // namespace internal | 2398 } // namespace internal |
| 2400 } // namespace v8 | 2399 } // namespace v8 |
| OLD | NEW |