Commit 02c3414d authored by rmcilroy's avatar rmcilroy Committed by Commit bot

[Interpereter] Inline FastNewClosure into CreateClosure bytecode handler

BUG=v8:4280

Review-Url: https://codereview.chromium.org/2113613002
Cr-Commit-Position: refs/heads/master@{#37453}
parent c17b44bd
...@@ -323,10 +323,10 @@ BytecodeArrayBuilder& BytecodeArrayBuilder::StoreKeyedProperty( ...@@ -323,10 +323,10 @@ BytecodeArrayBuilder& BytecodeArrayBuilder::StoreKeyedProperty(
} }
BytecodeArrayBuilder& BytecodeArrayBuilder::CreateClosure( BytecodeArrayBuilder& BytecodeArrayBuilder::CreateClosure(
Handle<SharedFunctionInfo> shared_info, PretenureFlag tenured) { Handle<SharedFunctionInfo> shared_info, int flags) {
size_t entry = GetConstantPoolEntry(shared_info); size_t entry = GetConstantPoolEntry(shared_info);
Output(Bytecode::kCreateClosure, UnsignedOperand(entry), Output(Bytecode::kCreateClosure, UnsignedOperand(entry),
UnsignedOperand(static_cast<size_t>(tenured))); UnsignedOperand(flags));
return *this; return *this;
} }
......
...@@ -129,7 +129,7 @@ class BytecodeArrayBuilder final : public ZoneObject { ...@@ -129,7 +129,7 @@ class BytecodeArrayBuilder final : public ZoneObject {
// Create a new closure for the SharedFunctionInfo. // Create a new closure for the SharedFunctionInfo.
BytecodeArrayBuilder& CreateClosure(Handle<SharedFunctionInfo> shared_info, BytecodeArrayBuilder& CreateClosure(Handle<SharedFunctionInfo> shared_info,
PretenureFlag tenured); int flags);
// Create a new arguments object in the accumulator. // Create a new arguments object in the accumulator.
BytecodeArrayBuilder& CreateArguments(CreateArgumentsType type); BytecodeArrayBuilder& CreateArguments(CreateArgumentsType type);
......
...@@ -1300,8 +1300,9 @@ void BytecodeGenerator::VisitFunctionLiteral(FunctionLiteral* expr) { ...@@ -1300,8 +1300,9 @@ void BytecodeGenerator::VisitFunctionLiteral(FunctionLiteral* expr) {
if (shared_info.is_null()) { if (shared_info.is_null()) {
return SetStackOverflow(); return SetStackOverflow();
} }
builder()->CreateClosure(shared_info, uint8_t flags = CreateClosureFlags::Encode(expr->pretenure(),
expr->pretenure() ? TENURED : NOT_TENURED); scope()->is_function_scope());
builder()->CreateClosure(shared_info, flags);
execution_result()->SetResultInAccumulator(); execution_result()->SetResultInAccumulator();
} }
...@@ -1518,18 +1519,10 @@ void BytecodeGenerator::VisitRegExpLiteral(RegExpLiteral* expr) { ...@@ -1518,18 +1519,10 @@ void BytecodeGenerator::VisitRegExpLiteral(RegExpLiteral* expr) {
void BytecodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { void BytecodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
// Copy the literal boilerplate. // Copy the literal boilerplate.
int fast_clone_properties_count = 0; uint8_t flags = CreateObjectLiteralFlags::Encode(
if (FastCloneShallowObjectStub::IsSupported(expr)) { FastCloneShallowObjectStub::IsSupported(expr),
STATIC_ASSERT( FastCloneShallowObjectStub::PropertiesCount(expr->properties_count()),
FastCloneShallowObjectStub::kMaximumClonedProperties <= expr->ComputeFlags());
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(), builder()->CreateObjectLiteral(expr->constant_properties(),
expr->literal_index(), flags); expr->literal_index(), flags);
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include <iomanip> #include <iomanip>
#include "src/base/bits.h" #include "src/base/bits.h"
#include "src/code-stubs.h"
#include "src/frames.h" #include "src/frames.h"
#include "src/interpreter/bytecode-traits.h" #include "src/interpreter/bytecode-traits.h"
#include "src/interpreter/interpreter.h" #include "src/interpreter/interpreter.h"
...@@ -916,6 +917,33 @@ std::string Register::ToString(int parameter_count) { ...@@ -916,6 +917,33 @@ std::string Register::ToString(int parameter_count) {
} }
} }
// static
uint8_t CreateObjectLiteralFlags::Encode(bool fast_clone_supported,
int properties_count,
int runtime_flags) {
uint8_t result = FlagsBits::encode(runtime_flags);
if (fast_clone_supported) {
STATIC_ASSERT(
FastCloneShallowObjectStub::kMaximumClonedProperties <=
1 << CreateObjectLiteralFlags::FastClonePropertiesCountBits::kShift);
DCHECK_LE(properties_count,
FastCloneShallowObjectStub::kMaximumClonedProperties);
result |= CreateObjectLiteralFlags::FastClonePropertiesCountBits::encode(
properties_count);
}
return result;
}
// static
uint8_t CreateClosureFlags::Encode(bool pretenure, bool is_function_scope) {
uint8_t result = PretenuredBit::encode(pretenure);
if (!FLAG_always_opt && !FLAG_prepare_always_opt &&
pretenure == NOT_TENURED && is_function_scope) {
result |= FastNewClosureBit::encode(true);
}
return result;
}
} // namespace interpreter } // namespace interpreter
} // namespace internal } // namespace internal
} // namespace v8 } // namespace v8
...@@ -661,7 +661,23 @@ class CreateObjectLiteralFlags { ...@@ -661,7 +661,23 @@ class CreateObjectLiteralFlags {
class FlagsBits : public BitField8<int, 0, 3> {}; class FlagsBits : public BitField8<int, 0, 3> {};
class FastClonePropertiesCountBits class FastClonePropertiesCountBits
: public BitField8<int, FlagsBits::kNext, 3> {}; : public BitField8<int, FlagsBits::kNext, 3> {};
STATIC_ASSERT((FlagsBits::kMask & FastClonePropertiesCountBits::kMask) == 0);
static uint8_t Encode(bool fast_clone_supported, int properties_count,
int runtime_flags);
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(CreateObjectLiteralFlags);
};
class CreateClosureFlags {
public:
class PretenuredBit : public BitField8<bool, 0, 1> {};
class FastNewClosureBit : public BitField8<bool, PretenuredBit::kNext, 1> {};
static uint8_t Encode(bool pretenure, bool is_function_scope);
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(CreateClosureFlags);
}; };
std::ostream& operator<<(std::ostream& os, const Bytecode& bytecode); std::ostream& operator<<(std::ostream& os, const Bytecode& bytecode);
......
...@@ -1492,17 +1492,29 @@ void Interpreter::DoCreateObjectLiteral(InterpreterAssembler* assembler) { ...@@ -1492,17 +1492,29 @@ void Interpreter::DoCreateObjectLiteral(InterpreterAssembler* assembler) {
// Creates a new closure for SharedFunctionInfo at position |index| in the // Creates a new closure for SharedFunctionInfo at position |index| in the
// constant pool and with the PretenureFlag <tenured>. // constant pool and with the PretenureFlag <tenured>.
void Interpreter::DoCreateClosure(InterpreterAssembler* assembler) { void Interpreter::DoCreateClosure(InterpreterAssembler* assembler) {
// TODO(rmcilroy): Possibly call FastNewClosureStub when possible instead of
// calling into the runtime.
Node* index = __ BytecodeOperandIdx(0); Node* index = __ BytecodeOperandIdx(0);
Node* shared = __ LoadConstantPoolEntry(index); Node* shared = __ LoadConstantPoolEntry(index);
Node* tenured_raw = __ BytecodeOperandFlag(1); Node* flags = __ BytecodeOperandFlag(1);
Node* tenured = __ SmiTag(tenured_raw);
Node* context = __ GetContext(); Node* context = __ GetContext();
Node* result =
__ CallRuntime(Runtime::kInterpreterNewClosure, context, shared, tenured); Label call_runtime(assembler, Label::kDeferred);
__ SetAccumulator(result); Node* fast_new_closure = __ Word32And(
flags, __ Int32Constant(CreateClosureFlags::FastNewClosureBit::kMask));
__ GotoUnless(fast_new_closure, &call_runtime);
__ SetAccumulator(FastNewClosureStub::Generate(assembler, shared, context));
__ Dispatch(); __ Dispatch();
__ Bind(&call_runtime);
{
STATIC_ASSERT(CreateClosureFlags::PretenuredBit::kShift == 0);
Node* tenured_raw = __ Word32And(
flags, __ Int32Constant(CreateClosureFlags::PretenuredBit::kMask));
Node* tenured = __ SmiTag(tenured_raw);
Node* result = __ CallRuntime(Runtime::kInterpreterNewClosure, context,
shared, tenured);
__ SetAccumulator(result);
__ Dispatch();
}
} }
// CreateMappedArguments // CreateMappedArguments
......
...@@ -712,7 +712,7 @@ bytecodes: [ ...@@ -712,7 +712,7 @@ bytecodes: [
B(PushContext), R(3), B(PushContext), R(3),
B(LdaTheHole), B(LdaTheHole),
B(StaContextSlot), R(context), U8(4), B(StaContextSlot), R(context), U8(4),
B(CreateClosure), U8(1), U8(0), B(CreateClosure), U8(1), U8(2),
B(Star), R(0), B(Star), R(0),
/* 73 S> */ B(LdaSmi), U8(1), /* 73 S> */ B(LdaSmi), U8(1),
/* 73 E> */ B(StaContextSlot), R(context), U8(4), /* 73 E> */ B(StaContextSlot), R(context), U8(4),
......
...@@ -114,7 +114,7 @@ bytecodes: [ ...@@ -114,7 +114,7 @@ bytecodes: [
B(PushContext), R(2), B(PushContext), R(2),
B(LdaTheHole), B(LdaTheHole),
B(StaContextSlot), R(context), U8(4), B(StaContextSlot), R(context), U8(4),
B(CreateClosure), U8(1), U8(0), B(CreateClosure), U8(1), U8(2),
B(Star), R(0), B(Star), R(0),
/* 53 S> */ B(LdaSmi), U8(10), /* 53 S> */ B(LdaSmi), U8(10),
/* 53 E> */ B(StaContextSlot), R(context), U8(4), /* 53 E> */ B(StaContextSlot), R(context), U8(4),
...@@ -168,7 +168,7 @@ bytecodes: [ ...@@ -168,7 +168,7 @@ bytecodes: [
B(PushContext), R(3), B(PushContext), R(3),
B(LdaTheHole), B(LdaTheHole),
B(StaContextSlot), R(context), U8(4), B(StaContextSlot), R(context), U8(4),
B(CreateClosure), U8(1), U8(0), B(CreateClosure), U8(1), U8(2),
B(Star), R(0), B(Star), R(0),
/* 76 S> */ B(LdaSmi), U8(2), /* 76 S> */ B(LdaSmi), U8(2),
/* 76 E> */ B(StaContextSlot), R(context), U8(4), /* 76 E> */ B(StaContextSlot), R(context), U8(4),
......
...@@ -24,7 +24,7 @@ bytecodes: [ ...@@ -24,7 +24,7 @@ bytecodes: [
B(Ldar), R(new_target), B(Ldar), R(new_target),
B(StaContextSlot), R(context), U8(6), B(StaContextSlot), R(context), U8(6),
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 34 S> */ B(CreateClosure), U8(0), U8(0), /* 34 S> */ B(CreateClosure), U8(0), U8(2),
/* 36 E> */ B(StaLookupSlotSloppy), U8(1), /* 36 E> */ B(StaLookupSlotSloppy), U8(1),
/* 52 S> */ B(LdaConstant), U8(2), /* 52 S> */ B(LdaConstant), U8(2),
B(Star), R(3), B(Star), R(3),
......
...@@ -25,7 +25,7 @@ bytecodes: [ ...@@ -25,7 +25,7 @@ bytecodes: [
B(Star), R(0), B(Star), R(0),
B(LdaTheHole), B(LdaTheHole),
B(Star), R(2), B(Star), R(2),
B(CreateClosure), U8(0), U8(0), B(CreateClosure), U8(0), U8(2),
B(Star), R(3), B(Star), R(3),
B(LdaSmi), U8(34), B(LdaSmi), U8(34),
B(Star), R(4), B(Star), R(4),
...@@ -36,7 +36,7 @@ bytecodes: [ ...@@ -36,7 +36,7 @@ bytecodes: [
B(LdrNamedProperty), R(2), U8(1), U8(1), R(3), B(LdrNamedProperty), R(2), U8(1), U8(1), R(3),
B(LdaConstant), U8(2), B(LdaConstant), U8(2),
B(Star), R(5), B(Star), R(5),
B(CreateClosure), U8(3), U8(0), B(CreateClosure), U8(3), U8(2),
B(Star), R(6), B(Star), R(6),
B(LdaSmi), U8(2), B(LdaSmi), U8(2),
B(Star), R(7), B(Star), R(7),
...@@ -77,7 +77,7 @@ bytecodes: [ ...@@ -77,7 +77,7 @@ bytecodes: [
B(Star), R(0), B(Star), R(0),
B(LdaTheHole), B(LdaTheHole),
B(Star), R(2), B(Star), R(2),
B(CreateClosure), U8(0), U8(0), B(CreateClosure), U8(0), U8(2),
B(Star), R(3), B(Star), R(3),
B(LdaSmi), U8(34), B(LdaSmi), U8(34),
B(Star), R(4), B(Star), R(4),
...@@ -88,7 +88,7 @@ bytecodes: [ ...@@ -88,7 +88,7 @@ bytecodes: [
B(LdrNamedProperty), R(2), U8(1), U8(1), R(3), B(LdrNamedProperty), R(2), U8(1), U8(1), R(3),
B(LdaConstant), U8(2), B(LdaConstant), U8(2),
B(Star), R(5), B(Star), R(5),
B(CreateClosure), U8(3), U8(0), B(CreateClosure), U8(3), U8(2),
B(Star), R(6), B(Star), R(6),
B(LdaSmi), U8(2), B(LdaSmi), U8(2),
B(Star), R(7), B(Star), R(7),
...@@ -137,7 +137,7 @@ bytecodes: [ ...@@ -137,7 +137,7 @@ bytecodes: [
B(Star), R(0), B(Star), R(0),
B(LdaTheHole), B(LdaTheHole),
B(Star), R(3), B(Star), R(3),
B(CreateClosure), U8(2), U8(0), B(CreateClosure), U8(2), U8(2),
B(Star), R(4), B(Star), R(4),
B(LdaSmi), U8(62), B(LdaSmi), U8(62),
B(Star), R(5), B(Star), R(5),
...@@ -149,7 +149,7 @@ bytecodes: [ ...@@ -149,7 +149,7 @@ bytecodes: [
/* 75 E> */ B(LdaContextSlot), R(context), U8(4), /* 75 E> */ B(LdaContextSlot), R(context), U8(4),
B(ToName), B(ToName),
B(Star), R(6), B(Star), R(6),
B(CreateClosure), U8(4), U8(0), B(CreateClosure), U8(4), U8(2),
B(Star), R(7), B(Star), R(7),
B(LdaSmi), U8(2), B(LdaSmi), U8(2),
B(Star), R(8), B(Star), R(8),
...@@ -165,7 +165,7 @@ bytecodes: [ ...@@ -165,7 +165,7 @@ bytecodes: [
B(Mov), R(3), R(5), B(Mov), R(3), R(5),
B(JumpIfToBooleanFalse), U8(7), B(JumpIfToBooleanFalse), U8(7),
B(CallRuntime), U16(Runtime::kThrowStaticPrototypeError), R(0), U8(0), B(CallRuntime), U16(Runtime::kThrowStaticPrototypeError), R(0), U8(0),
B(CreateClosure), U8(5), U8(0), B(CreateClosure), U8(5), U8(2),
B(Star), R(7), B(Star), R(7),
B(LdaSmi), U8(1), B(LdaSmi), U8(1),
B(Star), R(9), B(Star), R(9),
...@@ -208,7 +208,7 @@ bytecodes: [ ...@@ -208,7 +208,7 @@ bytecodes: [
B(Star), R(0), B(Star), R(0),
B(LdaTheHole), B(LdaTheHole),
B(Star), R(3), B(Star), R(3),
B(CreateClosure), U8(0), U8(0), B(CreateClosure), U8(0), U8(2),
B(Star), R(4), B(Star), R(4),
B(LdaSmi), U8(49), B(LdaSmi), U8(49),
B(Star), R(5), B(Star), R(5),
......
...@@ -119,7 +119,7 @@ bytecodes: [ ...@@ -119,7 +119,7 @@ bytecodes: [
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), U8(1), /* 42 S> */ B(LdaSmi), U8(1),
/* 42 E> */ B(StaContextSlot), R(context), U8(4), /* 42 E> */ B(StaContextSlot), R(context), U8(4),
/* 45 S> */ B(CreateClosure), U8(0), U8(0), /* 45 S> */ B(CreateClosure), U8(0), U8(2),
/* 75 S> */ B(LdrContextSlot), R(context), U8(4), R(1), /* 75 S> */ B(LdrContextSlot), R(context), U8(4), R(1),
B(LdaSmi), U8(24), B(LdaSmi), U8(24),
B(BitwiseOr), R(1), B(BitwiseOr), R(1),
......
...@@ -19,7 +19,7 @@ bytecodes: [ ...@@ -19,7 +19,7 @@ bytecodes: [
B(PushContext), R(1), B(PushContext), R(1),
B(LdaTheHole), B(LdaTheHole),
B(StaContextSlot), R(context), U8(4), B(StaContextSlot), R(context), U8(4),
B(CreateClosure), U8(0), U8(0), B(CreateClosure), U8(0), U8(2),
B(Star), R(0), B(Star), R(0),
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 44 S> */ B(LdaSmi), U8(10), /* 44 S> */ B(LdaSmi), U8(10),
...@@ -45,7 +45,7 @@ bytecodes: [ ...@@ -45,7 +45,7 @@ bytecodes: [
B(PushContext), R(1), B(PushContext), R(1),
B(LdaTheHole), B(LdaTheHole),
B(StaContextSlot), R(context), U8(4), B(StaContextSlot), R(context), U8(4),
B(CreateClosure), U8(0), U8(0), B(CreateClosure), U8(0), U8(2),
B(Star), R(0), B(Star), R(0),
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 44 S> */ B(LdaSmi), U8(10), /* 44 S> */ B(LdaSmi), U8(10),
...@@ -76,7 +76,7 @@ bytecodes: [ ...@@ -76,7 +76,7 @@ bytecodes: [
B(PushContext), R(1), B(PushContext), R(1),
B(LdaTheHole), B(LdaTheHole),
B(StaContextSlot), R(context), U8(4), B(StaContextSlot), R(context), U8(4),
B(CreateClosure), U8(0), U8(0), B(CreateClosure), U8(0), U8(2),
B(Star), R(0), B(Star), R(0),
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 47 S> */ B(LdaSmi), U8(20), /* 47 S> */ B(LdaSmi), U8(20),
...@@ -112,7 +112,7 @@ bytecodes: [ ...@@ -112,7 +112,7 @@ bytecodes: [
B(PushContext), R(1), B(PushContext), R(1),
B(LdaTheHole), B(LdaTheHole),
B(StaContextSlot), R(context), U8(4), B(StaContextSlot), R(context), U8(4),
B(CreateClosure), U8(0), U8(0), B(CreateClosure), U8(0), U8(2),
B(Star), R(0), B(Star), R(0),
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 44 S> */ B(LdaSmi), U8(10), /* 44 S> */ B(LdaSmi), U8(10),
......
...@@ -22,7 +22,7 @@ bytecodes: [ ...@@ -22,7 +22,7 @@ bytecodes: [
B(Ldar), R(arg0), B(Ldar), R(arg0),
B(StaContextSlot), R(context), U8(4), B(StaContextSlot), R(context), U8(4),
/* 10 E> */ B(StackCheck), /* 10 E> */ B(StackCheck),
/* 19 S> */ B(CreateClosure), U8(0), U8(0), /* 19 S> */ B(CreateClosure), U8(0), U8(2),
/* 52 S> */ B(Return), /* 52 S> */ B(Return),
] ]
constant pool: [ constant pool: [
...@@ -45,7 +45,7 @@ bytecodes: [ ...@@ -45,7 +45,7 @@ bytecodes: [
B(Ldar), R(arg0), B(Ldar), R(arg0),
B(StaContextSlot), R(context), U8(4), B(StaContextSlot), R(context), U8(4),
/* 10 E> */ B(StackCheck), /* 10 E> */ B(StackCheck),
/* 27 S> */ B(CreateClosure), U8(0), U8(0), /* 27 S> */ B(CreateClosure), U8(0), U8(2),
B(Star), R(0), B(Star), R(0),
/* 53 S> */ B(LdaContextSlot), R(context), U8(4), /* 53 S> */ B(LdaContextSlot), R(context), U8(4),
/* 66 S> */ B(Return), /* 66 S> */ B(Return),
...@@ -72,7 +72,7 @@ bytecodes: [ ...@@ -72,7 +72,7 @@ bytecodes: [
B(Ldar), R(arg2), B(Ldar), R(arg2),
B(StaContextSlot), R(context), U8(4), B(StaContextSlot), R(context), U8(4),
/* 10 E> */ B(StackCheck), /* 10 E> */ B(StackCheck),
/* 29 S> */ B(CreateClosure), U8(0), U8(0), /* 29 S> */ B(CreateClosure), U8(0), U8(2),
/* 61 S> */ B(Return), /* 61 S> */ B(Return),
] ]
constant pool: [ constant pool: [
...@@ -95,7 +95,7 @@ bytecodes: [ ...@@ -95,7 +95,7 @@ bytecodes: [
/* 10 E> */ B(StackCheck), /* 10 E> */ B(StackCheck),
/* 26 S> */ B(Ldar), R(this), /* 26 S> */ B(Ldar), R(this),
/* 26 E> */ B(StaContextSlot), R(context), U8(4), /* 26 E> */ B(StaContextSlot), R(context), U8(4),
/* 32 S> */ B(CreateClosure), U8(0), U8(0), /* 32 S> */ B(CreateClosure), U8(0), U8(2),
/* 65 S> */ B(Return), /* 65 S> */ B(Return),
] ]
constant pool: [ constant pool: [
......
...@@ -18,7 +18,7 @@ bytecodes: [ ...@@ -18,7 +18,7 @@ bytecodes: [
B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1), B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
B(PushContext), R(0), B(PushContext), R(0),
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 41 S> */ B(CreateClosure), U8(0), U8(0), /* 41 S> */ B(CreateClosure), U8(0), U8(2),
/* 71 S> */ B(Return), /* 71 S> */ B(Return),
] ]
constant pool: [ constant pool: [
...@@ -40,7 +40,7 @@ bytecodes: [ ...@@ -40,7 +40,7 @@ bytecodes: [
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), U8(1), /* 42 S> */ B(LdaSmi), U8(1),
/* 42 E> */ B(StaContextSlot), R(context), U8(4), /* 42 E> */ B(StaContextSlot), R(context), U8(4),
/* 45 S> */ B(CreateClosure), U8(0), U8(0), /* 45 S> */ B(CreateClosure), U8(0), U8(2),
/* 75 S> */ B(Return), /* 75 S> */ B(Return),
] ]
constant pool: [ constant pool: [
...@@ -64,7 +64,7 @@ bytecodes: [ ...@@ -64,7 +64,7 @@ bytecodes: [
/* 42 E> */ B(StaContextSlot), R(context), U8(4), /* 42 E> */ B(StaContextSlot), R(context), U8(4),
/* 53 S> */ B(LdaSmi), U8(2), /* 53 S> */ B(LdaSmi), U8(2),
/* 53 E> */ B(StaContextSlot), R(context), U8(5), /* 53 E> */ B(StaContextSlot), R(context), U8(5),
/* 56 S> */ B(CreateClosure), U8(0), U8(0), /* 56 S> */ B(CreateClosure), U8(0), U8(2),
/* 92 S> */ B(Return), /* 92 S> */ B(Return),
] ]
constant pool: [ constant pool: [
...@@ -85,7 +85,7 @@ bytecodes: [ ...@@ -85,7 +85,7 @@ bytecodes: [
B(PushContext), R(0), B(PushContext), R(0),
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 41 S> */ B(LdrUndefined), R(2), /* 41 S> */ B(LdrUndefined), R(2),
B(CreateClosure), U8(0), U8(0), B(CreateClosure), U8(0), U8(2),
B(Star), R(1), B(Star), R(1),
/* 64 E> */ B(Call), R(1), R(2), U8(1), U8(1), /* 64 E> */ B(Call), R(1), R(2), U8(1), U8(1),
/* 68 S> */ B(LdaContextSlot), R(context), U8(4), /* 68 S> */ B(LdaContextSlot), R(context), U8(4),
...@@ -123,7 +123,7 @@ bytecodes: [ ...@@ -123,7 +123,7 @@ bytecodes: [
B(StaContextSlot), R(context), U8(4), B(StaContextSlot), R(context), U8(4),
/* 69 S> */ B(LdaSmi), U8(2), /* 69 S> */ B(LdaSmi), U8(2),
/* 69 E> */ B(StaContextSlot), R(context), U8(4), /* 69 E> */ B(StaContextSlot), R(context), U8(4),
/* 72 S> */ B(CreateClosure), U8(1), U8(0), /* 72 S> */ B(CreateClosure), U8(1), U8(2),
B(PopContext), R(0), B(PopContext), R(0),
/* 104 S> */ B(Return), /* 104 S> */ B(Return),
] ]
......
...@@ -214,7 +214,7 @@ bytecodes: [ ...@@ -214,7 +214,7 @@ bytecodes: [
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), U8(1), /* 42 S> */ B(LdaSmi), U8(1),
/* 42 E> */ B(StaContextSlot), R(context), U8(4), /* 42 E> */ B(StaContextSlot), R(context), U8(4),
/* 53 S> */ B(CreateClosure), U8(0), U8(0), /* 53 S> */ B(CreateClosure), U8(0), U8(2),
B(Star), R(0), B(Star), R(0),
/* 78 S> */ B(LdaContextSlot), R(context), U8(4), /* 78 S> */ B(LdaContextSlot), R(context), U8(4),
B(Inc), B(Inc),
...@@ -240,7 +240,7 @@ bytecodes: [ ...@@ -240,7 +240,7 @@ bytecodes: [
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), U8(1), /* 42 S> */ B(LdaSmi), U8(1),
/* 42 E> */ B(StaContextSlot), R(context), U8(4), /* 42 E> */ B(StaContextSlot), R(context), U8(4),
/* 53 S> */ B(CreateClosure), U8(0), U8(0), /* 53 S> */ B(CreateClosure), U8(0), U8(2),
B(Star), R(0), B(Star), R(0),
/* 78 S> */ B(LdaContextSlot), R(context), U8(4), /* 78 S> */ B(LdaContextSlot), R(context), U8(4),
B(ToNumber), B(ToNumber),
......
...@@ -111,7 +111,7 @@ bytecodes: [ ...@@ -111,7 +111,7 @@ bytecodes: [
/* 56 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(1), /* 56 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(1),
B(Star), R(1), B(Star), R(1),
/* 56 E> */ B(StaContextSlot), R(context), U8(4), /* 56 E> */ B(StaContextSlot), R(context), U8(4),
/* 64 S> */ B(CreateClosure), U8(1), U8(0), /* 64 S> */ B(CreateClosure), U8(1), U8(2),
/* 93 S> */ B(LdrContextSlot), R(context), U8(4), R(1), /* 93 S> */ B(LdrContextSlot), R(context), U8(4), R(1),
B(LdaSmi), U8(1), B(LdaSmi), U8(1),
B(DeletePropertyStrict), R(1), B(DeletePropertyStrict), R(1),
......
...@@ -16,7 +16,7 @@ parameter count: 1 ...@@ -16,7 +16,7 @@ parameter count: 1
bytecode array length: 5 bytecode array length: 5
bytecodes: [ bytecodes: [
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 34 S> */ B(CreateClosure), U8(0), U8(0), /* 34 S> */ B(CreateClosure), U8(0), U8(2),
/* 55 S> */ B(Return), /* 55 S> */ B(Return),
] ]
constant pool: [ constant pool: [
...@@ -35,7 +35,7 @@ bytecode array length: 14 ...@@ -35,7 +35,7 @@ bytecode array length: 14
bytecodes: [ bytecodes: [
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 34 S> */ B(LdrUndefined), R(1), /* 34 S> */ B(LdrUndefined), R(1),
B(CreateClosure), U8(0), U8(0), B(CreateClosure), U8(0), U8(2),
B(Star), R(0), B(Star), R(0),
/* 56 E> */ B(Call), R(0), R(1), U8(1), U8(1), /* 56 E> */ B(Call), R(0), R(1), U8(1), U8(1),
/* 59 S> */ B(Return), /* 59 S> */ B(Return),
...@@ -56,7 +56,7 @@ bytecode array length: 18 ...@@ -56,7 +56,7 @@ bytecode array length: 18
bytecodes: [ bytecodes: [
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 34 S> */ B(LdrUndefined), R(1), /* 34 S> */ B(LdrUndefined), R(1),
B(CreateClosure), U8(0), U8(0), B(CreateClosure), U8(0), U8(2),
B(Star), R(0), B(Star), R(0),
B(LdaSmi), U8(1), B(LdaSmi), U8(1),
B(Star), R(2), B(Star), R(2),
......
...@@ -19,7 +19,7 @@ bytecodes: [ ...@@ -19,7 +19,7 @@ bytecodes: [
B(PushContext), R(1), B(PushContext), R(1),
B(LdaTheHole), B(LdaTheHole),
B(StaContextSlot), R(context), U8(4), B(StaContextSlot), R(context), U8(4),
B(CreateClosure), U8(0), U8(0), B(CreateClosure), U8(0), U8(2),
B(Star), R(0), B(Star), R(0),
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), U8(10), /* 42 S> */ B(LdaSmi), U8(10),
...@@ -45,7 +45,7 @@ bytecodes: [ ...@@ -45,7 +45,7 @@ bytecodes: [
B(PushContext), R(1), B(PushContext), R(1),
B(LdaTheHole), B(LdaTheHole),
B(StaContextSlot), R(context), U8(4), B(StaContextSlot), R(context), U8(4),
B(CreateClosure), U8(0), U8(0), B(CreateClosure), U8(0), U8(2),
B(Star), R(0), B(Star), R(0),
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), U8(10), /* 42 S> */ B(LdaSmi), U8(10),
...@@ -76,7 +76,7 @@ bytecodes: [ ...@@ -76,7 +76,7 @@ bytecodes: [
B(PushContext), R(1), B(PushContext), R(1),
B(LdaTheHole), B(LdaTheHole),
B(StaContextSlot), R(context), U8(4), B(StaContextSlot), R(context), U8(4),
B(CreateClosure), U8(0), U8(0), B(CreateClosure), U8(0), U8(2),
B(Star), R(0), B(Star), R(0),
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 45 S> */ B(LdaSmi), U8(20), /* 45 S> */ B(LdaSmi), U8(20),
...@@ -111,7 +111,7 @@ bytecodes: [ ...@@ -111,7 +111,7 @@ bytecodes: [
B(PushContext), R(1), B(PushContext), R(1),
B(LdaTheHole), B(LdaTheHole),
B(StaContextSlot), R(context), U8(4), B(StaContextSlot), R(context), U8(4),
B(CreateClosure), U8(0), U8(0), B(CreateClosure), U8(0), U8(2),
B(Star), R(0), B(Star), R(0),
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), U8(10), /* 42 S> */ B(LdaSmi), U8(10),
......
...@@ -107,7 +107,7 @@ bytecodes: [ ...@@ -107,7 +107,7 @@ bytecodes: [
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 34 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(1), /* 34 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(1),
B(Star), R(0), B(Star), R(0),
B(CreateClosure), U8(1), U8(0), B(CreateClosure), U8(1), U8(2),
B(StaNamedPropertySloppy), R(0), U8(2), U8(1), B(StaNamedPropertySloppy), R(0), U8(2), U8(1),
B(Ldar), R(0), B(Ldar), R(0),
/* 67 S> */ B(Return), /* 67 S> */ B(Return),
...@@ -131,7 +131,7 @@ bytecodes: [ ...@@ -131,7 +131,7 @@ bytecodes: [
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 34 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(1), /* 34 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(1),
B(Star), R(0), B(Star), R(0),
B(CreateClosure), U8(1), U8(0), B(CreateClosure), U8(1), U8(2),
B(StaNamedPropertySloppy), R(0), U8(2), U8(1), B(StaNamedPropertySloppy), R(0), U8(2), U8(1),
B(Ldar), R(0), B(Ldar), R(0),
/* 68 S> */ B(Return), /* 68 S> */ B(Return),
...@@ -157,7 +157,7 @@ bytecodes: [ ...@@ -157,7 +157,7 @@ bytecodes: [
B(Star), R(0), B(Star), R(0),
B(LdaConstant), U8(1), B(LdaConstant), U8(1),
B(Star), R(2), B(Star), R(2),
B(CreateClosure), U8(2), U8(0), B(CreateClosure), U8(2), U8(2),
B(Star), R(3), B(Star), R(3),
B(LdaNull), B(LdaNull),
B(Star), R(4), B(Star), R(4),
...@@ -189,9 +189,9 @@ bytecodes: [ ...@@ -189,9 +189,9 @@ bytecodes: [
B(Star), R(0), B(Star), R(0),
B(LdaConstant), U8(1), B(LdaConstant), U8(1),
B(Star), R(2), B(Star), R(2),
B(CreateClosure), U8(2), U8(0), B(CreateClosure), U8(2), U8(2),
B(Star), R(3), B(Star), R(3),
B(CreateClosure), U8(3), U8(0), B(CreateClosure), U8(3), U8(2),
B(Star), R(4), B(Star), R(4),
B(LdaZero), B(LdaZero),
B(Star), R(5), B(Star), R(5),
...@@ -224,7 +224,7 @@ bytecodes: [ ...@@ -224,7 +224,7 @@ bytecodes: [
B(Star), R(2), B(Star), R(2),
B(LdaNull), B(LdaNull),
B(Star), R(3), B(Star), R(3),
B(CreateClosure), U8(2), U8(0), B(CreateClosure), U8(2), U8(2),
B(Star), R(4), B(Star), R(4),
B(LdaZero), B(LdaZero),
B(Star), R(5), B(Star), R(5),
...@@ -429,7 +429,7 @@ bytecodes: [ ...@@ -429,7 +429,7 @@ bytecodes: [
B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(2), U8(5), B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(2), U8(5),
B(LdaConstant), U8(3), B(LdaConstant), U8(3),
B(Star), R(3), B(Star), R(3),
B(CreateClosure), U8(4), U8(0), B(CreateClosure), U8(4), U8(2),
B(Star), R(4), B(Star), R(4),
B(LdaZero), B(LdaZero),
B(Star), R(5), B(Star), R(5),
...@@ -437,7 +437,7 @@ bytecodes: [ ...@@ -437,7 +437,7 @@ bytecodes: [
B(CallRuntime), U16(Runtime::kDefineGetterPropertyUnchecked), R(2), U8(4), B(CallRuntime), U16(Runtime::kDefineGetterPropertyUnchecked), R(2), U8(4),
B(LdaConstant), U8(3), B(LdaConstant), U8(3),
B(Star), R(3), B(Star), R(3),
B(CreateClosure), U8(5), U8(0), B(CreateClosure), U8(5), U8(2),
B(Star), R(4), B(Star), R(4),
B(LdaZero), B(LdaZero),
B(Star), R(5), B(Star), R(5),
......
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