v8/test/cctest/test-transitions.h
Marja Hölttä ceaf02d613 [reland] [in-place weak refs] Replace the WeakCell potentially in Map::raw_transitions_.
Previous: https://chromium-review.googlesource.com/972962

BUG=v8:7308

Change-Id: I6882e36ad9f9360d006937a2f41b07839a73a768
Reviewed-on: https://chromium-review.googlesource.com/995014
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52404}
2018-04-05 16:24:06 +00:00

32 lines
874 B
C++

// Copyright 2017 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef V8_TEST_CCTEST_TEST_TRANSITIONS_H_
#define V8_TEST_CCTEST_TEST_TRANSITIONS_H_
#include "src/transitions.h"
namespace v8 {
namespace internal {
class TestTransitionsAccessor : public TransitionsAccessor {
public:
TestTransitionsAccessor(Map* map, DisallowHeapAllocation* no_gc)
: TransitionsAccessor(map, no_gc) {}
explicit TestTransitionsAccessor(Handle<Map> map)
: TransitionsAccessor(map) {}
// Expose internals for tests.
bool IsWeakRefEncoding() { return encoding() == kWeakRef; }
bool IsFullTransitionArrayEncoding() {
return encoding() == kFullTransitionArray;
}
};
} // namespace internal
} // namespace v8
#endif // V8_TEST_CCTEST_TEST_TRANSITIONS_H_