[Interpreter] Use FastCloneShallowObjectStub in CreateObjectLiteral bytecode.
Adapts FastCloneShallowObjectStub to enable it to be used by the CreateObjectLiteral bytecode. BUG=v8:4280 LOG=N Review-Url: https://codereview.chromium.org/1922523002 Cr-Commit-Position: refs/heads/master@{#35909}
This commit is contained in:
parent
4ecf8c6471
commit
ac2a17abcb
@ -435,8 +435,12 @@ Node* CodeStubAssembler::Allocate(int size_in_bytes, AllocationFlags flags) {
|
||||
return CodeStubAssembler::Allocate(IntPtrConstant(size_in_bytes), flags);
|
||||
}
|
||||
|
||||
Node* CodeStubAssembler::InnerAllocate(Node* previous, Node* offset) {
|
||||
return BitcastWordToTagged(IntPtrAdd(previous, offset));
|
||||
}
|
||||
|
||||
Node* CodeStubAssembler::InnerAllocate(Node* previous, int offset) {
|
||||
return BitcastWordToTagged(IntPtrAdd(previous, IntPtrConstant(offset)));
|
||||
return InnerAllocate(previous, IntPtrConstant(offset));
|
||||
}
|
||||
|
||||
Node* CodeStubAssembler::LoadBufferObject(Node* buffer, int offset,
|
||||
|
@ -72,6 +72,8 @@ class CodeStubAssembler : public compiler::CodeAssembler {
|
||||
compiler::Node* Allocate(compiler::Node* size, AllocationFlags flags = kNone);
|
||||
compiler::Node* Allocate(int size, AllocationFlags flags = kNone);
|
||||
compiler::Node* InnerAllocate(compiler::Node* previous, int offset);
|
||||
compiler::Node* InnerAllocate(compiler::Node* previous,
|
||||
compiler::Node* offset);
|
||||
|
||||
// Check a value for smi-ness
|
||||
compiler::Node* WordIsSmi(compiler::Node* a);
|
||||
|
@ -3747,13 +3747,34 @@ void LoadIndexedInterceptorStub::GenerateAssembly(
|
||||
slot, vector);
|
||||
}
|
||||
|
||||
void FastCloneShallowObjectStub::GenerateAssembly(
|
||||
CodeStubAssembler* assembler) const {
|
||||
typedef CodeStubAssembler::Label Label;
|
||||
// static
|
||||
bool FastCloneShallowObjectStub::IsSupported(ObjectLiteral* expr) {
|
||||
// FastCloneShallowObjectStub doesn't copy elements, and object literals don't
|
||||
// support copy-on-write (COW) elements for now.
|
||||
// TODO(mvstanton): make object literals support COW elements.
|
||||
return expr->fast_elements() && expr->has_shallow_properties() &&
|
||||
expr->properties_count() <= kMaximumClonedProperties;
|
||||
}
|
||||
|
||||
// static
|
||||
int FastCloneShallowObjectStub::PropertiesCount(int literal_length) {
|
||||
// This heuristic of setting empty literals to have
|
||||
// kInitialGlobalObjectUnusedPropertiesCount must remain in-sync with the
|
||||
// runtime.
|
||||
// TODO(verwaest): Unify this with the heuristic in the runtime.
|
||||
return literal_length == 0
|
||||
? JSObject::kInitialGlobalObjectUnusedPropertiesCount
|
||||
: literal_length;
|
||||
}
|
||||
|
||||
// static
|
||||
compiler::Node* FastCloneShallowObjectStub::GenerateFastPath(
|
||||
CodeStubAssembler* assembler, compiler::CodeAssembler::Label* call_runtime,
|
||||
compiler::Node* closure, compiler::Node* literals_index,
|
||||
compiler::Node* properties_count) {
|
||||
typedef compiler::Node Node;
|
||||
Label call_runtime(assembler);
|
||||
Node* closure = assembler->Parameter(0);
|
||||
Node* literals_index = assembler->Parameter(1);
|
||||
typedef compiler::CodeAssembler::Label Label;
|
||||
typedef compiler::CodeAssembler::Variable Variable;
|
||||
|
||||
Node* undefined = assembler->UndefinedConstant();
|
||||
Node* literals_array =
|
||||
@ -3762,38 +3783,52 @@ void FastCloneShallowObjectStub::GenerateAssembly(
|
||||
literals_array, literals_index,
|
||||
LiteralsArray::kFirstLiteralIndex * kPointerSize);
|
||||
assembler->GotoIf(assembler->WordEqual(allocation_site, undefined),
|
||||
&call_runtime);
|
||||
call_runtime);
|
||||
|
||||
// Calculate the object and allocation size based on the properties count.
|
||||
Node* object_size = assembler->IntPtrAdd(
|
||||
assembler->WordShl(properties_count, kPointerSizeLog2),
|
||||
assembler->IntPtrConstant(JSObject::kHeaderSize));
|
||||
Node* allocation_size = object_size;
|
||||
if (FLAG_allocation_site_pretenuring) {
|
||||
allocation_size = assembler->IntPtrAdd(
|
||||
object_size, assembler->IntPtrConstant(AllocationMemento::kSize));
|
||||
}
|
||||
Node* boilerplate = assembler->LoadObjectField(
|
||||
allocation_site, AllocationSite::kTransitionInfoOffset);
|
||||
|
||||
int length = this->length();
|
||||
if (length == 0) {
|
||||
length = JSObject::kInitialGlobalObjectUnusedPropertiesCount;
|
||||
}
|
||||
int allocation_size = JSObject::kHeaderSize + length * kPointerSize;
|
||||
int object_size = allocation_size;
|
||||
if (FLAG_allocation_site_pretenuring) {
|
||||
allocation_size += AllocationMemento::kSize;
|
||||
}
|
||||
|
||||
Node* boilerplate_map = assembler->LoadMap(boilerplate);
|
||||
Node* instance_size = assembler->LoadMapInstanceSize(boilerplate_map);
|
||||
Node* size_in_words =
|
||||
assembler->Int32Constant(object_size >> kPointerSizeLog2);
|
||||
Node* size_in_words = assembler->WordShr(object_size, kPointerSizeLog2);
|
||||
assembler->GotoUnless(assembler->Word32Equal(instance_size, size_in_words),
|
||||
&call_runtime);
|
||||
call_runtime);
|
||||
|
||||
Node* copy = assembler->Allocate(allocation_size);
|
||||
|
||||
for (int i = 0; i < object_size; i += kPointerSize) {
|
||||
// Copy boilerplate elements.
|
||||
Variable offset(assembler, MachineType::PointerRepresentation());
|
||||
offset.Bind(assembler->IntPtrConstant(-kHeapObjectTag));
|
||||
Node* end_offset = assembler->IntPtrAdd(object_size, offset.value());
|
||||
Label loop_body(assembler, &offset), loop_check(assembler, &offset);
|
||||
// We should always have an object size greater than zero.
|
||||
assembler->Goto(&loop_body);
|
||||
assembler->Bind(&loop_body);
|
||||
{
|
||||
// The Allocate above guarantees that the copy lies in new space. This
|
||||
// allows us to skip write barriers. This is necessary since we may also be
|
||||
// copying unboxed doubles.
|
||||
Node* field =
|
||||
assembler->LoadObjectField(boilerplate, i, MachineType::IntPtr());
|
||||
assembler->StoreObjectFieldNoWriteBarrier(
|
||||
copy, i, field, MachineType::PointerRepresentation());
|
||||
assembler->Load(MachineType::IntPtr(), boilerplate, offset.value());
|
||||
assembler->StoreNoWriteBarrier(MachineType::PointerRepresentation(), copy,
|
||||
offset.value(), field);
|
||||
assembler->Goto(&loop_check);
|
||||
}
|
||||
assembler->Bind(&loop_check);
|
||||
{
|
||||
offset.Bind(assembler->IntPtrAdd(offset.value(),
|
||||
assembler->IntPtrConstant(kPointerSize)));
|
||||
assembler->GotoUnless(
|
||||
assembler->IntPtrGreaterThanOrEqual(offset.value(), end_offset),
|
||||
&loop_body);
|
||||
}
|
||||
|
||||
if (FLAG_allocation_site_pretenuring) {
|
||||
@ -3813,6 +3848,21 @@ void FastCloneShallowObjectStub::GenerateAssembly(
|
||||
}
|
||||
|
||||
// TODO(verwaest): Allocate and fill in double boxes.
|
||||
return copy;
|
||||
}
|
||||
|
||||
void FastCloneShallowObjectStub::GenerateAssembly(
|
||||
CodeStubAssembler* assembler) const {
|
||||
typedef CodeStubAssembler::Label Label;
|
||||
typedef compiler::Node Node;
|
||||
Label call_runtime(assembler);
|
||||
Node* closure = assembler->Parameter(0);
|
||||
Node* literals_index = assembler->Parameter(1);
|
||||
|
||||
Node* properties_count =
|
||||
assembler->IntPtrConstant(PropertiesCount(this->length()));
|
||||
Node* copy = GenerateFastPath(assembler, &call_runtime, closure,
|
||||
literals_index, properties_count);
|
||||
assembler->Return(copy);
|
||||
|
||||
assembler->Bind(&call_runtime);
|
||||
|
@ -1134,6 +1134,14 @@ class FastCloneShallowObjectStub : public TurboFanCodeStub {
|
||||
minor_key_ = LengthBits::encode(LengthBits::encode(length));
|
||||
}
|
||||
|
||||
static compiler::Node* GenerateFastPath(
|
||||
CodeStubAssembler* assembler,
|
||||
compiler::CodeAssembler::Label* call_runtime, compiler::Node* closure,
|
||||
compiler::Node* literals_index, compiler::Node* properties_count);
|
||||
|
||||
static bool IsSupported(ObjectLiteral* expr);
|
||||
static int PropertiesCount(int literal_length);
|
||||
|
||||
int length() const { return LengthBits::decode(minor_key_); }
|
||||
|
||||
private:
|
||||
|
@ -882,7 +882,9 @@ void BytecodeGraphBuilder::VisitCreateObjectLiteral() {
|
||||
Handle<FixedArray> constant_properties = Handle<FixedArray>::cast(
|
||||
bytecode_iterator().GetConstantForIndexOperand(0));
|
||||
int literal_index = bytecode_iterator().GetIndexOperand(1);
|
||||
int literal_flags = bytecode_iterator().GetFlagOperand(2);
|
||||
int bytecode_flags = bytecode_iterator().GetFlagOperand(2);
|
||||
int literal_flags =
|
||||
interpreter::CreateObjectLiteralFlags::FlagsBits::decode(bytecode_flags);
|
||||
// TODO(mstarzinger): Thread through number of properties.
|
||||
int number_of_properties = constant_properties->length() / 2;
|
||||
const Operator* op = javascript()->CreateLiteralObject(
|
||||
|
@ -160,6 +160,10 @@ Node* CodeAssembler::WordShl(Node* value, int shift) {
|
||||
return raw_assembler_->WordShl(value, IntPtrConstant(shift));
|
||||
}
|
||||
|
||||
Node* CodeAssembler::WordShr(Node* value, int shift) {
|
||||
return raw_assembler_->WordShr(value, IntPtrConstant(shift));
|
||||
}
|
||||
|
||||
Node* CodeAssembler::ChangeUint32ToWord(Node* value) {
|
||||
if (raw_assembler_->machine()->Is64()) {
|
||||
value = raw_assembler_->ChangeUint32ToUint64(value);
|
||||
|
@ -52,6 +52,8 @@ class Schedule;
|
||||
V(Int32LessThanOrEqual) \
|
||||
V(IntPtrLessThan) \
|
||||
V(IntPtrLessThanOrEqual) \
|
||||
V(IntPtrGreaterThan) \
|
||||
V(IntPtrGreaterThanOrEqual) \
|
||||
V(IntPtrEqual) \
|
||||
V(Uint32LessThan) \
|
||||
V(UintPtrGreaterThanOrEqual) \
|
||||
@ -237,6 +239,7 @@ class CodeAssembler {
|
||||
#undef DECLARE_CODE_ASSEMBLER_BINARY_OP
|
||||
|
||||
Node* WordShl(Node* value, int shift);
|
||||
Node* WordShr(Node* value, int shift);
|
||||
|
||||
// Unary
|
||||
#define DECLARE_CODE_ASSEMBLER_UNARY_OP(name) Node* name(Node* a);
|
||||
|
@ -144,13 +144,8 @@ int FullCodeGenerator::NewHandlerTableEntry() {
|
||||
|
||||
bool FullCodeGenerator::MustCreateObjectLiteralWithRuntime(
|
||||
ObjectLiteral* expr) const {
|
||||
// FastCloneShallowObjectStub doesn't copy elements, and object literals don't
|
||||
// support copy-on-write (COW) elements for now.
|
||||
// TODO(mvstanton): make object literals support COW elements.
|
||||
return masm()->serializer_enabled() || !expr->fast_elements() ||
|
||||
!expr->has_shallow_properties() ||
|
||||
expr->properties_count() >
|
||||
FastCloneShallowObjectStub::kMaximumClonedProperties;
|
||||
return masm()->serializer_enabled() ||
|
||||
!FastCloneShallowObjectStub::IsSupported(expr);
|
||||
}
|
||||
|
||||
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include "src/interpreter/bytecode-generator.h"
|
||||
|
||||
#include "src/ast/scopes.h"
|
||||
#include "src/code-stubs.h"
|
||||
#include "src/compiler.h"
|
||||
#include "src/interpreter/bytecode-register-allocator.h"
|
||||
#include "src/interpreter/control-flow-builders.h"
|
||||
@ -1596,10 +1597,21 @@ void BytecodeGenerator::VisitRegExpLiteral(RegExpLiteral* expr) {
|
||||
|
||||
|
||||
void BytecodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
|
||||
// Deep-copy the literal boilerplate.
|
||||
// Copy the literal boilerplate.
|
||||
int fast_clone_properties_count = 0;
|
||||
if (FastCloneShallowObjectStub::IsSupported(expr)) {
|
||||
STATIC_ASSERT(
|
||||
FastCloneShallowObjectStub::kMaximumClonedProperties <=
|
||||
1 << CreateObjectLiteralFlags::FastClonePropertiesCountBits::kShift);
|
||||
fast_clone_properties_count =
|
||||
FastCloneShallowObjectStub::PropertiesCount(expr->properties_count());
|
||||
}
|
||||
uint8_t flags =
|
||||
CreateObjectLiteralFlags::FlagsBits::encode(expr->ComputeFlags()) |
|
||||
CreateObjectLiteralFlags::FastClonePropertiesCountBits::encode(
|
||||
fast_clone_properties_count);
|
||||
builder()->CreateObjectLiteral(expr->constant_properties(),
|
||||
expr->literal_index(),
|
||||
expr->ComputeFlags(true));
|
||||
expr->literal_index(), flags);
|
||||
|
||||
// Allocate in the outer scope since this register is used to return the
|
||||
// expression's results to the caller.
|
||||
|
@ -583,6 +583,14 @@ class Bytecodes {
|
||||
DISALLOW_IMPLICIT_CONSTRUCTORS(Bytecodes);
|
||||
};
|
||||
|
||||
class CreateObjectLiteralFlags {
|
||||
public:
|
||||
class FlagsBits : public BitField8<int, 0, 3> {};
|
||||
class FastClonePropertiesCountBits
|
||||
: public BitField8<int, FlagsBits::kNext, 3> {};
|
||||
STATIC_ASSERT((FlagsBits::kMask & FastClonePropertiesCountBits::kMask) == 0);
|
||||
};
|
||||
|
||||
std::ostream& operator<<(std::ostream& os, const Bytecode& bytecode);
|
||||
std::ostream& operator<<(std::ostream& os, const AccumulatorUse& use);
|
||||
std::ostream& operator<<(std::ostream& os, const OperandScale& operand_scale);
|
||||
|
@ -1395,23 +1395,6 @@ void Interpreter::DoJumpIfNotHoleConstant(InterpreterAssembler* assembler) {
|
||||
__ JumpIfWordNotEqual(accumulator, the_hole_value, relative_jump);
|
||||
}
|
||||
|
||||
void Interpreter::DoCreateLiteral(Runtime::FunctionId function_id,
|
||||
InterpreterAssembler* assembler) {
|
||||
Node* index = __ BytecodeOperandIdx(0);
|
||||
Node* constant_elements = __ LoadConstantPoolEntry(index);
|
||||
Node* literal_index_raw = __ BytecodeOperandIdx(1);
|
||||
Node* literal_index = __ SmiTag(literal_index_raw);
|
||||
Node* flags_raw = __ BytecodeOperandFlag(2);
|
||||
Node* flags = __ SmiTag(flags_raw);
|
||||
Node* closure = __ LoadRegister(Register::function_closure());
|
||||
Node* context = __ GetContext();
|
||||
Node* result = __ CallRuntime(function_id, context, closure, literal_index,
|
||||
constant_elements, flags);
|
||||
__ SetAccumulator(result);
|
||||
__ Dispatch();
|
||||
}
|
||||
|
||||
|
||||
// CreateRegExpLiteral <pattern_idx> <literal_idx> <flags>
|
||||
//
|
||||
// Creates a regular expression literal for literal index <literal_idx> with
|
||||
@ -1438,15 +1421,71 @@ void Interpreter::DoCreateRegExpLiteral(InterpreterAssembler* assembler) {
|
||||
// Creates an array literal for literal index <literal_idx> with flags <flags>
|
||||
// and constant elements in <element_idx>.
|
||||
void Interpreter::DoCreateArrayLiteral(InterpreterAssembler* assembler) {
|
||||
DoCreateLiteral(Runtime::kCreateArrayLiteral, assembler);
|
||||
Node* index = __ BytecodeOperandIdx(0);
|
||||
Node* constant_elements = __ LoadConstantPoolEntry(index);
|
||||
Node* literal_index_raw = __ BytecodeOperandIdx(1);
|
||||
Node* literal_index = __ SmiTag(literal_index_raw);
|
||||
Node* flags_raw = __ BytecodeOperandFlag(2);
|
||||
Node* flags = __ SmiTag(flags_raw);
|
||||
Node* closure = __ LoadRegister(Register::function_closure());
|
||||
Node* context = __ GetContext();
|
||||
Node* result = __ CallRuntime(Runtime::kCreateArrayLiteral, context, closure,
|
||||
literal_index, constant_elements, flags);
|
||||
__ SetAccumulator(result);
|
||||
__ Dispatch();
|
||||
}
|
||||
|
||||
// CreateObjectLiteral <element_idx> <literal_idx> <flags>
|
||||
//
|
||||
// Creates an object literal for literal index <literal_idx> with flags <flags>
|
||||
// and constant elements in <element_idx>.
|
||||
// Creates an object literal for literal index <literal_idx> with
|
||||
// CreateObjectLiteralFlags <flags> and constant elements in <element_idx>.
|
||||
void Interpreter::DoCreateObjectLiteral(InterpreterAssembler* assembler) {
|
||||
DoCreateLiteral(Runtime::kCreateObjectLiteral, assembler);
|
||||
Node* literal_index_raw = __ BytecodeOperandIdx(1);
|
||||
Node* literal_index = __ SmiTag(literal_index_raw);
|
||||
Node* bytecode_flags = __ BytecodeOperandFlag(2);
|
||||
Node* closure = __ LoadRegister(Register::function_closure());
|
||||
|
||||
Variable result(assembler, MachineRepresentation::kTagged);
|
||||
|
||||
// Check if we can do a fast clone or have to call the runtime.
|
||||
Label end(assembler), if_fast_clone(assembler),
|
||||
if_not_fast_clone(assembler, Label::kDeferred);
|
||||
Node* fast_clone_properties_count =
|
||||
__ BitFieldDecode<CreateObjectLiteralFlags::FastClonePropertiesCountBits>(
|
||||
bytecode_flags);
|
||||
__ BranchIf(fast_clone_properties_count, &if_fast_clone, &if_not_fast_clone);
|
||||
|
||||
__ Bind(&if_fast_clone);
|
||||
{
|
||||
// If we can do a fast clone do the fast-path in FastCloneShallowObjectStub.
|
||||
Node* clone = FastCloneShallowObjectStub::GenerateFastPath(
|
||||
assembler, &if_not_fast_clone, closure, literal_index,
|
||||
fast_clone_properties_count);
|
||||
result.Bind(clone);
|
||||
__ Goto(&end);
|
||||
}
|
||||
|
||||
__ Bind(&if_not_fast_clone);
|
||||
{
|
||||
// If we can't do a fast clone, call into the runtime.
|
||||
Node* index = __ BytecodeOperandIdx(0);
|
||||
Node* constant_elements = __ LoadConstantPoolEntry(index);
|
||||
Node* context = __ GetContext();
|
||||
|
||||
STATIC_ASSERT(CreateObjectLiteralFlags::FlagsBits::kShift == 0);
|
||||
Node* flags_raw = __ Word32And(
|
||||
bytecode_flags,
|
||||
__ Int32Constant(CreateObjectLiteralFlags::FlagsBits::kMask));
|
||||
Node* flags = __ SmiTag(flags_raw);
|
||||
|
||||
result.Bind(__ CallRuntime(Runtime::kCreateObjectLiteral, context, closure,
|
||||
literal_index, constant_elements, flags));
|
||||
__ Goto(&end);
|
||||
}
|
||||
|
||||
__ Bind(&end);
|
||||
__ SetAccumulator(result.value());
|
||||
__ Dispatch();
|
||||
}
|
||||
|
||||
// CreateClosure <index> <tenured>
|
||||
|
@ -119,10 +119,6 @@ class Interpreter {
|
||||
// Generates code to perform a type conversion.
|
||||
void DoTypeConversionOp(Callable callable, InterpreterAssembler* assembler);
|
||||
|
||||
// Generates code to create a literal via |function_id|.
|
||||
void DoCreateLiteral(Runtime::FunctionId function_id,
|
||||
InterpreterAssembler* assembler);
|
||||
|
||||
// Generates code to perform delete via function_id.
|
||||
void DoDelete(Runtime::FunctionId function_id,
|
||||
InterpreterAssembler* assembler);
|
||||
|
@ -62,7 +62,7 @@ parameter count: 1
|
||||
bytecode array length: 27
|
||||
bytecodes: [
|
||||
B(StackCheck),
|
||||
B(CreateObjectLiteral), U8(0), U8(0), U8(5),
|
||||
B(CreateObjectLiteral), U8(0), U8(0), U8(1),
|
||||
B(Star), R(1),
|
||||
B(Star), R(0),
|
||||
B(Star), R(1),
|
||||
@ -90,7 +90,7 @@ parameter count: 1
|
||||
bytecode array length: 30
|
||||
bytecodes: [
|
||||
B(StackCheck),
|
||||
B(CreateObjectLiteral), U8(0), U8(0), U8(5),
|
||||
B(CreateObjectLiteral), U8(0), U8(0), U8(1),
|
||||
B(Star), R(1),
|
||||
B(Star), R(0),
|
||||
B(Star), R(1),
|
||||
|
@ -102,7 +102,7 @@ parameter count: 1
|
||||
bytecode array length: 26
|
||||
bytecodes: [
|
||||
B(StackCheck),
|
||||
B(CreateObjectLiteral), U8(0), U8(0), U8(5),
|
||||
B(CreateObjectLiteral), U8(0), U8(0), U8(1),
|
||||
B(Star), R(1),
|
||||
B(Star), R(0),
|
||||
B(Star), R(1),
|
||||
@ -130,7 +130,7 @@ parameter count: 1
|
||||
bytecode array length: 21
|
||||
bytecodes: [
|
||||
B(StackCheck),
|
||||
B(CreateObjectLiteral), U8(0), U8(0), U8(5),
|
||||
B(CreateObjectLiteral), U8(0), U8(0), U8(1),
|
||||
B(Star), R(1),
|
||||
B(Star), R(0),
|
||||
B(Star), R(1),
|
||||
@ -157,7 +157,7 @@ bytecodes: [
|
||||
B(StackCheck),
|
||||
B(LdaConstant), U8(0),
|
||||
B(Star), R(0),
|
||||
B(CreateObjectLiteral), U8(1), U8(0), U8(5),
|
||||
B(CreateObjectLiteral), U8(1), U8(0), U8(1),
|
||||
B(Star), R(2),
|
||||
B(Star), R(1),
|
||||
B(Star), R(2),
|
||||
@ -189,7 +189,7 @@ bytecodes: [
|
||||
B(StackCheck),
|
||||
B(LdaConstant), U8(0),
|
||||
B(Star), R(0),
|
||||
B(CreateObjectLiteral), U8(1), U8(0), U8(5),
|
||||
B(CreateObjectLiteral), U8(1), U8(0), U8(1),
|
||||
B(Star), R(2),
|
||||
B(Star), R(1),
|
||||
B(Star), R(2),
|
||||
|
@ -16,7 +16,7 @@ parameter count: 1
|
||||
bytecode array length: 16
|
||||
bytecodes: [
|
||||
B(StackCheck),
|
||||
B(CreateObjectLiteral), U8(0), U8(0), U8(5),
|
||||
B(CreateObjectLiteral), U8(0), U8(0), U8(1),
|
||||
B(Star), R(1),
|
||||
B(Star), R(0),
|
||||
B(Star), R(1),
|
||||
@ -40,7 +40,7 @@ parameter count: 1
|
||||
bytecode array length: 16
|
||||
bytecodes: [
|
||||
B(StackCheck),
|
||||
B(CreateObjectLiteral), U8(0), U8(0), U8(5),
|
||||
B(CreateObjectLiteral), U8(0), U8(0), U8(1),
|
||||
B(Star), R(1),
|
||||
B(Star), R(0),
|
||||
B(Star), R(1),
|
||||
@ -64,7 +64,7 @@ parameter count: 1
|
||||
bytecode array length: 16
|
||||
bytecodes: [
|
||||
B(StackCheck),
|
||||
B(CreateObjectLiteral), U8(0), U8(0), U8(5),
|
||||
B(CreateObjectLiteral), U8(0), U8(0), U8(1),
|
||||
B(Star), R(1),
|
||||
B(Star), R(0),
|
||||
B(Star), R(1),
|
||||
@ -111,7 +111,7 @@ bytecodes: [
|
||||
B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
|
||||
B(PushContext), R(0),
|
||||
B(StackCheck),
|
||||
B(CreateObjectLiteral), U8(0), U8(0), U8(5),
|
||||
B(CreateObjectLiteral), U8(0), U8(0), U8(1),
|
||||
B(Star), R(1),
|
||||
B(StaContextSlot), R(context), U8(4),
|
||||
B(CreateClosure), U8(1), U8(0),
|
||||
|
@ -156,7 +156,7 @@ parameter count: 1
|
||||
bytecode array length: 94
|
||||
bytecodes: [
|
||||
B(StackCheck),
|
||||
B(CreateObjectLiteral), U8(0), U8(0), U8(5),
|
||||
B(CreateObjectLiteral), U8(0), U8(0), U8(1),
|
||||
B(Star), R(1),
|
||||
B(Star), R(0),
|
||||
B(CreateArrayLiteral), U8(1), U8(1), U8(3),
|
||||
|
@ -575,7 +575,7 @@ parameter count: 1
|
||||
bytecode array length: 379
|
||||
bytecodes: [
|
||||
B(StackCheck),
|
||||
B(CreateObjectLiteral), U8(0), U8(0), U8(5),
|
||||
B(CreateObjectLiteral), U8(0), U8(0), U8(1),
|
||||
B(Star), R(8),
|
||||
B(Star), R(6),
|
||||
B(LdaUndefined),
|
||||
|
@ -16,7 +16,7 @@ parameter count: 1
|
||||
bytecode array length: 8
|
||||
bytecodes: [
|
||||
B(StackCheck),
|
||||
B(CreateObjectLiteral), U8(0), U8(0), U8(7),
|
||||
B(CreateObjectLiteral), U8(0), U8(0), U8(35),
|
||||
B(Star), R(0),
|
||||
B(Return),
|
||||
]
|
||||
@ -35,7 +35,7 @@ parameter count: 1
|
||||
bytecode array length: 8
|
||||
bytecodes: [
|
||||
B(StackCheck),
|
||||
B(CreateObjectLiteral), U8(0), U8(0), U8(5),
|
||||
B(CreateObjectLiteral), U8(0), U8(0), U8(1),
|
||||
B(Star), R(0),
|
||||
B(Return),
|
||||
]
|
||||
@ -56,7 +56,7 @@ bytecodes: [
|
||||
B(StackCheck),
|
||||
B(LdaSmi), U8(1),
|
||||
B(Star), R(0),
|
||||
B(CreateObjectLiteral), U8(0), U8(0), U8(5),
|
||||
B(CreateObjectLiteral), U8(0), U8(0), U8(1),
|
||||
B(Star), R(1),
|
||||
B(Ldar), R(0),
|
||||
B(StoreICSloppy), R(1), U8(1), U8(1),
|
||||
@ -81,7 +81,7 @@ bytecodes: [
|
||||
B(StackCheck),
|
||||
B(LdaSmi), U8(1),
|
||||
B(Star), R(0),
|
||||
B(CreateObjectLiteral), U8(0), U8(0), U8(5),
|
||||
B(CreateObjectLiteral), U8(0), U8(0), U8(1),
|
||||
B(Star), R(1),
|
||||
B(Ldar), R(0),
|
||||
B(Star), R(2),
|
||||
@ -107,7 +107,7 @@ parameter count: 1
|
||||
bytecode array length: 17
|
||||
bytecodes: [
|
||||
B(StackCheck),
|
||||
B(CreateObjectLiteral), U8(0), U8(0), U8(5),
|
||||
B(CreateObjectLiteral), U8(0), U8(0), U8(1),
|
||||
B(Star), R(0),
|
||||
B(CreateClosure), U8(1), U8(0),
|
||||
B(StoreICSloppy), R(0), U8(2), U8(1),
|
||||
@ -131,7 +131,7 @@ parameter count: 1
|
||||
bytecode array length: 17
|
||||
bytecodes: [
|
||||
B(StackCheck),
|
||||
B(CreateObjectLiteral), U8(0), U8(0), U8(5),
|
||||
B(CreateObjectLiteral), U8(0), U8(0), U8(1),
|
||||
B(Star), R(0),
|
||||
B(CreateClosure), U8(1), U8(0),
|
||||
B(StoreICSloppy), R(0), U8(2), U8(1),
|
||||
@ -155,7 +155,7 @@ parameter count: 1
|
||||
bytecode array length: 33
|
||||
bytecodes: [
|
||||
B(StackCheck),
|
||||
B(CreateObjectLiteral), U8(0), U8(0), U8(5),
|
||||
B(CreateObjectLiteral), U8(0), U8(0), U8(1),
|
||||
B(Star), R(0),
|
||||
B(Mov), R(0), R(1),
|
||||
B(LdaConstant), U8(1),
|
||||
@ -187,7 +187,7 @@ parameter count: 1
|
||||
bytecode array length: 35
|
||||
bytecodes: [
|
||||
B(StackCheck),
|
||||
B(CreateObjectLiteral), U8(0), U8(0), U8(5),
|
||||
B(CreateObjectLiteral), U8(0), U8(0), U8(1),
|
||||
B(Star), R(0),
|
||||
B(Mov), R(0), R(1),
|
||||
B(LdaConstant), U8(1),
|
||||
@ -220,7 +220,7 @@ parameter count: 1
|
||||
bytecode array length: 33
|
||||
bytecodes: [
|
||||
B(StackCheck),
|
||||
B(CreateObjectLiteral), U8(0), U8(0), U8(5),
|
||||
B(CreateObjectLiteral), U8(0), U8(0), U8(1),
|
||||
B(Star), R(0),
|
||||
B(Mov), R(0), R(1),
|
||||
B(LdaConstant), U8(1),
|
||||
@ -254,7 +254,7 @@ bytecodes: [
|
||||
B(StackCheck),
|
||||
B(LdaSmi), U8(1),
|
||||
B(Star), R(0),
|
||||
B(CreateObjectLiteral), U8(0), U8(0), U8(5),
|
||||
B(CreateObjectLiteral), U8(0), U8(0), U8(1),
|
||||
B(Star), R(1),
|
||||
B(Mov), R(1), R(2),
|
||||
B(LdaSmi), U8(1),
|
||||
@ -282,7 +282,7 @@ parameter count: 1
|
||||
bytecode array length: 21
|
||||
bytecodes: [
|
||||
B(StackCheck),
|
||||
B(CreateObjectLiteral), U8(0), U8(0), U8(7),
|
||||
B(CreateObjectLiteral), U8(0), U8(0), U8(35),
|
||||
B(Star), R(0),
|
||||
B(Mov), R(0), R(1),
|
||||
B(LdaNull),
|
||||
@ -308,7 +308,7 @@ bytecodes: [
|
||||
B(StackCheck),
|
||||
B(LdaConstant), U8(0),
|
||||
B(Star), R(0),
|
||||
B(CreateObjectLiteral), U8(1), U8(0), U8(7),
|
||||
B(CreateObjectLiteral), U8(1), U8(0), U8(35),
|
||||
B(Star), R(1),
|
||||
B(Mov), R(1), R(2),
|
||||
B(Ldar), R(0),
|
||||
@ -342,7 +342,7 @@ bytecodes: [
|
||||
B(StackCheck),
|
||||
B(LdaConstant), U8(0),
|
||||
B(Star), R(0),
|
||||
B(CreateObjectLiteral), U8(1), U8(0), U8(5),
|
||||
B(CreateObjectLiteral), U8(1), U8(0), U8(1),
|
||||
B(Star), R(1),
|
||||
B(Ldar), R(0),
|
||||
B(StoreICSloppy), R(1), U8(2), U8(1),
|
||||
@ -379,7 +379,7 @@ bytecodes: [
|
||||
B(StackCheck),
|
||||
B(LdaConstant), U8(0),
|
||||
B(Star), R(0),
|
||||
B(CreateObjectLiteral), U8(1), U8(1), U8(7),
|
||||
B(CreateObjectLiteral), U8(1), U8(1), U8(35),
|
||||
B(Star), R(1),
|
||||
B(Mov), R(1), R(2),
|
||||
B(Ldar), R(0),
|
||||
@ -393,7 +393,7 @@ bytecodes: [
|
||||
B(Star), R(6),
|
||||
B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(2), U8(5),
|
||||
B(Mov), R(1), R(2),
|
||||
B(CreateObjectLiteral), U8(1), U8(0), U8(7),
|
||||
B(CreateObjectLiteral), U8(1), U8(0), U8(35),
|
||||
B(Star), R(4),
|
||||
B(Star), R(3),
|
||||
B(CallRuntime), U16(Runtime::kInternalSetPrototype), R(2), U8(2),
|
||||
@ -418,7 +418,7 @@ bytecodes: [
|
||||
B(StackCheck),
|
||||
B(LdaConstant), U8(0),
|
||||
B(Star), R(0),
|
||||
B(CreateObjectLiteral), U8(1), U8(0), U8(7),
|
||||
B(CreateObjectLiteral), U8(1), U8(0), U8(35),
|
||||
B(Star), R(1),
|
||||
B(Mov), R(1), R(2),
|
||||
B(Ldar), R(0),
|
||||
|
@ -785,7 +785,7 @@ bytecodes: [
|
||||
B(Star), R(0),
|
||||
B(LdaConstant), U8(255),
|
||||
B(Star), R(0),
|
||||
B(Wide), B(CreateObjectLiteral), U16(256), U16(0), U8(5),
|
||||
B(Wide), B(CreateObjectLiteral), U16(256), U16(0), U8(1),
|
||||
B(Star), R(1),
|
||||
B(Return),
|
||||
]
|
||||
|
@ -26,7 +26,7 @@ bytecodes: [
|
||||
B(Star), R(1),
|
||||
B(LdaZero),
|
||||
B(Star), R(2),
|
||||
B(CreateObjectLiteral), U8(2), U8(0), U8(5),
|
||||
B(CreateObjectLiteral), U8(2), U8(0), U8(1),
|
||||
B(Star), R(4),
|
||||
B(CreateClosure), U8(3), U8(0),
|
||||
B(StoreICSloppy), R(4), U8(4), U8(3),
|
||||
|
@ -16,7 +16,7 @@ parameter count: 1
|
||||
bytecode array length: 26
|
||||
bytecodes: [
|
||||
B(StackCheck),
|
||||
B(CreateObjectLiteral), U8(0), U8(0), U8(5),
|
||||
B(CreateObjectLiteral), U8(0), U8(0), U8(1),
|
||||
B(Star), R(1),
|
||||
B(ToObject),
|
||||
B(Star), R(2),
|
||||
|
Loading…
Reference in New Issue
Block a user