b55dd17f19
This is a reland of9c0a48580b
Original change's description: > Reland "Reland "[code-comments] Put code comments into the code object"" > > This is a reland ofed3d647284
> > This reland fixes that padding at the end of Wasm instruction streams > triggered asserts in the code printer. > > Original change's description: > > Reland "[code-comments] Put code comments into the code object" > > > > This is a reland ofe774cffe2b
> > > > This reland disables a test as v8:8548 is blocking it, which was > > broken by a recent CL. CQ did not catch this because the merge-base > > CQ used did not yet contain the CL that caused v8:8548. > > > > Original change's description: > > > [code-comments] Put code comments into the code object > > > > > > Code comments in the snapshot can now be enabled with gn > > > arg 'v8_enable_snapshot_code_comments' > > > > > > Bug: v8:7989 > > > Change-Id: I8bd00cafa63132d00d849394c311ba15e6b6daf3 > > > Reviewed-on: https://chromium-review.googlesource.com/c/1329173 > > > Commit-Queue: Sigurd Schneider <sigurds@chromium.org> > > > Reviewed-by: Jakob Gruber <jgruber@chromium.org> > > > Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> > > > Reviewed-by: Michael Stanton <mvstanton@chromium.org> > > > Cr-Commit-Position: refs/heads/master@{#58020} > > > > TBR=mvstanton@chromium.org,mstarzinger@chromium.org,jgruber@chromium.org,tebbi@chromium.org > > > > Bug: v8:7989, v8:8548 > > Change-Id: I464fc897205fefdf2dfc2eadc54d699c4e08a0e9 > > Reviewed-on: https://chromium-review.googlesource.com/c/1361166 > > Reviewed-by: Sigurd Schneider <sigurds@chromium.org> > > Commit-Queue: Sigurd Schneider <sigurds@chromium.org> > > Cr-Commit-Position: refs/heads/master@{#58028} > > Bug: v8:7989, v8:8548 > Change-Id: I254f55ff687ad049f8d92b09331ed26a2bd05d7d > Reviewed-on: https://chromium-review.googlesource.com/c/1371784 > Commit-Queue: Sigurd Schneider <sigurds@chromium.org> > Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> > Reviewed-by: Jakob Gruber <jgruber@chromium.org> > Cr-Commit-Position: refs/heads/master@{#58221} TBR=jgruber@chromium.org,mstarzinger@chromium.org Bug: v8:7989, v8:8548, v8:8593 Change-Id: I4f7ffc98e0281c7b744eb4a04ba0763896c7b59b Reviewed-on: https://chromium-review.googlesource.com/c/1375919 Reviewed-by: Sigurd Schneider <sigurds@chromium.org> Commit-Queue: Sigurd Schneider <sigurds@chromium.org> Cr-Commit-Position: refs/heads/master@{#58232}
58 lines
1.8 KiB
C++
58 lines
1.8 KiB
C++
// Copyright 2018 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.
|
|
|
|
#include "src/code-reference.h"
|
|
|
|
#include "src/handles-inl.h"
|
|
#include "src/objects-inl.h"
|
|
#include "src/wasm/wasm-code-manager.h"
|
|
|
|
namespace v8 {
|
|
namespace internal {
|
|
|
|
Address CodeReference::constant_pool() const {
|
|
return kind_ == JS ? js_code_->constant_pool() : wasm_code_->constant_pool();
|
|
}
|
|
|
|
Address CodeReference::instruction_start() const {
|
|
return kind_ == JS
|
|
? js_code_->InstructionStart()
|
|
: reinterpret_cast<Address>(wasm_code_->instructions().start());
|
|
}
|
|
|
|
Address CodeReference::instruction_end() const {
|
|
return kind_ == JS
|
|
? js_code_->InstructionEnd()
|
|
: reinterpret_cast<Address>(wasm_code_->instructions().start() +
|
|
wasm_code_->instructions().size());
|
|
}
|
|
|
|
int CodeReference::instruction_size() const {
|
|
return kind_ == JS ? js_code_->InstructionSize()
|
|
: wasm_code_->instructions().length();
|
|
}
|
|
|
|
const byte* CodeReference::relocation_start() const {
|
|
return kind_ == JS ? js_code_->relocation_start()
|
|
: wasm_code_->reloc_info().start();
|
|
}
|
|
|
|
const byte* CodeReference::relocation_end() const {
|
|
return kind_ == JS ? js_code_->relocation_end()
|
|
: wasm_code_->reloc_info().start() +
|
|
wasm_code_->reloc_info().length();
|
|
}
|
|
|
|
int CodeReference::relocation_size() const {
|
|
return kind_ == JS ? js_code_->relocation_size()
|
|
: wasm_code_->reloc_info().length();
|
|
}
|
|
|
|
Address CodeReference::code_comments() const {
|
|
return kind_ == JS ? js_code_->code_comments() : wasm_code_->code_comments();
|
|
}
|
|
|
|
} // namespace internal
|
|
} // namespace v8
|