[compiler] Move heap-refs code to heap-refs.cc

This splits up js-heap-broker.cc into

- js-heap-broker.cc: the JSHeapBroker impl, and
- heap-refs.cc: ObjectRef and ObjectData impls, as well as two
  JSHeapBroker functions that closely deal with refs/data objects.

Bug: v8:7790
Change-Id: I7e097b60cdec4fd61b39d7de9752d536ac313cbe
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2833919
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74057}
This commit is contained in:
Jakob Gruber 2021-04-20 08:43:58 +02:00 committed by Commit Bot
parent fbd114bd27
commit fc2beecbda
4 changed files with 4552 additions and 4514 deletions

View File

@ -3427,6 +3427,7 @@ v8_compiler_sources = [
"src/compiler/graph-trimmer.cc", "src/compiler/graph-trimmer.cc",
"src/compiler/graph-visualizer.cc", "src/compiler/graph-visualizer.cc",
"src/compiler/graph.cc", "src/compiler/graph.cc",
"src/compiler/heap-refs.cc",
"src/compiler/js-call-reducer.cc", "src/compiler/js-call-reducer.cc",
"src/compiler/js-context-specialization.cc", "src/compiler/js-context-specialization.cc",
"src/compiler/js-create-lowering.cc", "src/compiler/js-create-lowering.cc",

4537
src/compiler/heap-refs.cc Normal file

File diff suppressed because it is too large Load Diff

View File

@ -40,6 +40,8 @@ struct WasmModule;
namespace compiler { namespace compiler {
class ObjectData;
// Whether we are loading a property or storing to a property. // Whether we are loading a property or storing to a property.
// For a store during literal creation, do not walk up the prototype chain. // For a store during literal creation, do not walk up the prototype chain.
enum class AccessMode { kLoad, kStore, kStoreInLiteral, kHas }; enum class AccessMode { kLoad, kStore, kStoreInLiteral, kHas };
@ -532,6 +534,8 @@ class NativeContextRef : public ContextRef {
public: public:
DEFINE_REF_CONSTRUCTOR(NativeContext, ContextRef) DEFINE_REF_CONSTRUCTOR(NativeContext, ContextRef)
bool is_unserialized_heap_object() const;
Handle<NativeContext> object() const; Handle<NativeContext> object() const;
void Serialize(); void Serialize();

File diff suppressed because it is too large Load Diff