[cleanup] Minor changes in isolate and heap
- One (redundant) inline, for consistency. - One forgotten #undef. - Several typos. Change-Id: I7e51b98f9147698c8b147d1642ae3facbb0fc451 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4162914 Commit-Queue: Nikolaos Papaspyrou <nikolaos@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#85267}
This commit is contained in:
parent
16a31ada22
commit
3b8893202c
@ -693,7 +693,7 @@ StackTraceFailureMessage::StackTraceFailureMessage(
|
||||
FixedStringAllocator fixed(&js_stack_trace_[0], buffer_length - 1);
|
||||
StringStream accumulator(&fixed, StringStream::kPrintObjectConcise);
|
||||
isolate->PrintStack(&accumulator, Isolate::kPrintStackVerbose);
|
||||
// Keeping a reference to the last code objects to increase likelyhood that
|
||||
// Keeping a reference to the last code objects to increase likelihood that
|
||||
// they get included in the minidump.
|
||||
const size_t code_objects_length = arraysize(code_objects_);
|
||||
size_t i = 0;
|
||||
@ -4069,13 +4069,13 @@ void Isolate::AddCrashKeysForIsolateAndHeapPointers() {
|
||||
}
|
||||
const v8::StartupData* data = Snapshot::DefaultSnapshotBlob();
|
||||
// TODO(cbruni): Implement strategy to infrequently collect this.
|
||||
const uint32_t v8_snapshot_checkum_calculated = 0;
|
||||
const uint32_t v8_snapshot_checksum_calculated = 0;
|
||||
add_crash_key_callback_(v8::CrashKeyId::kSnapshotChecksumCalculated,
|
||||
ToHexString(v8_snapshot_checkum_calculated));
|
||||
const uint32_t v8_snapshot_checkum_expected =
|
||||
ToHexString(v8_snapshot_checksum_calculated));
|
||||
const uint32_t v8_snapshot_checksum_expected =
|
||||
Snapshot::GetExpectedChecksum(data);
|
||||
add_crash_key_callback_(v8::CrashKeyId::kSnapshotChecksumExpected,
|
||||
ToHexString(v8_snapshot_checkum_expected));
|
||||
ToHexString(v8_snapshot_checksum_expected));
|
||||
}
|
||||
|
||||
void Isolate::InitializeCodeRanges() {
|
||||
@ -4614,7 +4614,7 @@ bool Isolate::Init(SnapshotData* startup_snapshot_data,
|
||||
nullptr);
|
||||
|
||||
// Isolate initialization allocates long living objects that should be
|
||||
// pretentured to old space.
|
||||
// pretenured to old space.
|
||||
DCHECK_IMPLIES(heap()->new_space(), (heap()->new_space()->Size() == 0) &&
|
||||
(heap()->gc_count() == 0));
|
||||
|
||||
@ -5132,7 +5132,7 @@ MaybeHandle<JSPromise> Isolate::RunHostImportModuleDynamicallyCallback(
|
||||
ToApiHandle<v8::FixedArray>(import_assertions_array)),
|
||||
MaybeHandle<JSPromise>());
|
||||
} else {
|
||||
// TODO(cbruni, v8:12302): Avoid creating tempory ScriptOrModule objects.
|
||||
// TODO(cbruni, v8:12302): Avoid creating temporary ScriptOrModule objects.
|
||||
auto script_or_module = i::Handle<i::ScriptOrModule>::cast(
|
||||
this->factory()->NewStruct(i::SCRIPT_OR_MODULE_TYPE));
|
||||
script_or_module->set_resource_name(*resource_name);
|
||||
|
@ -553,7 +553,7 @@ using DebugObjectCache = std::vector<Handle<HeapObject>>;
|
||||
inline type name() const { return thread_local_top()->name##_; }
|
||||
|
||||
#define THREAD_LOCAL_TOP_ADDRESS(type, name) \
|
||||
type* name##_address() { return &thread_local_top()->name##_; }
|
||||
inline type* name##_address() { return &thread_local_top()->name##_; }
|
||||
|
||||
// HiddenFactory exists so Isolate can privately inherit from it without making
|
||||
// Factory's members available to Isolate directly.
|
||||
@ -681,7 +681,7 @@ class V8_EXPORT_PRIVATE Isolate final : private HiddenFactory {
|
||||
// at the same time, this should be prevented using external locking.
|
||||
void Enter();
|
||||
|
||||
// Exits the current thread. The previosuly entered Isolate is restored
|
||||
// Exits the current thread. The previously entered Isolate is restored
|
||||
// for the thread.
|
||||
// Not thread-safe. Multiple threads should not Enter/Exit the same isolate
|
||||
// at the same time, this should be prevented using external locking.
|
||||
@ -1519,7 +1519,7 @@ class V8_EXPORT_PRIVATE Isolate final : private HiddenFactory {
|
||||
DCHECK_NOT_NULL(optimizing_compile_dispatcher_);
|
||||
return optimizing_compile_dispatcher_;
|
||||
}
|
||||
// Flushes all pending concurrent optimzation jobs from the optimizing
|
||||
// Flushes all pending concurrent optimization jobs from the optimizing
|
||||
// compile dispatcher's queue.
|
||||
void AbortConcurrentOptimization(BlockingBehavior blocking_behavior);
|
||||
|
||||
@ -1728,7 +1728,8 @@ class V8_EXPORT_PRIVATE Isolate final : private HiddenFactory {
|
||||
const uint8_t* embedded_blob_data() const;
|
||||
uint32_t embedded_blob_data_size() const;
|
||||
|
||||
// Returns true if short bultin calls optimization is enabled for the Isolate.
|
||||
// Returns true if short builtin calls optimization is enabled for the
|
||||
// Isolate.
|
||||
bool is_short_builtin_calls_enabled() const {
|
||||
return V8_SHORT_BUILTIN_CALLS_BOOL && is_short_builtin_calls_enabled_;
|
||||
}
|
||||
@ -2297,7 +2298,7 @@ class V8_EXPORT_PRIVATE Isolate final : private HiddenFactory {
|
||||
// True if this isolate was initialized from a snapshot.
|
||||
bool initialized_from_snapshot_ = false;
|
||||
|
||||
// True if short bultin calls optimization is enabled.
|
||||
// True if short builtin calls optimization is enabled.
|
||||
bool is_short_builtin_calls_enabled_ = false;
|
||||
|
||||
// True if the isolate is in background. This flag is used
|
||||
@ -2555,6 +2556,7 @@ extern thread_local Isolate* g_current_isolate_ V8_CONSTINIT;
|
||||
|
||||
#undef FIELD_ACCESSOR
|
||||
#undef THREAD_LOCAL_TOP_ACCESSOR
|
||||
#undef THREAD_LOCAL_TOP_ADDRESS
|
||||
|
||||
// SaveContext scopes save the current context on the Isolate on creation, and
|
||||
// restore it on destruction.
|
||||
|
@ -3937,8 +3937,8 @@ void Heap::NotifyObjectSizeChange(
|
||||
void Heap::UpdateInvalidatedObjectSize(HeapObject object, int new_size) {
|
||||
if (!MayContainRecordedSlots(object)) return;
|
||||
|
||||
// Updating invalidated_slots is unsychronized and thus needs to happen on the
|
||||
// main thread.
|
||||
// Updating invalidated_slots is unsynchronized and thus needs to happen on
|
||||
// the main thread.
|
||||
DCHECK_NULL(LocalHeap::Current());
|
||||
DCHECK_EQ(isolate()->thread_id(), ThreadId::Current());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user