Commit ca150b04 authored by Georg Neis's avatar Georg Neis Committed by Commit Bot

Reland "[turbofan] Support new.target in the serializer."

This is a reland of 3145505a,
after removing the clashing Register name binding.

Original change's description:
> [turbofan] Support new.target in the serializer.
>
> Bug: v8:7790
> Change-Id: Ie98cff6f8b1f184c8152952cc3d39e373c93565d
> Reviewed-on: https://chromium-review.googlesource.com/c/1435943
> Commit-Queue: Georg Neis <neis@chromium.org>
> Reviewed-by: Maya Lekova <mslekova@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#59118}

Tbr: mslekova@chromium.org
Bug: v8:7790
Change-Id: I354d7907342e1f040d01eecc8b51ffca6e83c28d
Reviewed-on: https://chromium-review.googlesource.com/c/1442233
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59160}
parent 8f2ba3c5
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
#ifndef V8_COMPILER_SERIALIZER_FOR_BACKGROUND_COMPILATION_H_ #ifndef V8_COMPILER_SERIALIZER_FOR_BACKGROUND_COMPILATION_H_
#define V8_COMPILER_SERIALIZER_FOR_BACKGROUND_COMPILATION_H_ #define V8_COMPILER_SERIALIZER_FOR_BACKGROUND_COMPILATION_H_
#include "src/base/optional.h"
#include "src/handles.h" #include "src/handles.h"
#include "src/maybe-handles.h" #include "src/maybe-handles.h"
#include "src/zone/zone-containers.h" #include "src/zone/zone-containers.h"
...@@ -143,6 +144,7 @@ class Hints { ...@@ -143,6 +144,7 @@ class Hints {
void Add(const Hints& other); void Add(const Hints& other);
void Clear(); void Clear();
bool IsEmpty() const;
private: private:
ZoneVector<Handle<Object>> constants_; ZoneVector<Handle<Object>> constants_;
...@@ -164,6 +166,7 @@ class SerializerForBackgroundCompilation { ...@@ -164,6 +166,7 @@ class SerializerForBackgroundCompilation {
private: private:
SerializerForBackgroundCompilation(JSHeapBroker* broker, Zone* zone, SerializerForBackgroundCompilation(JSHeapBroker* broker, Zone* zone,
CompilationSubject function, CompilationSubject function,
base::Optional<Hints> new_target,
const HintsVector& arguments); const HintsVector& arguments);
void TraverseBytecode(); void TraverseBytecode();
...@@ -175,13 +178,16 @@ class SerializerForBackgroundCompilation { ...@@ -175,13 +178,16 @@ class SerializerForBackgroundCompilation {
class Environment; class Environment;
void ProcessCallOrConstruct(const Hints& callee, const HintsVector& arguments, void ProcessCallOrConstruct(const Hints& callee,
base::Optional<Hints> new_target,
const HintsVector& arguments,
bool with_spread = false); bool with_spread = false);
void ProcessCallVarArgs(interpreter::BytecodeArrayIterator* iterator, void ProcessCallVarArgs(interpreter::BytecodeArrayIterator* iterator,
ConvertReceiverMode receiver_mode, ConvertReceiverMode receiver_mode,
bool with_spread = false); bool with_spread = false);
Hints RunChildSerializer(CompilationSubject function, Hints RunChildSerializer(CompilationSubject function,
base::Optional<Hints> new_target,
const HintsVector& arguments, bool with_spread); const HintsVector& arguments, bool with_spread);
JSHeapBroker* broker() const { return broker_; } JSHeapBroker* broker() const { return broker_; }
......
...@@ -52,9 +52,9 @@ int DbgStreamBuf::sync() { ...@@ -52,9 +52,9 @@ int DbgStreamBuf::sync() {
} }
if (pbase() != pptr()) { if (pbase() != pptr()) {
OutputDebugStringA( OutputDebugStringA(std::string(pbase(), static_cast<std::string::size_type>(
std::string(pbase(), pptr() - pbase()))
static_cast<std::string::size_type>(pptr() - pbase())).c_str()); .c_str());
setp(pbase(), epptr()); setp(pbase(), epptr());
} }
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment