| 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 <stdlib.h> | 5 #include <stdlib.h> |
| 6 #include <utility> | 6 #include <utility> |
| 7 | 7 |
| 8 #include "src/v8.h" | 8 #include "src/v8.h" |
| 9 | 9 |
| 10 #include "src/compilation-cache.h" | 10 #include "src/compilation-cache.h" |
| (...skipping 1486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1497 CHECK(!MarkCompactCollector::IsOnEvacuationCandidate(*obj_value)); | 1497 CHECK(!MarkCompactCollector::IsOnEvacuationCandidate(*obj_value)); |
| 1498 | 1498 |
| 1499 if (check_tagged_value) { | 1499 if (check_tagged_value) { |
| 1500 FieldIndex tagged_field_index = | 1500 FieldIndex tagged_field_index = |
| 1501 FieldIndex::ForDescriptor(*new_map, tagged_descriptor); | 1501 FieldIndex::ForDescriptor(*new_map, tagged_descriptor); |
| 1502 CHECK_EQ(*obj_value, obj->RawFastPropertyAt(tagged_field_index)); | 1502 CHECK_EQ(*obj_value, obj->RawFastPropertyAt(tagged_field_index)); |
| 1503 } | 1503 } |
| 1504 CHECK_EQ(boom_value, obj->RawFastDoublePropertyAt(double_field_index)); | 1504 CHECK_EQ(boom_value, obj->RawFastDoublePropertyAt(double_field_index)); |
| 1505 } | 1505 } |
| 1506 | 1506 |
| 1507 enum OldToWriteBarrierKind { | 1507 |
| 1508 OLD_TO_OLD_WRITE_BARRIER, | 1508 enum WriteBarrierKind { OLD_TO_OLD_WRITE_BARRIER, OLD_TO_NEW_WRITE_BARRIER }; |
| 1509 OLD_TO_NEW_WRITE_BARRIER | |
| 1510 }; | |
| 1511 static void TestWriteBarrierObjectShiftFieldsRight( | 1509 static void TestWriteBarrierObjectShiftFieldsRight( |
| 1512 OldToWriteBarrierKind write_barrier_kind) { | 1510 WriteBarrierKind write_barrier_kind) { |
| 1513 CcTest::InitializeVM(); | 1511 CcTest::InitializeVM(); |
| 1514 Isolate* isolate = CcTest::i_isolate(); | 1512 Isolate* isolate = CcTest::i_isolate(); |
| 1515 v8::HandleScope scope(CcTest::isolate()); | 1513 v8::HandleScope scope(CcTest::isolate()); |
| 1516 | 1514 |
| 1517 Handle<FieldType> any_type = FieldType::Any(isolate); | 1515 Handle<FieldType> any_type = FieldType::Any(isolate); |
| 1518 | 1516 |
| 1519 CompileRun("function func() { return 1; }"); | 1517 CompileRun("function func() { return 1; }"); |
| 1520 | 1518 |
| 1521 Handle<JSObject> func = GetObject("func"); | 1519 Handle<JSObject> func = GetObject("func"); |
| 1522 | 1520 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1554 | 1552 |
| 1555 // TODO(ishell): add respective tests for property kind reconfiguring from | 1553 // TODO(ishell): add respective tests for property kind reconfiguring from |
| 1556 // accessor field to double, once accessor fields are supported by | 1554 // accessor field to double, once accessor fields are supported by |
| 1557 // Map::ReconfigureProperty(). | 1555 // Map::ReconfigureProperty(). |
| 1558 | 1556 |
| 1559 | 1557 |
| 1560 // TODO(ishell): add respective tests for fast property removal case once | 1558 // TODO(ishell): add respective tests for fast property removal case once |
| 1561 // Map::ReconfigureProperty() supports that. | 1559 // Map::ReconfigureProperty() supports that. |
| 1562 | 1560 |
| 1563 #endif | 1561 #endif |
| OLD | NEW |