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 // TODO(mythria): Remove this define after this flag is turned on globally | 5 // TODO(mythria): Remove this define after this flag 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 v8_str(name)) | 61 v8_str(name)) |
62 .ToLocalChecked()))); | 62 .ToLocalChecked()))); |
63 } | 63 } |
64 | 64 |
65 | 65 |
66 static double GetDoubleFieldValue(JSObject* obj, FieldIndex field_index) { | 66 static double GetDoubleFieldValue(JSObject* obj, FieldIndex field_index) { |
67 if (obj->IsUnboxedDoubleField(field_index)) { | 67 if (obj->IsUnboxedDoubleField(field_index)) { |
68 return obj->RawFastDoublePropertyAt(field_index); | 68 return obj->RawFastDoublePropertyAt(field_index); |
69 } else { | 69 } else { |
70 Object* value = obj->RawFastPropertyAt(field_index); | 70 Object* value = obj->RawFastPropertyAt(field_index); |
71 DCHECK(value->IsMutableHeapNumber()); | 71 CHECK(value->IsMutableHeapNumber()); |
72 return HeapNumber::cast(value)->value(); | 72 return HeapNumber::cast(value)->value(); |
73 } | 73 } |
74 } | 74 } |
75 | 75 |
76 const int kNumberOfBits = 32; | 76 const int kNumberOfBits = 32; |
77 | 77 |
78 | 78 |
79 enum TestPropertyKind { | 79 enum TestPropertyKind { |
80 PROP_CONSTANT, | 80 PROP_CONSTANT, |
81 PROP_SMI, | 81 PROP_SMI, |
(...skipping 1524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1606 | 1606 |
1607 // TODO(ishell): add respective tests for property kind reconfiguring from | 1607 // TODO(ishell): add respective tests for property kind reconfiguring from |
1608 // accessor field to double, once accessor fields are supported by | 1608 // accessor field to double, once accessor fields are supported by |
1609 // Map::ReconfigureProperty(). | 1609 // Map::ReconfigureProperty(). |
1610 | 1610 |
1611 | 1611 |
1612 // TODO(ishell): add respective tests for fast property removal case once | 1612 // TODO(ishell): add respective tests for fast property removal case once |
1613 // Map::ReconfigureProperty() supports that. | 1613 // Map::ReconfigureProperty() supports that. |
1614 | 1614 |
1615 #endif | 1615 #endif |
OLD | NEW |