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 @@
#ifndef 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/maybe-handles.h"
#include "src/zone/zone-containers.h"
......@@ -143,6 +144,7 @@ class Hints {
void Add(const Hints& other);
void Clear();
bool IsEmpty() const;
private:
ZoneVector<Handle<Object>> constants_;
......@@ -164,6 +166,7 @@ class SerializerForBackgroundCompilation {
private:
SerializerForBackgroundCompilation(JSHeapBroker* broker, Zone* zone,
CompilationSubject function,
base::Optional<Hints> new_target,
const HintsVector& arguments);
void TraverseBytecode();
......@@ -175,13 +178,16 @@ class SerializerForBackgroundCompilation {
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);
void ProcessCallVarArgs(interpreter::BytecodeArrayIterator* iterator,
ConvertReceiverMode receiver_mode,
bool with_spread = false);
Hints RunChildSerializer(CompilationSubject function,
base::Optional<Hints> new_target,
const HintsVector& arguments, bool with_spread);
JSHeapBroker* broker() const { return broker_; }
......
......@@ -52,9 +52,9 @@ int DbgStreamBuf::sync() {
}
if (pbase() != pptr()) {
OutputDebugStringA(
std::string(pbase(),
static_cast<std::string::size_type>(pptr() - pbase())).c_str());
OutputDebugStringA(std::string(pbase(), static_cast<std::string::size_type>(
pptr() - pbase()))
.c_str());
setp(pbase(), epptr());
}
#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