OLD | NEW |
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 // TODO(jochen): Remove this after the setting is turned on globally. | 5 // TODO(jochen): Remove this after the setting is turned on globally. |
6 #define V8_IMMINENT_DEPRECATION_WARNINGS | 6 #define V8_IMMINENT_DEPRECATION_WARNINGS |
7 | 7 |
8 #include <stdlib.h> | 8 #include <stdlib.h> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 // Setter for ACCESSOR_CONSTANT. | 97 // Setter for ACCESSOR_CONSTANT. |
98 Handle<Object> setter_values_[MAX_PROPERTIES]; | 98 Handle<Object> setter_values_[MAX_PROPERTIES]; |
99 int number_of_properties_; | 99 int number_of_properties_; |
100 | 100 |
101 public: | 101 public: |
102 explicit Expectations(Isolate* isolate) | 102 explicit Expectations(Isolate* isolate) |
103 : isolate_(isolate), number_of_properties_(0) {} | 103 : isolate_(isolate), number_of_properties_(0) {} |
104 | 104 |
105 void Init(int index, PropertyType type, PropertyAttributes attributes, | 105 void Init(int index, PropertyType type, PropertyAttributes attributes, |
106 Representation representation, Handle<Object> value) { | 106 Representation representation, Handle<Object> value) { |
107 DCHECK(index < MAX_PROPERTIES); | 107 CHECK(index < MAX_PROPERTIES); |
108 types_[index] = type; | 108 types_[index] = type; |
109 attributes_[index] = attributes; | 109 attributes_[index] = attributes; |
110 representations_[index] = representation; | 110 representations_[index] = representation; |
111 values_[index] = value; | 111 values_[index] = value; |
112 } | 112 } |
113 | 113 |
114 void Print() const { | 114 void Print() const { |
115 OFStream os(stdout); | 115 OFStream os(stdout); |
116 os << "Expectations: #" << number_of_properties_ << "\n"; | 116 os << "Expectations: #" << number_of_properties_ << "\n"; |
117 for (int i = 0; i < number_of_properties_; i++) { | 117 for (int i = 0; i < number_of_properties_; i++) { |
(...skipping 2062 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2180 Handle<AccessorPair> pair = CreateAccessorPair(true, true); | 2180 Handle<AccessorPair> pair = CreateAccessorPair(true, true); |
2181 TransitionToAccessorConstantOperator transition_op(pair); | 2181 TransitionToAccessorConstantOperator transition_op(pair); |
2182 | 2182 |
2183 SameMapChecker checker; | 2183 SameMapChecker checker; |
2184 TestTransitionTo(transition_op, transition_op, checker); | 2184 TestTransitionTo(transition_op, transition_op, checker); |
2185 } | 2185 } |
2186 | 2186 |
2187 | 2187 |
2188 // TODO(ishell): add this test once IS_ACCESSOR_FIELD_SUPPORTED is supported. | 2188 // TODO(ishell): add this test once IS_ACCESSOR_FIELD_SUPPORTED is supported. |
2189 // TEST(TransitionAccessorConstantToAnotherAccessorConstant) | 2189 // TEST(TransitionAccessorConstantToAnotherAccessorConstant) |
OLD | NEW |