| 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 #include <stdlib.h> | 5 #include <stdlib.h> |
| 6 #include <utility> | 6 #include <utility> |
| 7 | 7 |
| 8 #include "test/cctest/test-api.h" | 8 #include "test/cctest/test-api.h" |
| 9 | 9 |
| 10 #include "src/v8.h" | 10 #include "src/v8.h" |
| 11 | 11 |
| 12 #include "src/compilation-cache.h" | 12 #include "src/compilation-cache.h" |
| 13 #include "src/compilation-dependencies.h" | 13 #include "src/compilation-dependencies.h" |
| 14 #include "src/execution.h" | 14 #include "src/execution.h" |
| 15 #include "src/factory.h" | 15 #include "src/factory.h" |
| 16 #include "src/field-type.h" | 16 #include "src/field-type.h" |
| 17 #include "src/global-handles.h" | 17 #include "src/global-handles.h" |
| 18 #include "src/ic/stub-cache.h" | 18 #include "src/ic/stub-cache.h" |
| 19 #include "src/macro-assembler.h" | 19 #include "src/macro-assembler.h" |
| 20 #include "src/types.h" |
| 20 | 21 |
| 21 using namespace v8::internal; | 22 using namespace v8::internal; |
| 22 | 23 |
| 23 | 24 |
| 24 // TODO(ishell): fix this once TransitionToPrototype stops generalizing | 25 // TODO(ishell): fix this once TransitionToPrototype stops generalizing |
| 25 // all field representations (similar to crbug/448711 where elements kind | 26 // all field representations (similar to crbug/448711 where elements kind |
| 26 // and observed transitions caused generalization of all field representations). | 27 // and observed transitions caused generalization of all field representations). |
| 27 const bool IS_PROTO_TRANS_ISSUE_FIXED = false; | 28 const bool IS_PROTO_TRANS_ISSUE_FIXED = false; |
| 28 | 29 |
| 29 | 30 |
| (...skipping 2373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2403 CcTest::InitializeVM(); | 2404 CcTest::InitializeVM(); |
| 2404 v8::HandleScope scope(CcTest::isolate()); | 2405 v8::HandleScope scope(CcTest::isolate()); |
| 2405 | 2406 |
| 2406 Handle<AccessorPair> pair = CreateAccessorPair(true, true); | 2407 Handle<AccessorPair> pair = CreateAccessorPair(true, true); |
| 2407 TransitionToAccessorConstantOperator transition_op(pair); | 2408 TransitionToAccessorConstantOperator transition_op(pair); |
| 2408 | 2409 |
| 2409 SameMapChecker checker; | 2410 SameMapChecker checker; |
| 2410 TestTransitionTo(transition_op, transition_op, checker); | 2411 TestTransitionTo(transition_op, transition_op, checker); |
| 2411 } | 2412 } |
| 2412 | 2413 |
| 2414 TEST(FieldTypeConvertSimple) { |
| 2415 CcTest::InitializeVM(); |
| 2416 v8::HandleScope scope(CcTest::isolate()); |
| 2417 Isolate* isolate = CcTest::i_isolate(); |
| 2418 |
| 2419 Zone zone(isolate->allocator()); |
| 2420 |
| 2421 CHECK_EQ(FieldType::Any()->Convert(&zone), Type::NonInternal()); |
| 2422 CHECK_EQ(FieldType::None()->Convert(&zone), Type::None()); |
| 2423 } |
| 2413 | 2424 |
| 2414 // TODO(ishell): add this test once IS_ACCESSOR_FIELD_SUPPORTED is supported. | 2425 // TODO(ishell): add this test once IS_ACCESSOR_FIELD_SUPPORTED is supported. |
| 2415 // TEST(TransitionAccessorConstantToAnotherAccessorConstant) | 2426 // TEST(TransitionAccessorConstantToAnotherAccessorConstant) |
| OLD | NEW |