Commit cf93071c authored by Seth Brenith's avatar Seth Brenith Committed by Commit Bot

[interpreter] Short Star bytecode

Design doc:
https://docs.google.com/document/d/1g_NExMT78II_KnIYNa9MvyPYIj23qAiFUEsyemY5KRk/edit

This change adds 16 new interpreter opcodes, kStar0 through kStar15, so
that we can use a single byte to represent the common operation of
storing to a low-numbered register. This generally reduces the quantity
of bytecode generated on web sites by 8-9%.

In order to not degrade speed, a couple of other changes are required:

The existing lookahead logic to check for Star after certain other
bytecode handlers is updated to check for these new short Star codes
instead. Furthermore, that lookahead logic is updated to contain its own
copy of the dispatch jump rather than merging control flow with the
lookahead-failed case, to improve branch prediction.

A bunch of constants use bytecode size in bytes as a proxy for the size
or complexity of a function, and are adjusted downward proportionally to
the decrease in generated bytecode size.

Other small drive-by fix: update generate-bytecode-expectations to emit
\n instead of \r\n on Windows.

Change-Id: I6307c2b0f5794a3a1088bb0fb94f6e1615441ed5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2641180Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#72773}
parent 102b2624
......@@ -855,6 +855,15 @@ void BaselineCompiler::VisitStar() {
StoreRegister(0, kInterpreterAccumulatorRegister);
}
#define SHORT_STAR_VISITOR(Name, ...) \
void BaselineCompiler::Visit##Name() { \
__ StoreRegister( \
interpreter::Register::FromShortStar(interpreter::Bytecode::k##Name), \
kInterpreterAccumulatorRegister); \
}
SHORT_STAR_BYTECODE_LIST(SHORT_STAR_VISITOR)
#undef SHORT_STAR_VISITOR
void BaselineCompiler::VisitMov() {
BaselineAssembler::ScratchRegisterScope scratch_scope(&basm_);
Register scratch = scratch_scope.AcquireScratch();
......
......@@ -19,9 +19,18 @@ void WriteBytecode(std::ofstream& out, Bytecode bytecode,
int table_index) {
DCHECK_NOT_NULL(count);
if (Bytecodes::BytecodeHasHandler(bytecode, operand_scale)) {
out << " \\\n V(" << Bytecodes::ToString(bytecode, operand_scale, "")
<< "Handler, interpreter::OperandScale::k" << operand_scale
<< ", interpreter::Bytecode::k" << Bytecodes::ToString(bytecode) << ")";
std::string name = Bytecodes::ToString(bytecode, operand_scale, "");
// The handler for Star0 is used for all short star codes. Rename it to
// something more generic.
if (bytecode == Bytecode::kStar0) {
DCHECK_EQ(operand_scale, OperandScale::kSingle);
name = "ShortStar";
}
out << " \\\n V(" << name << "Handler, interpreter::OperandScale::k"
<< operand_scale << ", interpreter::Bytecode::k"
<< Bytecodes::ToString(bytecode) << ")";
offset_table[table_index] = *count;
(*count)++;
} else {
......@@ -62,7 +71,8 @@ void WriteHeader(const char* header_filename) {
#undef ADD_BYTECODES
int extra_wide_count = count - wide_count - single_count;
CHECK_GT(single_count, wide_count);
CHECK_EQ(single_count, Bytecodes::kBytecodeCount);
CHECK_EQ(single_count,
Bytecodes::kBytecodeCount - Bytecodes::kShortStarCount + 1);
CHECK_EQ(wide_count, extra_wide_count);
out << "\n\nconstexpr int kNumberOfBytecodeHandlers = " << single_count
<< ";\n"
......@@ -73,9 +83,10 @@ void WriteHeader(const char* header_filename) {
<< "// Mapping from Bytecode to a dense form with all the illegal\n"
<< "// wide Bytecodes removed. Used to index into the builtins table.\n"
<< "constexpr uint8_t kWideBytecodeToBuiltinsMapping["
<< "kNumberOfBytecodeHandlers] = { \n";
<< Bytecodes::kBytecodeCount << "] = { \n";
for (int i = single_count; i < 2 * single_count; ++i) {
for (int i = Bytecodes::kBytecodeCount; i < 2 * Bytecodes::kBytecodeCount;
++i) {
int offset = offset_table[i];
if (offset == kIllegalBytecodeHandler) {
offset = kIllegalBytecodeHandlerEncoding;
......
......@@ -166,6 +166,11 @@ void UpdateInLiveness(Bytecode bytecode, BytecodeLivenessState* in_liveness,
}
}
if (Bytecodes::WritesImplicitRegister(bytecode)) {
in_liveness->MarkRegisterDead(
interpreter::Register::FromShortStar(bytecode).index());
}
if (Bytecodes::ReadsAccumulator(bytecode)) {
in_liveness->MarkAccumulatorLive();
}
......@@ -308,6 +313,10 @@ void UpdateAssignments(Bytecode bytecode, BytecodeLoopAssignments* assignments,
break;
}
}
if (Bytecodes::WritesImplicitRegister(bytecode)) {
assignments->Add(interpreter::Register::FromShortStar(bytecode));
}
}
} // namespace
......
......@@ -1620,6 +1620,16 @@ void BytecodeGraphBuilder::VisitStar() {
environment()->BindRegister(bytecode_iterator().GetRegisterOperand(0), value);
}
#define SHORT_STAR_VISITOR(Name, ...) \
void BytecodeGraphBuilder::Visit##Name() { \
Node* value = environment()->LookupAccumulator(); \
environment()->BindRegister( \
interpreter::Register::FromShortStar(interpreter::Bytecode::k##Name), \
value); \
}
SHORT_STAR_BYTECODE_LIST(SHORT_STAR_VISITOR)
#undef SHORT_STAR_VISITOR
void BytecodeGraphBuilder::VisitMov() {
Node* value =
environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0));
......
......@@ -405,6 +405,8 @@ class SerializerForBackgroundCompilation {
SUPPORTED_BYTECODE_LIST(DECLARE_VISIT_BYTECODE)
#undef DECLARE_VISIT_BYTECODE
void VisitShortStar(interpreter::Register reg);
Hints& register_hints(interpreter::Register reg);
// Return a vector containing the hints for the given register range (in
......@@ -1311,13 +1313,20 @@ void SerializerForBackgroundCompilation::TraverseBytecode() {
}
}
switch (iterator.current_bytecode()) {
interpreter::Bytecode current_bytecode = iterator.current_bytecode();
switch (current_bytecode) {
#define DEFINE_BYTECODE_CASE(name) \
case interpreter::Bytecode::k##name: \
Visit##name(&iterator); \
break;
SUPPORTED_BYTECODE_LIST(DEFINE_BYTECODE_CASE)
#undef DEFINE_BYTECODE_CASE
#define DEFINE_SHORT_STAR_CASE(Name, ...) case interpreter::Bytecode::k##Name:
SHORT_STAR_BYTECODE_LIST(DEFINE_SHORT_STAR_CASE)
#undef DEFINE_SHORT_STAR_CASE
VisitShortStar(interpreter::Register::FromShortStar(current_bytecode));
break;
}
}
......@@ -1698,6 +1707,11 @@ void SerializerForBackgroundCompilation::VisitStar(
register_hints(reg).Reset(&environment()->accumulator_hints(), zone());
}
void SerializerForBackgroundCompilation::VisitShortStar(
interpreter::Register reg) {
register_hints(reg).Reset(&environment()->accumulator_hints(), zone());
}
void SerializerForBackgroundCompilation::VisitMov(
BytecodeArrayIterator* iterator) {
interpreter::Register src = iterator->GetRegisterOperand(0);
......
......@@ -27,16 +27,16 @@ static const int kProfilerTicksBeforeOptimization = 3;
// The number of ticks required for optimizing a function increases with
// the size of the bytecode. This is in addition to the
// kProfilerTicksBeforeOptimization required for any function.
static const int kBytecodeSizeAllowancePerTick = 1200;
static const int kBytecodeSizeAllowancePerTick = 1100;
// Maximum size in bytes of generate code for a function to allow OSR.
static const int kOSRBytecodeSizeAllowanceBase = 132;
static const int kOSRBytecodeSizeAllowanceBase = 119;
static const int kOSRBytecodeSizeAllowancePerTick = 48;
static const int kOSRBytecodeSizeAllowancePerTick = 43;
// Maximum size in bytes of generated code for a function to be optimized
// the very first time it is seen on the stack.
static const int kMaxBytecodeSizeForEarlyOpt = 90;
static const int kMaxBytecodeSizeForEarlyOpt = 81;
// Number of times a function has to be seen on the stack before it is
// OSRed in TurboProp
......
......@@ -499,12 +499,12 @@ DEFINE_BOOL_READONLY(enable_sealed_frozen_elements_kind, true,
DEFINE_BOOL(unbox_double_arrays, true, "automatically unbox arrays of doubles")
DEFINE_BOOL_READONLY(string_slices, true, "use string slices")
DEFINE_INT(interrupt_budget, 144 * KB,
DEFINE_INT(interrupt_budget, 132 * KB,
"interrupt budget which should be used for the profiler counter")
// Flags for inline caching and feedback vectors.
DEFINE_BOOL(use_ic, true, "use inline caching")
DEFINE_INT(budget_for_feedback_vector_allocation, 1 * KB,
DEFINE_INT(budget_for_feedback_vector_allocation, 940,
"The budget in amount of bytecode executed by a function before we "
"decide to allocate feedback vectors")
DEFINE_INT(scale_factor_for_feedback_allocation, 4,
......@@ -571,7 +571,7 @@ DEFINE_BOOL(
turboprop_as_toptier, false,
"enable experimental turboprop compiler without further tierup to turbofan")
DEFINE_IMPLICATION(turboprop_as_toptier, turboprop)
DEFINE_VALUE_IMPLICATION(turboprop, interrupt_budget, 15 * KB)
DEFINE_VALUE_IMPLICATION(turboprop, interrupt_budget, 14 * KB)
DEFINE_VALUE_IMPLICATION(turboprop, reuse_opt_code_count, 2)
DEFINE_UINT_READONLY(max_minimorphic_map_checks, 4,
"max number of map checks to perform in minimorphic state")
......@@ -686,16 +686,16 @@ DEFINE_BOOL(turbo_splitting, true, "split nodes during scheduling in TurboFan")
DEFINE_BOOL(function_context_specialization, false,
"enable function context specialization in TurboFan")
DEFINE_BOOL(turbo_inlining, true, "enable inlining in TurboFan")
DEFINE_INT(max_inlined_bytecode_size, 500,
DEFINE_INT(max_inlined_bytecode_size, 460,
"maximum size of bytecode for a single inlining")
DEFINE_INT(max_inlined_bytecode_size_cumulative, 1000,
DEFINE_INT(max_inlined_bytecode_size_cumulative, 920,
"maximum cumulative size of bytecode considered for inlining")
DEFINE_INT(max_inlined_bytecode_size_absolute, 5000,
DEFINE_INT(max_inlined_bytecode_size_absolute, 4600,
"maximum absolute size of bytecode considered for inlining")
DEFINE_FLOAT(
reserve_inline_budget_scale_factor, 1.2,
"scale factor of bytecode size used to calculate the inlining budget")
DEFINE_INT(max_inlined_bytecode_size_small, 30,
DEFINE_INT(max_inlined_bytecode_size_small, 27,
"maximum size of bytecode considered for small function inlining")
DEFINE_INT(max_optimized_bytecode_size, 60 * KB,
"maximum bytecode size to "
......
......@@ -197,7 +197,10 @@ void BytecodeArrayBuilder::OutputLdarRaw(Register reg) {
void BytecodeArrayBuilder::OutputStarRaw(Register reg) {
uint32_t operand = static_cast<uint32_t>(reg.ToOperand());
BytecodeNode node(BytecodeNode::Star(BytecodeSourceInfo(), operand));
base::Optional<Bytecode> short_code = reg.TryToShortStar();
BytecodeNode node = short_code
? BytecodeNode(*short_code)
: BytecodeNode::Star(BytecodeSourceInfo(), operand);
Write(&node);
}
......@@ -696,7 +699,7 @@ BytecodeArrayBuilder& BytecodeArrayBuilder::StoreAccumulatorInRegister(
SetDeferredSourceInfo(CurrentSourcePosition(Bytecode::kStar));
register_optimizer_->DoStar(reg);
} else {
OutputStar(reg);
OutputStarRaw(reg);
}
return *this;
}
......
......@@ -18,11 +18,15 @@ const char* ImplicitRegisterUseToString(
case ImplicitRegisterUse::kNone:
return "None";
case ImplicitRegisterUse::kReadAccumulator:
return "Read";
return "ReadAccumulator";
case ImplicitRegisterUse::kWriteAccumulator:
return "Write";
return "WriteAccumulator";
case ImplicitRegisterUse::kWriteShortStar:
return "WriteShortStar";
case ImplicitRegisterUse::kReadWriteAccumulator:
return "ReadWrite";
return "ReadWriteAccumulator";
case ImplicitRegisterUse::kReadAccumulatorWriteShortStar:
return "ReadAccumulatorWriteShortStar";
}
UNREACHABLE();
}
......
......@@ -113,7 +113,9 @@ enum class ImplicitRegisterUse : uint8_t {
kNone = 0,
kReadAccumulator = 1 << 0,
kWriteAccumulator = 1 << 1,
kReadWriteAccumulator = kReadAccumulator | kWriteAccumulator
kWriteShortStar = 1 << 2,
kReadWriteAccumulator = kReadAccumulator | kWriteAccumulator,
kReadAccumulatorWriteShortStar = kReadAccumulator | kWriteShortStar
};
constexpr inline ImplicitRegisterUse operator&(ImplicitRegisterUse lhs,
......@@ -186,6 +188,14 @@ class BytecodeOperands : public AllStatic {
ImplicitRegisterUse::kWriteAccumulator;
}
// Returns true if |implicit_register_use| writes to a
// register not specified by an operand.
static constexpr bool WritesImplicitRegister(
ImplicitRegisterUse implicit_register_use) {
return (implicit_register_use & ImplicitRegisterUse::kWriteShortStar) ==
ImplicitRegisterUse::kWriteShortStar;
}
// Returns true if |operand_type| is a scalable signed byte.
static constexpr bool IsScalableSignedByte(OperandType operand_type) {
return base::IsInRange(operand_type, OperandType::kImm,
......
......@@ -20,7 +20,7 @@ namespace interpreter {
// in its stack-frame. Register hold parameters, this, and expression values.
class V8_EXPORT_PRIVATE Register final {
public:
explicit Register(int index = kInvalidIndex) : index_(index) {}
constexpr explicit Register(int index = kInvalidIndex) : index_(index) {}
int index() const { return index_; }
bool is_parameter() const { return index() < 0; }
......@@ -58,11 +58,30 @@ class V8_EXPORT_PRIVATE Register final {
OperandSize SizeOfOperand() const;
int32_t ToOperand() const { return kRegisterFileStartOffset - index_; }
constexpr int32_t ToOperand() const {
return kRegisterFileStartOffset - index_;
}
static Register FromOperand(int32_t operand) {
return Register(kRegisterFileStartOffset - operand);
}
static Register FromShortStar(Bytecode bytecode) {
DCHECK(Bytecodes::IsShortStar(bytecode));
return Register(static_cast<int>(Bytecode::kStar0) -
static_cast<int>(bytecode));
}
const base::Optional<Bytecode> TryToShortStar() const {
if (index() >= 0 && index() < Bytecodes::kShortStarCount) {
Bytecode bytecode =
static_cast<Bytecode>(static_cast<int>(Bytecode::kStar0) - index());
DCHECK_GE(bytecode, Bytecode::kFirstShortStar);
DCHECK_LE(bytecode, Bytecode::kLastShortStar);
return bytecode;
}
return {};
}
static bool AreContiguous(Register reg1, Register reg2,
Register reg3 = invalid_value(),
Register reg4 = invalid_value(),
......
......@@ -94,6 +94,13 @@ Bytecodes::kOperandKindSizes[3][BytecodeOperands::kOperandTypeCount] = {
};
// clang-format on
// Make sure kFirstShortStar and kLastShortStar are set correctly.
#define ASSERT_SHORT_STAR_RANGE(Name, ...) \
STATIC_ASSERT(Bytecode::k##Name >= Bytecode::kFirstShortStar && \
Bytecode::k##Name <= Bytecode::kLastShortStar);
SHORT_STAR_BYTECODE_LIST(ASSERT_SHORT_STAR_RANGE)
#undef ASSERT_SHORT_STAR_RANGE
// static
const char* Bytecodes::ToString(Bytecode bytecode) {
switch (bytecode) {
......@@ -264,6 +271,11 @@ bool Bytecodes::IsRegisterOutputOperandType(OperandType operand_type) {
bool Bytecodes::IsStarLookahead(Bytecode bytecode, OperandScale operand_scale) {
if (operand_scale == OperandScale::kSingle) {
switch (bytecode) {
// Short-star lookahead is required for correctness on kDebugBreak0. The
// handler for all short-star codes re-reads the opcode from the bytecode
// array and would not work correctly if it instead read kDebugBreak0.
case Bytecode::kDebugBreak0:
case Bytecode::kLdaZero:
case Bytecode::kLdaSmi:
case Bytecode::kLdaNull:
......@@ -332,7 +344,8 @@ bool Bytecodes::IsUnsignedOperandType(OperandType operand_type) {
// static
bool Bytecodes::BytecodeHasHandler(Bytecode bytecode,
OperandScale operand_scale) {
return operand_scale == OperandScale::kSingle ||
return (operand_scale == OperandScale::kSingle &&
(!IsShortStar(bytecode) || bytecode == Bytecode::kStar0)) ||
Bytecodes::IsBytecodeWithScalableOperands(bytecode);
}
......
......@@ -21,9 +21,29 @@ namespace v8 {
namespace internal {
namespace interpreter {
// The list of bytecodes which are interpreted by the interpreter.
// The list of single-byte Star variants, in the format of BYTECODE_LIST.
#define SHORT_STAR_BYTECODE_LIST(V) \
V(Star15, ImplicitRegisterUse::kReadAccumulatorWriteShortStar) \
V(Star14, ImplicitRegisterUse::kReadAccumulatorWriteShortStar) \
V(Star13, ImplicitRegisterUse::kReadAccumulatorWriteShortStar) \
V(Star12, ImplicitRegisterUse::kReadAccumulatorWriteShortStar) \
V(Star11, ImplicitRegisterUse::kReadAccumulatorWriteShortStar) \
V(Star10, ImplicitRegisterUse::kReadAccumulatorWriteShortStar) \
V(Star9, ImplicitRegisterUse::kReadAccumulatorWriteShortStar) \
V(Star8, ImplicitRegisterUse::kReadAccumulatorWriteShortStar) \
V(Star7, ImplicitRegisterUse::kReadAccumulatorWriteShortStar) \
V(Star6, ImplicitRegisterUse::kReadAccumulatorWriteShortStar) \
V(Star5, ImplicitRegisterUse::kReadAccumulatorWriteShortStar) \
V(Star4, ImplicitRegisterUse::kReadAccumulatorWriteShortStar) \
V(Star3, ImplicitRegisterUse::kReadAccumulatorWriteShortStar) \
V(Star2, ImplicitRegisterUse::kReadAccumulatorWriteShortStar) \
V(Star1, ImplicitRegisterUse::kReadAccumulatorWriteShortStar) \
V(Star0, ImplicitRegisterUse::kReadAccumulatorWriteShortStar)
// The list of bytecodes which have unique handlers (no other bytecode is
// executed using identical code).
// Format is V(<bytecode>, <implicit_register_use>, <operands>).
#define BYTECODE_LIST(V) \
#define BYTECODE_LIST_WITH_UNIQUE_HANDLERS(V) \
/* Extended width operands */ \
V(Wide, ImplicitRegisterUse::kNone) \
V(ExtraWide, ImplicitRegisterUse::kNone) \
......@@ -421,7 +441,15 @@ namespace interpreter {
V(IncBlockCounter, ImplicitRegisterUse::kNone, OperandType::kIdx) \
\
/* Execution Abort (internal error) */ \
V(Abort, ImplicitRegisterUse::kNone, OperandType::kIdx) \
V(Abort, ImplicitRegisterUse::kNone, OperandType::kIdx)
// The list of bytecodes which are interpreted by the interpreter.
// Format is V(<bytecode>, <implicit_register_use>, <operands>).
#define BYTECODE_LIST(V) \
BYTECODE_LIST_WITH_UNIQUE_HANDLERS(V) \
\
/* Special-case Star for common register numbers, to save space */ \
SHORT_STAR_BYTECODE_LIST(V) \
\
/* Illegal bytecode */ \
V(Illegal, ImplicitRegisterUse::kNone)
......@@ -523,7 +551,9 @@ enum class Bytecode : uint8_t {
#define COUNT_BYTECODE(x, ...) +1
// The COUNT_BYTECODE macro will turn this into kLast = -1 +1 +1... which will
// evaluate to the same value as the last real bytecode.
kLast = -1 BYTECODE_LIST(COUNT_BYTECODE)
kLast = -1 BYTECODE_LIST(COUNT_BYTECODE),
kFirstShortStar = kStar15,
kLastShortStar = kStar0
#undef COUNT_BYTECODE
};
......@@ -535,6 +565,10 @@ class V8_EXPORT_PRIVATE Bytecodes final : public AllStatic {
// The total number of bytecodes used.
static const int kBytecodeCount = static_cast<int>(Bytecode::kLast) + 1;
static const int kShortStarCount =
static_cast<int>(Bytecode::kLastShortStar) -
static_cast<int>(Bytecode::kFirstShortStar) + 1;
// Returns string representation of |bytecode|.
static const char* ToString(Bytecode bytecode);
......@@ -606,6 +640,13 @@ class V8_EXPORT_PRIVATE Bytecodes final : public AllStatic {
GetImplicitRegisterUse(bytecode));
}
// Returns true if |bytecode| writes to a register not specified by an
// operand.
static bool WritesImplicitRegister(Bytecode bytecode) {
return BytecodeOperands::WritesImplicitRegister(
GetImplicitRegisterUse(bytecode));
}
// Return true if |bytecode| is an accumulator load without effects,
// e.g. LdaConstant, LdaTrue, Ldar.
static constexpr bool IsAccumulatorLoadWithoutEffects(Bytecode bytecode) {
......@@ -630,11 +671,20 @@ class V8_EXPORT_PRIVATE Bytecodes final : public AllStatic {
bytecode == Bytecode::kTestTypeOf;
}
static constexpr bool IsShortStar(Bytecode bytecode) {
return bytecode >= Bytecode::kFirstShortStar &&
bytecode <= Bytecode::kLastShortStar;
}
static constexpr bool IsAnyStar(Bytecode bytecode) {
return bytecode == Bytecode::kStar || IsShortStar(bytecode);
}
// Return true if |bytecode| is a register load without effects,
// e.g. Mov, Star.
static constexpr bool IsRegisterLoadWithoutEffects(Bytecode bytecode) {
return bytecode == Bytecode::kMov || bytecode == Bytecode::kPopContext ||
bytecode == Bytecode::kPushContext || bytecode == Bytecode::kStar;
bytecode == Bytecode::kPushContext || IsAnyStar(bytecode);
}
// Returns true if the bytecode is a conditional jump taking
......@@ -724,7 +774,7 @@ class V8_EXPORT_PRIVATE Bytecodes final : public AllStatic {
// Returns true if the bytecode is Ldar or Star.
static constexpr bool IsLdarOrStar(Bytecode bytecode) {
return bytecode == Bytecode::kLdar || bytecode == Bytecode::kStar;
return bytecode == Bytecode::kLdar || IsAnyStar(bytecode);
}
// Returns true if the bytecode is a call or a constructor call.
......
......@@ -298,6 +298,35 @@ void InterpreterAssembler::StoreRegister(TNode<Object> value,
RegisterFrameOffset(reg_index), value);
}
void InterpreterAssembler::StoreRegisterForShortStar(TNode<Object> value,
TNode<WordT> opcode) {
DCHECK(Bytecodes::IsShortStar(bytecode_));
implicit_register_use_ =
implicit_register_use_ | ImplicitRegisterUse::kWriteShortStar;
CSA_ASSERT(
this, UintPtrGreaterThanOrEqual(opcode, UintPtrConstant(static_cast<int>(
Bytecode::kFirstShortStar))));
CSA_ASSERT(
this,
UintPtrLessThanOrEqual(
opcode, UintPtrConstant(static_cast<int>(Bytecode::kLastShortStar))));
// Compute the constant that we can add to a Bytecode value to map the range
// [Bytecode::kStar15, Bytecode::kStar0] to the range
// [Register(15).ToOperand(), Register(0).ToOperand()].
constexpr int short_star_to_operand =
Register(0).ToOperand() - static_cast<int>(Bytecode::kStar0);
// Make sure the values count in the right direction.
STATIC_ASSERT(short_star_to_operand ==
Register(1).ToOperand() - static_cast<int>(Bytecode::kStar1));
TNode<IntPtrT> offset =
IntPtrAdd(RegisterFrameOffset(Signed(opcode)),
IntPtrConstant(short_star_to_operand * kSystemPointerSize));
StoreFullTaggedNoWriteBarrier(GetInterpretedFramePointer(), offset, value);
}
void InterpreterAssembler::StoreRegisterAtOperandIndex(TNode<Object> value,
int operand_index) {
StoreRegister(value,
......@@ -1105,40 +1134,51 @@ TNode<WordT> InterpreterAssembler::LoadBytecode(
return ChangeUint32ToWord(bytecode);
}
TNode<WordT> InterpreterAssembler::StarDispatchLookahead(
TNode<WordT> target_bytecode) {
void InterpreterAssembler::StarDispatchLookahead(TNode<WordT> target_bytecode) {
Label do_inline_star(this), done(this);
TVARIABLE(WordT, var_bytecode, target_bytecode);
TNode<Int32T> star_bytecode =
Int32Constant(static_cast<int>(Bytecode::kStar));
TNode<BoolT> is_star =
Word32Equal(TruncateWordToInt32(target_bytecode), star_bytecode);
// Check whether the following opcode is one of the short Star codes. All
// opcodes higher than the short Star variants are invalid, and invalid
// opcodes are never deliberately written, so we can use a one-sided check.
// This is no less secure than the normal-length Star handler, which performs
// no validation on its operand.
STATIC_ASSERT(static_cast<int>(Bytecode::kLastShortStar) + 1 ==
static_cast<int>(Bytecode::kIllegal));
STATIC_ASSERT(Bytecode::kIllegal == Bytecode::kLast);
TNode<Int32T> first_short_star_bytecode =
Int32Constant(static_cast<int>(Bytecode::kFirstShortStar));
TNode<BoolT> is_star = Uint32GreaterThanOrEqual(
TruncateWordToInt32(target_bytecode), first_short_star_bytecode);
Branch(is_star, &do_inline_star, &done);
BIND(&do_inline_star);
{
InlineStar();
var_bytecode = LoadBytecode(BytecodeOffset());
Goto(&done);
InlineShortStar(target_bytecode);
// Rather than merging control flow to a single indirect jump, we can get
// better branch prediction by duplicating it. This is because the
// instruction following a merged X + StarN is a bad predictor of the
// instruction following a non-merged X, and vice versa.
DispatchToBytecode(LoadBytecode(BytecodeOffset()), BytecodeOffset());
}
BIND(&done);
return var_bytecode.value();
}
void InterpreterAssembler::InlineStar() {
void InterpreterAssembler::InlineShortStar(TNode<WordT> target_bytecode) {
Bytecode previous_bytecode = bytecode_;
ImplicitRegisterUse previous_acc_use = implicit_register_use_;
bytecode_ = Bytecode::kStar;
// At this point we don't know statically what bytecode we're executing, but
// kStar0 has the right attributes (namely, no operands) for any of the short
// Star codes.
bytecode_ = Bytecode::kStar0;
implicit_register_use_ = ImplicitRegisterUse::kNone;
#ifdef V8_TRACE_UNOPTIMIZED
TraceBytecode(Runtime::kTraceUnoptimizedBytecodeEntry);
#endif
StoreRegister(GetAccumulator(),
BytecodeOperandReg(0, LoadSensitivity::kSafe));
StoreRegisterForShortStar(GetAccumulator(), target_bytecode);
DCHECK_EQ(implicit_register_use_,
Bytecodes::GetImplicitRegisterUse(bytecode_));
......@@ -1153,9 +1193,13 @@ void InterpreterAssembler::Dispatch() {
DCHECK_IMPLIES(Bytecodes::MakesCallAlongCriticalPath(bytecode_), made_call_);
TNode<IntPtrT> target_offset = Advance();
TNode<WordT> target_bytecode = LoadBytecode(target_offset);
DispatchToBytecodeWithOptionalStarLookahead(target_bytecode);
}
void InterpreterAssembler::DispatchToBytecodeWithOptionalStarLookahead(
TNode<WordT> target_bytecode) {
if (Bytecodes::IsStarLookahead(bytecode_, operand_scale_)) {
target_bytecode = StarDispatchLookahead(target_bytecode);
StarDispatchLookahead(target_bytecode);
}
DispatchToBytecode(target_bytecode, BytecodeOffset());
}
......
......@@ -226,6 +226,12 @@ class V8_EXPORT_PRIVATE InterpreterAssembler : public CodeStubAssembler {
void DispatchToBytecode(TNode<WordT> target_bytecode,
TNode<IntPtrT> new_bytecode_offset);
// Dispatches to |target_bytecode| at BytecodeOffset(). Includes short-star
// lookahead if the current bytecode_ is likely followed by a short-star
// instruction.
void DispatchToBytecodeWithOptionalStarLookahead(
TNode<WordT> target_bytecode);
// Abort with the given abort reason.
void Abort(AbortReason abort_reason);
void AbortIfWordNotEqual(TNode<WordT> lhs, TNode<WordT> rhs,
......@@ -247,6 +253,11 @@ class V8_EXPORT_PRIVATE InterpreterAssembler : public CodeStubAssembler {
void ToNumberOrNumeric(Object::Conversion mode);
void StoreRegisterForShortStar(TNode<Object> value, TNode<WordT> opcode);
// Load the bytecode at |bytecode_offset|.
TNode<WordT> LoadBytecode(TNode<IntPtrT> bytecode_offset);
private:
// Returns a pointer to the current function's BytecodeArray object.
TNode<BytecodeArray> BytecodeArrayTaggedPointer();
......@@ -367,16 +378,14 @@ class V8_EXPORT_PRIVATE InterpreterAssembler : public CodeStubAssembler {
TNode<IntPtrT> Advance(int delta);
TNode<IntPtrT> Advance(TNode<IntPtrT> delta, bool backward = false);
// Load the bytecode at |bytecode_offset|.
TNode<WordT> LoadBytecode(TNode<IntPtrT> bytecode_offset);
// Look ahead for Star and inline it in a branch. Returns a new target
// bytecode node for dispatch.
TNode<WordT> StarDispatchLookahead(TNode<WordT> target_bytecode);
// Look ahead for short Star and inline it in a branch, including subsequent
// dispatch. Anything after this point can assume that the following
// instruction was not a short Star.
void StarDispatchLookahead(TNode<WordT> target_bytecode);
// Build code for Star at the current BytecodeOffset() and Advance() to the
// next dispatch offset.
void InlineStar();
// Build code for short Star at the current BytecodeOffset() and Advance() to
// the next dispatch offset.
void InlineShortStar(TNode<WordT> target_bytecode);
// Dispatch to the bytecode handler with code entry point |handler_entry|.
void DispatchToBytecodeHandlerEntry(TNode<RawPtrT> handler_entry,
......
......@@ -145,6 +145,20 @@ IGNITION_HANDLER(Star, InterpreterAssembler) {
Dispatch();
}
// Star0 - StarN
//
// Store accumulator to one of a special batch of registers, without using a
// second byte to specify the destination.
//
// Even though this handler is declared as Star0, multiple entries in
// the jump table point to this handler.
IGNITION_HANDLER(Star0, InterpreterAssembler) {
TNode<Object> accumulator = GetAccumulator();
TNode<WordT> opcode = LoadBytecode(BytecodeOffset());
StoreRegisterForShortStar(accumulator, opcode);
Dispatch();
}
// Mov <src> <dst>
//
// Stores the value of register <src> to register <dst>.
......@@ -2783,7 +2797,7 @@ IGNITION_HANDLER(Debugger, InterpreterAssembler) {
TNode<IntPtrT> original_bytecode = SmiUntag(Projection<1>(result_pair)); \
MaybeDropFrames(context); \
SetAccumulator(return_value); \
DispatchToBytecode(original_bytecode, BytecodeOffset()); \
DispatchToBytecodeWithOptionalStarLookahead(original_bytecode); \
}
DEBUG_BREAK_BYTECODE_LIST(DEBUG_BREAK)
#undef DEBUG_BREAK
......@@ -3103,8 +3117,19 @@ Handle<Code> GenerateBytecodeHandler(Isolate* isolate, const char* debug_name,
case Bytecode::k##Name: \
Name##Assembler::Generate(&state, operand_scale); \
break;
BYTECODE_LIST(CALL_GENERATOR);
BYTECODE_LIST_WITH_UNIQUE_HANDLERS(CALL_GENERATOR);
#undef CALL_GENERATOR
case Bytecode::kIllegal:
IllegalAssembler::Generate(&state, operand_scale);
break;
case Bytecode::kStar0:
Star0Assembler::Generate(&state, operand_scale);
break;
default:
// Others (the rest of the short stars, and the rest of the illegal range)
// must not get their own handler generated. Rather, multiple entries in
// the jump table point to those handlers.
UNREACHABLE();
}
Handle<Code> code = compiler::CodeAssembler::GenerateCode(
......
......@@ -83,7 +83,14 @@ namespace {
int BuiltinIndexFromBytecode(Bytecode bytecode, OperandScale operand_scale) {
int index = static_cast<int>(bytecode);
if (operand_scale != OperandScale::kSingle) {
if (operand_scale == OperandScale::kSingle) {
if (Bytecodes::IsShortStar(bytecode)) {
index = static_cast<int>(Bytecode::kFirstShortStar);
} else if (bytecode > Bytecode::kLastShortStar) {
// Adjust the index due to repeated handlers.
index -= Bytecodes::kShortStarCount - 1;
}
} else {
// The table contains uint8_t offsets starting at 0 with
// kIllegalBytecodeHandlerEncoding for illegal bytecode/scale combinations.
uint8_t offset = kWideBytecodeToBuiltinsMapping[index];
......@@ -277,6 +284,7 @@ InterpreterCompilationJob::Status InterpreterCompilationJob::DoFinalizeJobImpl(
compilation_info()->literal()->GetDebugName();
os << "[generated bytecode for function: " << name.get() << " ("
<< shared_info << ")]" << std::endl;
os << "Bytecode length: " << bytecodes->length() << std::endl;
bytecodes->Disassemble(os);
os << std::flush;
}
......@@ -336,23 +344,23 @@ void Interpreter::Initialize() {
interpreter_entry_trampoline_instruction_start_ = code->InstructionStart();
// Initialize the dispatch table.
Code illegal = builtins->builtin(Builtins::kIllegalHandler);
int builtin_id = Builtins::kFirstBytecodeHandler;
ForEachBytecode([=, &builtin_id](Bytecode bytecode,
OperandScale operand_scale) {
Code handler = illegal;
ForEachBytecode([=](Bytecode bytecode, OperandScale operand_scale) {
int builtin_id = BuiltinIndexFromBytecode(bytecode, operand_scale);
Code handler = builtins->builtin(builtin_id);
if (Bytecodes::BytecodeHasHandler(bytecode, operand_scale)) {
#ifdef DEBUG
std::string builtin_name(Builtins::name(builtin_id));
std::string expected_name =
Bytecodes::ToString(bytecode, operand_scale, "") + "Handler";
(Bytecodes::IsShortStar(bytecode)
? "ShortStar"
: Bytecodes::ToString(bytecode, operand_scale, "")) +
"Handler";
DCHECK_EQ(expected_name, builtin_name);
#endif
handler = builtins->builtin(builtin_id++);
}
SetBytecodeHandler(bytecode, operand_scale, handler);
});
DCHECK(builtin_id == Builtins::builtin_count);
DCHECK(IsDispatchTableInitialized());
}
......
......@@ -28,18 +28,18 @@ snippet: "
"
frame size: 3
parameter count: 1
bytecode array length: 35
bytecode array length: 31
bytecodes: [
/* 42 S> */ B(LdaSmi), I8(1),
B(Star), R(0),
B(Star0),
/* 45 S> */ B(CreateArrayLiteral), U8(0), U8(0), U8(37),
B(Star), R(2),
B(Star2),
B(LdaZero),
B(Star), R(1),
B(Star1),
B(Ldar), R(0),
/* 54 E> */ B(StaInArrayLiteral), R(2), R(1), U8(1),
B(LdaSmi), I8(1),
B(Star), R(1),
B(Star1),
B(Ldar), R(0),
/* 59 E> */ B(AddSmi), I8(1), U8(3),
B(StaInArrayLiteral), R(2), R(1), U8(1),
......@@ -75,28 +75,28 @@ snippet: "
"
frame size: 5
parameter count: 1
bytecode array length: 65
bytecode array length: 57
bytecodes: [
/* 42 S> */ B(LdaSmi), I8(1),
B(Star), R(0),
B(Star0),
/* 45 S> */ B(CreateArrayLiteral), U8(0), U8(0), U8(4),
B(Star), R(2),
B(Star2),
B(LdaZero),
B(Star), R(1),
B(Star1),
B(CreateArrayLiteral), U8(1), U8(1), U8(37),
B(Star), R(4),
B(Star4),
B(LdaZero),
B(Star), R(3),
B(Star3),
B(Ldar), R(0),
/* 56 E> */ B(StaInArrayLiteral), R(4), R(3), U8(2),
B(Ldar), R(4),
B(StaInArrayLiteral), R(2), R(1), U8(4),
B(LdaSmi), I8(1),
B(Star), R(1),
B(Star1),
B(CreateArrayLiteral), U8(2), U8(6), U8(37),
B(Star), R(4),
B(Star4),
B(LdaZero),
B(Star), R(3),
B(Star3),
B(Ldar), R(0),
/* 68 E> */ B(AddSmi), I8(2), U8(7),
B(StaInArrayLiteral), R(4), R(3), U8(8),
......@@ -119,10 +119,10 @@ snippet: "
"
frame size: 1
parameter count: 1
bytecode array length: 8
bytecode array length: 7
bytecodes: [
/* 42 S> */ B(CreateArrayLiteral), U8(0), U8(0), U8(37),
B(Star), R(0),
B(Star0),
/* 64 S> */ B(CreateArrayFromIterable),
/* 68 S> */ B(Return),
]
......@@ -138,32 +138,32 @@ snippet: "
"
frame size: 6
parameter count: 1
bytecode array length: 74
bytecode array length: 67
bytecodes: [
/* 42 S> */ B(CreateArrayLiteral), U8(0), U8(0), U8(37),
B(Star), R(0),
B(Star0),
/* 52 S> */ B(CreateArrayLiteral), U8(1), U8(1), U8(37),
B(Star), R(2),
B(Star2),
B(LdaSmi), I8(1),
/* 67 S> */ B(Star), R(1),
/* 67 S> */ B(Star1),
/* 67 E> */ B(GetIterator), R(0), U8(2), U8(4),
B(JumpIfJSReceiver), U8(7),
B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
B(Star), R(4),
B(Star4),
B(LdaNamedProperty), R(4), U8(2), U8(6),
B(Star), R(3),
B(Star3),
B(CallProperty0), R(3), R(4), U8(15),
B(Star), R(5),
B(Star5),
B(JumpIfJSReceiver), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(5), U8(1),
B(LdaNamedProperty), R(5), U8(3), U8(17),
B(JumpIfToBooleanTrue), U8(19),
B(JumpIfToBooleanTrue), U8(18),
B(LdaNamedProperty), R(5), U8(4), U8(8),
B(StaInArrayLiteral), R(2), R(1), U8(13),
B(Ldar), R(1),
B(Inc), U8(12),
B(Star), R(1),
B(JumpLoop), U8(33), I8(0),
B(Star1),
B(JumpLoop), U8(31), I8(0),
B(Ldar), R(2),
/* 71 S> */ B(Return),
]
......@@ -183,14 +183,14 @@ snippet: "
"
frame size: 3
parameter count: 1
bytecode array length: 24
bytecode array length: 21
bytecodes: [
/* 42 S> */ B(CreateArrayLiteral), U8(0), U8(0), U8(37),
B(Star), R(0),
B(Star0),
/* 64 S> */ B(CreateArrayFromIterable),
B(Star), R(2),
B(Star2),
B(LdaNamedProperty), R(2), U8(1), U8(1),
B(Star), R(1),
B(Star1),
B(LdaSmi), I8(3),
B(StaInArrayLiteral), R(2), R(1), U8(3),
B(Ldar), R(2),
......
......@@ -12,20 +12,20 @@ snippet: "
"
frame size: 2
parameter count: 1
bytecode array length: 24
bytecode array length: 18
bytecodes: [
/* 42 S> */ B(LdaZero),
B(Star), R(0),
B(Star0),
/* 49 S> */ B(LdaSmi), I8(1),
B(Star), R(1),
B(Star1),
/* 52 S> */ B(LdaSmi), I8(2),
B(Star), R(0),
B(Star0),
B(LdaSmi), I8(3),
B(Star), R(1),
B(Star1),
B(LdaSmi), I8(4),
B(Star), R(0),
B(Star0),
B(LdaSmi), I8(5),
B(Star), R(1),
B(Star1),
/* 88 S> */ B(Return),
]
constant pool: [
......@@ -41,13 +41,13 @@ snippet: "
"
frame size: 2
parameter count: 1
bytecode array length: 11
bytecode array length: 8
bytecodes: [
/* 42 S> */ B(LdaSmi), I8(55),
B(Star), R(0),
B(Star0),
/* 54 S> */ B(LdaSmi), I8(100),
B(Star), R(0),
B(Star), R(1),
B(Star0),
B(Star1),
/* 74 S> */ B(Return),
]
constant pool: [
......@@ -63,19 +63,19 @@ snippet: "
"
frame size: 2
parameter count: 1
bytecode array length: 26
bytecode array length: 21
bytecodes: [
/* 42 S> */ B(LdaSmi), I8(55),
B(Star), R(0),
B(Star0),
/* 46 S> */ B(LdaSmi), I8(100),
B(Mov), R(0), R(1),
B(Star), R(0),
B(Star0),
/* 52 E> */ B(Add), R(1), U8(0),
B(Star), R(1),
B(Star1),
B(LdaSmi), I8(101),
B(Star), R(0),
B(Star0),
/* 64 E> */ B(Add), R(1), U8(1),
B(Star), R(0),
B(Star0),
/* 86 S> */ B(Return),
]
constant pool: [
......@@ -92,20 +92,20 @@ snippet: "
"
frame size: 2
parameter count: 1
bytecode array length: 27
bytecode array length: 21
bytecodes: [
/* 42 S> */ B(LdaSmi), I8(55),
B(Star), R(0),
B(Star0),
/* 46 S> */ B(LdaSmi), I8(56),
B(Star), R(0),
B(Star0),
/* 59 E> */ B(Sub), R(0), U8(1),
B(Star), R(1),
B(Star1),
B(LdaSmi), I8(57),
B(Star), R(0),
B(Star0),
/* 63 E> */ B(Add), R(1), U8(0),
B(Star), R(0),
B(Star0),
/* 75 S> */ B(Inc), U8(2),
B(Star), R(0),
B(Star0),
/* 89 S> */ B(Return),
]
constant pool: [
......@@ -121,23 +121,23 @@ snippet: "
"
frame size: 3
parameter count: 1
bytecode array length: 35
bytecode array length: 28
bytecodes: [
/* 42 S> */ B(LdaSmi), I8(55),
B(Star), R(0),
B(Star0),
/* 54 S> */ B(LdaSmi), I8(1),
B(Mov), R(0), R(2),
B(Star), R(0),
B(Star0),
/* 56 E> */ B(Add), R(2), U8(0),
B(Star), R(2),
B(Star2),
B(LdaSmi), I8(2),
B(Star), R(0),
B(Star0),
/* 66 E> */ B(Add), R(2), U8(1),
B(Star), R(2),
B(Star2),
B(LdaSmi), I8(3),
B(Star), R(0),
B(Star0),
/* 76 E> */ B(Add), R(2), U8(2),
B(Star), R(1),
B(Star1),
/* 96 S> */ B(Return),
]
constant pool: [
......@@ -153,23 +153,23 @@ snippet: "
"
frame size: 2
parameter count: 1
bytecode array length: 35
bytecode array length: 28
bytecodes: [
/* 42 S> */ B(LdaSmi), I8(55),
B(Star), R(0),
B(Star0),
/* 54 S> */ B(LdaSmi), I8(1),
B(Mov), R(0), R(1),
B(Star), R(0),
B(Star0),
/* 56 E> */ B(Add), R(1), U8(0),
B(Star), R(1),
B(Star1),
B(LdaSmi), I8(2),
B(Star), R(0),
B(Star0),
/* 66 E> */ B(Add), R(1), U8(1),
B(Star), R(1),
B(Star1),
B(LdaSmi), I8(3),
B(Star), R(0),
B(Star0),
/* 76 E> */ B(Add), R(1), U8(2),
B(Star), R(0),
B(Star0),
/* 96 S> */ B(Return),
]
constant pool: [
......@@ -184,37 +184,37 @@ snippet: "
"
frame size: 4
parameter count: 1
bytecode array length: 72
bytecode array length: 59
bytecodes: [
/* 42 S> */ B(LdaSmi), I8(10),
B(Star), R(0),
B(Star0),
/* 50 S> */ B(LdaSmi), I8(20),
B(Star), R(1),
B(Star1),
/* 54 S> */ B(LdaSmi), I8(1),
B(Mov), R(0), R(2),
B(Star), R(0),
B(Star0),
/* 63 E> */ B(Add), R(2), U8(0),
B(Star), R(2),
B(Star2),
B(Ldar), R(0),
/* 78 E> */ B(AddSmi), I8(1), U8(2),
B(Star), R(3),
B(Star3),
B(LdaSmi), I8(2),
B(Star), R(1),
B(Star1),
/* 83 E> */ B(Mul), R(3), U8(1),
/* 73 E> */ B(Add), R(2), U8(3),
B(Star), R(2),
B(Star2),
B(LdaSmi), I8(3),
B(Star), R(1),
B(Star1),
/* 93 E> */ B(Add), R(2), U8(4),
B(Star), R(2),
B(Star2),
B(LdaSmi), I8(4),
B(Star), R(0),
B(Star0),
/* 103 E> */ B(Add), R(2), U8(5),
B(Star), R(2),
B(Star2),
B(LdaSmi), I8(5),
B(Star), R(1),
B(Star1),
/* 113 E> */ B(Add), R(2), U8(6),
B(Star), R(2),
B(Star2),
B(Ldar), R(1),
/* 123 E> */ B(Add), R(2), U8(7),
/* 127 S> */ B(Return),
......@@ -231,26 +231,26 @@ snippet: "
"
frame size: 3
parameter count: 1
bytecode array length: 42
bytecode array length: 35
bytecodes: [
/* 42 S> */ B(LdaSmi), I8(17),
B(Star), R(0),
B(Star0),
/* 46 S> */ B(LdaSmi), I8(1),
B(Star), R(1),
B(Star1),
B(Ldar), R(0),
/* 55 E> */ B(Add), R(1), U8(0),
B(Star), R(1),
B(Star1),
B(Ldar), R(0),
B(ToNumeric), U8(1),
B(Star), R(2),
B(Star2),
B(Inc), U8(1),
B(Star), R(0),
B(Star0),
B(Ldar), R(2),
/* 59 E> */ B(Add), R(1), U8(2),
B(Star), R(1),
B(Star1),
B(Ldar), R(0),
B(Inc), U8(3),
B(Star), R(0),
B(Star0),
/* 67 E> */ B(Add), R(1), U8(4),
/* 75 S> */ B(Return),
]
......
......@@ -11,10 +11,10 @@ snippet: "
"
frame size: 1
parameter count: 1
bytecode array length: 17
bytecode array length: 16
bytecodes: [
/* 42 S> */ B(LdaSmi), I8(1),
B(Star), R(0),
B(Star0),
/* 45 S> */ B(JumpIfToBooleanTrue), U8(8),
B(LdaZero),
/* 56 E> */ B(TestLessThan), R(0), U8(0),
......@@ -35,10 +35,10 @@ snippet: "
"
frame size: 1
parameter count: 1
bytecode array length: 17
bytecode array length: 16
bytecodes: [
/* 42 S> */ B(LdaSmi), I8(1),
B(Star), R(0),
B(Star0),
/* 45 S> */ B(JumpIfToBooleanFalse), U8(11),
B(LdaZero),
/* 56 E> */ B(TestLessThan), R(0), U8(0),
......@@ -59,10 +59,10 @@ snippet: "
"
frame size: 1
parameter count: 1
bytecode array length: 22
bytecode array length: 20
bytecodes: [
/* 42 S> */ B(LdaSmi), I8(1),
B(Star), R(0),
B(Star0),
/* 45 S> */ B(JumpIfToBooleanTrue), U8(8),
B(LdaZero),
/* 57 E> */ B(TestLessThan), R(0), U8(0),
......@@ -70,7 +70,7 @@ bytecodes: [
B(LdaSmi), I8(2),
B(Jump), U8(4),
B(LdaSmi), I8(3),
B(Star), R(0),
B(Star0),
B(LdaUndefined),
/* 71 S> */ B(Return),
]
......
......@@ -17,12 +17,12 @@ snippet: "
"
frame size: 1
parameter count: 1
bytecode array length: 13
bytecode array length: 11
bytecodes: [
/* 42 S> */ B(LdaZero),
B(Star), R(0),
B(Star0),
/* 62 S> */ B(AddSmi), I8(1), U8(0),
B(Star), R(0),
B(Star0),
/* 69 S> */ B(Jump), U8(2),
/* 97 S> */ B(Ldar), R(0),
/* 106 S> */ B(Return),
......@@ -47,38 +47,38 @@ snippet: "
"
frame size: 4
parameter count: 1
bytecode array length: 66
bytecode array length: 59
bytecodes: [
/* 44 S> */ B(LdaZero),
B(Star), R(0),
B(Star0),
/* 71 S> */ B(LdaZero),
B(Star), R(1),
B(Star1),
/* 76 S> */ B(LdaSmi), I8(10),
/* 76 E> */ B(TestLessThan), R(1), U8(0),
B(JumpIfFalse), U8(52),
B(JumpIfFalse), U8(47),
/* 106 S> */ B(LdaZero),
B(Star), R(2),
B(Star2),
/* 111 S> */ B(LdaSmi), I8(3),
/* 111 E> */ B(TestLessThan), R(2), U8(1),
B(JumpIfFalse), U8(33),
B(JumpIfFalse), U8(30),
/* 129 S> */ B(Ldar), R(0),
B(Inc), U8(2),
B(Star), R(0),
B(Star0),
/* 142 S> */ B(Ldar), R(2),
/* 148 E> */ B(Add), R(1), U8(3),
B(Star), R(3),
B(Star3),
B(LdaSmi), I8(12),
/* 152 E> */ B(TestEqual), R(3), U8(4),
B(JumpIfFalse), U8(4),
/* 161 S> */ B(Jump), U8(20),
/* 161 S> */ B(Jump), U8(18),
/* 118 S> */ B(Ldar), R(2),
B(Inc), U8(5),
B(Star), R(2),
/* 93 E> */ B(JumpLoop), U8(35), I8(1),
B(Star2),
/* 93 E> */ B(JumpLoop), U8(32), I8(1),
/* 84 S> */ B(Ldar), R(1),
B(Inc), U8(6),
B(Star), R(1),
/* 58 E> */ B(JumpLoop), U8(54), I8(0),
B(Star1),
/* 58 E> */ B(JumpLoop), U8(49), I8(0),
/* 188 S> */ B(Ldar), R(0),
/* 199 S> */ B(Return),
]
......@@ -97,14 +97,14 @@ snippet: "
"
frame size: 3
parameter count: 1
bytecode array length: 28
bytecode array length: 27
bytecodes: [
/* 30 E> */ B(CreateBlockContext), U8(0),
B(PushContext), R(2),
B(LdaTheHole),
B(StaCurrentContextSlot), U8(2),
B(CreateClosure), U8(1), U8(0), U8(2),
B(Star), R(1),
B(Star1),
/* 53 S> */ B(LdaSmi), I8(10),
/* 53 E> */ B(StaCurrentContextSlot), U8(2),
/* 85 S> */ B(Mov), R(1), R(0),
......@@ -136,7 +136,7 @@ snippet: "
"
frame size: 4
parameter count: 1
bytecode array length: 52
bytecode array length: 51
bytecodes: [
/* 30 E> */ B(CreateFunctionContext), U8(0), U8(1),
B(PushContext), R(2),
......@@ -149,7 +149,7 @@ bytecodes: [
B(LdaTheHole),
B(StaCurrentContextSlot), U8(2),
B(CreateClosure), U8(2), U8(0), U8(2),
B(Star), R(1),
B(Star1),
/* 76 S> */ B(LdaSmi), I8(2),
/* 76 E> */ B(StaCurrentContextSlot), U8(2),
/* 113 S> */ B(Mov), R(1), R(0),
......
......@@ -11,14 +11,14 @@ snippet: "
"
frame size: 3
parameter count: 1
bytecode array length: 24
bytecode array length: 21
bytecodes: [
/* 34 S> */ B(LdaGlobal), U8(0), U8(0),
B(Star), R(1),
B(Star1),
/* 39 E> */ B(LdaNamedProperty), R(1), U8(1), U8(2),
B(Star), R(0),
B(Star0),
B(CreateArrayLiteral), U8(2), U8(4), U8(37),
B(Star), R(2),
B(Star2),
/* 39 E> */ B(CallWithSpread), R(0), R(1), U8(2), U8(5),
B(LdaUndefined),
/* 58 S> */ B(Return),
......@@ -37,16 +37,16 @@ snippet: "
"
frame size: 4
parameter count: 1
bytecode array length: 27
bytecode array length: 23
bytecodes: [
/* 34 S> */ B(LdaGlobal), U8(0), U8(0),
B(Star), R(1),
B(Star1),
/* 39 E> */ B(LdaNamedProperty), R(1), U8(1), U8(2),
B(Star), R(0),
B(Star0),
B(LdaZero),
B(Star), R(2),
B(Star2),
B(CreateArrayLiteral), U8(2), U8(4), U8(37),
B(Star), R(3),
B(Star3),
/* 39 E> */ B(CallWithSpread), R(0), R(1), U8(3), U8(5),
B(LdaUndefined),
/* 61 S> */ B(Return),
......@@ -65,37 +65,37 @@ snippet: "
"
frame size: 8
parameter count: 1
bytecode array length: 100
bytecode array length: 91
bytecodes: [
/* 34 S> */ B(LdaGlobal), U8(0), U8(0),
B(Star), R(0),
B(Star0),
B(LdaNamedProperty), R(0), U8(1), U8(2),
B(Star), R(1),
B(Star1),
B(CreateArrayLiteral), U8(2), U8(4), U8(37),
B(Star), R(4),
B(Star4),
B(LdaSmi), I8(1),
B(Star), R(3),
B(Star3),
/* 49 S> */ B(CreateArrayLiteral), U8(3), U8(5), U8(37),
B(Star), R(7),
B(Star7),
/* 49 E> */ B(GetIterator), R(7), U8(6), U8(8),
B(Mov), R(0), R(2),
B(JumpIfJSReceiver), U8(7),
B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
B(Star), R(6),
B(Star6),
B(LdaNamedProperty), R(6), U8(4), U8(10),
B(Star), R(5),
B(Star5),
B(CallProperty0), R(5), R(6), U8(19),
B(Star), R(7),
B(Star7),
B(JumpIfJSReceiver), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(7), U8(1),
B(LdaNamedProperty), R(7), U8(5), U8(21),
B(JumpIfToBooleanTrue), U8(19),
B(JumpIfToBooleanTrue), U8(18),
B(LdaNamedProperty), R(7), U8(6), U8(12),
B(StaInArrayLiteral), R(4), R(3), U8(17),
B(Ldar), R(3),
B(Inc), U8(16),
B(Star), R(3),
B(JumpLoop), U8(33), I8(0),
B(Star3),
B(JumpLoop), U8(31), I8(0),
B(LdaSmi), I8(4),
B(StaInArrayLiteral), R(4), R(3), U8(17),
B(Mov), R(4), R(3),
......
......@@ -14,10 +14,10 @@ snippet: "
"
frame size: 1
parameter count: 1
bytecode array length: 9
bytecode array length: 8
bytecodes: [
/* 32 S> */ B(LdaGlobal), U8(0), U8(0),
B(Star), R(0),
B(Star0),
/* 39 E> */ B(CallUndefinedReceiver0), R(0), U8(2),
/* 43 S> */ B(Return),
]
......@@ -35,16 +35,16 @@ snippet: "
"
frame size: 4
parameter count: 1
bytecode array length: 23
bytecode array length: 19
bytecodes: [
/* 39 S> */ B(LdaGlobal), U8(0), U8(0),
B(Star), R(0),
B(Star0),
B(LdaSmi), I8(1),
B(Star), R(1),
B(Star1),
B(LdaSmi), I8(2),
B(Star), R(2),
B(Star2),
B(LdaSmi), I8(3),
B(Star), R(3),
B(Star3),
/* 46 E> */ B(CallUndefinedReceiver), R(0), R(1), U8(3), U8(2),
/* 57 S> */ B(Return),
]
......
......@@ -11,7 +11,7 @@ snippet: "
"
frame size: 10
parameter count: 1
bytecode array length: 74
bytecode array length: 67
bytecodes: [
/* 30 E> */ B(CreateFunctionContext), U8(0), U8(4),
B(PushContext), R(1),
......@@ -24,23 +24,23 @@ bytecodes: [
/* 34 S> */ B(CreateClosure), U8(1), U8(0), U8(2),
/* 36 E> */ B(StaLookupSlot), U8(2), U8(0),
/* 52 S> */ B(LdaLookupGlobalSlot), U8(3), U8(0), U8(1),
B(Star), R(2),
B(Star2),
B(LdaConstant), U8(4),
B(Star), R(3),
B(Star3),
B(LdaZero),
B(Star), R(7),
B(Star7),
B(LdaSmi), I8(30),
B(Star), R(8),
B(Star8),
B(LdaSmi), I8(52),
B(Star), R(9),
B(Star9),
B(Mov), R(2), R(4),
B(Mov), R(3), R(5),
B(Mov), R(closure), R(6),
B(CallRuntime), U16(Runtime::kResolvePossiblyDirectEval), R(4), U8(6),
B(Star), R(2),
B(Star2),
/* 52 E> */ B(CallUndefinedReceiver1), R(2), R(3), U8(2),
/* 62 S> */ B(LdaLookupGlobalSlot), U8(2), U8(4), U8(1),
B(Star), R(2),
B(Star2),
/* 69 E> */ B(CallUndefinedReceiver0), R(2), U8(6),
/* 73 S> */ B(Return),
]
......
......@@ -14,10 +14,10 @@ snippet: "
"
frame size: 1
parameter count: 1
bytecode array length: 11
bytecode array length: 10
bytecodes: [
/* 50 S> */ B(LdaGlobal), U8(0), U8(0),
B(Star), R(0),
B(Star0),
/* 57 E> */ B(Construct), R(0), R(0), U8(0), U8(2),
/* 67 S> */ B(Return),
]
......@@ -35,12 +35,12 @@ snippet: "
"
frame size: 2
parameter count: 1
bytecode array length: 17
bytecode array length: 15
bytecodes: [
/* 63 S> */ B(LdaGlobal), U8(0), U8(0),
B(Star), R(0),
B(Star0),
B(LdaSmi), I8(3),
B(Star), R(1),
B(Star1),
B(Ldar), R(0),
/* 70 E> */ B(Construct), R(0), R(1), U8(1), U8(2),
/* 81 S> */ B(Return),
......@@ -64,16 +64,16 @@ snippet: "
"
frame size: 4
parameter count: 1
bytecode array length: 25
bytecode array length: 21
bytecodes: [
/* 105 S> */ B(LdaGlobal), U8(0), U8(0),
B(Star), R(0),
B(Star0),
B(LdaSmi), I8(3),
B(Star), R(1),
B(Star1),
B(LdaSmi), I8(4),
B(Star), R(2),
B(Star2),
B(LdaSmi), I8(5),
B(Star), R(3),
B(Star3),
B(Ldar), R(0),
/* 112 E> */ B(Construct), R(0), R(1), U8(3), U8(2),
/* 129 S> */ B(Return),
......
......@@ -48,12 +48,12 @@ snippet: "
"
frame size: 2
parameter count: 1
bytecode array length: 14
bytecode array length: 12
bytecodes: [
/* 15 S> */ B(LdaSmi), I8(1),
B(Star), R(0),
B(Star0),
B(LdaSmi), I8(2),
B(Star), R(1),
B(Star1),
B(CallRuntime), U16(Runtime::kAdd), R(0), U8(2),
/* 32 S> */ B(Return),
]
......
......@@ -22,11 +22,11 @@ snippet: "
"
frame size: 1
parameter count: 1
bytecode array length: 17
bytecode array length: 16
bytecodes: [
/* 104 S> */ B(LdaImmutableCurrentContextSlot), U8(2),
/* 117 E> */ B(LdaNamedPropertyFromSuper), R(this), U8(0), U8(1),
B(Star), R(0),
B(Star0),
/* 117 E> */ B(CallAnyReceiver), R(0), R(this), U8(1), U8(3),
/* 126 E> */ B(AddSmi), I8(1), U8(0),
/* 130 S> */ B(Return),
......@@ -54,14 +54,14 @@ snippet: "
"
frame size: 4
parameter count: 1
bytecode array length: 27
bytecode array length: 24
bytecodes: [
/* 130 S> */ B(LdaImmutableCurrentContextSlot), U8(2),
B(Star), R(1),
B(Star1),
B(LdaConstant), U8(0),
B(Star), R(2),
B(Star2),
B(LdaSmi), I8(2),
B(Star), R(3),
B(Star3),
B(Mov), R(this), R(0),
/* 138 E> */ B(CallRuntime), U16(Runtime::kStoreToSuper), R(0), U8(4),
/* 143 S> */ B(LdaImmutableCurrentContextSlot), U8(2),
......@@ -89,17 +89,17 @@ snippet: "
"
frame size: 6
parameter count: 1
bytecode array length: 41
bytecode array length: 39
bytecodes: [
B(Mov), R(closure), R(1),
/* 118 S> */ B(Ldar), R(1),
B(GetSuperConstructor), R(3),
B(LdaSmi), I8(1),
B(ThrowIfNotSuperConstructor), R(3),
B(Star), R(4),
B(Star4),
B(Ldar), R(0),
/* 118 E> */ B(Construct), R(3), R(4), U8(1), U8(0),
B(Star), R(5),
B(Star5),
B(Ldar), R(this),
B(ThrowSuperAlreadyCalledIfNotHole),
B(Mov), R(5), R(this),
......@@ -132,7 +132,7 @@ snippet: "
"
frame size: 5
parameter count: 1
bytecode array length: 37
bytecode array length: 36
bytecodes: [
B(Mov), R(closure), R(1),
/* 117 S> */ B(Ldar), R(1),
......@@ -140,7 +140,7 @@ bytecodes: [
B(ThrowIfNotSuperConstructor), R(3),
B(Ldar), R(0),
/* 117 E> */ B(Construct), R(3), R(0), U8(0), U8(0),
B(Star), R(4),
B(Star4),
B(Ldar), R(this),
B(ThrowSuperAlreadyCalledIfNotHole),
B(Mov), R(4), R(this),
......
......@@ -14,21 +14,21 @@ snippet: "
"
frame size: 7
parameter count: 1
bytecode array length: 40
bytecode array length: 35
bytecodes: [
/* 30 E> */ B(CreateBlockContext), U8(0),
B(PushContext), R(1),
B(LdaTheHole),
B(Star), R(5),
B(Star5),
B(CreateClosure), U8(2), U8(0), U8(2),
B(Star), R(2),
B(Star2),
B(LdaConstant), U8(1),
B(Star), R(3),
B(Star3),
B(CreateClosure), U8(3), U8(1), U8(2),
B(Star), R(6),
B(Star6),
B(Mov), R(2), R(4),
B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(4),
B(Star), R(3),
B(Star3),
B(PopContext), R(1),
B(Mov), R(4), R(0),
B(LdaUndefined),
......@@ -52,21 +52,21 @@ snippet: "
"
frame size: 7
parameter count: 1
bytecode array length: 40
bytecode array length: 35
bytecodes: [
/* 30 E> */ B(CreateBlockContext), U8(0),
B(PushContext), R(1),
B(LdaTheHole),
B(Star), R(5),
B(Star5),
B(CreateClosure), U8(2), U8(0), U8(2),
B(Star), R(2),
B(Star2),
B(LdaConstant), U8(1),
B(Star), R(3),
B(Star3),
B(CreateClosure), U8(3), U8(1), U8(2),
B(Star), R(6),
B(Star6),
B(Mov), R(2), R(4),
B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(4),
B(Star), R(3),
B(Star3),
B(PopContext), R(1),
B(Mov), R(4), R(0),
B(LdaUndefined),
......@@ -92,7 +92,7 @@ snippet: "
"
frame size: 11
parameter count: 1
bytecode array length: 83
bytecode array length: 77
bytecodes: [
/* 30 E> */ B(CreateFunctionContext), U8(0), U8(2),
B(PushContext), R(1),
......@@ -103,15 +103,15 @@ bytecodes: [
B(CreateBlockContext), U8(3),
B(PushContext), R(2),
B(LdaTheHole),
B(Star), R(6),
B(Star6),
B(CreateClosure), U8(5), U8(0), U8(2),
B(Star), R(3),
B(Star3),
B(LdaConstant), U8(4),
B(Star), R(4),
B(Star4),
/* 75 S> */ B(LdaImmutableContextSlot), R(2), U8(2), U8(0),
B(ToName), R(7),
B(CreateClosure), U8(6), U8(1), U8(2),
B(Star), R(8),
B(Star8),
/* 106 S> */ B(LdaImmutableContextSlot), R(2), U8(3), U8(0),
B(ToName), R(9),
B(LdaConstant), U8(7),
......@@ -120,9 +120,9 @@ bytecodes: [
B(JumpIfFalse), U8(7),
B(CallRuntime), U16(Runtime::kThrowStaticPrototypeError), R(0), U8(0),
B(CreateClosure), U8(8), U8(2), U8(2),
B(Star), R(10),
B(Star10),
B(CallRuntime), U16(Runtime::kDefineClass), R(4), U8(7),
B(Star), R(4),
B(Star4),
B(PopContext), R(2),
B(Mov), R(3), R(0),
B(LdaUndefined),
......@@ -150,7 +150,7 @@ snippet: "
"
frame size: 7
parameter count: 1
bytecode array length: 48
bytecode array length: 44
bytecodes: [
/* 30 E> */ B(CreateFunctionContext), U8(0), U8(1),
B(PushContext), R(1),
......@@ -159,14 +159,14 @@ bytecodes: [
B(CreateBlockContext), U8(1),
B(PushContext), R(2),
B(LdaTheHole),
B(Star), R(6),
B(Star6),
B(CreateClosure), U8(3), U8(0), U8(2),
B(Star), R(3),
B(Star3),
B(LdaConstant), U8(2),
B(Star), R(4),
B(Star4),
B(Mov), R(3), R(5),
B(CallRuntime), U16(Runtime::kDefineClass), R(4), U8(3),
B(Star), R(4),
B(Star4),
B(PopContext), R(2),
B(Mov), R(5), R(0),
/* 87 S> */ B(Ldar), R(0),
......@@ -189,33 +189,33 @@ snippet: "
"
frame size: 7
parameter count: 1
bytecode array length: 69
bytecode array length: 60
bytecodes: [
/* 34 S> */ B(CreateBlockContext), U8(0),
B(PushContext), R(1),
B(LdaTheHole),
B(Star), R(5),
B(Star5),
B(CreateClosure), U8(2), U8(0), U8(2),
B(Star), R(2),
B(Star2),
B(LdaConstant), U8(1),
B(Star), R(3),
B(Star3),
B(Mov), R(2), R(4),
B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(3),
B(Star), R(3),
B(Star3),
B(PopContext), R(1),
B(CreateBlockContext), U8(3),
B(PushContext), R(1),
B(LdaTheHole),
B(Star), R(5),
B(Star5),
B(CreateClosure), U8(5), U8(1), U8(2),
B(Star), R(2),
B(Star2),
B(LdaConstant), U8(4),
B(Star), R(3),
B(Star3),
B(CreateClosure), U8(6), U8(2), U8(2),
B(Star), R(6),
B(Star6),
B(Mov), R(2), R(4),
B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(4),
B(Star), R(3),
B(Star3),
B(PopContext), R(1),
B(Mov), R(4), R(0),
B(LdaUndefined),
......
......@@ -12,10 +12,10 @@ snippet: "
"
frame size: 1
parameter count: 1
bytecode array length: 6
bytecode array length: 5
bytecodes: [
/* 42 S> */ B(LdaSmi), I8(1),
B(Star), R(0),
B(Star0),
/* 45 S> */ B(TestNull),
/* 63 S> */ B(Return),
]
......@@ -31,10 +31,10 @@ snippet: "
"
frame size: 1
parameter count: 1
bytecode array length: 5
bytecode array length: 4
bytecodes: [
/* 42 S> */ B(LdaUndefined),
B(Star), R(0),
B(Star0),
/* 53 S> */ B(TestUndefined),
/* 76 S> */ B(Return),
]
......@@ -50,10 +50,10 @@ snippet: "
"
frame size: 1
parameter count: 1
bytecode array length: 6
bytecode array length: 5
bytecodes: [
/* 42 S> */ B(LdaUndefined),
B(Star), R(0),
B(Star0),
/* 53 S> */ B(TestUndefined),
/* 70 E> */ B(LogicalNot),
/* 76 S> */ B(Return),
......@@ -70,10 +70,10 @@ snippet: "
"
frame size: 1
parameter count: 1
bytecode array length: 7
bytecode array length: 6
bytecodes: [
/* 42 S> */ B(LdaSmi), I8(2),
B(Star), R(0),
B(Star0),
/* 45 S> */ B(TestUndetectable),
/* 54 E> */ B(LogicalNot),
/* 62 S> */ B(Return),
......@@ -90,10 +90,10 @@ snippet: "
"
frame size: 1
parameter count: 1
bytecode array length: 5
bytecode array length: 4
bytecodes: [
/* 42 S> */ B(LdaUndefined),
B(Star), R(0),
B(Star0),
/* 53 S> */ B(TestUndetectable),
/* 75 S> */ B(Return),
]
......@@ -109,10 +109,10 @@ snippet: "
"
frame size: 1
parameter count: 1
bytecode array length: 12
bytecode array length: 11
bytecodes: [
/* 42 S> */ B(LdaUndefined),
B(Star), R(0),
B(Star0),
/* 53 S> */ B(JumpIfNotUndefined), U8(6),
B(LdaSmi), I8(1),
B(Jump), U8(4),
......@@ -131,10 +131,10 @@ snippet: "
"
frame size: 1
parameter count: 1
bytecode array length: 13
bytecode array length: 12
bytecodes: [
/* 42 S> */ B(LdaZero),
B(Star), R(0),
B(Star0),
/* 45 S> */ B(TestUndetectable),
B(JumpIfFalse), U8(6),
B(LdaSmi), I8(1),
......@@ -154,10 +154,10 @@ snippet: "
"
frame size: 1
parameter count: 1
bytecode array length: 12
bytecode array length: 11
bytecodes: [
/* 42 S> */ B(LdaZero),
B(Star), R(0),
B(Star0),
/* 45 S> */ B(JumpIfUndefined), U8(6),
B(LdaSmi), I8(1),
B(Jump), U8(4),
......@@ -176,10 +176,10 @@ snippet: "
"
frame size: 1
parameter count: 1
bytecode array length: 12
bytecode array length: 11
bytecodes: [
/* 42 S> */ B(LdaZero),
B(Star), R(0),
B(Star0),
/* 45 S> */ B(JumpIfNotNull), U8(6),
B(LdaSmi), I8(1),
B(Jump), U8(4),
......@@ -202,10 +202,10 @@ snippet: "
"
frame size: 1
parameter count: 1
bytecode array length: 11
bytecode array length: 10
bytecodes: [
/* 42 S> */ B(LdaZero),
B(Star), R(0),
B(Star0),
/* 45 S> */ B(JumpIfNotNull), U8(5),
/* 65 S> */ B(LdaSmi), I8(1),
/* 74 S> */ B(Return),
......@@ -226,10 +226,10 @@ snippet: "
"
frame size: 1
parameter count: 1
bytecode array length: 11
bytecode array length: 10
bytecodes: [
/* 42 S> */ B(LdaZero),
B(Star), R(0),
B(Star0),
/* 45 S> */ B(TestUndetectable),
B(JumpIfTrue), U8(5),
/* 69 S> */ B(LdaSmi), I8(1),
......@@ -252,18 +252,18 @@ snippet: "
"
frame size: 2
parameter count: 1
bytecode array length: 21
bytecode array length: 18
bytecodes: [
/* 42 S> */ B(LdaUndefined),
B(Star), R(0),
B(Star0),
/* 61 S> */ B(LdaZero),
B(Star), R(1),
B(Star1),
/* 73 S> */ B(Ldar), R(0),
B(JumpIfUndefined), U8(11),
B(JumpIfUndefined), U8(10),
/* 92 S> */ B(Ldar), R(1),
B(Inc), U8(0),
B(Star), R(1),
/* 64 E> */ B(JumpLoop), U8(10), I8(0),
B(Star1),
/* 64 E> */ B(JumpLoop), U8(9), I8(0),
B(LdaUndefined),
/* 99 S> */ B(Return),
]
......
......@@ -11,12 +11,12 @@ snippet: "
"
frame size: 1
parameter count: 1
bytecode array length: 11
bytecode array length: 9
bytecodes: [
/* 42 S> */ B(LdaSmi), I8(1),
B(Star), R(0),
B(Star0),
/* 45 S> */ B(AddSmi), I8(2), U8(0),
B(Star), R(0),
B(Star0),
B(LdaUndefined),
/* 53 S> */ B(Return),
]
......@@ -31,12 +31,12 @@ snippet: "
"
frame size: 1
parameter count: 1
bytecode array length: 11
bytecode array length: 9
bytecodes: [
/* 42 S> */ B(LdaSmi), I8(1),
B(Star), R(0),
B(Star0),
/* 45 S> */ B(DivSmi), I8(2), U8(0),
B(Star), R(0),
B(Star0),
B(LdaUndefined),
/* 53 S> */ B(Return),
]
......@@ -51,10 +51,10 @@ snippet: "
"
frame size: 1
parameter count: 1
bytecode array length: 19
bytecode array length: 18
bytecodes: [
/* 42 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(41),
B(Star), R(0),
B(Star0),
/* 54 S> */ B(LdaNamedProperty), R(0), U8(1), U8(1),
B(MulSmi), I8(2), U8(3),
/* 61 E> */ B(StaNamedProperty), R(0), U8(1), U8(4),
......@@ -74,12 +74,12 @@ snippet: "
"
frame size: 3
parameter count: 1
bytecode array length: 22
bytecode array length: 20
bytecodes: [
/* 42 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(41),
B(Star), R(0),
B(Star0),
/* 52 S> */ B(LdaSmi), I8(1),
B(Star), R(2),
B(Star2),
B(LdaKeyedProperty), R(0), U8(1),
B(BitwiseXorSmi), I8(2), U8(3),
/* 57 E> */ B(StaKeyedProperty), R(0), R(2), U8(4),
......
......@@ -43,10 +43,10 @@ snippet: "
"
frame size: 1
parameter count: 1
bytecode array length: 17
bytecode array length: 16
bytecodes: [
/* 34 S> */ B(LdaZero),
B(Star), R(0),
B(Star0),
B(LdaSmi), I8(1),
/* 43 E> */ B(TestLessThan), R(0), U8(0),
B(JumpIfFalse), U8(6),
......@@ -67,10 +67,10 @@ snippet: "
"
frame size: 1
parameter count: 1
bytecode array length: 12
bytecode array length: 11
bytecodes: [
/* 42 S> */ B(LdaZero),
B(Star), R(0),
B(Star0),
/* 45 S> */ B(JumpIfToBooleanFalse), U8(6),
B(LdaSmi), I8(2),
B(Jump), U8(4),
......
......@@ -11,10 +11,10 @@ snippet: "
"
frame size: 1
parameter count: 1
bytecode array length: 6
bytecode array length: 5
bytecodes: [
/* 44 S> */ B(LdaSmi), I8(10),
B(Star), R(0),
B(Star0),
B(LdaUndefined),
/* 48 S> */ B(Return),
]
......@@ -29,10 +29,10 @@ snippet: "
"
frame size: 1
parameter count: 1
bytecode array length: 5
bytecode array length: 4
bytecodes: [
/* 44 S> */ B(LdaSmi), I8(10),
B(Star), R(0),
B(Star0),
/* 57 S> */ B(Return),
]
constant pool: [
......@@ -46,16 +46,16 @@ snippet: "
"
frame size: 2
parameter count: 1
bytecode array length: 20
bytecode array length: 17
bytecodes: [
B(LdaTheHole),
B(Star), R(0),
B(Star0),
/* 44 S> */ B(LdaSmi), I8(20),
B(Star), R(1),
B(Star1),
B(Ldar), R(0),
/* 48 E> */ B(ThrowReferenceErrorIfHole), U8(0),
B(CallRuntime), U16(Runtime::kThrowConstAssignError), R(0), U8(0),
B(Star), R(0),
B(Star0),
B(LdaUndefined),
/* 55 S> */ B(Return),
]
......@@ -71,10 +71,10 @@ snippet: "
"
frame size: 1
parameter count: 1
bytecode array length: 13
bytecode array length: 12
bytecodes: [
/* 44 S> */ B(LdaSmi), I8(10),
B(Star), R(0),
B(Star0),
/* 48 S> */ B(LdaSmi), I8(20),
/* 50 E> */ B(CallRuntime), U16(Runtime::kThrowConstAssignError), R(0), U8(0),
B(LdaUndefined),
......
......@@ -57,14 +57,14 @@ snippet: "
"
frame size: 2
parameter count: 1
bytecode array length: 25
bytecode array length: 24
bytecodes: [
/* 30 E> */ B(CreateFunctionContext), U8(0), U8(1),
B(PushContext), R(0),
B(LdaTheHole),
B(StaCurrentContextSlot), U8(2),
/* 44 S> */ B(LdaSmi), I8(20),
B(Star), R(1),
B(Star1),
B(LdaCurrentContextSlot), U8(2),
/* 47 E> */ B(ThrowReferenceErrorIfHole), U8(1),
B(CallRuntime), U16(Runtime::kThrowConstAssignError), R(0), U8(0),
......
......@@ -36,14 +36,14 @@ snippet: "
"
frame size: 2
parameter count: 2
bytecode array length: 18
bytecode array length: 17
bytecodes: [
/* 10 E> */ B(CreateFunctionContext), U8(0), U8(1),
B(PushContext), R(1),
B(Ldar), R(arg0),
B(StaCurrentContextSlot), U8(2),
/* 27 S> */ B(CreateClosure), U8(1), U8(0), U8(2),
B(Star), R(0),
B(Star0),
/* 53 S> */ B(LdaCurrentContextSlot), U8(2),
/* 65 S> */ B(Return),
]
......
......@@ -77,12 +77,12 @@ snippet: "
"
frame size: 2
parameter count: 1
bytecode array length: 17
bytecode array length: 16
bytecodes: [
/* 30 E> */ B(CreateFunctionContext), U8(0), U8(1),
B(PushContext), R(0),
/* 41 S> */ B(CreateClosure), U8(1), U8(0), U8(2),
B(Star), R(1),
B(Star1),
/* 64 E> */ B(CallUndefinedReceiver0), R(1), U8(0),
/* 68 S> */ B(LdaCurrentContextSlot), U8(2),
/* 77 S> */ B(Return),
......@@ -388,7 +388,7 @@ snippet: "
"
frame size: 3
parameter count: 1
bytecode array length: 796
bytecode array length: 795
bytecodes: [
/* 30 E> */ B(Wide), B(CreateFunctionContext), U16(0), U16(256),
B(PushContext), R(1),
......@@ -903,7 +903,7 @@ bytecodes: [
/* 3721 S> */ B(LdaZero),
/* 3721 E> */ B(StaCurrentContextSlot), U8(255),
/* 3724 S> */ B(LdaGlobal), U8(1), U8(0),
B(Star), R(2),
B(Star2),
/* 3724 E> */ B(CallUndefinedReceiver0), R(2), U8(2),
/* 3740 S> */ B(LdaSmi), I8(100),
/* 3740 E> */ B(Wide), B(StaCurrentContextSlot), U16(256),
......
......@@ -11,12 +11,12 @@ snippet: "
"
frame size: 1
parameter count: 1
bytecode array length: 9
bytecode array length: 7
bytecodes: [
/* 42 S> */ B(LdaSmi), I8(1),
B(Star), R(0),
B(Star0),
/* 45 S> */ B(Inc), U8(0),
B(Star), R(0),
B(Star0),
/* 56 S> */ B(Return),
]
constant pool: [
......@@ -30,14 +30,14 @@ snippet: "
"
frame size: 2
parameter count: 1
bytecode array length: 15
bytecode array length: 12
bytecodes: [
/* 42 S> */ B(LdaSmi), I8(1),
B(Star), R(0),
B(Star0),
/* 45 S> */ B(ToNumeric), U8(0),
B(Star), R(1),
B(Star1),
B(Inc), U8(0),
B(Star), R(0),
B(Star0),
B(Ldar), R(1),
/* 56 S> */ B(Return),
]
......@@ -52,12 +52,12 @@ snippet: "
"
frame size: 1
parameter count: 1
bytecode array length: 9
bytecode array length: 7
bytecodes: [
/* 42 S> */ B(LdaSmi), I8(1),
B(Star), R(0),
B(Star0),
/* 45 S> */ B(Dec), U8(0),
B(Star), R(0),
B(Star0),
/* 56 S> */ B(Return),
]
constant pool: [
......@@ -71,14 +71,14 @@ snippet: "
"
frame size: 2
parameter count: 1
bytecode array length: 15
bytecode array length: 12
bytecodes: [
/* 42 S> */ B(LdaSmi), I8(1),
B(Star), R(0),
B(Star0),
/* 45 S> */ B(ToNumeric), U8(0),
B(Star), R(1),
B(Star1),
B(Dec), U8(0),
B(Star), R(0),
B(Star0),
B(Ldar), R(1),
/* 56 S> */ B(Return),
]
......@@ -93,15 +93,15 @@ snippet: "
"
frame size: 4
parameter count: 1
bytecode array length: 25
bytecode array length: 22
bytecodes: [
/* 42 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(41),
B(Star), R(0),
B(Star0),
/* 54 S> */ B(LdaNamedProperty), R(0), U8(1), U8(1),
B(ToNumeric), U8(3),
B(Star), R(2),
B(Star2),
B(Inc), U8(3),
B(Star), R(3),
B(Star3),
/* 66 E> */ B(StaNamedProperty), R(0), U8(1), U8(4),
B(Ldar), R(2),
/* 69 S> */ B(Return),
......@@ -119,13 +119,13 @@ snippet: "
"
frame size: 3
parameter count: 1
bytecode array length: 21
bytecode array length: 19
bytecodes: [
/* 42 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(41),
B(Star), R(0),
B(Star0),
/* 54 S> */ B(LdaNamedProperty), R(0), U8(1), U8(1),
B(Dec), U8(3),
B(Star), R(2),
B(Star2),
/* 65 E> */ B(StaNamedProperty), R(0), U8(1), U8(4),
B(Ldar), R(2),
/* 69 S> */ B(Return),
......@@ -143,18 +143,18 @@ snippet: "
"
frame size: 6
parameter count: 1
bytecode array length: 30
bytecode array length: 26
bytecodes: [
/* 45 S> */ B(LdaConstant), U8(0),
B(Star), R(0),
B(Star0),
/* 60 S> */ B(CreateObjectLiteral), U8(1), U8(0), U8(41),
B(Star), R(1),
B(Star1),
/* 72 S> */ B(Ldar), R(0),
/* 81 E> */ B(LdaKeyedProperty), R(1), U8(1),
B(ToNumeric), U8(3),
B(Star), R(4),
B(Star4),
B(Dec), U8(3),
B(Star), R(5),
B(Star5),
/* 86 E> */ B(StaKeyedProperty), R(1), R(0), U8(4),
B(Ldar), R(4),
/* 89 S> */ B(Return),
......@@ -172,16 +172,16 @@ snippet: "
"
frame size: 5
parameter count: 1
bytecode array length: 26
bytecode array length: 23
bytecodes: [
/* 45 S> */ B(LdaConstant), U8(0),
B(Star), R(0),
B(Star0),
/* 60 S> */ B(CreateObjectLiteral), U8(1), U8(0), U8(41),
B(Star), R(1),
B(Star1),
/* 72 S> */ B(Ldar), R(0),
/* 83 E> */ B(LdaKeyedProperty), R(1), U8(1),
B(Inc), U8(3),
B(Star), R(4),
B(Star4),
/* 87 E> */ B(StaKeyedProperty), R(1), R(0), U8(4),
B(Ldar), R(4),
/* 89 S> */ B(Return),
......@@ -199,14 +199,14 @@ snippet: "
"
frame size: 2
parameter count: 1
bytecode array length: 22
bytecode array length: 21
bytecodes: [
/* 30 E> */ B(CreateFunctionContext), U8(0), U8(1),
B(PushContext), R(1),
/* 42 S> */ B(LdaSmi), I8(1),
/* 42 E> */ B(StaCurrentContextSlot), U8(2),
/* 53 S> */ B(CreateClosure), U8(1), U8(0), U8(2),
B(Star), R(0),
B(Star0),
/* 78 S> */ B(LdaCurrentContextSlot), U8(2),
B(Inc), U8(0),
/* 87 E> */ B(StaCurrentContextSlot), U8(2),
......@@ -225,17 +225,17 @@ snippet: "
"
frame size: 3
parameter count: 1
bytecode array length: 28
bytecode array length: 26
bytecodes: [
/* 30 E> */ B(CreateFunctionContext), U8(0), U8(1),
B(PushContext), R(1),
/* 42 S> */ B(LdaSmi), I8(1),
/* 42 E> */ B(StaCurrentContextSlot), U8(2),
/* 53 S> */ B(CreateClosure), U8(1), U8(0), U8(2),
B(Star), R(0),
B(Star0),
/* 78 S> */ B(LdaCurrentContextSlot), U8(2),
B(ToNumeric), U8(0),
B(Star), R(2),
B(Star2),
B(Dec), U8(0),
/* 86 E> */ B(StaCurrentContextSlot), U8(2),
B(Ldar), R(2),
......@@ -254,19 +254,19 @@ snippet: "
"
frame size: 5
parameter count: 1
bytecode array length: 31
bytecode array length: 26
bytecodes: [
/* 44 S> */ B(LdaSmi), I8(1),
B(Star), R(0),
B(Star0),
/* 55 S> */ B(CreateArrayLiteral), U8(0), U8(0), U8(37),
B(Star), R(1),
B(Star1),
/* 63 S> */ B(Ldar), R(0),
B(ToNumeric), U8(1),
B(Star), R(3),
B(Star3),
B(Inc), U8(1),
B(Star), R(0),
B(Star0),
B(LdaSmi), I8(2),
B(Star), R(4),
B(Star4),
/* 79 E> */ B(StaKeyedProperty), R(1), R(3), U8(2),
B(Ldar), R(4),
/* 83 S> */ B(Return),
......
......@@ -13,10 +13,10 @@ snippet: "
"
frame size: 1
parameter count: 1
bytecode array length: 4
bytecode array length: 3
bytecodes: [
/* 10 E> */ B(CreateMappedArguments),
B(Star), R(0),
B(Star0),
/* 32 S> */ B(Return),
]
constant pool: [
......@@ -31,10 +31,10 @@ snippet: "
"
frame size: 1
parameter count: 1
bytecode array length: 8
bytecode array length: 7
bytecodes: [
/* 10 E> */ B(CreateMappedArguments),
B(Star), R(0),
B(Star0),
/* 15 S> */ B(LdaZero),
/* 31 E> */ B(LdaKeyedProperty), R(0), U8(0),
/* 35 S> */ B(Return),
......@@ -51,10 +51,10 @@ snippet: "
"
frame size: 1
parameter count: 1
bytecode array length: 4
bytecode array length: 3
bytecodes: [
/* 10 E> */ B(CreateUnmappedArguments),
B(Star), R(0),
B(Star0),
/* 46 S> */ B(Return),
]
constant pool: [
......@@ -69,14 +69,14 @@ snippet: "
"
frame size: 2
parameter count: 2
bytecode array length: 17
bytecode array length: 16
bytecodes: [
/* 10 E> */ B(CreateFunctionContext), U8(0), U8(1),
B(PushContext), R(1),
B(Ldar), R(arg0),
B(StaCurrentContextSlot), U8(2),
B(CreateMappedArguments),
B(Star), R(0),
B(Star0),
/* 16 S> */ B(LdaZero),
/* 32 E> */ B(LdaKeyedProperty), R(0), U8(0),
/* 36 S> */ B(Return),
......@@ -94,7 +94,7 @@ snippet: "
"
frame size: 2
parameter count: 4
bytecode array length: 21
bytecode array length: 20
bytecodes: [
/* 10 E> */ B(CreateFunctionContext), U8(0), U8(3),
B(PushContext), R(1),
......@@ -105,7 +105,7 @@ bytecodes: [
B(Ldar), R(arg2),
B(StaCurrentContextSlot), U8(2),
B(CreateMappedArguments),
B(Star), R(0),
B(Star0),
/* 39 S> */ B(Return),
]
constant pool: [
......@@ -121,10 +121,10 @@ snippet: "
"
frame size: 1
parameter count: 4
bytecode array length: 4
bytecode array length: 3
bytecodes: [
/* 10 E> */ B(CreateUnmappedArguments),
B(Star), R(0),
B(Star0),
/* 53 S> */ B(Return),
]
constant pool: [
......
......@@ -13,11 +13,11 @@ snippet: "
"
frame size: 2
parameter count: 1
bytecode array length: 6
bytecode array length: 4
bytecodes: [
/* 10 E> */ B(CreateRestParameter),
B(Star), R(1),
B(Star), R(0),
B(Star1),
B(Star0),
/* 42 S> */ B(Return),
]
constant pool: [
......@@ -32,10 +32,10 @@ snippet: "
"
frame size: 3
parameter count: 2
bytecode array length: 12
bytecode array length: 11
bytecodes: [
/* 10 E> */ B(CreateRestParameter),
B(Star), R(2),
B(Star2),
B(Mov), R(arg0), R(0),
B(Mov), R(2), R(1),
/* 29 S> */ B(Ldar), R(1),
......@@ -53,10 +53,10 @@ snippet: "
"
frame size: 3
parameter count: 2
bytecode array length: 14
bytecode array length: 13
bytecodes: [
/* 10 E> */ B(CreateRestParameter),
B(Star), R(2),
B(Star2),
B(Mov), R(arg0), R(0),
B(Mov), R(2), R(1),
/* 29 S> */ B(LdaZero),
......@@ -75,17 +75,17 @@ snippet: "
"
frame size: 5
parameter count: 2
bytecode array length: 26
bytecode array length: 23
bytecodes: [
/* 10 E> */ B(CreateUnmappedArguments),
B(Star), R(3),
B(Star3),
B(CreateRestParameter),
B(Star), R(2),
B(Star2),
B(Mov), R(arg0), R(0),
B(Mov), R(2), R(1),
/* 29 S> */ B(LdaZero),
/* 44 E> */ B(LdaKeyedProperty), R(1), U8(1),
B(Star), R(4),
B(Star4),
B(LdaZero),
/* 59 E> */ B(LdaKeyedProperty), R(3), U8(3),
/* 48 E> */ B(Add), R(4), U8(0),
......
......@@ -27,10 +27,10 @@ snippet: "
"
frame size: 1
parameter count: 1
bytecode array length: 6
bytecode array length: 5
bytecodes: [
/* 66 S> */ B(LdaSmi), I8(1),
B(Star), R(0),
B(Star0),
B(LdaUndefined),
/* 69 S> */ B(Return),
]
......@@ -61,10 +61,10 @@ snippet: "
"
frame size: 1
parameter count: 1
bytecode array length: 12
bytecode array length: 11
bytecodes: [
/* 42 S> */ B(LdaSmi), I8(1),
B(Star), R(0),
B(Star0),
/* 45 S> */ B(JumpIfToBooleanFalse), U8(5),
/* 54 S> */ B(LdaSmi), I8(1),
/* 63 S> */ B(Return),
......
......@@ -12,10 +12,10 @@ snippet: "
"
frame size: 3
parameter count: 1
bytecode array length: 19
bytecode array length: 18
bytecodes: [
B(LdaConstant), U8(0),
B(Star), R(1),
B(Star1),
B(Mov), R(closure), R(2),
/* 0 E> */ B(CallRuntime), U16(Runtime::kDeclareGlobals), R(1), U8(2),
/* 8 S> */ B(LdaSmi), I8(1),
......@@ -36,10 +36,10 @@ snippet: "
"
frame size: 2
parameter count: 1
bytecode array length: 14
bytecode array length: 13
bytecodes: [
B(LdaConstant), U8(0),
B(Star), R(0),
B(Star0),
B(Mov), R(closure), R(1),
/* 0 E> */ B(CallRuntime), U16(Runtime::kDeclareGlobals), R(0), U8(2),
B(LdaUndefined),
......@@ -58,17 +58,17 @@ snippet: "
"
frame size: 3
parameter count: 1
bytecode array length: 25
bytecode array length: 23
bytecodes: [
B(LdaConstant), U8(0),
B(Star), R(1),
B(Star1),
B(Mov), R(closure), R(2),
/* 0 E> */ B(CallRuntime), U16(Runtime::kDeclareGlobals), R(1), U8(2),
/* 8 S> */ B(LdaSmi), I8(1),
/* 8 E> */ B(StaGlobal), U8(1), U8(0),
/* 11 S> */ B(LdaSmi), I8(2),
/* 12 E> */ B(StaGlobal), U8(1), U8(0),
B(Star), R(0),
B(Star0),
/* 16 S> */ B(Return),
]
constant pool: [
......@@ -85,16 +85,16 @@ snippet: "
"
frame size: 3
parameter count: 1
bytecode array length: 23
bytecode array length: 20
bytecodes: [
B(LdaConstant), U8(0),
B(Star), R(1),
B(Star1),
B(Mov), R(closure), R(2),
/* 0 E> */ B(CallRuntime), U16(Runtime::kDeclareGlobals), R(1), U8(2),
/* 16 S> */ B(LdaGlobal), U8(1), U8(0),
B(Star), R(1),
B(Star1),
/* 16 E> */ B(CallUndefinedReceiver0), R(1), U8(2),
B(Star), R(0),
B(Star0),
/* 21 S> */ B(Return),
]
constant pool: [
......
......@@ -11,10 +11,10 @@ snippet: "
"
frame size: 1
parameter count: 1
bytecode array length: 11
bytecode array length: 10
bytecodes: [
/* 42 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(41),
B(Star), R(0),
B(Star0),
/* 56 S> */ B(LdaConstant), U8(1),
B(DeletePropertySloppy), R(0),
/* 74 S> */ B(Return),
......@@ -32,10 +32,10 @@ snippet: "
"
frame size: 1
parameter count: 1
bytecode array length: 11
bytecode array length: 10
bytecodes: [
/* 56 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(41),
B(Star), R(0),
B(Star0),
/* 70 S> */ B(LdaConstant), U8(1),
B(DeletePropertyStrict), R(0),
/* 88 S> */ B(Return),
......@@ -53,10 +53,10 @@ snippet: "
"
frame size: 1
parameter count: 1
bytecode array length: 11
bytecode array length: 10
bytecodes: [
/* 42 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(41),
B(Star), R(0),
B(Star0),
/* 56 S> */ B(LdaSmi), I8(2),
B(DeletePropertySloppy), R(0),
/* 75 S> */ B(Return),
......@@ -73,10 +73,10 @@ snippet: "
"
frame size: 1
parameter count: 1
bytecode array length: 6
bytecode array length: 5
bytecodes: [
/* 42 S> */ B(LdaSmi), I8(10),
B(Star), R(0),
B(Star0),
/* 46 S> */ B(LdaFalse),
/* 62 S> */ B(Return),
]
......@@ -94,7 +94,7 @@ snippet: "
"
frame size: 2
parameter count: 1
bytecode array length: 24
bytecode array length: 23
bytecodes: [
/* 30 E> */ B(CreateFunctionContext), U8(0), U8(1),
B(PushContext), R(0),
......@@ -102,7 +102,7 @@ bytecodes: [
/* 56 E> */ B(StaCurrentContextSlot), U8(2),
/* 64 S> */ B(CreateClosure), U8(2), U8(0), U8(2),
/* 93 S> */ B(LdaImmutableCurrentContextSlot), U8(2),
B(Star), R(1),
B(Star1),
B(LdaSmi), I8(1),
B(DeletePropertyStrict), R(1),
/* 112 S> */ B(Return),
......
......@@ -19,10 +19,10 @@ snippet: "
"
frame size: 1
parameter count: 1
bytecode array length: 11
bytecode array length: 10
bytecodes: [
/* 15 S> */ B(LdaConstant), U8(0),
B(Star), R(0),
B(Star0),
B(CallRuntime), U16(Runtime::kDeleteLookupSlot), R(0), U8(1),
B(LdaUndefined),
/* 25 S> */ B(Return),
......@@ -69,10 +69,10 @@ snippet: "
"
frame size: 1
parameter count: 1
bytecode array length: 10
bytecode array length: 9
bytecodes: [
/* 15 S> */ B(LdaConstant), U8(0),
B(Star), R(0),
B(Star0),
B(CallRuntime), U16(Runtime::kDeleteLookupSlot), R(0), U8(1),
/* 31 S> */ B(Return),
]
......
......@@ -11,7 +11,7 @@ snippet: "
"
frame size: 10
parameter count: 1
bytecode array length: 58
bytecode array length: 52
bytecodes: [
/* 30 E> */ B(CreateFunctionContext), U8(0), U8(4),
B(PushContext), R(1),
......@@ -22,20 +22,20 @@ bytecodes: [
B(Ldar), R(0),
B(StaCurrentContextSlot), U8(4),
/* 34 S> */ B(LdaLookupGlobalSlot), U8(1), U8(0), U8(1),
B(Star), R(2),
B(Star2),
B(LdaConstant), U8(2),
B(Star), R(3),
B(Star3),
B(LdaZero),
B(Star), R(7),
B(Star7),
B(LdaSmi), I8(30),
B(Star), R(8),
B(Star8),
B(LdaSmi), I8(41),
B(Star), R(9),
B(Star9),
B(Mov), R(2), R(4),
B(Mov), R(3), R(5),
B(Mov), R(closure), R(6),
B(CallRuntime), U16(Runtime::kResolvePossiblyDirectEval), R(4), U8(6),
B(Star), R(2),
B(Star2),
/* 41 E> */ B(CallUndefinedReceiver1), R(2), R(3), U8(2),
/* 52 S> */ B(Return),
]
......
......@@ -60,26 +60,26 @@ snippet: "
"
frame size: 8
parameter count: 1
bytecode array length: 42
bytecode array length: 37
bytecodes: [
/* 42 S> */ B(LdaConstant), U8(0),
B(Star), R(0),
/* 68 S> */ B(JumpIfUndefinedOrNull), U8(36),
B(Star0),
/* 68 S> */ B(JumpIfUndefinedOrNull), U8(32),
B(ToObject), R(3),
B(ForInEnumerate), R(3),
B(ForInPrepare), R(4), U8(0),
B(LdaZero),
B(Star), R(7),
B(Star7),
/* 63 S> */ B(ForInContinue), R(7), R(6),
B(JumpIfFalse), U8(21),
B(JumpIfFalse), U8(18),
B(ForInNext), R(3), R(7), R(4), U8(0),
B(JumpIfUndefined), U8(7),
B(Star), R(2),
/* 63 S> */ B(Star), R(1),
B(JumpIfUndefined), U8(5),
B(Star2),
/* 63 S> */ B(Star1),
/* 82 S> */ B(Return),
B(ForInStep), R(7),
B(Star), R(7),
/* 54 E> */ B(JumpLoop), U8(21), I8(0),
B(Star7),
/* 54 E> */ B(JumpLoop), U8(18), I8(0),
B(LdaUndefined),
/* 85 S> */ B(Return),
]
......@@ -96,30 +96,30 @@ snippet: "
"
frame size: 9
parameter count: 1
bytecode array length: 54
bytecode array length: 48
bytecodes: [
/* 42 S> */ B(LdaZero),
B(Star), R(0),
B(Star0),
/* 59 S> */ B(CreateArrayLiteral), U8(0), U8(1), U8(37),
B(JumpIfUndefinedOrNull), U8(45),
B(JumpIfUndefinedOrNull), U8(40),
B(ToObject), R(3),
B(ForInEnumerate), R(3),
B(ForInPrepare), R(4), U8(0),
B(LdaZero),
B(Star), R(7),
B(Star7),
/* 54 S> */ B(ForInContinue), R(7), R(6),
B(JumpIfFalse), U8(30),
B(JumpIfFalse), U8(26),
B(ForInNext), R(3), R(7), R(4), U8(0),
B(JumpIfUndefined), U8(16),
B(Star), R(2),
/* 54 S> */ B(Star), R(1),
B(JumpIfUndefined), U8(13),
B(Star2),
/* 54 S> */ B(Star1),
/* 70 S> */ B(Ldar), R(2),
/* 75 E> */ B(Add), R(0), U8(2),
B(Mov), R(0), R(8),
B(Star), R(0),
B(Star0),
/* 72 E> */ B(ForInStep), R(7),
B(Star), R(7),
/* 45 E> */ B(JumpLoop), U8(30), I8(0),
B(Star7),
/* 45 E> */ B(JumpLoop), U8(26), I8(0),
B(LdaUndefined),
/* 80 S> */ B(Return),
]
......@@ -139,39 +139,39 @@ snippet: "
"
frame size: 7
parameter count: 1
bytecode array length: 81
bytecode array length: 75
bytecodes: [
/* 42 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(41),
B(Star), R(0),
B(Star0),
/* 77 S> */ B(CreateArrayLiteral), U8(1), U8(2), U8(37),
B(JumpIfUndefinedOrNull), U8(69),
B(JumpIfUndefinedOrNull), U8(64),
B(ToObject), R(1),
B(ForInEnumerate), R(1),
B(ForInPrepare), R(2), U8(1),
B(LdaZero),
B(Star), R(5),
B(Star5),
/* 68 S> */ B(ForInContinue), R(5), R(4),
B(JumpIfFalse), U8(54),
B(JumpIfFalse), U8(50),
B(ForInNext), R(1), R(5), R(2), U8(1),
B(JumpIfUndefined), U8(40),
B(Star), R(6),
B(JumpIfUndefined), U8(37),
B(Star6),
B(Ldar), R(6),
/* 68 E> */ B(StaNamedProperty), R(0), U8(2), U8(3),
/* 100 S> */ B(LdaNamedProperty), R(0), U8(2), U8(5),
B(Star), R(6),
B(Star6),
B(LdaSmi), I8(10),
/* 106 E> */ B(TestEqual), R(6), U8(7),
B(JumpIfFalse), U8(4),
/* 113 S> */ B(Jump), U8(17),
/* 113 S> */ B(Jump), U8(16),
/* 130 S> */ B(LdaNamedProperty), R(0), U8(2), U8(5),
B(Star), R(6),
B(Star6),
B(LdaSmi), I8(20),
/* 136 E> */ B(TestEqual), R(6), U8(8),
B(JumpIfFalse), U8(4),
/* 143 S> */ B(Jump), U8(9),
/* 143 S> */ B(Jump), U8(8),
B(ForInStep), R(5),
B(Star), R(5),
/* 62 E> */ B(JumpLoop), U8(54), I8(0),
B(Star5),
/* 62 E> */ B(JumpLoop), U8(50), I8(0),
B(LdaUndefined),
/* 152 S> */ B(Return),
]
......@@ -190,32 +190,32 @@ snippet: "
"
frame size: 9
parameter count: 1
bytecode array length: 60
bytecode array length: 55
bytecodes: [
/* 42 S> */ B(CreateArrayLiteral), U8(0), U8(0), U8(37),
B(Star), R(0),
B(Star0),
/* 72 S> */ B(CreateArrayLiteral), U8(1), U8(2), U8(37),
B(JumpIfUndefinedOrNull), U8(48),
B(JumpIfUndefinedOrNull), U8(44),
B(ToObject), R(1),
B(ForInEnumerate), R(1),
B(ForInPrepare), R(2), U8(1),
B(LdaZero),
B(Star), R(5),
B(Star5),
/* 65 S> */ B(ForInContinue), R(5), R(4),
B(JumpIfFalse), U8(33),
B(JumpIfFalse), U8(30),
B(ForInNext), R(1), R(5), R(2), U8(1),
B(JumpIfUndefined), U8(19),
B(Star), R(6),
B(JumpIfUndefined), U8(17),
B(Star6),
B(LdaZero),
B(Star), R(8),
B(Star8),
B(Ldar), R(6),
/* 65 E> */ B(StaKeyedProperty), R(0), R(8), U8(3),
/* 83 S> */ B(LdaSmi), I8(3),
/* 91 E> */ B(LdaKeyedProperty), R(0), U8(5),
/* 95 S> */ B(Return),
B(ForInStep), R(5),
B(Star), R(5),
/* 59 E> */ B(JumpLoop), U8(33), I8(0),
B(Star5),
/* 59 E> */ B(JumpLoop), U8(30), I8(0),
B(LdaUndefined),
/* 98 S> */ B(Return),
]
......
......@@ -28,10 +28,10 @@ snippet: "
"
frame size: 1
parameter count: 1
bytecode array length: 10
bytecode array length: 9
bytecodes: [
/* 34 S> */ B(CreateClosure), U8(0), U8(0), U8(2),
B(Star), R(0),
B(Star0),
/* 56 E> */ B(CallUndefinedReceiver0), R(0), U8(0),
/* 58 S> */ B(Return),
]
......@@ -47,12 +47,12 @@ snippet: "
"
frame size: 2
parameter count: 1
bytecode array length: 15
bytecode array length: 13
bytecodes: [
/* 34 S> */ B(CreateClosure), U8(0), U8(0), U8(2),
B(Star), R(0),
B(Star0),
B(LdaSmi), I8(1),
B(Star), R(1),
B(Star1),
/* 67 E> */ B(CallUndefinedReceiver1), R(0), R(1), U8(0),
/* 70 S> */ B(Return),
]
......
......@@ -14,17 +14,17 @@ snippet: "
"
frame size: 2
parameter count: 1
bytecode array length: 22
bytecode array length: 19
bytecodes: [
/* 46 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(41),
B(Star), R(0),
B(Star0),
/* 63 S> */ B(LdaSmi), I8(10),
B(Star), R(1),
B(Star1),
/* 67 S> */ B(Ldar), R(0),
B(TestUndetectable),
B(JumpIfFalse), U8(6),
B(JumpIfFalse), U8(5),
/* 88 S> */ B(LdaSmi), I8(20),
B(Star), R(1),
B(Star1),
/* 97 S> */ B(Ldar), R(1),
/* 106 S> */ B(Return),
]
......@@ -43,17 +43,17 @@ snippet: "
"
frame size: 2
parameter count: 1
bytecode array length: 22
bytecode array length: 19
bytecodes: [
/* 46 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(41),
B(Star), R(0),
B(Star0),
/* 63 S> */ B(LdaSmi), I8(10),
B(Star), R(1),
B(Star1),
/* 67 S> */ B(Ldar), R(0),
B(TestUndetectable),
B(JumpIfFalse), U8(6),
B(JumpIfFalse), U8(5),
/* 93 S> */ B(LdaSmi), I8(20),
B(Star), R(1),
B(Star1),
/* 102 S> */ B(Ldar), R(1),
/* 111 S> */ B(Return),
]
......@@ -72,17 +72,17 @@ snippet: "
"
frame size: 2
parameter count: 1
bytecode array length: 22
bytecode array length: 19
bytecodes: [
/* 46 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(41),
B(Star), R(0),
B(Star0),
/* 63 S> */ B(LdaSmi), I8(10),
B(Star), R(1),
B(Star1),
/* 67 S> */ B(Ldar), R(0),
B(TestUndetectable),
B(JumpIfTrue), U8(6),
B(JumpIfTrue), U8(5),
/* 88 S> */ B(LdaSmi), I8(20),
B(Star), R(1),
B(Star1),
/* 97 S> */ B(Ldar), R(1),
/* 106 S> */ B(Return),
]
......@@ -101,17 +101,17 @@ snippet: "
"
frame size: 2
parameter count: 1
bytecode array length: 22
bytecode array length: 19
bytecodes: [
/* 46 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(41),
B(Star), R(0),
B(Star0),
/* 63 S> */ B(LdaSmi), I8(10),
B(Star), R(1),
B(Star1),
/* 67 S> */ B(Ldar), R(0),
B(TestUndetectable),
B(JumpIfTrue), U8(6),
B(JumpIfTrue), U8(5),
/* 93 S> */ B(LdaSmi), I8(20),
B(Star), R(1),
B(Star1),
/* 102 S> */ B(Ldar), R(1),
/* 111 S> */ B(Return),
]
......@@ -130,16 +130,16 @@ snippet: "
"
frame size: 2
parameter count: 1
bytecode array length: 21
bytecode array length: 18
bytecodes: [
/* 46 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(41),
B(Star), R(0),
B(Star0),
/* 63 S> */ B(LdaSmi), I8(10),
B(Star), R(1),
B(Star1),
/* 67 S> */ B(Ldar), R(0),
B(JumpIfNotNull), U8(6),
B(JumpIfNotNull), U8(5),
/* 89 S> */ B(LdaSmi), I8(20),
B(Star), R(1),
B(Star1),
/* 98 S> */ B(Ldar), R(1),
/* 107 S> */ B(Return),
]
......@@ -158,16 +158,16 @@ snippet: "
"
frame size: 2
parameter count: 1
bytecode array length: 21
bytecode array length: 18
bytecodes: [
/* 46 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(41),
B(Star), R(0),
B(Star0),
/* 63 S> */ B(LdaSmi), I8(10),
B(Star), R(1),
B(Star1),
/* 67 S> */ B(Ldar), R(0),
B(JumpIfNotUndefined), U8(6),
B(JumpIfNotUndefined), U8(5),
/* 94 S> */ B(LdaSmi), I8(20),
B(Star), R(1),
B(Star1),
/* 103 S> */ B(Ldar), R(1),
/* 112 S> */ B(Return),
]
......@@ -186,16 +186,16 @@ snippet: "
"
frame size: 2
parameter count: 1
bytecode array length: 21
bytecode array length: 18
bytecodes: [
/* 46 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(41),
B(Star), R(0),
B(Star0),
/* 63 S> */ B(LdaSmi), I8(10),
B(Star), R(1),
B(Star1),
/* 67 S> */ B(Ldar), R(0),
B(JumpIfNull), U8(6),
B(JumpIfNull), U8(5),
/* 89 S> */ B(LdaSmi), I8(20),
B(Star), R(1),
B(Star1),
/* 98 S> */ B(Ldar), R(1),
/* 107 S> */ B(Return),
]
......@@ -214,16 +214,16 @@ snippet: "
"
frame size: 2
parameter count: 1
bytecode array length: 21
bytecode array length: 18
bytecodes: [
/* 46 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(41),
B(Star), R(0),
B(Star0),
/* 63 S> */ B(LdaSmi), I8(10),
B(Star), R(1),
B(Star1),
/* 67 S> */ B(Ldar), R(0),
B(JumpIfUndefined), U8(6),
B(JumpIfUndefined), U8(5),
/* 94 S> */ B(LdaSmi), I8(20),
B(Star), R(1),
B(Star1),
/* 103 S> */ B(Ldar), R(1),
/* 112 S> */ B(Return),
]
......
......@@ -35,11 +35,11 @@ snippet: "
"
frame size: 1
parameter count: 1
bytecode array length: 15
bytecode array length: 14
bytecodes: [
/* 31 S> */ B(LdaGlobal), U8(0), U8(0),
B(ToNumeric), U8(2),
B(Star), R(0),
B(Star0),
B(Dec), U8(2),
/* 44 E> */ B(StaGlobal), U8(0), U8(3),
B(Ldar), R(0),
......@@ -80,11 +80,11 @@ snippet: "
"
frame size: 1
parameter count: 1
bytecode array length: 15
bytecode array length: 14
bytecodes: [
/* 32 S> */ B(LdaGlobal), U8(0), U8(0),
B(ToNumeric), U8(2),
B(Star), R(0),
B(Star0),
B(Inc), U8(2),
/* 50 E> */ B(StaGlobal), U8(0), U8(3),
B(Ldar), R(0),
......
This diff is collapsed.
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