v8/src/code-reference.cc
Sigurd Schneider 871e3dea50 Revert "Reland "[code-comments] Put code comments into the code object""
This reverts commit ed3d647284.

Reason for revert: 
https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux%20-%20noi18n%20-%20debug/24178

Original change's description:
> Reland "[code-comments] Put code comments into the code object"
> 
> This is a reland of e774cffe2b
> 
> 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}

TBR=mvstanton@chromium.org,mstarzinger@chromium.org,sigurds@chromium.org,jgruber@chromium.org

Change-Id: I1075bb09de7cb8dad71e31ff51a4e7bb6a200a8b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7989, v8:8548
Reviewed-on: https://chromium-review.googlesource.com/c/1362043
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58029}
2018-12-04 21:21:37 +00:00

54 lines
1.6 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();
}
} // namespace internal
} // namespace v8