Remove strong mode support from property loads.
R=rossberg@chromium.org,bmeurer@chromium.org,verwaest@chromium.org BUG=v8:3956 LOG=n Review URL: https://codereview.chromium.org/1700993002 Cr-Commit-Position: refs/heads/master@{#34067}
This commit is contained in:
parent
a7b315b50c
commit
305a36e0d4
@ -142,8 +142,7 @@ MUST_USE_RESULT static MaybeHandle<Object> ReplaceAccessorWithDataProperty(
|
|||||||
Handle<Object> old_value;
|
Handle<Object> old_value;
|
||||||
bool is_observed = observe && receiver->map()->is_observed();
|
bool is_observed = observe && receiver->map()->is_observed();
|
||||||
if (is_observed) {
|
if (is_observed) {
|
||||||
MaybeHandle<Object> maybe_old =
|
MaybeHandle<Object> maybe_old = Object::GetPropertyWithAccessor(&it);
|
||||||
Object::GetPropertyWithAccessor(&it, SLOPPY);
|
|
||||||
if (!maybe_old.ToHandle(&old_value)) return maybe_old;
|
if (!maybe_old.ToHandle(&old_value)) return maybe_old;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1625,9 +1625,9 @@ MUST_USE_RESULT Maybe<bool> FastAssign(Handle<JSReceiver> to,
|
|||||||
prop_value = JSObject::FastPropertyAt(from, representation, index);
|
prop_value = JSObject::FastPropertyAt(from, representation, index);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ASSIGN_RETURN_ON_EXCEPTION_VALUE(
|
ASSIGN_RETURN_ON_EXCEPTION_VALUE(isolate, prop_value,
|
||||||
isolate, prop_value, Object::GetProperty(from, next_key, STRICT),
|
Object::GetProperty(from, next_key),
|
||||||
Nothing<bool>());
|
Nothing<bool>());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// If the map did change, do a slower lookup. We are still guaranteed that
|
// If the map did change, do a slower lookup. We are still guaranteed that
|
||||||
@ -1637,9 +1637,8 @@ MUST_USE_RESULT Maybe<bool> FastAssign(Handle<JSReceiver> to,
|
|||||||
DCHECK(it.state() == LookupIterator::DATA ||
|
DCHECK(it.state() == LookupIterator::DATA ||
|
||||||
it.state() == LookupIterator::ACCESSOR);
|
it.state() == LookupIterator::ACCESSOR);
|
||||||
if (!it.IsEnumerable()) continue;
|
if (!it.IsEnumerable()) continue;
|
||||||
ASSIGN_RETURN_ON_EXCEPTION_VALUE(isolate, prop_value,
|
ASSIGN_RETURN_ON_EXCEPTION_VALUE(
|
||||||
Object::GetProperty(&it, STRICT),
|
isolate, prop_value, Object::GetProperty(&it), Nothing<bool>());
|
||||||
Nothing<bool>());
|
|
||||||
}
|
}
|
||||||
Handle<Object> status;
|
Handle<Object> status;
|
||||||
ASSIGN_RETURN_ON_EXCEPTION_VALUE(
|
ASSIGN_RETURN_ON_EXCEPTION_VALUE(
|
||||||
@ -1698,7 +1697,7 @@ BUILTIN(ObjectAssign) {
|
|||||||
Handle<Object> prop_value;
|
Handle<Object> prop_value;
|
||||||
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
|
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
|
||||||
isolate, prop_value,
|
isolate, prop_value,
|
||||||
Runtime::GetObjectProperty(isolate, from, next_key, STRICT));
|
Runtime::GetObjectProperty(isolate, from, next_key));
|
||||||
// 4c ii 2. Let status be ? Set(to, nextKey, propValue, true).
|
// 4c ii 2. Let status be ? Set(to, nextKey, propValue, true).
|
||||||
Handle<Object> status;
|
Handle<Object> status;
|
||||||
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
|
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
|
||||||
@ -4075,12 +4074,7 @@ static void Generate_LoadIC_Miss(MacroAssembler* masm) {
|
|||||||
|
|
||||||
|
|
||||||
static void Generate_LoadIC_Normal(MacroAssembler* masm) {
|
static void Generate_LoadIC_Normal(MacroAssembler* masm) {
|
||||||
LoadIC::GenerateNormal(masm, SLOPPY);
|
LoadIC::GenerateNormal(masm);
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void Generate_LoadIC_Normal_Strong(MacroAssembler* masm) {
|
|
||||||
LoadIC::GenerateNormal(masm, STRONG);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -4090,22 +4084,12 @@ static void Generate_LoadIC_Getter_ForDeopt(MacroAssembler* masm) {
|
|||||||
|
|
||||||
|
|
||||||
static void Generate_LoadIC_Slow(MacroAssembler* masm) {
|
static void Generate_LoadIC_Slow(MacroAssembler* masm) {
|
||||||
LoadIC::GenerateRuntimeGetProperty(masm, SLOPPY);
|
LoadIC::GenerateRuntimeGetProperty(masm);
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void Generate_LoadIC_Slow_Strong(MacroAssembler* masm) {
|
|
||||||
LoadIC::GenerateRuntimeGetProperty(masm, STRONG);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void Generate_KeyedLoadIC_Slow(MacroAssembler* masm) {
|
static void Generate_KeyedLoadIC_Slow(MacroAssembler* masm) {
|
||||||
KeyedLoadIC::GenerateRuntimeGetProperty(masm, SLOPPY);
|
KeyedLoadIC::GenerateRuntimeGetProperty(masm);
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void Generate_KeyedLoadIC_Slow_Strong(MacroAssembler* masm) {
|
|
||||||
KeyedLoadIC::GenerateRuntimeGetProperty(masm, STRONG);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -4115,12 +4099,7 @@ static void Generate_KeyedLoadIC_Miss(MacroAssembler* masm) {
|
|||||||
|
|
||||||
|
|
||||||
static void Generate_KeyedLoadIC_Megamorphic(MacroAssembler* masm) {
|
static void Generate_KeyedLoadIC_Megamorphic(MacroAssembler* masm) {
|
||||||
KeyedLoadIC::GenerateMegamorphic(masm, SLOPPY);
|
KeyedLoadIC::GenerateMegamorphic(masm);
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void Generate_KeyedLoadIC_Megamorphic_Strong(MacroAssembler* masm) {
|
|
||||||
KeyedLoadIC::GenerateMegamorphic(masm, STRONG);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -224,9 +224,6 @@ inline bool operator&(BuiltinExtraArguments lhs, BuiltinExtraArguments rhs) {
|
|||||||
V(LoadIC_Getter_ForDeopt, LOAD_IC, MONOMORPHIC, kNoExtraICState) \
|
V(LoadIC_Getter_ForDeopt, LOAD_IC, MONOMORPHIC, kNoExtraICState) \
|
||||||
V(KeyedLoadIC_Megamorphic, KEYED_LOAD_IC, MEGAMORPHIC, kNoExtraICState) \
|
V(KeyedLoadIC_Megamorphic, KEYED_LOAD_IC, MEGAMORPHIC, kNoExtraICState) \
|
||||||
\
|
\
|
||||||
V(KeyedLoadIC_Megamorphic_Strong, KEYED_LOAD_IC, MEGAMORPHIC, \
|
|
||||||
LoadICState::kStrongModeState) \
|
|
||||||
\
|
|
||||||
V(StoreIC_Setter_ForDeopt, STORE_IC, MONOMORPHIC, \
|
V(StoreIC_Setter_ForDeopt, STORE_IC, MONOMORPHIC, \
|
||||||
StoreICState::kStrictModeState) \
|
StoreICState::kStrictModeState) \
|
||||||
\
|
\
|
||||||
@ -292,13 +289,10 @@ inline bool operator&(BuiltinExtraArguments lhs, BuiltinExtraArguments rhs) {
|
|||||||
// Define list of builtin handlers implemented in assembly.
|
// Define list of builtin handlers implemented in assembly.
|
||||||
#define BUILTIN_LIST_H(V) \
|
#define BUILTIN_LIST_H(V) \
|
||||||
V(LoadIC_Slow, LOAD_IC) \
|
V(LoadIC_Slow, LOAD_IC) \
|
||||||
V(LoadIC_Slow_Strong, LOAD_IC) \
|
|
||||||
V(KeyedLoadIC_Slow, KEYED_LOAD_IC) \
|
V(KeyedLoadIC_Slow, KEYED_LOAD_IC) \
|
||||||
V(KeyedLoadIC_Slow_Strong, KEYED_LOAD_IC) \
|
|
||||||
V(StoreIC_Slow, STORE_IC) \
|
V(StoreIC_Slow, STORE_IC) \
|
||||||
V(KeyedStoreIC_Slow, KEYED_STORE_IC) \
|
V(KeyedStoreIC_Slow, KEYED_STORE_IC) \
|
||||||
V(LoadIC_Normal, LOAD_IC) \
|
V(LoadIC_Normal, LOAD_IC) \
|
||||||
V(LoadIC_Normal_Strong, LOAD_IC) \
|
|
||||||
V(StoreIC_Normal, STORE_IC)
|
V(StoreIC_Normal, STORE_IC)
|
||||||
|
|
||||||
// Define list of builtins used by the debugger implemented in assembly.
|
// Define list of builtins used by the debugger implemented in assembly.
|
||||||
|
@ -12,44 +12,36 @@ namespace internal {
|
|||||||
|
|
||||||
|
|
||||||
// static
|
// static
|
||||||
Callable CodeFactory::LoadIC(Isolate* isolate, TypeofMode typeof_mode,
|
Callable CodeFactory::LoadIC(Isolate* isolate, TypeofMode typeof_mode) {
|
||||||
LanguageMode language_mode) {
|
return Callable(LoadIC::initialize_stub(
|
||||||
return Callable(
|
isolate, LoadICState(typeof_mode).GetExtraICState()),
|
||||||
LoadIC::initialize_stub(
|
LoadDescriptor(isolate));
|
||||||
isolate, LoadICState(typeof_mode, language_mode).GetExtraICState()),
|
|
||||||
LoadDescriptor(isolate));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// static
|
// static
|
||||||
Callable CodeFactory::LoadICInOptimizedCode(
|
Callable CodeFactory::LoadICInOptimizedCode(
|
||||||
Isolate* isolate, TypeofMode typeof_mode, LanguageMode language_mode,
|
Isolate* isolate, TypeofMode typeof_mode,
|
||||||
InlineCacheState initialization_state) {
|
InlineCacheState initialization_state) {
|
||||||
auto code = LoadIC::initialize_stub_in_optimized_code(
|
auto code = LoadIC::initialize_stub_in_optimized_code(
|
||||||
isolate, LoadICState(typeof_mode, language_mode).GetExtraICState(),
|
isolate, LoadICState(typeof_mode).GetExtraICState(),
|
||||||
initialization_state);
|
initialization_state);
|
||||||
return Callable(code, LoadWithVectorDescriptor(isolate));
|
return Callable(code, LoadWithVectorDescriptor(isolate));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// static
|
// static
|
||||||
Callable CodeFactory::KeyedLoadIC(Isolate* isolate,
|
Callable CodeFactory::KeyedLoadIC(Isolate* isolate) {
|
||||||
LanguageMode language_mode) {
|
return Callable(KeyedLoadIC::initialize_stub(isolate, kNoExtraICState),
|
||||||
ExtraICState state = is_strong(language_mode) ? LoadICState::kStrongModeState
|
|
||||||
: kNoExtraICState;
|
|
||||||
return Callable(KeyedLoadIC::initialize_stub(isolate, state),
|
|
||||||
LoadDescriptor(isolate));
|
LoadDescriptor(isolate));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// static
|
// static
|
||||||
Callable CodeFactory::KeyedLoadICInOptimizedCode(
|
Callable CodeFactory::KeyedLoadICInOptimizedCode(
|
||||||
Isolate* isolate, LanguageMode language_mode,
|
Isolate* isolate, InlineCacheState initialization_state) {
|
||||||
InlineCacheState initialization_state) {
|
|
||||||
ExtraICState state = is_strong(language_mode) ? LoadICState::kStrongModeState
|
|
||||||
: kNoExtraICState;
|
|
||||||
auto code = KeyedLoadIC::initialize_stub_in_optimized_code(
|
auto code = KeyedLoadIC::initialize_stub_in_optimized_code(
|
||||||
isolate, initialization_state, state);
|
isolate, initialization_state, kNoExtraICState);
|
||||||
if (initialization_state != MEGAMORPHIC) {
|
if (initialization_state != MEGAMORPHIC) {
|
||||||
return Callable(code, LoadWithVectorDescriptor(isolate));
|
return Callable(code, LoadWithVectorDescriptor(isolate));
|
||||||
}
|
}
|
||||||
|
@ -32,16 +32,13 @@ class Callable final BASE_EMBEDDED {
|
|||||||
class CodeFactory final {
|
class CodeFactory final {
|
||||||
public:
|
public:
|
||||||
// Initial states for ICs.
|
// Initial states for ICs.
|
||||||
static Callable LoadIC(Isolate* isolate, TypeofMode typeof_mode,
|
static Callable LoadIC(Isolate* isolate, TypeofMode typeof_mode);
|
||||||
LanguageMode language_mode);
|
|
||||||
static Callable LoadICInOptimizedCode(Isolate* isolate,
|
static Callable LoadICInOptimizedCode(Isolate* isolate,
|
||||||
TypeofMode typeof_mode,
|
TypeofMode typeof_mode,
|
||||||
LanguageMode language_mode,
|
|
||||||
InlineCacheState initialization_state);
|
InlineCacheState initialization_state);
|
||||||
static Callable KeyedLoadIC(Isolate* isolate, LanguageMode language_mode);
|
static Callable KeyedLoadIC(Isolate* isolate);
|
||||||
static Callable KeyedLoadICInOptimizedCode(
|
static Callable KeyedLoadICInOptimizedCode(
|
||||||
Isolate* isolate, LanguageMode language_mode,
|
Isolate* isolate, InlineCacheState initialization_state);
|
||||||
InlineCacheState initialization_state);
|
|
||||||
static Callable CallIC(Isolate* isolate, int argc,
|
static Callable CallIC(Isolate* isolate, int argc,
|
||||||
ConvertReceiverMode mode = ConvertReceiverMode::kAny,
|
ConvertReceiverMode mode = ConvertReceiverMode::kAny,
|
||||||
TailCallMode tail_call_mode = TailCallMode::kDisallow);
|
TailCallMode tail_call_mode = TailCallMode::kDisallow);
|
||||||
|
@ -2157,8 +2157,7 @@ HValue* CodeStubGraphBuilder<LoadDictionaryElementStub>::BuildCodeStub() {
|
|||||||
|
|
||||||
HValue* hash = BuildElementIndexHash(key);
|
HValue* hash = BuildElementIndexHash(key);
|
||||||
|
|
||||||
return BuildUncheckedDictionaryElementLoad(receiver, elements, key, hash,
|
return BuildUncheckedDictionaryElementLoad(receiver, elements, key, hash);
|
||||||
casted_stub()->language_mode());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -2292,8 +2291,7 @@ HValue* CodeStubGraphBuilder<KeyedLoadGenericStub>::BuildCodeStub() {
|
|||||||
|
|
||||||
HValue* hash = BuildElementIndexHash(key);
|
HValue* hash = BuildElementIndexHash(key);
|
||||||
|
|
||||||
Push(BuildUncheckedDictionaryElementLoad(receiver, elements, key, hash,
|
Push(BuildUncheckedDictionaryElementLoad(receiver, elements, key, hash));
|
||||||
casted_stub()->language_mode()));
|
|
||||||
}
|
}
|
||||||
kind_if.Else();
|
kind_if.Else();
|
||||||
|
|
||||||
@ -2337,8 +2335,8 @@ HValue* CodeStubGraphBuilder<KeyedLoadGenericStub>::BuildCodeStub() {
|
|||||||
|
|
||||||
hash = AddUncasted<HShr>(hash, Add<HConstant>(Name::kHashShift));
|
hash = AddUncasted<HShr>(hash, Add<HConstant>(Name::kHashShift));
|
||||||
|
|
||||||
HValue* value = BuildUncheckedDictionaryElementLoad(
|
HValue* value =
|
||||||
receiver, properties, key, hash, casted_stub()->language_mode());
|
BuildUncheckedDictionaryElementLoad(receiver, properties, key, hash);
|
||||||
Push(value);
|
Push(value);
|
||||||
}
|
}
|
||||||
if_dict_properties.Else();
|
if_dict_properties.Else();
|
||||||
@ -2415,10 +2413,7 @@ HValue* CodeStubGraphBuilder<KeyedLoadGenericStub>::BuildCodeStub() {
|
|||||||
// KeyedLookupCache miss; call runtime.
|
// KeyedLookupCache miss; call runtime.
|
||||||
Add<HPushArguments>(receiver, key);
|
Add<HPushArguments>(receiver, key);
|
||||||
Push(Add<HCallRuntime>(
|
Push(Add<HCallRuntime>(
|
||||||
Runtime::FunctionForId(is_strong(casted_stub()->language_mode())
|
Runtime::FunctionForId(Runtime::kKeyedGetProperty), 2));
|
||||||
? Runtime::kKeyedGetPropertyStrong
|
|
||||||
: Runtime::kKeyedGetProperty),
|
|
||||||
2));
|
|
||||||
}
|
}
|
||||||
inline_or_runtime.End();
|
inline_or_runtime.End();
|
||||||
}
|
}
|
||||||
|
@ -601,9 +601,7 @@ void LoadDictionaryElementStub::InitializeDescriptor(
|
|||||||
void KeyedLoadGenericStub::InitializeDescriptor(
|
void KeyedLoadGenericStub::InitializeDescriptor(
|
||||||
CodeStubDescriptor* descriptor) {
|
CodeStubDescriptor* descriptor) {
|
||||||
descriptor->Initialize(
|
descriptor->Initialize(
|
||||||
Runtime::FunctionForId(is_strong(language_mode())
|
Runtime::FunctionForId(Runtime::kKeyedGetProperty)->entry);
|
||||||
? Runtime::kKeyedGetPropertyStrong
|
|
||||||
: Runtime::kKeyedGetProperty)->entry);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2074,10 +2074,6 @@ class LoadDictionaryElementStub : public HydrogenCodeStub {
|
|||||||
return LoadWithVectorDescriptor(isolate());
|
return LoadWithVectorDescriptor(isolate());
|
||||||
}
|
}
|
||||||
|
|
||||||
LanguageMode language_mode() const {
|
|
||||||
return LoadICState::GetLanguageMode(MinorKey());
|
|
||||||
}
|
|
||||||
|
|
||||||
DEFINE_HYDROGEN_CODE_STUB(LoadDictionaryElement, HydrogenCodeStub);
|
DEFINE_HYDROGEN_CODE_STUB(LoadDictionaryElement, HydrogenCodeStub);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -2092,10 +2088,6 @@ class KeyedLoadGenericStub : public HydrogenCodeStub {
|
|||||||
Code::Kind GetCodeKind() const override { return Code::KEYED_LOAD_IC; }
|
Code::Kind GetCodeKind() const override { return Code::KEYED_LOAD_IC; }
|
||||||
InlineCacheState GetICState() const override { return GENERIC; }
|
InlineCacheState GetICState() const override { return GENERIC; }
|
||||||
|
|
||||||
LanguageMode language_mode() const {
|
|
||||||
return LoadICState::GetLanguageMode(MinorKey());
|
|
||||||
}
|
|
||||||
|
|
||||||
DEFINE_CALL_INTERFACE_DESCRIPTOR(Load);
|
DEFINE_CALL_INTERFACE_DESCRIPTOR(Load);
|
||||||
|
|
||||||
DEFINE_HYDROGEN_CODE_STUB(KeyedLoadGeneric, HydrogenCodeStub);
|
DEFINE_HYDROGEN_CODE_STUB(KeyedLoadGeneric, HydrogenCodeStub);
|
||||||
|
@ -3570,7 +3570,7 @@ Node* AstGraphBuilder::BuildVariableAssignment(
|
|||||||
|
|
||||||
Node* AstGraphBuilder::BuildKeyedLoad(Node* object, Node* key,
|
Node* AstGraphBuilder::BuildKeyedLoad(Node* object, Node* key,
|
||||||
const VectorSlotPair& feedback) {
|
const VectorSlotPair& feedback) {
|
||||||
const Operator* op = javascript()->LoadProperty(language_mode(), feedback);
|
const Operator* op = javascript()->LoadProperty(feedback);
|
||||||
Node* node = NewNode(op, object, key, GetFunctionClosure());
|
Node* node = NewNode(op, object, key, GetFunctionClosure());
|
||||||
return node;
|
return node;
|
||||||
}
|
}
|
||||||
@ -3578,7 +3578,7 @@ Node* AstGraphBuilder::BuildKeyedLoad(Node* object, Node* key,
|
|||||||
|
|
||||||
Node* AstGraphBuilder::BuildNamedLoad(Node* object, Handle<Name> name,
|
Node* AstGraphBuilder::BuildNamedLoad(Node* object, Handle<Name> name,
|
||||||
const VectorSlotPair& feedback) {
|
const VectorSlotPair& feedback) {
|
||||||
const Operator* op = javascript()->LoadNamed(language_mode(), name, feedback);
|
const Operator* op = javascript()->LoadNamed(name, feedback);
|
||||||
Node* node = NewNode(op, object, GetFunctionClosure());
|
Node* node = NewNode(op, object, GetFunctionClosure());
|
||||||
return node;
|
return node;
|
||||||
}
|
}
|
||||||
@ -3606,9 +3606,8 @@ Node* AstGraphBuilder::BuildNamedSuperLoad(Node* receiver, Node* home_object,
|
|||||||
Handle<Name> name,
|
Handle<Name> name,
|
||||||
const VectorSlotPair& feedback) {
|
const VectorSlotPair& feedback) {
|
||||||
Node* name_node = jsgraph()->Constant(name);
|
Node* name_node = jsgraph()->Constant(name);
|
||||||
Node* language = jsgraph()->Constant(language_mode());
|
|
||||||
const Operator* op = javascript()->CallRuntime(Runtime::kLoadFromSuper);
|
const Operator* op = javascript()->CallRuntime(Runtime::kLoadFromSuper);
|
||||||
Node* node = NewNode(op, receiver, home_object, name_node, language);
|
Node* node = NewNode(op, receiver, home_object, name_node);
|
||||||
return node;
|
return node;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3616,9 +3615,8 @@ Node* AstGraphBuilder::BuildNamedSuperLoad(Node* receiver, Node* home_object,
|
|||||||
Node* AstGraphBuilder::BuildKeyedSuperLoad(Node* receiver, Node* home_object,
|
Node* AstGraphBuilder::BuildKeyedSuperLoad(Node* receiver, Node* home_object,
|
||||||
Node* key,
|
Node* key,
|
||||||
const VectorSlotPair& feedback) {
|
const VectorSlotPair& feedback) {
|
||||||
Node* language = jsgraph()->Constant(language_mode());
|
|
||||||
const Operator* op = javascript()->CallRuntime(Runtime::kLoadKeyedFromSuper);
|
const Operator* op = javascript()->CallRuntime(Runtime::kLoadKeyedFromSuper);
|
||||||
Node* node = NewNode(op, receiver, home_object, key, language);
|
Node* node = NewNode(op, receiver, home_object, key);
|
||||||
return node;
|
return node;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -645,35 +645,19 @@ void BytecodeGraphBuilder::BuildLoadGlobal(
|
|||||||
environment()->BindAccumulator(node, &states);
|
environment()->BindAccumulator(node, &states);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BytecodeGraphBuilder::VisitLdaGlobalSloppy() {
|
void BytecodeGraphBuilder::VisitLdaGlobal() {
|
||||||
BuildLoadGlobal(TypeofMode::NOT_INSIDE_TYPEOF);
|
BuildLoadGlobal(TypeofMode::NOT_INSIDE_TYPEOF);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BytecodeGraphBuilder::VisitLdaGlobalStrict() {
|
void BytecodeGraphBuilder::VisitLdaGlobalInsideTypeof() {
|
||||||
BuildLoadGlobal(TypeofMode::NOT_INSIDE_TYPEOF);
|
|
||||||
}
|
|
||||||
|
|
||||||
void BytecodeGraphBuilder::VisitLdaGlobalInsideTypeofSloppy() {
|
|
||||||
BuildLoadGlobal(TypeofMode::INSIDE_TYPEOF);
|
BuildLoadGlobal(TypeofMode::INSIDE_TYPEOF);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BytecodeGraphBuilder::VisitLdaGlobalInsideTypeofStrict() {
|
void BytecodeGraphBuilder::VisitLdaGlobalWide() {
|
||||||
BuildLoadGlobal(TypeofMode::INSIDE_TYPEOF);
|
|
||||||
}
|
|
||||||
|
|
||||||
void BytecodeGraphBuilder::VisitLdaGlobalSloppyWide() {
|
|
||||||
BuildLoadGlobal(TypeofMode::NOT_INSIDE_TYPEOF);
|
BuildLoadGlobal(TypeofMode::NOT_INSIDE_TYPEOF);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BytecodeGraphBuilder::VisitLdaGlobalStrictWide() {
|
void BytecodeGraphBuilder::VisitLdaGlobalInsideTypeofWide() {
|
||||||
BuildLoadGlobal(TypeofMode::NOT_INSIDE_TYPEOF);
|
|
||||||
}
|
|
||||||
|
|
||||||
void BytecodeGraphBuilder::VisitLdaGlobalInsideTypeofSloppyWide() {
|
|
||||||
BuildLoadGlobal(TypeofMode::INSIDE_TYPEOF);
|
|
||||||
}
|
|
||||||
|
|
||||||
void BytecodeGraphBuilder::VisitLdaGlobalInsideTypeofStrictWide() {
|
|
||||||
BuildLoadGlobal(TypeofMode::INSIDE_TYPEOF);
|
BuildLoadGlobal(TypeofMode::INSIDE_TYPEOF);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -800,30 +784,14 @@ void BytecodeGraphBuilder::BuildNamedLoad() {
|
|||||||
VectorSlotPair feedback =
|
VectorSlotPair feedback =
|
||||||
CreateVectorSlotPair(bytecode_iterator().GetIndexOperand(2));
|
CreateVectorSlotPair(bytecode_iterator().GetIndexOperand(2));
|
||||||
|
|
||||||
const Operator* op = javascript()->LoadNamed(language_mode(), name, feedback);
|
const Operator* op = javascript()->LoadNamed(name, feedback);
|
||||||
Node* node = NewNode(op, object, GetFunctionClosure());
|
Node* node = NewNode(op, object, GetFunctionClosure());
|
||||||
environment()->BindAccumulator(node, &states);
|
environment()->BindAccumulator(node, &states);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BytecodeGraphBuilder::VisitLoadICSloppy() {
|
void BytecodeGraphBuilder::VisitLoadIC() { BuildNamedLoad(); }
|
||||||
DCHECK(is_sloppy(language_mode()));
|
|
||||||
BuildNamedLoad();
|
|
||||||
}
|
|
||||||
|
|
||||||
void BytecodeGraphBuilder::VisitLoadICStrict() {
|
void BytecodeGraphBuilder::VisitLoadICWide() { BuildNamedLoad(); }
|
||||||
DCHECK(is_strict(language_mode()));
|
|
||||||
BuildNamedLoad();
|
|
||||||
}
|
|
||||||
|
|
||||||
void BytecodeGraphBuilder::VisitLoadICSloppyWide() {
|
|
||||||
DCHECK(is_sloppy(language_mode()));
|
|
||||||
BuildNamedLoad();
|
|
||||||
}
|
|
||||||
|
|
||||||
void BytecodeGraphBuilder::VisitLoadICStrictWide() {
|
|
||||||
DCHECK(is_strict(language_mode()));
|
|
||||||
BuildNamedLoad();
|
|
||||||
}
|
|
||||||
|
|
||||||
void BytecodeGraphBuilder::BuildKeyedLoad() {
|
void BytecodeGraphBuilder::BuildKeyedLoad() {
|
||||||
FrameStateBeforeAndAfter states(this);
|
FrameStateBeforeAndAfter states(this);
|
||||||
@ -833,30 +801,14 @@ void BytecodeGraphBuilder::BuildKeyedLoad() {
|
|||||||
VectorSlotPair feedback =
|
VectorSlotPair feedback =
|
||||||
CreateVectorSlotPair(bytecode_iterator().GetIndexOperand(1));
|
CreateVectorSlotPair(bytecode_iterator().GetIndexOperand(1));
|
||||||
|
|
||||||
const Operator* op = javascript()->LoadProperty(language_mode(), feedback);
|
const Operator* op = javascript()->LoadProperty(feedback);
|
||||||
Node* node = NewNode(op, object, key, GetFunctionClosure());
|
Node* node = NewNode(op, object, key, GetFunctionClosure());
|
||||||
environment()->BindAccumulator(node, &states);
|
environment()->BindAccumulator(node, &states);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BytecodeGraphBuilder::VisitKeyedLoadICSloppy() {
|
void BytecodeGraphBuilder::VisitKeyedLoadIC() { BuildKeyedLoad(); }
|
||||||
DCHECK(is_sloppy(language_mode()));
|
|
||||||
BuildKeyedLoad();
|
|
||||||
}
|
|
||||||
|
|
||||||
void BytecodeGraphBuilder::VisitKeyedLoadICStrict() {
|
void BytecodeGraphBuilder::VisitKeyedLoadICWide() { BuildKeyedLoad(); }
|
||||||
DCHECK(is_strict(language_mode()));
|
|
||||||
BuildKeyedLoad();
|
|
||||||
}
|
|
||||||
|
|
||||||
void BytecodeGraphBuilder::VisitKeyedLoadICSloppyWide() {
|
|
||||||
DCHECK(is_sloppy(language_mode()));
|
|
||||||
BuildKeyedLoad();
|
|
||||||
}
|
|
||||||
|
|
||||||
void BytecodeGraphBuilder::VisitKeyedLoadICStrictWide() {
|
|
||||||
DCHECK(is_strict(language_mode()));
|
|
||||||
BuildKeyedLoad();
|
|
||||||
}
|
|
||||||
|
|
||||||
void BytecodeGraphBuilder::BuildNamedStore(LanguageMode language_mode) {
|
void BytecodeGraphBuilder::BuildNamedStore(LanguageMode language_mode) {
|
||||||
FrameStateBeforeAndAfter states(this);
|
FrameStateBeforeAndAfter states(this);
|
||||||
|
@ -270,8 +270,8 @@ void JSGenericLowering::LowerJSLoadProperty(Node* node) {
|
|||||||
Node* control = NodeProperties::GetControlInput(node);
|
Node* control = NodeProperties::GetControlInput(node);
|
||||||
CallDescriptor::Flags flags = AdjustFrameStatesForCall(node);
|
CallDescriptor::Flags flags = AdjustFrameStatesForCall(node);
|
||||||
const PropertyAccess& p = PropertyAccessOf(node->op());
|
const PropertyAccess& p = PropertyAccessOf(node->op());
|
||||||
Callable callable = CodeFactory::KeyedLoadICInOptimizedCode(
|
Callable callable =
|
||||||
isolate(), p.language_mode(), UNINITIALIZED);
|
CodeFactory::KeyedLoadICInOptimizedCode(isolate(), UNINITIALIZED);
|
||||||
// Load the type feedback vector from the closure.
|
// Load the type feedback vector from the closure.
|
||||||
Node* shared_info = effect = graph()->NewNode(
|
Node* shared_info = effect = graph()->NewNode(
|
||||||
machine()->Load(MachineType::AnyTagged()), closure,
|
machine()->Load(MachineType::AnyTagged()), closure,
|
||||||
@ -297,7 +297,7 @@ void JSGenericLowering::LowerJSLoadNamed(Node* node) {
|
|||||||
CallDescriptor::Flags flags = AdjustFrameStatesForCall(node);
|
CallDescriptor::Flags flags = AdjustFrameStatesForCall(node);
|
||||||
NamedAccess const& p = NamedAccessOf(node->op());
|
NamedAccess const& p = NamedAccessOf(node->op());
|
||||||
Callable callable = CodeFactory::LoadICInOptimizedCode(
|
Callable callable = CodeFactory::LoadICInOptimizedCode(
|
||||||
isolate(), NOT_INSIDE_TYPEOF, p.language_mode(), UNINITIALIZED);
|
isolate(), NOT_INSIDE_TYPEOF, UNINITIALIZED);
|
||||||
// Load the type feedback vector from the closure.
|
// Load the type feedback vector from the closure.
|
||||||
Node* shared_info = effect = graph()->NewNode(
|
Node* shared_info = effect = graph()->NewNode(
|
||||||
machine()->Load(MachineType::AnyTagged()), closure,
|
machine()->Load(MachineType::AnyTagged()), closure,
|
||||||
@ -325,7 +325,7 @@ void JSGenericLowering::LowerJSLoadGlobal(Node* node) {
|
|||||||
CallDescriptor::Flags flags = AdjustFrameStatesForCall(node);
|
CallDescriptor::Flags flags = AdjustFrameStatesForCall(node);
|
||||||
const LoadGlobalParameters& p = LoadGlobalParametersOf(node->op());
|
const LoadGlobalParameters& p = LoadGlobalParametersOf(node->op());
|
||||||
Callable callable = CodeFactory::LoadICInOptimizedCode(
|
Callable callable = CodeFactory::LoadICInOptimizedCode(
|
||||||
isolate(), p.typeof_mode(), SLOPPY, UNINITIALIZED);
|
isolate(), p.typeof_mode(), UNINITIALIZED);
|
||||||
// Load the type feedback vector from the closure.
|
// Load the type feedback vector from the closure.
|
||||||
Node* shared_info = effect = graph()->NewNode(
|
Node* shared_info = effect = graph()->NewNode(
|
||||||
machine()->Load(MachineType::AnyTagged()), closure,
|
machine()->Load(MachineType::AnyTagged()), closure,
|
||||||
|
@ -603,11 +603,9 @@ const Operator* JSOperatorBuilder::ConvertReceiver(
|
|||||||
convert_mode); // parameter
|
convert_mode); // parameter
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const Operator* JSOperatorBuilder::LoadNamed(Handle<Name> name,
|
||||||
const Operator* JSOperatorBuilder::LoadNamed(LanguageMode language_mode,
|
|
||||||
Handle<Name> name,
|
|
||||||
const VectorSlotPair& feedback) {
|
const VectorSlotPair& feedback) {
|
||||||
NamedAccess access(language_mode, name, feedback);
|
NamedAccess access(SLOPPY, name, feedback);
|
||||||
return new (zone()) Operator1<NamedAccess>( // --
|
return new (zone()) Operator1<NamedAccess>( // --
|
||||||
IrOpcode::kJSLoadNamed, Operator::kNoProperties, // opcode
|
IrOpcode::kJSLoadNamed, Operator::kNoProperties, // opcode
|
||||||
"JSLoadNamed", // name
|
"JSLoadNamed", // name
|
||||||
@ -615,10 +613,9 @@ const Operator* JSOperatorBuilder::LoadNamed(LanguageMode language_mode,
|
|||||||
access); // parameter
|
access); // parameter
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const Operator* JSOperatorBuilder::LoadProperty(
|
const Operator* JSOperatorBuilder::LoadProperty(
|
||||||
LanguageMode language_mode, VectorSlotPair const& feedback) {
|
VectorSlotPair const& feedback) {
|
||||||
PropertyAccess access(language_mode, feedback);
|
PropertyAccess access(SLOPPY, feedback);
|
||||||
return new (zone()) Operator1<PropertyAccess>( // --
|
return new (zone()) Operator1<PropertyAccess>( // --
|
||||||
IrOpcode::kJSLoadProperty, Operator::kNoProperties, // opcode
|
IrOpcode::kJSLoadProperty, Operator::kNoProperties, // opcode
|
||||||
"JSLoadProperty", // name
|
"JSLoadProperty", // name
|
||||||
|
@ -438,10 +438,8 @@ class JSOperatorBuilder final : public ZoneObject {
|
|||||||
|
|
||||||
const Operator* ConvertReceiver(ConvertReceiverMode convert_mode);
|
const Operator* ConvertReceiver(ConvertReceiverMode convert_mode);
|
||||||
|
|
||||||
const Operator* LoadProperty(LanguageMode language_mode,
|
const Operator* LoadProperty(VectorSlotPair const& feedback);
|
||||||
VectorSlotPair const& feedback);
|
const Operator* LoadNamed(Handle<Name> name, VectorSlotPair const& feedback);
|
||||||
const Operator* LoadNamed(LanguageMode language_mode, Handle<Name> name,
|
|
||||||
VectorSlotPair const& feedback);
|
|
||||||
|
|
||||||
const Operator* StoreProperty(LanguageMode language_mode,
|
const Operator* StoreProperty(LanguageMode language_mode,
|
||||||
VectorSlotPair const& feedback);
|
VectorSlotPair const& feedback);
|
||||||
|
@ -2671,9 +2671,9 @@ void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
|
|||||||
|
|
||||||
__ mov(LoadDescriptor::NameRegister(), Operand(instr->name()));
|
__ mov(LoadDescriptor::NameRegister(), Operand(instr->name()));
|
||||||
EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
|
EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
|
||||||
Handle<Code> ic =
|
Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(
|
||||||
CodeFactory::LoadICInOptimizedCode(isolate(), instr->typeof_mode(),
|
isolate(), instr->typeof_mode(), PREMONOMORPHIC)
|
||||||
SLOPPY, PREMONOMORPHIC).code();
|
.code();
|
||||||
CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2768,10 +2768,10 @@ void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) {
|
|||||||
// Name is always in r2.
|
// Name is always in r2.
|
||||||
__ mov(LoadDescriptor::NameRegister(), Operand(instr->name()));
|
__ mov(LoadDescriptor::NameRegister(), Operand(instr->name()));
|
||||||
EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr);
|
EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr);
|
||||||
Handle<Code> ic =
|
Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(
|
||||||
CodeFactory::LoadICInOptimizedCode(
|
isolate(), NOT_INSIDE_TYPEOF,
|
||||||
isolate(), NOT_INSIDE_TYPEOF, instr->hydrogen()->language_mode(),
|
instr->hydrogen()->initialization_state())
|
||||||
instr->hydrogen()->initialization_state()).code();
|
.code();
|
||||||
CallCode(ic, RelocInfo::CODE_TARGET, instr, NEVER_INLINE_TARGET_ADDRESS);
|
CallCode(ic, RelocInfo::CODE_TARGET, instr, NEVER_INLINE_TARGET_ADDRESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3070,8 +3070,8 @@ void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Handle<Code> ic = CodeFactory::KeyedLoadICInOptimizedCode(
|
Handle<Code> ic = CodeFactory::KeyedLoadICInOptimizedCode(
|
||||||
isolate(), instr->hydrogen()->language_mode(),
|
isolate(), instr->hydrogen()->initialization_state())
|
||||||
instr->hydrogen()->initialization_state()).code();
|
.code();
|
||||||
CallCode(ic, RelocInfo::CODE_TARGET, instr, NEVER_INLINE_TARGET_ADDRESS);
|
CallCode(ic, RelocInfo::CODE_TARGET, instr, NEVER_INLINE_TARGET_ADDRESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3046,9 +3046,9 @@ void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
|
|||||||
DCHECK(ToRegister(instr->result()).Is(x0));
|
DCHECK(ToRegister(instr->result()).Is(x0));
|
||||||
__ Mov(LoadDescriptor::NameRegister(), Operand(instr->name()));
|
__ Mov(LoadDescriptor::NameRegister(), Operand(instr->name()));
|
||||||
EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
|
EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
|
||||||
Handle<Code> ic =
|
Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(
|
||||||
CodeFactory::LoadICInOptimizedCode(isolate(), instr->typeof_mode(),
|
isolate(), instr->typeof_mode(), PREMONOMORPHIC)
|
||||||
SLOPPY, PREMONOMORPHIC).code();
|
.code();
|
||||||
CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3311,8 +3311,8 @@ void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Handle<Code> ic = CodeFactory::KeyedLoadICInOptimizedCode(
|
Handle<Code> ic = CodeFactory::KeyedLoadICInOptimizedCode(
|
||||||
isolate(), instr->hydrogen()->language_mode(),
|
isolate(), instr->hydrogen()->initialization_state())
|
||||||
instr->hydrogen()->initialization_state()).code();
|
.code();
|
||||||
CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
||||||
|
|
||||||
DCHECK(ToRegister(instr->result()).Is(x0));
|
DCHECK(ToRegister(instr->result()).Is(x0));
|
||||||
@ -3366,10 +3366,10 @@ void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) {
|
|||||||
DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister()));
|
DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister()));
|
||||||
__ Mov(LoadDescriptor::NameRegister(), Operand(instr->name()));
|
__ Mov(LoadDescriptor::NameRegister(), Operand(instr->name()));
|
||||||
EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr);
|
EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr);
|
||||||
Handle<Code> ic =
|
Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(
|
||||||
CodeFactory::LoadICInOptimizedCode(
|
isolate(), NOT_INSIDE_TYPEOF,
|
||||||
isolate(), NOT_INSIDE_TYPEOF, instr->hydrogen()->language_mode(),
|
instr->hydrogen()->initialization_state())
|
||||||
instr->hydrogen()->initialization_state()).code();
|
.code();
|
||||||
CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
||||||
|
|
||||||
DCHECK(ToRegister(instr->result()).is(x0));
|
DCHECK(ToRegister(instr->result()).is(x0));
|
||||||
|
@ -6323,9 +6323,8 @@ class HLoadNamedField final : public HTemplateInstruction<2> {
|
|||||||
|
|
||||||
class HLoadNamedGeneric final : public HTemplateInstruction<2> {
|
class HLoadNamedGeneric final : public HTemplateInstruction<2> {
|
||||||
public:
|
public:
|
||||||
DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P4(HLoadNamedGeneric, HValue*,
|
DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P3(HLoadNamedGeneric, HValue*,
|
||||||
Handle<Name>, LanguageMode,
|
Handle<Name>, InlineCacheState);
|
||||||
InlineCacheState);
|
|
||||||
|
|
||||||
HValue* context() const { return OperandAt(0); }
|
HValue* context() const { return OperandAt(0); }
|
||||||
HValue* object() const { return OperandAt(1); }
|
HValue* object() const { return OperandAt(1); }
|
||||||
@ -6353,14 +6352,10 @@ class HLoadNamedGeneric final : public HTemplateInstruction<2> {
|
|||||||
|
|
||||||
DECLARE_CONCRETE_INSTRUCTION(LoadNamedGeneric)
|
DECLARE_CONCRETE_INSTRUCTION(LoadNamedGeneric)
|
||||||
|
|
||||||
LanguageMode language_mode() const { return language_mode_; }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
HLoadNamedGeneric(HValue* context, HValue* object, Handle<Name> name,
|
HLoadNamedGeneric(HValue* context, HValue* object, Handle<Name> name,
|
||||||
LanguageMode language_mode,
|
|
||||||
InlineCacheState initialization_state)
|
InlineCacheState initialization_state)
|
||||||
: name_(name),
|
: name_(name),
|
||||||
language_mode_(language_mode),
|
|
||||||
initialization_state_(initialization_state) {
|
initialization_state_(initialization_state) {
|
||||||
SetOperandAt(0, context);
|
SetOperandAt(0, context);
|
||||||
SetOperandAt(1, object);
|
SetOperandAt(1, object);
|
||||||
@ -6371,7 +6366,6 @@ class HLoadNamedGeneric final : public HTemplateInstruction<2> {
|
|||||||
Handle<Name> name_;
|
Handle<Name> name_;
|
||||||
Handle<TypeFeedbackVector> feedback_vector_;
|
Handle<TypeFeedbackVector> feedback_vector_;
|
||||||
FeedbackVectorSlot slot_;
|
FeedbackVectorSlot slot_;
|
||||||
LanguageMode language_mode_;
|
|
||||||
InlineCacheState initialization_state_;
|
InlineCacheState initialization_state_;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -6614,9 +6608,8 @@ class HLoadKeyed final : public HTemplateInstruction<4>,
|
|||||||
|
|
||||||
class HLoadKeyedGeneric final : public HTemplateInstruction<3> {
|
class HLoadKeyedGeneric final : public HTemplateInstruction<3> {
|
||||||
public:
|
public:
|
||||||
DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P4(HLoadKeyedGeneric, HValue*,
|
DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P3(HLoadKeyedGeneric, HValue*,
|
||||||
HValue*, LanguageMode,
|
HValue*, InlineCacheState);
|
||||||
InlineCacheState);
|
|
||||||
HValue* object() const { return OperandAt(0); }
|
HValue* object() const { return OperandAt(0); }
|
||||||
HValue* key() const { return OperandAt(1); }
|
HValue* key() const { return OperandAt(1); }
|
||||||
HValue* context() const { return OperandAt(2); }
|
HValue* context() const { return OperandAt(2); }
|
||||||
@ -6648,14 +6641,10 @@ class HLoadKeyedGeneric final : public HTemplateInstruction<3> {
|
|||||||
|
|
||||||
DECLARE_CONCRETE_INSTRUCTION(LoadKeyedGeneric)
|
DECLARE_CONCRETE_INSTRUCTION(LoadKeyedGeneric)
|
||||||
|
|
||||||
LanguageMode language_mode() const { return language_mode_; }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
HLoadKeyedGeneric(HValue* context, HValue* obj, HValue* key,
|
HLoadKeyedGeneric(HValue* context, HValue* obj, HValue* key,
|
||||||
LanguageMode language_mode,
|
|
||||||
InlineCacheState initialization_state)
|
InlineCacheState initialization_state)
|
||||||
: initialization_state_(initialization_state),
|
: initialization_state_(initialization_state) {
|
||||||
language_mode_(language_mode) {
|
|
||||||
set_representation(Representation::Tagged());
|
set_representation(Representation::Tagged());
|
||||||
SetOperandAt(0, obj);
|
SetOperandAt(0, obj);
|
||||||
SetOperandAt(1, key);
|
SetOperandAt(1, key);
|
||||||
@ -6666,7 +6655,6 @@ class HLoadKeyedGeneric final : public HTemplateInstruction<3> {
|
|||||||
Handle<TypeFeedbackVector> feedback_vector_;
|
Handle<TypeFeedbackVector> feedback_vector_;
|
||||||
FeedbackVectorSlot slot_;
|
FeedbackVectorSlot slot_;
|
||||||
InlineCacheState initialization_state_;
|
InlineCacheState initialization_state_;
|
||||||
LanguageMode language_mode_;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -1675,10 +1675,10 @@ HValue* HGraphBuilder::BuildElementIndexHash(HValue* index) {
|
|||||||
return AddUncasted<HBitwise>(Token::BIT_XOR, hash, shifted_hash);
|
return AddUncasted<HBitwise>(Token::BIT_XOR, hash, shifted_hash);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HValue* HGraphBuilder::BuildUncheckedDictionaryElementLoad(HValue* receiver,
|
||||||
HValue* HGraphBuilder::BuildUncheckedDictionaryElementLoad(
|
HValue* elements,
|
||||||
HValue* receiver, HValue* elements, HValue* key, HValue* hash,
|
HValue* key,
|
||||||
LanguageMode language_mode) {
|
HValue* hash) {
|
||||||
HValue* capacity =
|
HValue* capacity =
|
||||||
Add<HLoadKeyed>(elements, Add<HConstant>(NameDictionary::kCapacityIndex),
|
Add<HLoadKeyed>(elements, Add<HConstant>(NameDictionary::kCapacityIndex),
|
||||||
nullptr, nullptr, FAST_ELEMENTS);
|
nullptr, nullptr, FAST_ELEMENTS);
|
||||||
@ -1721,11 +1721,8 @@ HValue* HGraphBuilder::BuildUncheckedDictionaryElementLoad(
|
|||||||
// element == undefined means "not found". Call the runtime.
|
// element == undefined means "not found". Call the runtime.
|
||||||
// TODO(jkummerow): walk the prototype chain instead.
|
// TODO(jkummerow): walk the prototype chain instead.
|
||||||
Add<HPushArguments>(receiver, key);
|
Add<HPushArguments>(receiver, key);
|
||||||
Push(Add<HCallRuntime>(
|
Push(Add<HCallRuntime>(Runtime::FunctionForId(Runtime::kKeyedGetProperty),
|
||||||
Runtime::FunctionForId(is_strong(language_mode)
|
2));
|
||||||
? Runtime::kKeyedGetPropertyStrong
|
|
||||||
: Runtime::kKeyedGetProperty),
|
|
||||||
2));
|
|
||||||
}
|
}
|
||||||
if_undefined.Else();
|
if_undefined.Else();
|
||||||
{
|
{
|
||||||
@ -1784,11 +1781,8 @@ HValue* HGraphBuilder::BuildUncheckedDictionaryElementLoad(
|
|||||||
FAST_ELEMENTS));
|
FAST_ELEMENTS));
|
||||||
details_compare.Else();
|
details_compare.Else();
|
||||||
Add<HPushArguments>(receiver, key);
|
Add<HPushArguments>(receiver, key);
|
||||||
Push(Add<HCallRuntime>(
|
Push(Add<HCallRuntime>(Runtime::FunctionForId(Runtime::kKeyedGetProperty),
|
||||||
Runtime::FunctionForId(is_strong(language_mode)
|
2));
|
||||||
? Runtime::kKeyedGetPropertyStrong
|
|
||||||
: Runtime::kKeyedGetProperty),
|
|
||||||
2));
|
|
||||||
details_compare.End();
|
details_compare.End();
|
||||||
|
|
||||||
found_key_match.Else();
|
found_key_match.Else();
|
||||||
@ -7335,14 +7329,14 @@ HInstruction* HOptimizedGraphBuilder::BuildNamedGeneric(
|
|||||||
// use a generic Keyed Load if we are using the type vector, because
|
// use a generic Keyed Load if we are using the type vector, because
|
||||||
// it has to share information with full code.
|
// it has to share information with full code.
|
||||||
HConstant* key = Add<HConstant>(name);
|
HConstant* key = Add<HConstant>(name);
|
||||||
HLoadKeyedGeneric* result = New<HLoadKeyedGeneric>(
|
HLoadKeyedGeneric* result =
|
||||||
object, key, function_language_mode(), PREMONOMORPHIC);
|
New<HLoadKeyedGeneric>(object, key, PREMONOMORPHIC);
|
||||||
result->SetVectorAndSlot(vector, slot);
|
result->SetVectorAndSlot(vector, slot);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
HLoadNamedGeneric* result = New<HLoadNamedGeneric>(
|
HLoadNamedGeneric* result =
|
||||||
object, name, function_language_mode(), PREMONOMORPHIC);
|
New<HLoadNamedGeneric>(object, name, PREMONOMORPHIC);
|
||||||
result->SetVectorAndSlot(vector, slot);
|
result->SetVectorAndSlot(vector, slot);
|
||||||
return result;
|
return result;
|
||||||
} else {
|
} else {
|
||||||
@ -7376,8 +7370,8 @@ HInstruction* HOptimizedGraphBuilder::BuildKeyedGeneric(
|
|||||||
HValue* object, HValue* key, HValue* value) {
|
HValue* object, HValue* key, HValue* value) {
|
||||||
if (access_type == LOAD) {
|
if (access_type == LOAD) {
|
||||||
InlineCacheState initial_state = expr->AsProperty()->GetInlineCacheState();
|
InlineCacheState initial_state = expr->AsProperty()->GetInlineCacheState();
|
||||||
HLoadKeyedGeneric* result = New<HLoadKeyedGeneric>(
|
HLoadKeyedGeneric* result =
|
||||||
object, key, function_language_mode(), initial_state);
|
New<HLoadKeyedGeneric>(object, key, initial_state);
|
||||||
// HLoadKeyedGeneric with vector ics benefits from being encoded as
|
// HLoadKeyedGeneric with vector ics benefits from being encoded as
|
||||||
// MEGAMORPHIC because the vector/slot combo becomes unnecessary.
|
// MEGAMORPHIC because the vector/slot combo becomes unnecessary.
|
||||||
if (initial_state != MEGAMORPHIC) {
|
if (initial_state != MEGAMORPHIC) {
|
||||||
|
@ -1348,8 +1348,7 @@ class HGraphBuilder {
|
|||||||
|
|
||||||
HValue* BuildUncheckedDictionaryElementLoad(HValue* receiver,
|
HValue* BuildUncheckedDictionaryElementLoad(HValue* receiver,
|
||||||
HValue* elements, HValue* key,
|
HValue* elements, HValue* key,
|
||||||
HValue* hash,
|
HValue* hash);
|
||||||
LanguageMode language_mode);
|
|
||||||
|
|
||||||
// ES6 section 7.4.7 CreateIterResultObject ( value, done )
|
// ES6 section 7.4.7 CreateIterResultObject ( value, done )
|
||||||
HValue* BuildCreateIterResultObject(HValue* value, HValue* done);
|
HValue* BuildCreateIterResultObject(HValue* value, HValue* done);
|
||||||
|
@ -2600,9 +2600,9 @@ void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
|
|||||||
|
|
||||||
__ mov(LoadDescriptor::NameRegister(), instr->name());
|
__ mov(LoadDescriptor::NameRegister(), instr->name());
|
||||||
EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
|
EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
|
||||||
Handle<Code> ic =
|
Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(
|
||||||
CodeFactory::LoadICInOptimizedCode(isolate(), instr->typeof_mode(),
|
isolate(), instr->typeof_mode(), PREMONOMORPHIC)
|
||||||
SLOPPY, PREMONOMORPHIC).code();
|
.code();
|
||||||
CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2717,10 +2717,10 @@ void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) {
|
|||||||
|
|
||||||
__ mov(LoadDescriptor::NameRegister(), instr->name());
|
__ mov(LoadDescriptor::NameRegister(), instr->name());
|
||||||
EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr);
|
EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr);
|
||||||
Handle<Code> ic =
|
Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(
|
||||||
CodeFactory::LoadICInOptimizedCode(
|
isolate(), NOT_INSIDE_TYPEOF,
|
||||||
isolate(), NOT_INSIDE_TYPEOF, instr->hydrogen()->language_mode(),
|
instr->hydrogen()->initialization_state())
|
||||||
instr->hydrogen()->initialization_state()).code();
|
.code();
|
||||||
CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2956,8 +2956,8 @@ void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Handle<Code> ic = CodeFactory::KeyedLoadICInOptimizedCode(
|
Handle<Code> ic = CodeFactory::KeyedLoadICInOptimizedCode(
|
||||||
isolate(), instr->hydrogen()->language_mode(),
|
isolate(), instr->hydrogen()->initialization_state())
|
||||||
instr->hydrogen()->initialization_state()).code();
|
.code();
|
||||||
CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2587,9 +2587,9 @@ void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
|
|||||||
|
|
||||||
__ li(LoadDescriptor::NameRegister(), Operand(instr->name()));
|
__ li(LoadDescriptor::NameRegister(), Operand(instr->name()));
|
||||||
EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
|
EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
|
||||||
Handle<Code> ic =
|
Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(
|
||||||
CodeFactory::LoadICInOptimizedCode(isolate(), instr->typeof_mode(),
|
isolate(), instr->typeof_mode(), PREMONOMORPHIC)
|
||||||
SLOPPY, PREMONOMORPHIC).code();
|
.code();
|
||||||
CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2688,10 +2688,10 @@ void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) {
|
|||||||
// Name is always in a2.
|
// Name is always in a2.
|
||||||
__ li(LoadDescriptor::NameRegister(), Operand(instr->name()));
|
__ li(LoadDescriptor::NameRegister(), Operand(instr->name()));
|
||||||
EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr);
|
EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr);
|
||||||
Handle<Code> ic =
|
Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(
|
||||||
CodeFactory::LoadICInOptimizedCode(
|
isolate(), NOT_INSIDE_TYPEOF,
|
||||||
isolate(), NOT_INSIDE_TYPEOF, instr->hydrogen()->language_mode(),
|
instr->hydrogen()->initialization_state())
|
||||||
instr->hydrogen()->initialization_state()).code();
|
.code();
|
||||||
CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3001,8 +3001,8 @@ void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Handle<Code> ic = CodeFactory::KeyedLoadICInOptimizedCode(
|
Handle<Code> ic = CodeFactory::KeyedLoadICInOptimizedCode(
|
||||||
isolate(), instr->hydrogen()->language_mode(),
|
isolate(), instr->hydrogen()->initialization_state())
|
||||||
instr->hydrogen()->initialization_state()).code();
|
.code();
|
||||||
CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2708,9 +2708,9 @@ void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
|
|||||||
|
|
||||||
__ li(LoadDescriptor::NameRegister(), Operand(instr->name()));
|
__ li(LoadDescriptor::NameRegister(), Operand(instr->name()));
|
||||||
EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
|
EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
|
||||||
Handle<Code> ic =
|
Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(
|
||||||
CodeFactory::LoadICInOptimizedCode(isolate(), instr->typeof_mode(),
|
isolate(), instr->typeof_mode(), PREMONOMORPHIC)
|
||||||
SLOPPY, PREMONOMORPHIC).code();
|
.code();
|
||||||
CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2824,10 +2824,10 @@ void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) {
|
|||||||
// Name is always in a2.
|
// Name is always in a2.
|
||||||
__ li(LoadDescriptor::NameRegister(), Operand(instr->name()));
|
__ li(LoadDescriptor::NameRegister(), Operand(instr->name()));
|
||||||
EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr);
|
EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr);
|
||||||
Handle<Code> ic =
|
Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(
|
||||||
CodeFactory::LoadICInOptimizedCode(
|
isolate(), NOT_INSIDE_TYPEOF,
|
||||||
isolate(), NOT_INSIDE_TYPEOF, instr->hydrogen()->language_mode(),
|
instr->hydrogen()->initialization_state())
|
||||||
instr->hydrogen()->initialization_state()).code();
|
.code();
|
||||||
CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3181,8 +3181,8 @@ void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Handle<Code> ic = CodeFactory::KeyedLoadICInOptimizedCode(
|
Handle<Code> ic = CodeFactory::KeyedLoadICInOptimizedCode(
|
||||||
isolate(), instr->hydrogen()->language_mode(),
|
isolate(), instr->hydrogen()->initialization_state())
|
||||||
instr->hydrogen()->initialization_state()).code();
|
.code();
|
||||||
CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2738,9 +2738,9 @@ void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
|
|||||||
|
|
||||||
__ mov(LoadDescriptor::NameRegister(), Operand(instr->name()));
|
__ mov(LoadDescriptor::NameRegister(), Operand(instr->name()));
|
||||||
EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
|
EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
|
||||||
Handle<Code> ic =
|
Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(
|
||||||
CodeFactory::LoadICInOptimizedCode(isolate(), instr->typeof_mode(),
|
isolate(), instr->typeof_mode(), PREMONOMORPHIC)
|
||||||
SLOPPY, PREMONOMORPHIC).code();
|
.code();
|
||||||
CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2855,10 +2855,10 @@ void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) {
|
|||||||
// Name is always in r5.
|
// Name is always in r5.
|
||||||
__ mov(LoadDescriptor::NameRegister(), Operand(instr->name()));
|
__ mov(LoadDescriptor::NameRegister(), Operand(instr->name()));
|
||||||
EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr);
|
EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr);
|
||||||
Handle<Code> ic =
|
Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(
|
||||||
CodeFactory::LoadICInOptimizedCode(
|
isolate(), NOT_INSIDE_TYPEOF,
|
||||||
isolate(), NOT_INSIDE_TYPEOF, instr->hydrogen()->language_mode(),
|
instr->hydrogen()->initialization_state())
|
||||||
instr->hydrogen()->initialization_state()).code();
|
.code();
|
||||||
CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3222,8 +3222,8 @@ void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Handle<Code> ic = CodeFactory::KeyedLoadICInOptimizedCode(
|
Handle<Code> ic = CodeFactory::KeyedLoadICInOptimizedCode(
|
||||||
isolate(), instr->hydrogen()->language_mode(),
|
isolate(), instr->hydrogen()->initialization_state())
|
||||||
instr->hydrogen()->initialization_state()).code();
|
.code();
|
||||||
CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2616,9 +2616,9 @@ void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
|
|||||||
|
|
||||||
__ Move(LoadDescriptor::NameRegister(), instr->name());
|
__ Move(LoadDescriptor::NameRegister(), instr->name());
|
||||||
EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
|
EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
|
||||||
Handle<Code> ic =
|
Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(
|
||||||
CodeFactory::LoadICInOptimizedCode(isolate(), instr->typeof_mode(),
|
isolate(), instr->typeof_mode(), PREMONOMORPHIC)
|
||||||
SLOPPY, PREMONOMORPHIC).code();
|
.code();
|
||||||
CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2733,10 +2733,10 @@ void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) {
|
|||||||
|
|
||||||
__ Move(LoadDescriptor::NameRegister(), instr->name());
|
__ Move(LoadDescriptor::NameRegister(), instr->name());
|
||||||
EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr);
|
EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr);
|
||||||
Handle<Code> ic =
|
Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(
|
||||||
CodeFactory::LoadICInOptimizedCode(
|
isolate(), NOT_INSIDE_TYPEOF,
|
||||||
isolate(), NOT_INSIDE_TYPEOF, instr->hydrogen()->language_mode(),
|
instr->hydrogen()->initialization_state())
|
||||||
instr->hydrogen()->initialization_state()).code();
|
.code();
|
||||||
CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3025,8 +3025,8 @@ void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Handle<Code> ic = CodeFactory::KeyedLoadICInOptimizedCode(
|
Handle<Code> ic = CodeFactory::KeyedLoadICInOptimizedCode(
|
||||||
isolate(), instr->hydrogen()->language_mode(),
|
isolate(), instr->hydrogen()->initialization_state())
|
||||||
instr->hydrogen()->initialization_state()).code();
|
.code();
|
||||||
CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2886,9 +2886,9 @@ void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
|
|||||||
|
|
||||||
__ mov(LoadDescriptor::NameRegister(), instr->name());
|
__ mov(LoadDescriptor::NameRegister(), instr->name());
|
||||||
EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
|
EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
|
||||||
Handle<Code> ic =
|
Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(
|
||||||
CodeFactory::LoadICInOptimizedCode(isolate(), instr->typeof_mode(),
|
isolate(), instr->typeof_mode(), PREMONOMORPHIC)
|
||||||
SLOPPY, PREMONOMORPHIC).code();
|
.code();
|
||||||
CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2997,10 +2997,10 @@ void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) {
|
|||||||
|
|
||||||
__ mov(LoadDescriptor::NameRegister(), instr->name());
|
__ mov(LoadDescriptor::NameRegister(), instr->name());
|
||||||
EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr);
|
EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr);
|
||||||
Handle<Code> ic =
|
Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(
|
||||||
CodeFactory::LoadICInOptimizedCode(
|
isolate(), NOT_INSIDE_TYPEOF,
|
||||||
isolate(), NOT_INSIDE_TYPEOF, instr->hydrogen()->language_mode(),
|
instr->hydrogen()->initialization_state())
|
||||||
instr->hydrogen()->initialization_state()).code();
|
.code();
|
||||||
CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3233,8 +3233,8 @@ void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Handle<Code> ic = CodeFactory::KeyedLoadICInOptimizedCode(
|
Handle<Code> ic = CodeFactory::KeyedLoadICInOptimizedCode(
|
||||||
isolate(), instr->hydrogen()->language_mode(),
|
isolate(), instr->hydrogen()->initialization_state())
|
||||||
instr->hydrogen()->initialization_state()).code();
|
.code();
|
||||||
CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -707,7 +707,7 @@ MaybeHandle<Object> Debug::CallFunction(const char* name, int argc,
|
|||||||
AssertDebugContext();
|
AssertDebugContext();
|
||||||
Handle<Object> holder = isolate_->natives_utils_object();
|
Handle<Object> holder = isolate_->natives_utils_object();
|
||||||
Handle<JSFunction> fun = Handle<JSFunction>::cast(
|
Handle<JSFunction> fun = Handle<JSFunction>::cast(
|
||||||
Object::GetProperty(isolate_, holder, name, STRICT).ToHandleChecked());
|
Object::GetProperty(isolate_, holder, name).ToHandleChecked());
|
||||||
Handle<Object> undefined = isolate_->factory()->undefined_value();
|
Handle<Object> undefined = isolate_->factory()->undefined_value();
|
||||||
return Execution::TryCall(isolate_, fun, undefined, argc, args);
|
return Execution::TryCall(isolate_, fun, undefined, argc, args);
|
||||||
}
|
}
|
||||||
|
@ -2106,7 +2106,7 @@ void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) {
|
|||||||
__ mov(LoadDescriptor::NameRegister(), Operand(key->value()));
|
__ mov(LoadDescriptor::NameRegister(), Operand(key->value()));
|
||||||
__ mov(LoadDescriptor::SlotRegister(),
|
__ mov(LoadDescriptor::SlotRegister(),
|
||||||
Operand(SmiFromSlot(prop->PropertyFeedbackSlot())));
|
Operand(SmiFromSlot(prop->PropertyFeedbackSlot())));
|
||||||
CallLoadIC(NOT_INSIDE_TYPEOF, language_mode());
|
CallLoadIC(NOT_INSIDE_TYPEOF);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -2118,14 +2118,13 @@ void FullCodeGenerator::EmitNamedSuperPropertyLoad(Property* prop) {
|
|||||||
DCHECK(prop->IsSuperAccess());
|
DCHECK(prop->IsSuperAccess());
|
||||||
|
|
||||||
__ Push(key->value());
|
__ Push(key->value());
|
||||||
__ Push(Smi::FromInt(language_mode()));
|
|
||||||
__ CallRuntime(Runtime::kLoadFromSuper);
|
__ CallRuntime(Runtime::kLoadFromSuper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) {
|
void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) {
|
||||||
SetExpressionPosition(prop);
|
SetExpressionPosition(prop);
|
||||||
Handle<Code> ic = CodeFactory::KeyedLoadIC(isolate(), language_mode()).code();
|
Handle<Code> ic = CodeFactory::KeyedLoadIC(isolate()).code();
|
||||||
__ mov(LoadDescriptor::SlotRegister(),
|
__ mov(LoadDescriptor::SlotRegister(),
|
||||||
Operand(SmiFromSlot(prop->PropertyFeedbackSlot())));
|
Operand(SmiFromSlot(prop->PropertyFeedbackSlot())));
|
||||||
CallIC(ic);
|
CallIC(ic);
|
||||||
@ -2135,7 +2134,6 @@ void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) {
|
|||||||
void FullCodeGenerator::EmitKeyedSuperPropertyLoad(Property* prop) {
|
void FullCodeGenerator::EmitKeyedSuperPropertyLoad(Property* prop) {
|
||||||
// Stack: receiver, home_object, key.
|
// Stack: receiver, home_object, key.
|
||||||
SetExpressionPosition(prop);
|
SetExpressionPosition(prop);
|
||||||
__ Push(Smi::FromInt(language_mode()));
|
|
||||||
__ CallRuntime(Runtime::kLoadKeyedFromSuper);
|
__ CallRuntime(Runtime::kLoadKeyedFromSuper);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2658,7 +2656,6 @@ void FullCodeGenerator::EmitSuperCallWithLoadIC(Call* expr) {
|
|||||||
__ ldr(scratch, MemOperand(sp, kPointerSize * 2));
|
__ ldr(scratch, MemOperand(sp, kPointerSize * 2));
|
||||||
__ Push(scratch);
|
__ Push(scratch);
|
||||||
__ Push(key->value());
|
__ Push(key->value());
|
||||||
__ Push(Smi::FromInt(language_mode()));
|
|
||||||
|
|
||||||
// Stack here:
|
// Stack here:
|
||||||
// - home_object
|
// - home_object
|
||||||
@ -2666,7 +2663,6 @@ void FullCodeGenerator::EmitSuperCallWithLoadIC(Call* expr) {
|
|||||||
// - this (receiver) <-- LoadFromSuper will pop here and below.
|
// - this (receiver) <-- LoadFromSuper will pop here and below.
|
||||||
// - home_object
|
// - home_object
|
||||||
// - key
|
// - key
|
||||||
// - language_mode
|
|
||||||
__ CallRuntime(Runtime::kLoadFromSuper);
|
__ CallRuntime(Runtime::kLoadFromSuper);
|
||||||
|
|
||||||
// Replace home_object with target function.
|
// Replace home_object with target function.
|
||||||
@ -2720,7 +2716,6 @@ void FullCodeGenerator::EmitKeyedSuperCallWithLoadIC(Call* expr) {
|
|||||||
__ ldr(scratch, MemOperand(sp, kPointerSize * 2));
|
__ ldr(scratch, MemOperand(sp, kPointerSize * 2));
|
||||||
__ Push(scratch);
|
__ Push(scratch);
|
||||||
VisitForStackValue(prop->key());
|
VisitForStackValue(prop->key());
|
||||||
__ Push(Smi::FromInt(language_mode()));
|
|
||||||
|
|
||||||
// Stack here:
|
// Stack here:
|
||||||
// - home_object
|
// - home_object
|
||||||
@ -2728,7 +2723,6 @@ void FullCodeGenerator::EmitKeyedSuperCallWithLoadIC(Call* expr) {
|
|||||||
// - this (receiver) <-- LoadKeyedFromSuper will pop here and below.
|
// - this (receiver) <-- LoadKeyedFromSuper will pop here and below.
|
||||||
// - home_object
|
// - home_object
|
||||||
// - key
|
// - key
|
||||||
// - language_mode
|
|
||||||
__ CallRuntime(Runtime::kLoadKeyedFromSuper);
|
__ CallRuntime(Runtime::kLoadKeyedFromSuper);
|
||||||
|
|
||||||
// Replace home_object with target function.
|
// Replace home_object with target function.
|
||||||
|
@ -1892,7 +1892,7 @@ void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) {
|
|||||||
__ Mov(LoadDescriptor::NameRegister(), Operand(key->value()));
|
__ Mov(LoadDescriptor::NameRegister(), Operand(key->value()));
|
||||||
__ Mov(LoadDescriptor::SlotRegister(),
|
__ Mov(LoadDescriptor::SlotRegister(),
|
||||||
SmiFromSlot(prop->PropertyFeedbackSlot()));
|
SmiFromSlot(prop->PropertyFeedbackSlot()));
|
||||||
CallLoadIC(NOT_INSIDE_TYPEOF, language_mode());
|
CallLoadIC(NOT_INSIDE_TYPEOF);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1904,7 +1904,6 @@ void FullCodeGenerator::EmitNamedSuperPropertyLoad(Property* prop) {
|
|||||||
DCHECK(prop->IsSuperAccess());
|
DCHECK(prop->IsSuperAccess());
|
||||||
|
|
||||||
__ Push(key->value());
|
__ Push(key->value());
|
||||||
__ Push(Smi::FromInt(language_mode()));
|
|
||||||
__ CallRuntime(Runtime::kLoadFromSuper);
|
__ CallRuntime(Runtime::kLoadFromSuper);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1912,7 +1911,7 @@ void FullCodeGenerator::EmitNamedSuperPropertyLoad(Property* prop) {
|
|||||||
void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) {
|
void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) {
|
||||||
SetExpressionPosition(prop);
|
SetExpressionPosition(prop);
|
||||||
// Call keyed load IC. It has arguments key and receiver in x0 and x1.
|
// Call keyed load IC. It has arguments key and receiver in x0 and x1.
|
||||||
Handle<Code> ic = CodeFactory::KeyedLoadIC(isolate(), language_mode()).code();
|
Handle<Code> ic = CodeFactory::KeyedLoadIC(isolate()).code();
|
||||||
__ Mov(LoadDescriptor::SlotRegister(),
|
__ Mov(LoadDescriptor::SlotRegister(),
|
||||||
SmiFromSlot(prop->PropertyFeedbackSlot()));
|
SmiFromSlot(prop->PropertyFeedbackSlot()));
|
||||||
CallIC(ic);
|
CallIC(ic);
|
||||||
@ -1922,7 +1921,6 @@ void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) {
|
|||||||
void FullCodeGenerator::EmitKeyedSuperPropertyLoad(Property* prop) {
|
void FullCodeGenerator::EmitKeyedSuperPropertyLoad(Property* prop) {
|
||||||
// Stack: receiver, home_object, key.
|
// Stack: receiver, home_object, key.
|
||||||
SetExpressionPosition(prop);
|
SetExpressionPosition(prop);
|
||||||
__ Push(Smi::FromInt(language_mode()));
|
|
||||||
__ CallRuntime(Runtime::kLoadKeyedFromSuper);
|
__ CallRuntime(Runtime::kLoadKeyedFromSuper);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2459,14 +2457,12 @@ void FullCodeGenerator::EmitSuperCallWithLoadIC(Call* expr) {
|
|||||||
__ Peek(scratch, kPointerSize);
|
__ Peek(scratch, kPointerSize);
|
||||||
__ Push(x0, scratch);
|
__ Push(x0, scratch);
|
||||||
__ Push(key->value());
|
__ Push(key->value());
|
||||||
__ Push(Smi::FromInt(language_mode()));
|
|
||||||
|
|
||||||
// Stack here:
|
// Stack here:
|
||||||
// - home_object
|
// - home_object
|
||||||
// - this (receiver)
|
// - this (receiver)
|
||||||
// - this (receiver) <-- LoadFromSuper will pop here and below.
|
// - this (receiver) <-- LoadFromSuper will pop here and below.
|
||||||
// - home_object
|
// - home_object
|
||||||
// - language_mode
|
|
||||||
__ CallRuntime(Runtime::kLoadFromSuper);
|
__ CallRuntime(Runtime::kLoadFromSuper);
|
||||||
|
|
||||||
// Replace home_object with target function.
|
// Replace home_object with target function.
|
||||||
@ -2521,7 +2517,6 @@ void FullCodeGenerator::EmitKeyedSuperCallWithLoadIC(Call* expr) {
|
|||||||
__ Peek(scratch, kPointerSize);
|
__ Peek(scratch, kPointerSize);
|
||||||
__ Push(x0, scratch);
|
__ Push(x0, scratch);
|
||||||
VisitForStackValue(prop->key());
|
VisitForStackValue(prop->key());
|
||||||
__ Push(Smi::FromInt(language_mode()));
|
|
||||||
|
|
||||||
// Stack here:
|
// Stack here:
|
||||||
// - home_object
|
// - home_object
|
||||||
@ -2529,7 +2524,6 @@ void FullCodeGenerator::EmitKeyedSuperCallWithLoadIC(Call* expr) {
|
|||||||
// - this (receiver) <-- LoadKeyedFromSuper will pop here and below.
|
// - this (receiver) <-- LoadKeyedFromSuper will pop here and below.
|
||||||
// - home_object
|
// - home_object
|
||||||
// - key
|
// - key
|
||||||
// - language_mode
|
|
||||||
__ CallRuntime(Runtime::kLoadKeyedFromSuper);
|
__ CallRuntime(Runtime::kLoadKeyedFromSuper);
|
||||||
|
|
||||||
// Replace home_object with target function.
|
// Replace home_object with target function.
|
||||||
|
@ -181,10 +181,8 @@ void FullCodeGenerator::PrepareForBailout(Expression* node, State state) {
|
|||||||
|
|
||||||
|
|
||||||
void FullCodeGenerator::CallLoadIC(TypeofMode typeof_mode,
|
void FullCodeGenerator::CallLoadIC(TypeofMode typeof_mode,
|
||||||
LanguageMode language_mode,
|
|
||||||
TypeFeedbackId id) {
|
TypeFeedbackId id) {
|
||||||
Handle<Code> ic =
|
Handle<Code> ic = CodeFactory::LoadIC(isolate(), typeof_mode).code();
|
||||||
CodeFactory::LoadIC(isolate(), typeof_mode, language_mode).code();
|
|
||||||
CallIC(ic, id);
|
CallIC(ic, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -675,7 +675,7 @@ class FullCodeGenerator: public AstVisitor {
|
|||||||
TypeFeedbackId id = TypeFeedbackId::None());
|
TypeFeedbackId id = TypeFeedbackId::None());
|
||||||
|
|
||||||
// Inside typeof reference errors are never thrown.
|
// Inside typeof reference errors are never thrown.
|
||||||
void CallLoadIC(TypeofMode typeof_mode, LanguageMode language_mode = SLOPPY,
|
void CallLoadIC(TypeofMode typeof_mode,
|
||||||
TypeFeedbackId id = TypeFeedbackId::None());
|
TypeFeedbackId id = TypeFeedbackId::None());
|
||||||
void CallStoreIC(TypeFeedbackId id = TypeFeedbackId::None());
|
void CallStoreIC(TypeFeedbackId id = TypeFeedbackId::None());
|
||||||
|
|
||||||
|
@ -2009,7 +2009,7 @@ void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) {
|
|||||||
__ mov(LoadDescriptor::NameRegister(), Immediate(key->value()));
|
__ mov(LoadDescriptor::NameRegister(), Immediate(key->value()));
|
||||||
__ mov(LoadDescriptor::SlotRegister(),
|
__ mov(LoadDescriptor::SlotRegister(),
|
||||||
Immediate(SmiFromSlot(prop->PropertyFeedbackSlot())));
|
Immediate(SmiFromSlot(prop->PropertyFeedbackSlot())));
|
||||||
CallLoadIC(NOT_INSIDE_TYPEOF, language_mode());
|
CallLoadIC(NOT_INSIDE_TYPEOF);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -2021,14 +2021,13 @@ void FullCodeGenerator::EmitNamedSuperPropertyLoad(Property* prop) {
|
|||||||
DCHECK(prop->IsSuperAccess());
|
DCHECK(prop->IsSuperAccess());
|
||||||
|
|
||||||
__ push(Immediate(key->value()));
|
__ push(Immediate(key->value()));
|
||||||
__ push(Immediate(Smi::FromInt(language_mode())));
|
|
||||||
__ CallRuntime(Runtime::kLoadFromSuper);
|
__ CallRuntime(Runtime::kLoadFromSuper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) {
|
void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) {
|
||||||
SetExpressionPosition(prop);
|
SetExpressionPosition(prop);
|
||||||
Handle<Code> ic = CodeFactory::KeyedLoadIC(isolate(), language_mode()).code();
|
Handle<Code> ic = CodeFactory::KeyedLoadIC(isolate()).code();
|
||||||
__ mov(LoadDescriptor::SlotRegister(),
|
__ mov(LoadDescriptor::SlotRegister(),
|
||||||
Immediate(SmiFromSlot(prop->PropertyFeedbackSlot())));
|
Immediate(SmiFromSlot(prop->PropertyFeedbackSlot())));
|
||||||
CallIC(ic);
|
CallIC(ic);
|
||||||
@ -2038,7 +2037,6 @@ void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) {
|
|||||||
void FullCodeGenerator::EmitKeyedSuperPropertyLoad(Property* prop) {
|
void FullCodeGenerator::EmitKeyedSuperPropertyLoad(Property* prop) {
|
||||||
// Stack: receiver, home_object, key.
|
// Stack: receiver, home_object, key.
|
||||||
SetExpressionPosition(prop);
|
SetExpressionPosition(prop);
|
||||||
__ push(Immediate(Smi::FromInt(language_mode())));
|
|
||||||
__ CallRuntime(Runtime::kLoadKeyedFromSuper);
|
__ CallRuntime(Runtime::kLoadKeyedFromSuper);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2549,14 +2547,12 @@ void FullCodeGenerator::EmitSuperCallWithLoadIC(Call* expr) {
|
|||||||
__ push(eax);
|
__ push(eax);
|
||||||
__ push(Operand(esp, kPointerSize * 2));
|
__ push(Operand(esp, kPointerSize * 2));
|
||||||
__ push(Immediate(key->value()));
|
__ push(Immediate(key->value()));
|
||||||
__ push(Immediate(Smi::FromInt(language_mode())));
|
|
||||||
// Stack here:
|
// Stack here:
|
||||||
// - home_object
|
// - home_object
|
||||||
// - this (receiver)
|
// - this (receiver)
|
||||||
// - this (receiver) <-- LoadFromSuper will pop here and below.
|
// - this (receiver) <-- LoadFromSuper will pop here and below.
|
||||||
// - home_object
|
// - home_object
|
||||||
// - key
|
// - key
|
||||||
// - language_mode
|
|
||||||
__ CallRuntime(Runtime::kLoadFromSuper);
|
__ CallRuntime(Runtime::kLoadFromSuper);
|
||||||
|
|
||||||
// Replace home_object with target function.
|
// Replace home_object with target function.
|
||||||
@ -2607,14 +2603,12 @@ void FullCodeGenerator::EmitKeyedSuperCallWithLoadIC(Call* expr) {
|
|||||||
__ push(eax);
|
__ push(eax);
|
||||||
__ push(Operand(esp, kPointerSize * 2));
|
__ push(Operand(esp, kPointerSize * 2));
|
||||||
VisitForStackValue(prop->key());
|
VisitForStackValue(prop->key());
|
||||||
__ push(Immediate(Smi::FromInt(language_mode())));
|
|
||||||
// Stack here:
|
// Stack here:
|
||||||
// - home_object
|
// - home_object
|
||||||
// - this (receiver)
|
// - this (receiver)
|
||||||
// - this (receiver) <-- LoadKeyedFromSuper will pop here and below.
|
// - this (receiver) <-- LoadKeyedFromSuper will pop here and below.
|
||||||
// - home_object
|
// - home_object
|
||||||
// - key
|
// - key
|
||||||
// - language_mode
|
|
||||||
__ CallRuntime(Runtime::kLoadKeyedFromSuper);
|
__ CallRuntime(Runtime::kLoadKeyedFromSuper);
|
||||||
|
|
||||||
// Replace home_object with target function.
|
// Replace home_object with target function.
|
||||||
|
@ -2093,7 +2093,7 @@ void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) {
|
|||||||
__ li(LoadDescriptor::NameRegister(), Operand(key->value()));
|
__ li(LoadDescriptor::NameRegister(), Operand(key->value()));
|
||||||
__ li(LoadDescriptor::SlotRegister(),
|
__ li(LoadDescriptor::SlotRegister(),
|
||||||
Operand(SmiFromSlot(prop->PropertyFeedbackSlot())));
|
Operand(SmiFromSlot(prop->PropertyFeedbackSlot())));
|
||||||
CallLoadIC(NOT_INSIDE_TYPEOF, language_mode());
|
CallLoadIC(NOT_INSIDE_TYPEOF);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -2106,14 +2106,13 @@ void FullCodeGenerator::EmitNamedSuperPropertyLoad(Property* prop) {
|
|||||||
DCHECK(prop->IsSuperAccess());
|
DCHECK(prop->IsSuperAccess());
|
||||||
|
|
||||||
__ Push(key->value());
|
__ Push(key->value());
|
||||||
__ Push(Smi::FromInt(language_mode()));
|
|
||||||
__ CallRuntime(Runtime::kLoadFromSuper);
|
__ CallRuntime(Runtime::kLoadFromSuper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) {
|
void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) {
|
||||||
SetExpressionPosition(prop);
|
SetExpressionPosition(prop);
|
||||||
Handle<Code> ic = CodeFactory::KeyedLoadIC(isolate(), language_mode()).code();
|
Handle<Code> ic = CodeFactory::KeyedLoadIC(isolate()).code();
|
||||||
__ li(LoadDescriptor::SlotRegister(),
|
__ li(LoadDescriptor::SlotRegister(),
|
||||||
Operand(SmiFromSlot(prop->PropertyFeedbackSlot())));
|
Operand(SmiFromSlot(prop->PropertyFeedbackSlot())));
|
||||||
CallIC(ic);
|
CallIC(ic);
|
||||||
@ -2123,7 +2122,6 @@ void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) {
|
|||||||
void FullCodeGenerator::EmitKeyedSuperPropertyLoad(Property* prop) {
|
void FullCodeGenerator::EmitKeyedSuperPropertyLoad(Property* prop) {
|
||||||
// Stack: receiver, home_object, key.
|
// Stack: receiver, home_object, key.
|
||||||
SetExpressionPosition(prop);
|
SetExpressionPosition(prop);
|
||||||
__ Push(Smi::FromInt(language_mode()));
|
|
||||||
__ CallRuntime(Runtime::kLoadKeyedFromSuper);
|
__ CallRuntime(Runtime::kLoadKeyedFromSuper);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2646,7 +2644,6 @@ void FullCodeGenerator::EmitSuperCallWithLoadIC(Call* expr) {
|
|||||||
VisitForAccumulatorValue(super_ref->this_var());
|
VisitForAccumulatorValue(super_ref->this_var());
|
||||||
__ Push(scratch, v0, v0, scratch);
|
__ Push(scratch, v0, v0, scratch);
|
||||||
__ Push(key->value());
|
__ Push(key->value());
|
||||||
__ Push(Smi::FromInt(language_mode()));
|
|
||||||
|
|
||||||
// Stack here:
|
// Stack here:
|
||||||
// - home_object
|
// - home_object
|
||||||
@ -2654,7 +2651,6 @@ void FullCodeGenerator::EmitSuperCallWithLoadIC(Call* expr) {
|
|||||||
// - this (receiver) <-- LoadFromSuper will pop here and below.
|
// - this (receiver) <-- LoadFromSuper will pop here and below.
|
||||||
// - home_object
|
// - home_object
|
||||||
// - key
|
// - key
|
||||||
// - language_mode
|
|
||||||
__ CallRuntime(Runtime::kLoadFromSuper);
|
__ CallRuntime(Runtime::kLoadFromSuper);
|
||||||
|
|
||||||
// Replace home_object with target function.
|
// Replace home_object with target function.
|
||||||
@ -2706,7 +2702,6 @@ void FullCodeGenerator::EmitKeyedSuperCallWithLoadIC(Call* expr) {
|
|||||||
VisitForAccumulatorValue(super_ref->this_var());
|
VisitForAccumulatorValue(super_ref->this_var());
|
||||||
__ Push(scratch, v0, v0, scratch);
|
__ Push(scratch, v0, v0, scratch);
|
||||||
VisitForStackValue(prop->key());
|
VisitForStackValue(prop->key());
|
||||||
__ Push(Smi::FromInt(language_mode()));
|
|
||||||
|
|
||||||
// Stack here:
|
// Stack here:
|
||||||
// - home_object
|
// - home_object
|
||||||
@ -2714,7 +2709,6 @@ void FullCodeGenerator::EmitKeyedSuperCallWithLoadIC(Call* expr) {
|
|||||||
// - this (receiver) <-- LoadKeyedFromSuper will pop here and below.
|
// - this (receiver) <-- LoadKeyedFromSuper will pop here and below.
|
||||||
// - home_object
|
// - home_object
|
||||||
// - key
|
// - key
|
||||||
// - language_mode
|
|
||||||
__ CallRuntime(Runtime::kLoadKeyedFromSuper);
|
__ CallRuntime(Runtime::kLoadKeyedFromSuper);
|
||||||
|
|
||||||
// Replace home_object with target function.
|
// Replace home_object with target function.
|
||||||
|
@ -2097,7 +2097,7 @@ void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) {
|
|||||||
__ li(LoadDescriptor::NameRegister(), Operand(key->value()));
|
__ li(LoadDescriptor::NameRegister(), Operand(key->value()));
|
||||||
__ li(LoadDescriptor::SlotRegister(),
|
__ li(LoadDescriptor::SlotRegister(),
|
||||||
Operand(SmiFromSlot(prop->PropertyFeedbackSlot())));
|
Operand(SmiFromSlot(prop->PropertyFeedbackSlot())));
|
||||||
CallLoadIC(NOT_INSIDE_TYPEOF, language_mode());
|
CallLoadIC(NOT_INSIDE_TYPEOF);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -2110,7 +2110,6 @@ void FullCodeGenerator::EmitNamedSuperPropertyLoad(Property* prop) {
|
|||||||
DCHECK(prop->IsSuperAccess());
|
DCHECK(prop->IsSuperAccess());
|
||||||
|
|
||||||
__ Push(key->value());
|
__ Push(key->value());
|
||||||
__ Push(Smi::FromInt(language_mode()));
|
|
||||||
__ CallRuntime(Runtime::kLoadFromSuper);
|
__ CallRuntime(Runtime::kLoadFromSuper);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2119,7 +2118,7 @@ void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) {
|
|||||||
// Call keyed load IC. It has register arguments receiver and key.
|
// Call keyed load IC. It has register arguments receiver and key.
|
||||||
SetExpressionPosition(prop);
|
SetExpressionPosition(prop);
|
||||||
|
|
||||||
Handle<Code> ic = CodeFactory::KeyedLoadIC(isolate(), language_mode()).code();
|
Handle<Code> ic = CodeFactory::KeyedLoadIC(isolate()).code();
|
||||||
__ li(LoadDescriptor::SlotRegister(),
|
__ li(LoadDescriptor::SlotRegister(),
|
||||||
Operand(SmiFromSlot(prop->PropertyFeedbackSlot())));
|
Operand(SmiFromSlot(prop->PropertyFeedbackSlot())));
|
||||||
CallIC(ic);
|
CallIC(ic);
|
||||||
@ -2129,7 +2128,6 @@ void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) {
|
|||||||
void FullCodeGenerator::EmitKeyedSuperPropertyLoad(Property* prop) {
|
void FullCodeGenerator::EmitKeyedSuperPropertyLoad(Property* prop) {
|
||||||
// Stack: receiver, home_object, key.
|
// Stack: receiver, home_object, key.
|
||||||
SetExpressionPosition(prop);
|
SetExpressionPosition(prop);
|
||||||
__ Push(Smi::FromInt(language_mode()));
|
|
||||||
__ CallRuntime(Runtime::kLoadKeyedFromSuper);
|
__ CallRuntime(Runtime::kLoadKeyedFromSuper);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2652,7 +2650,6 @@ void FullCodeGenerator::EmitSuperCallWithLoadIC(Call* expr) {
|
|||||||
VisitForAccumulatorValue(super_ref->this_var());
|
VisitForAccumulatorValue(super_ref->this_var());
|
||||||
__ Push(scratch, v0, v0, scratch);
|
__ Push(scratch, v0, v0, scratch);
|
||||||
__ Push(key->value());
|
__ Push(key->value());
|
||||||
__ Push(Smi::FromInt(language_mode()));
|
|
||||||
|
|
||||||
// Stack here:
|
// Stack here:
|
||||||
// - home_object
|
// - home_object
|
||||||
@ -2660,7 +2657,6 @@ void FullCodeGenerator::EmitSuperCallWithLoadIC(Call* expr) {
|
|||||||
// - this (receiver) <-- LoadFromSuper will pop here and below.
|
// - this (receiver) <-- LoadFromSuper will pop here and below.
|
||||||
// - home_object
|
// - home_object
|
||||||
// - key
|
// - key
|
||||||
// - language_mode
|
|
||||||
__ CallRuntime(Runtime::kLoadFromSuper);
|
__ CallRuntime(Runtime::kLoadFromSuper);
|
||||||
|
|
||||||
// Replace home_object with target function.
|
// Replace home_object with target function.
|
||||||
@ -2712,7 +2708,6 @@ void FullCodeGenerator::EmitKeyedSuperCallWithLoadIC(Call* expr) {
|
|||||||
VisitForAccumulatorValue(super_ref->this_var());
|
VisitForAccumulatorValue(super_ref->this_var());
|
||||||
__ Push(scratch, v0, v0, scratch);
|
__ Push(scratch, v0, v0, scratch);
|
||||||
VisitForStackValue(prop->key());
|
VisitForStackValue(prop->key());
|
||||||
__ Push(Smi::FromInt(language_mode()));
|
|
||||||
|
|
||||||
// Stack here:
|
// Stack here:
|
||||||
// - home_object
|
// - home_object
|
||||||
@ -2720,7 +2715,6 @@ void FullCodeGenerator::EmitKeyedSuperCallWithLoadIC(Call* expr) {
|
|||||||
// - this (receiver) <-- LoadKeyedFromSuper will pop here and below.
|
// - this (receiver) <-- LoadKeyedFromSuper will pop here and below.
|
||||||
// - home_object
|
// - home_object
|
||||||
// - key
|
// - key
|
||||||
// - language_mode
|
|
||||||
__ CallRuntime(Runtime::kLoadKeyedFromSuper);
|
__ CallRuntime(Runtime::kLoadKeyedFromSuper);
|
||||||
|
|
||||||
// Replace home_object with target function.
|
// Replace home_object with target function.
|
||||||
|
@ -2072,7 +2072,7 @@ void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) {
|
|||||||
__ mov(LoadDescriptor::NameRegister(), Operand(key->value()));
|
__ mov(LoadDescriptor::NameRegister(), Operand(key->value()));
|
||||||
__ mov(LoadDescriptor::SlotRegister(),
|
__ mov(LoadDescriptor::SlotRegister(),
|
||||||
Operand(SmiFromSlot(prop->PropertyFeedbackSlot())));
|
Operand(SmiFromSlot(prop->PropertyFeedbackSlot())));
|
||||||
CallLoadIC(NOT_INSIDE_TYPEOF, language_mode());
|
CallLoadIC(NOT_INSIDE_TYPEOF);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -2084,14 +2084,13 @@ void FullCodeGenerator::EmitNamedSuperPropertyLoad(Property* prop) {
|
|||||||
DCHECK(prop->IsSuperAccess());
|
DCHECK(prop->IsSuperAccess());
|
||||||
|
|
||||||
__ Push(key->value());
|
__ Push(key->value());
|
||||||
__ Push(Smi::FromInt(language_mode()));
|
|
||||||
__ CallRuntime(Runtime::kLoadFromSuper);
|
__ CallRuntime(Runtime::kLoadFromSuper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) {
|
void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) {
|
||||||
SetExpressionPosition(prop);
|
SetExpressionPosition(prop);
|
||||||
Handle<Code> ic = CodeFactory::KeyedLoadIC(isolate(), language_mode()).code();
|
Handle<Code> ic = CodeFactory::KeyedLoadIC(isolate()).code();
|
||||||
__ mov(LoadDescriptor::SlotRegister(),
|
__ mov(LoadDescriptor::SlotRegister(),
|
||||||
Operand(SmiFromSlot(prop->PropertyFeedbackSlot())));
|
Operand(SmiFromSlot(prop->PropertyFeedbackSlot())));
|
||||||
CallIC(ic);
|
CallIC(ic);
|
||||||
@ -2101,7 +2100,6 @@ void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) {
|
|||||||
void FullCodeGenerator::EmitKeyedSuperPropertyLoad(Property* prop) {
|
void FullCodeGenerator::EmitKeyedSuperPropertyLoad(Property* prop) {
|
||||||
// Stack: receiver, home_object, key.
|
// Stack: receiver, home_object, key.
|
||||||
SetExpressionPosition(prop);
|
SetExpressionPosition(prop);
|
||||||
__ Push(Smi::FromInt(language_mode()));
|
|
||||||
__ CallRuntime(Runtime::kLoadKeyedFromSuper);
|
__ CallRuntime(Runtime::kLoadKeyedFromSuper);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2650,7 +2648,6 @@ void FullCodeGenerator::EmitSuperCallWithLoadIC(Call* expr) {
|
|||||||
VisitForAccumulatorValue(super_ref->this_var());
|
VisitForAccumulatorValue(super_ref->this_var());
|
||||||
__ Push(scratch, r3, r3, scratch);
|
__ Push(scratch, r3, r3, scratch);
|
||||||
__ Push(key->value());
|
__ Push(key->value());
|
||||||
__ Push(Smi::FromInt(language_mode()));
|
|
||||||
|
|
||||||
// Stack here:
|
// Stack here:
|
||||||
// - home_object
|
// - home_object
|
||||||
@ -2658,7 +2655,6 @@ void FullCodeGenerator::EmitSuperCallWithLoadIC(Call* expr) {
|
|||||||
// - this (receiver) <-- LoadFromSuper will pop here and below.
|
// - this (receiver) <-- LoadFromSuper will pop here and below.
|
||||||
// - home_object
|
// - home_object
|
||||||
// - key
|
// - key
|
||||||
// - language_mode
|
|
||||||
__ CallRuntime(Runtime::kLoadFromSuper);
|
__ CallRuntime(Runtime::kLoadFromSuper);
|
||||||
|
|
||||||
// Replace home_object with target function.
|
// Replace home_object with target function.
|
||||||
@ -2709,7 +2705,6 @@ void FullCodeGenerator::EmitKeyedSuperCallWithLoadIC(Call* expr) {
|
|||||||
VisitForAccumulatorValue(super_ref->this_var());
|
VisitForAccumulatorValue(super_ref->this_var());
|
||||||
__ Push(scratch, r3, r3, scratch);
|
__ Push(scratch, r3, r3, scratch);
|
||||||
VisitForStackValue(prop->key());
|
VisitForStackValue(prop->key());
|
||||||
__ Push(Smi::FromInt(language_mode()));
|
|
||||||
|
|
||||||
// Stack here:
|
// Stack here:
|
||||||
// - home_object
|
// - home_object
|
||||||
@ -2717,7 +2712,6 @@ void FullCodeGenerator::EmitKeyedSuperCallWithLoadIC(Call* expr) {
|
|||||||
// - this (receiver) <-- LoadKeyedFromSuper will pop here and below.
|
// - this (receiver) <-- LoadKeyedFromSuper will pop here and below.
|
||||||
// - home_object
|
// - home_object
|
||||||
// - key
|
// - key
|
||||||
// - language_mode
|
|
||||||
__ CallRuntime(Runtime::kLoadKeyedFromSuper);
|
__ CallRuntime(Runtime::kLoadKeyedFromSuper);
|
||||||
|
|
||||||
// Replace home_object with target function.
|
// Replace home_object with target function.
|
||||||
|
@ -2028,7 +2028,7 @@ void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) {
|
|||||||
__ Move(LoadDescriptor::NameRegister(), key->value());
|
__ Move(LoadDescriptor::NameRegister(), key->value());
|
||||||
__ Move(LoadDescriptor::SlotRegister(),
|
__ Move(LoadDescriptor::SlotRegister(),
|
||||||
SmiFromSlot(prop->PropertyFeedbackSlot()));
|
SmiFromSlot(prop->PropertyFeedbackSlot()));
|
||||||
CallLoadIC(NOT_INSIDE_TYPEOF, language_mode());
|
CallLoadIC(NOT_INSIDE_TYPEOF);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -2040,14 +2040,13 @@ void FullCodeGenerator::EmitNamedSuperPropertyLoad(Property* prop) {
|
|||||||
DCHECK(prop->IsSuperAccess());
|
DCHECK(prop->IsSuperAccess());
|
||||||
|
|
||||||
__ Push(key->value());
|
__ Push(key->value());
|
||||||
__ Push(Smi::FromInt(language_mode()));
|
|
||||||
__ CallRuntime(Runtime::kLoadFromSuper);
|
__ CallRuntime(Runtime::kLoadFromSuper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) {
|
void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) {
|
||||||
SetExpressionPosition(prop);
|
SetExpressionPosition(prop);
|
||||||
Handle<Code> ic = CodeFactory::KeyedLoadIC(isolate(), language_mode()).code();
|
Handle<Code> ic = CodeFactory::KeyedLoadIC(isolate()).code();
|
||||||
__ Move(LoadDescriptor::SlotRegister(),
|
__ Move(LoadDescriptor::SlotRegister(),
|
||||||
SmiFromSlot(prop->PropertyFeedbackSlot()));
|
SmiFromSlot(prop->PropertyFeedbackSlot()));
|
||||||
CallIC(ic);
|
CallIC(ic);
|
||||||
@ -2057,7 +2056,6 @@ void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) {
|
|||||||
void FullCodeGenerator::EmitKeyedSuperPropertyLoad(Property* prop) {
|
void FullCodeGenerator::EmitKeyedSuperPropertyLoad(Property* prop) {
|
||||||
// Stack: receiver, home_object, key.
|
// Stack: receiver, home_object, key.
|
||||||
SetExpressionPosition(prop);
|
SetExpressionPosition(prop);
|
||||||
__ Push(Smi::FromInt(language_mode()));
|
|
||||||
__ CallRuntime(Runtime::kLoadKeyedFromSuper);
|
__ CallRuntime(Runtime::kLoadKeyedFromSuper);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2532,7 +2530,6 @@ void FullCodeGenerator::EmitSuperCallWithLoadIC(Call* expr) {
|
|||||||
__ Push(rax);
|
__ Push(rax);
|
||||||
__ Push(Operand(rsp, kPointerSize * 2));
|
__ Push(Operand(rsp, kPointerSize * 2));
|
||||||
__ Push(key->value());
|
__ Push(key->value());
|
||||||
__ Push(Smi::FromInt(language_mode()));
|
|
||||||
|
|
||||||
// Stack here:
|
// Stack here:
|
||||||
// - home_object
|
// - home_object
|
||||||
@ -2540,7 +2537,6 @@ void FullCodeGenerator::EmitSuperCallWithLoadIC(Call* expr) {
|
|||||||
// - this (receiver) <-- LoadFromSuper will pop here and below.
|
// - this (receiver) <-- LoadFromSuper will pop here and below.
|
||||||
// - home_object
|
// - home_object
|
||||||
// - key
|
// - key
|
||||||
// - language_mode
|
|
||||||
__ CallRuntime(Runtime::kLoadFromSuper);
|
__ CallRuntime(Runtime::kLoadFromSuper);
|
||||||
|
|
||||||
// Replace home_object with target function.
|
// Replace home_object with target function.
|
||||||
@ -2591,7 +2587,6 @@ void FullCodeGenerator::EmitKeyedSuperCallWithLoadIC(Call* expr) {
|
|||||||
__ Push(rax);
|
__ Push(rax);
|
||||||
__ Push(Operand(rsp, kPointerSize * 2));
|
__ Push(Operand(rsp, kPointerSize * 2));
|
||||||
VisitForStackValue(prop->key());
|
VisitForStackValue(prop->key());
|
||||||
__ Push(Smi::FromInt(language_mode()));
|
|
||||||
|
|
||||||
// Stack here:
|
// Stack here:
|
||||||
// - home_object
|
// - home_object
|
||||||
@ -2599,7 +2594,6 @@ void FullCodeGenerator::EmitKeyedSuperCallWithLoadIC(Call* expr) {
|
|||||||
// - this (receiver) <-- LoadKeyedFromSuper will pop here and below.
|
// - this (receiver) <-- LoadKeyedFromSuper will pop here and below.
|
||||||
// - home_object
|
// - home_object
|
||||||
// - key
|
// - key
|
||||||
// - language_mode
|
|
||||||
__ CallRuntime(Runtime::kLoadKeyedFromSuper);
|
__ CallRuntime(Runtime::kLoadKeyedFromSuper);
|
||||||
|
|
||||||
// Replace home_object with target function.
|
// Replace home_object with target function.
|
||||||
|
@ -2001,7 +2001,7 @@ void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) {
|
|||||||
__ mov(LoadDescriptor::NameRegister(), Immediate(key->value()));
|
__ mov(LoadDescriptor::NameRegister(), Immediate(key->value()));
|
||||||
__ mov(LoadDescriptor::SlotRegister(),
|
__ mov(LoadDescriptor::SlotRegister(),
|
||||||
Immediate(SmiFromSlot(prop->PropertyFeedbackSlot())));
|
Immediate(SmiFromSlot(prop->PropertyFeedbackSlot())));
|
||||||
CallLoadIC(NOT_INSIDE_TYPEOF, language_mode());
|
CallLoadIC(NOT_INSIDE_TYPEOF);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -2013,14 +2013,13 @@ void FullCodeGenerator::EmitNamedSuperPropertyLoad(Property* prop) {
|
|||||||
DCHECK(prop->IsSuperAccess());
|
DCHECK(prop->IsSuperAccess());
|
||||||
|
|
||||||
__ push(Immediate(key->value()));
|
__ push(Immediate(key->value()));
|
||||||
__ push(Immediate(Smi::FromInt(language_mode())));
|
|
||||||
__ CallRuntime(Runtime::kLoadFromSuper);
|
__ CallRuntime(Runtime::kLoadFromSuper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) {
|
void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) {
|
||||||
SetExpressionPosition(prop);
|
SetExpressionPosition(prop);
|
||||||
Handle<Code> ic = CodeFactory::KeyedLoadIC(isolate(), language_mode()).code();
|
Handle<Code> ic = CodeFactory::KeyedLoadIC(isolate()).code();
|
||||||
__ mov(LoadDescriptor::SlotRegister(),
|
__ mov(LoadDescriptor::SlotRegister(),
|
||||||
Immediate(SmiFromSlot(prop->PropertyFeedbackSlot())));
|
Immediate(SmiFromSlot(prop->PropertyFeedbackSlot())));
|
||||||
CallIC(ic);
|
CallIC(ic);
|
||||||
@ -2030,7 +2029,6 @@ void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) {
|
|||||||
void FullCodeGenerator::EmitKeyedSuperPropertyLoad(Property* prop) {
|
void FullCodeGenerator::EmitKeyedSuperPropertyLoad(Property* prop) {
|
||||||
// Stack: receiver, home_object, key.
|
// Stack: receiver, home_object, key.
|
||||||
SetExpressionPosition(prop);
|
SetExpressionPosition(prop);
|
||||||
__ push(Immediate(Smi::FromInt(language_mode())));
|
|
||||||
__ CallRuntime(Runtime::kLoadKeyedFromSuper);
|
__ CallRuntime(Runtime::kLoadKeyedFromSuper);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2541,14 +2539,12 @@ void FullCodeGenerator::EmitSuperCallWithLoadIC(Call* expr) {
|
|||||||
__ push(eax);
|
__ push(eax);
|
||||||
__ push(Operand(esp, kPointerSize * 2));
|
__ push(Operand(esp, kPointerSize * 2));
|
||||||
__ push(Immediate(key->value()));
|
__ push(Immediate(key->value()));
|
||||||
__ push(Immediate(Smi::FromInt(language_mode())));
|
|
||||||
// Stack here:
|
// Stack here:
|
||||||
// - home_object
|
// - home_object
|
||||||
// - this (receiver)
|
// - this (receiver)
|
||||||
// - this (receiver) <-- LoadFromSuper will pop here and below.
|
// - this (receiver) <-- LoadFromSuper will pop here and below.
|
||||||
// - home_object
|
// - home_object
|
||||||
// - key
|
// - key
|
||||||
// - language_mode
|
|
||||||
__ CallRuntime(Runtime::kLoadFromSuper);
|
__ CallRuntime(Runtime::kLoadFromSuper);
|
||||||
|
|
||||||
// Replace home_object with target function.
|
// Replace home_object with target function.
|
||||||
@ -2599,14 +2595,12 @@ void FullCodeGenerator::EmitKeyedSuperCallWithLoadIC(Call* expr) {
|
|||||||
__ push(eax);
|
__ push(eax);
|
||||||
__ push(Operand(esp, kPointerSize * 2));
|
__ push(Operand(esp, kPointerSize * 2));
|
||||||
VisitForStackValue(prop->key());
|
VisitForStackValue(prop->key());
|
||||||
__ push(Immediate(Smi::FromInt(language_mode())));
|
|
||||||
// Stack here:
|
// Stack here:
|
||||||
// - home_object
|
// - home_object
|
||||||
// - this (receiver)
|
// - this (receiver)
|
||||||
// - this (receiver) <-- LoadKeyedFromSuper will pop here and below.
|
// - this (receiver) <-- LoadKeyedFromSuper will pop here and below.
|
||||||
// - home_object
|
// - home_object
|
||||||
// - key
|
// - key
|
||||||
// - language_mode
|
|
||||||
__ CallRuntime(Runtime::kLoadKeyedFromSuper);
|
__ CallRuntime(Runtime::kLoadKeyedFromSuper);
|
||||||
|
|
||||||
// Replace home_object with target function.
|
// Replace home_object with target function.
|
||||||
|
@ -157,8 +157,7 @@ static void GenerateKeyedLoadReceiverCheck(MacroAssembler* masm,
|
|||||||
static void GenerateFastArrayLoad(MacroAssembler* masm, Register receiver,
|
static void GenerateFastArrayLoad(MacroAssembler* masm, Register receiver,
|
||||||
Register key, Register elements,
|
Register key, Register elements,
|
||||||
Register scratch1, Register scratch2,
|
Register scratch1, Register scratch2,
|
||||||
Register result, Label* slow,
|
Register result, Label* slow) {
|
||||||
LanguageMode language_mode) {
|
|
||||||
// Register use:
|
// Register use:
|
||||||
//
|
//
|
||||||
// receiver - holds the receiver on entry.
|
// receiver - holds the receiver on entry.
|
||||||
@ -215,13 +214,8 @@ static void GenerateFastArrayLoad(MacroAssembler* masm, Register receiver,
|
|||||||
__ jmp(&check_next_prototype);
|
__ jmp(&check_next_prototype);
|
||||||
|
|
||||||
__ bind(&absent);
|
__ bind(&absent);
|
||||||
if (is_strong(language_mode)) {
|
__ LoadRoot(result, Heap::kUndefinedValueRootIndex);
|
||||||
// Strong mode accesses must throw in this case, so call the runtime.
|
__ jmp(&done);
|
||||||
__ jmp(slow);
|
|
||||||
} else {
|
|
||||||
__ LoadRoot(result, Heap::kUndefinedValueRootIndex);
|
|
||||||
__ jmp(&done);
|
|
||||||
}
|
|
||||||
|
|
||||||
__ bind(&in_bounds);
|
__ bind(&in_bounds);
|
||||||
// Fast case: Do the load.
|
// Fast case: Do the load.
|
||||||
@ -264,8 +258,7 @@ static void GenerateKeyNameCheck(MacroAssembler* masm, Register key,
|
|||||||
__ bind(&unique);
|
__ bind(&unique);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LoadIC::GenerateNormal(MacroAssembler* masm) {
|
||||||
void LoadIC::GenerateNormal(MacroAssembler* masm, LanguageMode language_mode) {
|
|
||||||
Register dictionary = r0;
|
Register dictionary = r0;
|
||||||
DCHECK(!dictionary.is(LoadDescriptor::ReceiverRegister()));
|
DCHECK(!dictionary.is(LoadDescriptor::ReceiverRegister()));
|
||||||
DCHECK(!dictionary.is(LoadDescriptor::NameRegister()));
|
DCHECK(!dictionary.is(LoadDescriptor::NameRegister()));
|
||||||
@ -280,7 +273,7 @@ void LoadIC::GenerateNormal(MacroAssembler* masm, LanguageMode language_mode) {
|
|||||||
|
|
||||||
// Dictionary load failed, go slow (but don't miss).
|
// Dictionary load failed, go slow (but don't miss).
|
||||||
__ bind(&slow);
|
__ bind(&slow);
|
||||||
GenerateRuntimeGetProperty(masm, language_mode);
|
GenerateRuntimeGetProperty(masm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -312,17 +305,14 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) {
|
|||||||
__ TailCallRuntime(Runtime::kLoadIC_Miss);
|
__ TailCallRuntime(Runtime::kLoadIC_Miss);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
|
||||||
void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm,
|
|
||||||
LanguageMode language_mode) {
|
|
||||||
// The return address is in lr.
|
// The return address is in lr.
|
||||||
|
|
||||||
__ mov(LoadIC_TempRegister(), LoadDescriptor::ReceiverRegister());
|
__ mov(LoadIC_TempRegister(), LoadDescriptor::ReceiverRegister());
|
||||||
__ Push(LoadIC_TempRegister(), LoadDescriptor::NameRegister());
|
__ Push(LoadIC_TempRegister(), LoadDescriptor::NameRegister());
|
||||||
|
|
||||||
// Do tail-call to runtime routine.
|
// Do tail-call to runtime routine.
|
||||||
__ TailCallRuntime(is_strong(language_mode) ? Runtime::kGetPropertyStrong
|
__ TailCallRuntime(Runtime::kGetProperty);
|
||||||
: Runtime::kGetProperty);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -340,22 +330,17 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
|
|||||||
__ TailCallRuntime(Runtime::kKeyedLoadIC_Miss);
|
__ TailCallRuntime(Runtime::kKeyedLoadIC_Miss);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
|
||||||
void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm,
|
|
||||||
LanguageMode language_mode) {
|
|
||||||
// The return address is in lr.
|
// The return address is in lr.
|
||||||
|
|
||||||
__ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister());
|
__ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister());
|
||||||
|
|
||||||
// Perform tail call to the entry.
|
// Perform tail call to the entry.
|
||||||
// Do tail-call to runtime routine.
|
// Do tail-call to runtime routine.
|
||||||
__ TailCallRuntime(is_strong(language_mode) ? Runtime::kKeyedGetPropertyStrong
|
__ TailCallRuntime(Runtime::kKeyedGetProperty);
|
||||||
: Runtime::kKeyedGetProperty);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void KeyedLoadIC::GenerateMegamorphic(MacroAssembler* masm) {
|
||||||
void KeyedLoadIC::GenerateMegamorphic(MacroAssembler* masm,
|
|
||||||
LanguageMode language_mode) {
|
|
||||||
// The return address is in lr.
|
// The return address is in lr.
|
||||||
Label slow, check_name, index_smi, index_name, property_array_property;
|
Label slow, check_name, index_smi, index_name, property_array_property;
|
||||||
Label probe_dictionary, check_number_dictionary;
|
Label probe_dictionary, check_number_dictionary;
|
||||||
@ -379,8 +364,7 @@ void KeyedLoadIC::GenerateMegamorphic(MacroAssembler* masm,
|
|||||||
// Check the receiver's map to see if it has fast elements.
|
// Check the receiver's map to see if it has fast elements.
|
||||||
__ CheckFastElements(r0, r3, &check_number_dictionary);
|
__ CheckFastElements(r0, r3, &check_number_dictionary);
|
||||||
|
|
||||||
GenerateFastArrayLoad(masm, receiver, key, r0, r3, r4, r0, &slow,
|
GenerateFastArrayLoad(masm, receiver, key, r0, r3, r4, r0, &slow);
|
||||||
language_mode);
|
|
||||||
__ IncrementCounter(isolate->counters()->ic_keyed_load_generic_smi(), 1, r4,
|
__ IncrementCounter(isolate->counters()->ic_keyed_load_generic_smi(), 1, r4,
|
||||||
r3);
|
r3);
|
||||||
__ Ret();
|
__ Ret();
|
||||||
@ -403,7 +387,7 @@ void KeyedLoadIC::GenerateMegamorphic(MacroAssembler* masm,
|
|||||||
__ bind(&slow);
|
__ bind(&slow);
|
||||||
__ IncrementCounter(isolate->counters()->ic_keyed_load_generic_slow(), 1, r4,
|
__ IncrementCounter(isolate->counters()->ic_keyed_load_generic_slow(), 1, r4,
|
||||||
r3);
|
r3);
|
||||||
GenerateRuntimeGetProperty(masm, language_mode);
|
GenerateRuntimeGetProperty(masm);
|
||||||
|
|
||||||
__ bind(&check_name);
|
__ bind(&check_name);
|
||||||
GenerateKeyNameCheck(masm, key, r0, r3, &index_name, &slow);
|
GenerateKeyNameCheck(masm, key, r0, r3, &index_name, &slow);
|
||||||
|
@ -164,8 +164,7 @@ static void GenerateKeyedLoadReceiverCheck(MacroAssembler* masm,
|
|||||||
static void GenerateFastArrayLoad(MacroAssembler* masm, Register receiver,
|
static void GenerateFastArrayLoad(MacroAssembler* masm, Register receiver,
|
||||||
Register key, Register elements,
|
Register key, Register elements,
|
||||||
Register scratch1, Register scratch2,
|
Register scratch1, Register scratch2,
|
||||||
Register result, Label* slow,
|
Register result, Label* slow) {
|
||||||
LanguageMode language_mode) {
|
|
||||||
DCHECK(!AreAliased(receiver, key, elements, scratch1, scratch2));
|
DCHECK(!AreAliased(receiver, key, elements, scratch1, scratch2));
|
||||||
|
|
||||||
Label check_prototypes, check_next_prototype;
|
Label check_prototypes, check_next_prototype;
|
||||||
@ -203,13 +202,8 @@ static void GenerateFastArrayLoad(MacroAssembler* masm, Register receiver,
|
|||||||
__ B(&check_next_prototype);
|
__ B(&check_next_prototype);
|
||||||
|
|
||||||
__ Bind(&absent);
|
__ Bind(&absent);
|
||||||
if (is_strong(language_mode)) {
|
__ LoadRoot(result, Heap::kUndefinedValueRootIndex);
|
||||||
// Strong mode accesses must throw in this case, so call the runtime.
|
__ B(&done);
|
||||||
__ B(slow);
|
|
||||||
} else {
|
|
||||||
__ LoadRoot(result, Heap::kUndefinedValueRootIndex);
|
|
||||||
__ B(&done);
|
|
||||||
}
|
|
||||||
|
|
||||||
__ Bind(&in_bounds);
|
__ Bind(&in_bounds);
|
||||||
// Fast case: Do the load.
|
// Fast case: Do the load.
|
||||||
@ -260,8 +254,7 @@ static void GenerateKeyNameCheck(MacroAssembler* masm, Register key,
|
|||||||
// Fall through if the key is a unique name.
|
// Fall through if the key is a unique name.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LoadIC::GenerateNormal(MacroAssembler* masm) {
|
||||||
void LoadIC::GenerateNormal(MacroAssembler* masm, LanguageMode language_mode) {
|
|
||||||
Register dictionary = x0;
|
Register dictionary = x0;
|
||||||
DCHECK(!dictionary.is(LoadDescriptor::ReceiverRegister()));
|
DCHECK(!dictionary.is(LoadDescriptor::ReceiverRegister()));
|
||||||
DCHECK(!dictionary.is(LoadDescriptor::NameRegister()));
|
DCHECK(!dictionary.is(LoadDescriptor::NameRegister()));
|
||||||
@ -275,7 +268,7 @@ void LoadIC::GenerateNormal(MacroAssembler* masm, LanguageMode language_mode) {
|
|||||||
|
|
||||||
// Dictionary load failed, go slow (but don't miss).
|
// Dictionary load failed, go slow (but don't miss).
|
||||||
__ Bind(&slow);
|
__ Bind(&slow);
|
||||||
GenerateRuntimeGetProperty(masm, language_mode);
|
GenerateRuntimeGetProperty(masm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -296,15 +289,12 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) {
|
|||||||
__ TailCallRuntime(Runtime::kLoadIC_Miss);
|
__ TailCallRuntime(Runtime::kLoadIC_Miss);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
|
||||||
void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm,
|
|
||||||
LanguageMode language_mode) {
|
|
||||||
// The return address is in lr.
|
// The return address is in lr.
|
||||||
__ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister());
|
__ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister());
|
||||||
|
|
||||||
// Do tail-call to runtime routine.
|
// Do tail-call to runtime routine.
|
||||||
__ TailCallRuntime(is_strong(language_mode) ? Runtime::kGetPropertyStrong
|
__ TailCallRuntime(Runtime::kGetProperty);
|
||||||
: Runtime::kGetProperty);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -325,24 +315,19 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
|
|||||||
__ TailCallRuntime(Runtime::kKeyedLoadIC_Miss);
|
__ TailCallRuntime(Runtime::kKeyedLoadIC_Miss);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
|
||||||
void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm,
|
|
||||||
LanguageMode language_mode) {
|
|
||||||
// The return address is in lr.
|
// The return address is in lr.
|
||||||
__ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister());
|
__ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister());
|
||||||
|
|
||||||
// Do tail-call to runtime routine.
|
// Do tail-call to runtime routine.
|
||||||
__ TailCallRuntime(is_strong(language_mode) ? Runtime::kKeyedGetPropertyStrong
|
__ TailCallRuntime(Runtime::kKeyedGetProperty);
|
||||||
: Runtime::kKeyedGetProperty);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void GenerateKeyedLoadWithSmiKey(MacroAssembler* masm, Register key,
|
static void GenerateKeyedLoadWithSmiKey(MacroAssembler* masm, Register key,
|
||||||
Register receiver, Register scratch1,
|
Register receiver, Register scratch1,
|
||||||
Register scratch2, Register scratch3,
|
Register scratch2, Register scratch3,
|
||||||
Register scratch4, Register scratch5,
|
Register scratch4, Register scratch5,
|
||||||
Label* slow,
|
Label* slow) {
|
||||||
LanguageMode language_mode) {
|
|
||||||
DCHECK(!AreAliased(key, receiver, scratch1, scratch2, scratch3, scratch4,
|
DCHECK(!AreAliased(key, receiver, scratch1, scratch2, scratch3, scratch4,
|
||||||
scratch5));
|
scratch5));
|
||||||
|
|
||||||
@ -358,7 +343,7 @@ static void GenerateKeyedLoadWithSmiKey(MacroAssembler* masm, Register key,
|
|||||||
__ CheckFastElements(scratch1, scratch2, &check_number_dictionary);
|
__ CheckFastElements(scratch1, scratch2, &check_number_dictionary);
|
||||||
|
|
||||||
GenerateFastArrayLoad(masm, receiver, key, scratch3, scratch2, scratch1,
|
GenerateFastArrayLoad(masm, receiver, key, scratch3, scratch2, scratch1,
|
||||||
result, slow, language_mode);
|
result, slow);
|
||||||
__ IncrementCounter(isolate->counters()->ic_keyed_load_generic_smi(), 1,
|
__ IncrementCounter(isolate->counters()->ic_keyed_load_generic_smi(), 1,
|
||||||
scratch1, scratch2);
|
scratch1, scratch2);
|
||||||
__ Ret();
|
__ Ret();
|
||||||
@ -429,9 +414,7 @@ static void GenerateKeyedLoadWithNameKey(MacroAssembler* masm, Register key,
|
|||||||
__ Ret();
|
__ Ret();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void KeyedLoadIC::GenerateMegamorphic(MacroAssembler* masm) {
|
||||||
void KeyedLoadIC::GenerateMegamorphic(MacroAssembler* masm,
|
|
||||||
LanguageMode language_mode) {
|
|
||||||
// The return address is in lr.
|
// The return address is in lr.
|
||||||
Label slow, check_name, index_smi, index_name;
|
Label slow, check_name, index_smi, index_name;
|
||||||
|
|
||||||
@ -444,14 +427,13 @@ void KeyedLoadIC::GenerateMegamorphic(MacroAssembler* masm,
|
|||||||
__ Bind(&index_smi);
|
__ Bind(&index_smi);
|
||||||
// Now the key is known to be a smi. This place is also jumped to from below
|
// Now the key is known to be a smi. This place is also jumped to from below
|
||||||
// where a numeric string is converted to a smi.
|
// where a numeric string is converted to a smi.
|
||||||
GenerateKeyedLoadWithSmiKey(masm, key, receiver, x7, x3, x4, x5, x6, &slow,
|
GenerateKeyedLoadWithSmiKey(masm, key, receiver, x7, x3, x4, x5, x6, &slow);
|
||||||
language_mode);
|
|
||||||
|
|
||||||
// Slow case.
|
// Slow case.
|
||||||
__ Bind(&slow);
|
__ Bind(&slow);
|
||||||
__ IncrementCounter(masm->isolate()->counters()->ic_keyed_load_generic_slow(),
|
__ IncrementCounter(masm->isolate()->counters()->ic_keyed_load_generic_slow(),
|
||||||
1, x4, x3);
|
1, x4, x3);
|
||||||
GenerateRuntimeGetProperty(masm, language_mode);
|
GenerateRuntimeGetProperty(masm);
|
||||||
|
|
||||||
__ Bind(&check_name);
|
__ Bind(&check_name);
|
||||||
GenerateKeyNameCheck(masm, key, x0, x3, &index_name, &slow);
|
GenerateKeyNameCheck(masm, key, x0, x3, &index_name, &slow);
|
||||||
|
@ -561,10 +561,8 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback(
|
|||||||
|
|
||||||
#undef __
|
#undef __
|
||||||
|
|
||||||
|
|
||||||
void ElementHandlerCompiler::CompileElementHandlers(
|
void ElementHandlerCompiler::CompileElementHandlers(
|
||||||
MapHandleList* receiver_maps, CodeHandleList* handlers,
|
MapHandleList* receiver_maps, CodeHandleList* handlers) {
|
||||||
LanguageMode language_mode) {
|
|
||||||
for (int i = 0; i < receiver_maps->length(); ++i) {
|
for (int i = 0; i < receiver_maps->length(); ++i) {
|
||||||
Handle<Map> receiver_map = receiver_maps->at(i);
|
Handle<Map> receiver_map = receiver_maps->at(i);
|
||||||
Handle<Code> cached_stub;
|
Handle<Code> cached_stub;
|
||||||
@ -572,9 +570,7 @@ void ElementHandlerCompiler::CompileElementHandlers(
|
|||||||
if (receiver_map->IsStringMap()) {
|
if (receiver_map->IsStringMap()) {
|
||||||
cached_stub = LoadIndexedStringStub(isolate()).GetCode();
|
cached_stub = LoadIndexedStringStub(isolate()).GetCode();
|
||||||
} else if (receiver_map->instance_type() < FIRST_JS_RECEIVER_TYPE) {
|
} else if (receiver_map->instance_type() < FIRST_JS_RECEIVER_TYPE) {
|
||||||
cached_stub = is_strong(language_mode)
|
cached_stub = isolate()->builtins()->KeyedLoadIC_Slow();
|
||||||
? isolate()->builtins()->KeyedLoadIC_Slow_Strong()
|
|
||||||
: isolate()->builtins()->KeyedLoadIC_Slow();
|
|
||||||
} else {
|
} else {
|
||||||
bool is_js_array = receiver_map->instance_type() == JS_ARRAY_TYPE;
|
bool is_js_array = receiver_map->instance_type() == JS_ARRAY_TYPE;
|
||||||
ElementsKind elements_kind = receiver_map->elements_kind();
|
ElementsKind elements_kind = receiver_map->elements_kind();
|
||||||
@ -583,9 +579,7 @@ void ElementHandlerCompiler::CompileElementHandlers(
|
|||||||
// generated stub code needs to check that dynamically anyway.
|
// generated stub code needs to check that dynamically anyway.
|
||||||
bool convert_hole_to_undefined =
|
bool convert_hole_to_undefined =
|
||||||
(is_js_array && elements_kind == FAST_HOLEY_ELEMENTS &&
|
(is_js_array && elements_kind == FAST_HOLEY_ELEMENTS &&
|
||||||
*receiver_map ==
|
*receiver_map == isolate()->get_initial_js_array_map(elements_kind));
|
||||||
isolate()->get_initial_js_array_map(elements_kind)) &&
|
|
||||||
!is_strong(language_mode);
|
|
||||||
|
|
||||||
if (receiver_map->has_indexed_interceptor()) {
|
if (receiver_map->has_indexed_interceptor()) {
|
||||||
cached_stub = LoadIndexedInterceptorStub(isolate()).GetCode();
|
cached_stub = LoadIndexedInterceptorStub(isolate()).GetCode();
|
||||||
@ -597,9 +591,7 @@ void ElementHandlerCompiler::CompileElementHandlers(
|
|||||||
convert_hole_to_undefined).GetCode();
|
convert_hole_to_undefined).GetCode();
|
||||||
} else {
|
} else {
|
||||||
DCHECK(elements_kind == DICTIONARY_ELEMENTS);
|
DCHECK(elements_kind == DICTIONARY_ELEMENTS);
|
||||||
LoadICState state =
|
LoadICState state = LoadICState(kNoExtraICState);
|
||||||
LoadICState(is_strong(language_mode) ? LoadICState::kStrongModeState
|
|
||||||
: kNoExtraICState);
|
|
||||||
cached_stub = LoadDictionaryElementStub(isolate(), state).GetCode();
|
cached_stub = LoadDictionaryElementStub(isolate(), state).GetCode();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -295,8 +295,7 @@ class ElementHandlerCompiler : public PropertyHandlerCompiler {
|
|||||||
virtual ~ElementHandlerCompiler() {}
|
virtual ~ElementHandlerCompiler() {}
|
||||||
|
|
||||||
void CompileElementHandlers(MapHandleList* receiver_maps,
|
void CompileElementHandlers(MapHandleList* receiver_maps,
|
||||||
CodeHandleList* handlers,
|
CodeHandleList* handlers);
|
||||||
LanguageMode language_mode);
|
|
||||||
|
|
||||||
static void GenerateStoreSlow(MacroAssembler* masm);
|
static void GenerateStoreSlow(MacroAssembler* masm);
|
||||||
};
|
};
|
||||||
|
@ -167,7 +167,7 @@ static void GenerateKeyedLoadReceiverCheck(MacroAssembler* masm,
|
|||||||
static void GenerateFastArrayLoad(MacroAssembler* masm, Register receiver,
|
static void GenerateFastArrayLoad(MacroAssembler* masm, Register receiver,
|
||||||
Register key, Register scratch,
|
Register key, Register scratch,
|
||||||
Register scratch2, Register result,
|
Register scratch2, Register result,
|
||||||
Label* slow, LanguageMode language_mode) {
|
Label* slow) {
|
||||||
// Register use:
|
// Register use:
|
||||||
// receiver - holds the receiver and is unchanged.
|
// receiver - holds the receiver and is unchanged.
|
||||||
// key - holds the key and is unchanged (must be a smi).
|
// key - holds the key and is unchanged (must be a smi).
|
||||||
@ -211,13 +211,8 @@ static void GenerateFastArrayLoad(MacroAssembler* masm, Register receiver,
|
|||||||
__ jmp(&check_next_prototype);
|
__ jmp(&check_next_prototype);
|
||||||
|
|
||||||
__ bind(&absent);
|
__ bind(&absent);
|
||||||
if (is_strong(language_mode)) {
|
__ mov(result, masm->isolate()->factory()->undefined_value());
|
||||||
// Strong mode accesses must throw in this case, so call the runtime.
|
__ jmp(&done);
|
||||||
__ jmp(slow);
|
|
||||||
} else {
|
|
||||||
__ mov(result, masm->isolate()->factory()->undefined_value());
|
|
||||||
__ jmp(&done);
|
|
||||||
}
|
|
||||||
|
|
||||||
__ bind(&in_bounds);
|
__ bind(&in_bounds);
|
||||||
// Fast case: Do the load.
|
// Fast case: Do the load.
|
||||||
@ -262,9 +257,7 @@ static void GenerateKeyNameCheck(MacroAssembler* masm, Register key,
|
|||||||
__ bind(&unique);
|
__ bind(&unique);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void KeyedLoadIC::GenerateMegamorphic(MacroAssembler* masm) {
|
||||||
void KeyedLoadIC::GenerateMegamorphic(MacroAssembler* masm,
|
|
||||||
LanguageMode language_mode) {
|
|
||||||
// The return address is on the stack.
|
// The return address is on the stack.
|
||||||
Label slow, check_name, index_smi, index_name, property_array_property;
|
Label slow, check_name, index_smi, index_name, property_array_property;
|
||||||
Label probe_dictionary, check_number_dictionary;
|
Label probe_dictionary, check_number_dictionary;
|
||||||
@ -286,8 +279,7 @@ void KeyedLoadIC::GenerateMegamorphic(MacroAssembler* masm,
|
|||||||
// Check the receiver's map to see if it has fast elements.
|
// Check the receiver's map to see if it has fast elements.
|
||||||
__ CheckFastElements(eax, &check_number_dictionary);
|
__ CheckFastElements(eax, &check_number_dictionary);
|
||||||
|
|
||||||
GenerateFastArrayLoad(masm, receiver, key, eax, ebx, eax, &slow,
|
GenerateFastArrayLoad(masm, receiver, key, eax, ebx, eax, &slow);
|
||||||
language_mode);
|
|
||||||
Isolate* isolate = masm->isolate();
|
Isolate* isolate = masm->isolate();
|
||||||
Counters* counters = isolate->counters();
|
Counters* counters = isolate->counters();
|
||||||
__ IncrementCounter(counters->ic_keyed_load_generic_smi(), 1);
|
__ IncrementCounter(counters->ic_keyed_load_generic_smi(), 1);
|
||||||
@ -319,7 +311,7 @@ void KeyedLoadIC::GenerateMegamorphic(MacroAssembler* masm,
|
|||||||
__ bind(&slow);
|
__ bind(&slow);
|
||||||
// Slow case: jump to runtime.
|
// Slow case: jump to runtime.
|
||||||
__ IncrementCounter(counters->ic_keyed_load_generic_slow(), 1);
|
__ IncrementCounter(counters->ic_keyed_load_generic_slow(), 1);
|
||||||
GenerateRuntimeGetProperty(masm, language_mode);
|
GenerateRuntimeGetProperty(masm);
|
||||||
|
|
||||||
__ bind(&check_name);
|
__ bind(&check_name);
|
||||||
GenerateKeyNameCheck(masm, key, eax, ebx, &index_name, &slow);
|
GenerateKeyNameCheck(masm, key, eax, ebx, &index_name, &slow);
|
||||||
@ -628,8 +620,7 @@ void KeyedStoreIC::GenerateMegamorphic(MacroAssembler* masm,
|
|||||||
GenerateMiss(masm);
|
GenerateMiss(masm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LoadIC::GenerateNormal(MacroAssembler* masm) {
|
||||||
void LoadIC::GenerateNormal(MacroAssembler* masm, LanguageMode language_mode) {
|
|
||||||
Register dictionary = eax;
|
Register dictionary = eax;
|
||||||
DCHECK(!dictionary.is(LoadDescriptor::ReceiverRegister()));
|
DCHECK(!dictionary.is(LoadDescriptor::ReceiverRegister()));
|
||||||
DCHECK(!dictionary.is(LoadDescriptor::NameRegister()));
|
DCHECK(!dictionary.is(LoadDescriptor::NameRegister()));
|
||||||
@ -644,7 +635,7 @@ void LoadIC::GenerateNormal(MacroAssembler* masm, LanguageMode language_mode) {
|
|||||||
|
|
||||||
// Dictionary load failed, go slow (but don't miss).
|
// Dictionary load failed, go slow (but don't miss).
|
||||||
__ bind(&slow);
|
__ bind(&slow);
|
||||||
GenerateRuntimeGetProperty(masm, language_mode);
|
GenerateRuntimeGetProperty(masm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -675,9 +666,7 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) {
|
|||||||
__ TailCallRuntime(Runtime::kLoadIC_Miss);
|
__ TailCallRuntime(Runtime::kLoadIC_Miss);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
|
||||||
void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm,
|
|
||||||
LanguageMode language_mode) {
|
|
||||||
// Return address is on the stack.
|
// Return address is on the stack.
|
||||||
Register receiver = LoadDescriptor::ReceiverRegister();
|
Register receiver = LoadDescriptor::ReceiverRegister();
|
||||||
Register name = LoadDescriptor::NameRegister();
|
Register name = LoadDescriptor::NameRegister();
|
||||||
@ -689,8 +678,7 @@ void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm,
|
|||||||
__ push(ebx);
|
__ push(ebx);
|
||||||
|
|
||||||
// Do tail-call to runtime routine.
|
// Do tail-call to runtime routine.
|
||||||
__ TailCallRuntime(is_strong(language_mode) ? Runtime::kGetPropertyStrong
|
__ TailCallRuntime(Runtime::kGetProperty);
|
||||||
: Runtime::kGetProperty);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -704,9 +692,7 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
|
|||||||
__ TailCallRuntime(Runtime::kKeyedLoadIC_Miss);
|
__ TailCallRuntime(Runtime::kKeyedLoadIC_Miss);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
|
||||||
void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm,
|
|
||||||
LanguageMode language_mode) {
|
|
||||||
// Return address is on the stack.
|
// Return address is on the stack.
|
||||||
Register receiver = LoadDescriptor::ReceiverRegister();
|
Register receiver = LoadDescriptor::ReceiverRegister();
|
||||||
Register name = LoadDescriptor::NameRegister();
|
Register name = LoadDescriptor::NameRegister();
|
||||||
@ -718,8 +704,7 @@ void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm,
|
|||||||
__ push(ebx);
|
__ push(ebx);
|
||||||
|
|
||||||
// Do tail-call to runtime routine.
|
// Do tail-call to runtime routine.
|
||||||
__ TailCallRuntime(is_strong(language_mode) ? Runtime::kKeyedGetPropertyStrong
|
__ TailCallRuntime(Runtime::kKeyedGetProperty);
|
||||||
: Runtime::kKeyedGetProperty);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -43,8 +43,7 @@ Handle<Code> PropertyICCompiler::ComputeKeyedLoadMonomorphicHandler(
|
|||||||
// stub code needs to check that dynamically anyway.
|
// stub code needs to check that dynamically anyway.
|
||||||
bool convert_hole_to_undefined =
|
bool convert_hole_to_undefined =
|
||||||
is_js_array && elements_kind == FAST_HOLEY_ELEMENTS &&
|
is_js_array && elements_kind == FAST_HOLEY_ELEMENTS &&
|
||||||
*receiver_map == isolate->get_initial_js_array_map(elements_kind) &&
|
*receiver_map == isolate->get_initial_js_array_map(elements_kind);
|
||||||
!(is_strong(LoadICState::GetLanguageMode(extra_ic_state)));
|
|
||||||
Handle<Code> stub;
|
Handle<Code> stub;
|
||||||
if (receiver_map->has_indexed_interceptor()) {
|
if (receiver_map->has_indexed_interceptor()) {
|
||||||
stub = LoadIndexedInterceptorStub(isolate).GetCode();
|
stub = LoadIndexedInterceptorStub(isolate).GetCode();
|
||||||
|
@ -95,9 +95,6 @@ void LoadIC::set_target(Code* code) {
|
|||||||
// The contextual mode must be preserved across IC patching.
|
// The contextual mode must be preserved across IC patching.
|
||||||
DCHECK(LoadICState::GetTypeofMode(code->extra_ic_state()) ==
|
DCHECK(LoadICState::GetTypeofMode(code->extra_ic_state()) ==
|
||||||
LoadICState::GetTypeofMode(target()->extra_ic_state()));
|
LoadICState::GetTypeofMode(target()->extra_ic_state()));
|
||||||
// Strongness must be preserved across IC patching.
|
|
||||||
DCHECK(LoadICState::GetLanguageMode(code->extra_ic_state()) ==
|
|
||||||
LoadICState::GetLanguageMode(target()->extra_ic_state()));
|
|
||||||
|
|
||||||
IC::set_target(code);
|
IC::set_target(code);
|
||||||
}
|
}
|
||||||
|
@ -202,38 +202,24 @@ class CompareICState {
|
|||||||
class LoadICState final BASE_EMBEDDED {
|
class LoadICState final BASE_EMBEDDED {
|
||||||
private:
|
private:
|
||||||
class TypeofModeBits : public BitField<TypeofMode, 0, 1> {};
|
class TypeofModeBits : public BitField<TypeofMode, 0, 1> {};
|
||||||
class LanguageModeBits
|
|
||||||
: public BitField<LanguageMode, TypeofModeBits::kNext, 2> {};
|
|
||||||
STATIC_ASSERT(static_cast<int>(INSIDE_TYPEOF) == 0);
|
STATIC_ASSERT(static_cast<int>(INSIDE_TYPEOF) == 0);
|
||||||
const ExtraICState state_;
|
const ExtraICState state_;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static const uint32_t kNextBitFieldOffset = LanguageModeBits::kNext;
|
static const uint32_t kNextBitFieldOffset = TypeofModeBits::kNext;
|
||||||
|
|
||||||
static const ExtraICState kStrongModeState = STRONG
|
|
||||||
<< LanguageModeBits::kShift;
|
|
||||||
|
|
||||||
explicit LoadICState(ExtraICState extra_ic_state) : state_(extra_ic_state) {}
|
explicit LoadICState(ExtraICState extra_ic_state) : state_(extra_ic_state) {}
|
||||||
|
|
||||||
explicit LoadICState(TypeofMode typeof_mode, LanguageMode language_mode)
|
explicit LoadICState(TypeofMode typeof_mode)
|
||||||
: state_(TypeofModeBits::encode(typeof_mode) |
|
: state_(TypeofModeBits::encode(typeof_mode)) {}
|
||||||
LanguageModeBits::encode(language_mode)) {}
|
|
||||||
|
|
||||||
ExtraICState GetExtraICState() const { return state_; }
|
ExtraICState GetExtraICState() const { return state_; }
|
||||||
|
|
||||||
TypeofMode typeof_mode() const { return TypeofModeBits::decode(state_); }
|
TypeofMode typeof_mode() const { return TypeofModeBits::decode(state_); }
|
||||||
|
|
||||||
LanguageMode language_mode() const {
|
|
||||||
return LanguageModeBits::decode(state_);
|
|
||||||
}
|
|
||||||
|
|
||||||
static TypeofMode GetTypeofMode(ExtraICState state) {
|
static TypeofMode GetTypeofMode(ExtraICState state) {
|
||||||
return LoadICState(state).typeof_mode();
|
return LoadICState(state).typeof_mode();
|
||||||
}
|
}
|
||||||
|
|
||||||
static LanguageMode GetLanguageMode(ExtraICState state) {
|
|
||||||
return LoadICState(state).language_mode();
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
42
src/ic/ic.cc
42
src/ic/ic.cc
@ -559,9 +559,7 @@ Handle<Code> KeyedLoadIC::ChooseMegamorphicStub(Isolate* isolate,
|
|||||||
if (FLAG_compiled_keyed_generic_loads) {
|
if (FLAG_compiled_keyed_generic_loads) {
|
||||||
return KeyedLoadGenericStub(isolate, LoadICState(extra_state)).GetCode();
|
return KeyedLoadGenericStub(isolate, LoadICState(extra_state)).GetCode();
|
||||||
} else {
|
} else {
|
||||||
return is_strong(LoadICState::GetLanguageMode(extra_state))
|
return isolate->builtins()->KeyedLoadIC_Megamorphic();
|
||||||
? isolate->builtins()->KeyedLoadIC_Megamorphic_Strong()
|
|
||||||
: isolate->builtins()->KeyedLoadIC_Megamorphic();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -668,9 +666,9 @@ MaybeHandle<Object> LoadIC::Load(Handle<Object> object, Handle<Name> name) {
|
|||||||
TRACE_GENERIC_IC(isolate(), "LoadIC", "name as array index");
|
TRACE_GENERIC_IC(isolate(), "LoadIC", "name as array index");
|
||||||
}
|
}
|
||||||
Handle<Object> result;
|
Handle<Object> result;
|
||||||
ASSIGN_RETURN_ON_EXCEPTION(
|
ASSIGN_RETURN_ON_EXCEPTION(isolate(), result,
|
||||||
isolate(), result,
|
Object::GetElement(isolate(), object, index),
|
||||||
Object::GetElement(isolate(), object, index, language_mode()), Object);
|
Object);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -714,8 +712,8 @@ MaybeHandle<Object> LoadIC::Load(Handle<Object> object, Handle<Name> name) {
|
|||||||
// Get the property.
|
// Get the property.
|
||||||
Handle<Object> result;
|
Handle<Object> result;
|
||||||
|
|
||||||
ASSIGN_RETURN_ON_EXCEPTION(
|
ASSIGN_RETURN_ON_EXCEPTION(isolate(), result, Object::GetProperty(&it),
|
||||||
isolate(), result, Object::GetProperty(&it, language_mode()), Object);
|
Object);
|
||||||
if (it.IsFound()) {
|
if (it.IsFound()) {
|
||||||
return result;
|
return result;
|
||||||
} else if (!ShouldThrowReferenceError(object)) {
|
} else if (!ShouldThrowReferenceError(object)) {
|
||||||
@ -900,9 +898,7 @@ Handle<Code> KeyedLoadIC::initialize_stub_in_optimized_code(
|
|||||||
if (initialization_state != MEGAMORPHIC) {
|
if (initialization_state != MEGAMORPHIC) {
|
||||||
return KeyedLoadICStub(isolate, LoadICState(extra_state)).GetCode();
|
return KeyedLoadICStub(isolate, LoadICState(extra_state)).GetCode();
|
||||||
}
|
}
|
||||||
return is_strong(LoadICState::GetLanguageMode(extra_state))
|
return isolate->builtins()->KeyedLoadIC_Megamorphic();
|
||||||
? isolate->builtins()->KeyedLoadIC_Megamorphic_Strong()
|
|
||||||
: isolate->builtins()->KeyedLoadIC_Megamorphic();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1025,7 +1021,7 @@ void LoadIC::UpdateCaches(LookupIterator* lookup) {
|
|||||||
lookup->state() == LookupIterator::ACCESS_CHECK) {
|
lookup->state() == LookupIterator::ACCESS_CHECK) {
|
||||||
code = slow_stub();
|
code = slow_stub();
|
||||||
} else if (!lookup->IsFound()) {
|
} else if (!lookup->IsFound()) {
|
||||||
if (kind() == Code::LOAD_IC && !is_strong(language_mode())) {
|
if (kind() == Code::LOAD_IC) {
|
||||||
code = NamedLoadHandlerCompiler::ComputeLoadNonexistent(lookup->name(),
|
code = NamedLoadHandlerCompiler::ComputeLoadNonexistent(lookup->name(),
|
||||||
receiver_map());
|
receiver_map());
|
||||||
// TODO(jkummerow/verwaest): Introduce a builtin that handles this case.
|
// TODO(jkummerow/verwaest): Introduce a builtin that handles this case.
|
||||||
@ -1232,9 +1228,7 @@ Handle<Code> LoadIC::CompileHandler(LookupIterator* lookup,
|
|||||||
// property must be found in the object for the stub to be
|
// property must be found in the object for the stub to be
|
||||||
// applicable.
|
// applicable.
|
||||||
if (!receiver_is_holder) break;
|
if (!receiver_is_holder) break;
|
||||||
return is_strong(language_mode())
|
return isolate()->builtins()->LoadIC_Normal();
|
||||||
? isolate()->builtins()->LoadIC_Normal_Strong()
|
|
||||||
: isolate()->builtins()->LoadIC_Normal();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// -------------- Fields --------------
|
// -------------- Fields --------------
|
||||||
@ -1344,8 +1338,7 @@ Handle<Code> KeyedLoadIC::LoadElementStub(Handle<HeapObject> receiver) {
|
|||||||
|
|
||||||
CodeHandleList handlers(target_receiver_maps.length());
|
CodeHandleList handlers(target_receiver_maps.length());
|
||||||
ElementHandlerCompiler compiler(isolate());
|
ElementHandlerCompiler compiler(isolate());
|
||||||
compiler.CompileElementHandlers(&target_receiver_maps, &handlers,
|
compiler.CompileElementHandlers(&target_receiver_maps, &handlers);
|
||||||
language_mode());
|
|
||||||
ConfigureVectorState(Handle<Name>::null(), &target_receiver_maps, &handlers);
|
ConfigureVectorState(Handle<Name>::null(), &target_receiver_maps, &handlers);
|
||||||
return null_handle;
|
return null_handle;
|
||||||
}
|
}
|
||||||
@ -1356,8 +1349,7 @@ MaybeHandle<Object> KeyedLoadIC::Load(Handle<Object> object,
|
|||||||
if (MigrateDeprecated(object)) {
|
if (MigrateDeprecated(object)) {
|
||||||
Handle<Object> result;
|
Handle<Object> result;
|
||||||
ASSIGN_RETURN_ON_EXCEPTION(
|
ASSIGN_RETURN_ON_EXCEPTION(
|
||||||
isolate(), result,
|
isolate(), result, Runtime::GetObjectProperty(isolate(), object, key),
|
||||||
Runtime::GetObjectProperty(isolate(), object, key, language_mode()),
|
|
||||||
Object);
|
Object);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -1395,10 +1387,9 @@ MaybeHandle<Object> KeyedLoadIC::Load(Handle<Object> object,
|
|||||||
if (!load_handle.is_null()) return load_handle;
|
if (!load_handle.is_null()) return load_handle;
|
||||||
|
|
||||||
Handle<Object> result;
|
Handle<Object> result;
|
||||||
ASSIGN_RETURN_ON_EXCEPTION(
|
ASSIGN_RETURN_ON_EXCEPTION(isolate(), result,
|
||||||
isolate(), result,
|
Runtime::GetObjectProperty(isolate(), object, key),
|
||||||
Runtime::GetObjectProperty(isolate(), object, key, language_mode()),
|
Object);
|
||||||
Object);
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2919,11 +2910,8 @@ RUNTIME_FUNCTION(Runtime_LoadElementWithInterceptor) {
|
|||||||
DCHECK(args.smi_at(1) >= 0);
|
DCHECK(args.smi_at(1) >= 0);
|
||||||
uint32_t index = args.smi_at(1);
|
uint32_t index = args.smi_at(1);
|
||||||
Handle<Object> result;
|
Handle<Object> result;
|
||||||
// TODO(conradw): Investigate strong mode semantics for this.
|
|
||||||
LanguageMode language_mode = SLOPPY;
|
|
||||||
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
|
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
|
||||||
isolate, result,
|
isolate, result, Object::GetElement(isolate, receiver, index));
|
||||||
Object::GetElement(isolate, receiver, index, language_mode));
|
|
||||||
return *result;
|
return *result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
31
src/ic/ic.h
31
src/ic/ic.h
@ -296,19 +296,14 @@ class CallIC : public IC {
|
|||||||
|
|
||||||
class LoadIC : public IC {
|
class LoadIC : public IC {
|
||||||
public:
|
public:
|
||||||
static ExtraICState ComputeExtraICState(TypeofMode typeof_mode,
|
static ExtraICState ComputeExtraICState(TypeofMode typeof_mode) {
|
||||||
LanguageMode language_mode) {
|
return LoadICState(typeof_mode).GetExtraICState();
|
||||||
return LoadICState(typeof_mode, language_mode).GetExtraICState();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TypeofMode typeof_mode() const {
|
TypeofMode typeof_mode() const {
|
||||||
return LoadICState::GetTypeofMode(extra_ic_state());
|
return LoadICState::GetTypeofMode(extra_ic_state());
|
||||||
}
|
}
|
||||||
|
|
||||||
LanguageMode language_mode() const {
|
|
||||||
return LoadICState::GetLanguageMode(extra_ic_state());
|
|
||||||
}
|
|
||||||
|
|
||||||
LoadIC(FrameDepth depth, Isolate* isolate, FeedbackNexus* nexus = NULL)
|
LoadIC(FrameDepth depth, Isolate* isolate, FeedbackNexus* nexus = NULL)
|
||||||
: IC(depth, isolate, nexus) {
|
: IC(depth, isolate, nexus) {
|
||||||
DCHECK(nexus != NULL);
|
DCHECK(nexus != NULL);
|
||||||
@ -323,9 +318,8 @@ class LoadIC : public IC {
|
|||||||
|
|
||||||
static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); }
|
static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); }
|
||||||
static void GenerateMiss(MacroAssembler* masm);
|
static void GenerateMiss(MacroAssembler* masm);
|
||||||
static void GenerateRuntimeGetProperty(MacroAssembler* masm,
|
static void GenerateRuntimeGetProperty(MacroAssembler* masm);
|
||||||
LanguageMode language_mode);
|
static void GenerateNormal(MacroAssembler* masm);
|
||||||
static void GenerateNormal(MacroAssembler* masm, LanguageMode language_mode);
|
|
||||||
|
|
||||||
static Handle<Code> initialize_stub(Isolate* isolate,
|
static Handle<Code> initialize_stub(Isolate* isolate,
|
||||||
ExtraICState extra_state);
|
ExtraICState extra_state);
|
||||||
@ -342,14 +336,10 @@ class LoadIC : public IC {
|
|||||||
|
|
||||||
Handle<Code> slow_stub() const {
|
Handle<Code> slow_stub() const {
|
||||||
if (kind() == Code::LOAD_IC) {
|
if (kind() == Code::LOAD_IC) {
|
||||||
return is_strong(language_mode())
|
return isolate()->builtins()->LoadIC_Slow();
|
||||||
? isolate()->builtins()->LoadIC_Slow_Strong()
|
|
||||||
: isolate()->builtins()->LoadIC_Slow();
|
|
||||||
} else {
|
} else {
|
||||||
DCHECK_EQ(Code::KEYED_LOAD_IC, kind());
|
DCHECK_EQ(Code::KEYED_LOAD_IC, kind());
|
||||||
return is_strong(language_mode())
|
return isolate()->builtins()->KeyedLoadIC_Slow();
|
||||||
? isolate()->builtins()->KeyedLoadIC_Slow_Strong()
|
|
||||||
: isolate()->builtins()->KeyedLoadIC_Slow();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -379,9 +369,8 @@ class KeyedLoadIC : public LoadIC {
|
|||||||
: public BitField<IcCheckType, LoadICState::kNextBitFieldOffset, 1> {};
|
: public BitField<IcCheckType, LoadICState::kNextBitFieldOffset, 1> {};
|
||||||
|
|
||||||
static ExtraICState ComputeExtraICState(TypeofMode typeof_mode,
|
static ExtraICState ComputeExtraICState(TypeofMode typeof_mode,
|
||||||
LanguageMode language_mode,
|
|
||||||
IcCheckType key_type) {
|
IcCheckType key_type) {
|
||||||
return LoadICState(typeof_mode, language_mode).GetExtraICState() |
|
return LoadICState(typeof_mode).GetExtraICState() |
|
||||||
IcCheckTypeField::encode(key_type);
|
IcCheckTypeField::encode(key_type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -401,11 +390,9 @@ class KeyedLoadIC : public LoadIC {
|
|||||||
|
|
||||||
// Code generator routines.
|
// Code generator routines.
|
||||||
static void GenerateMiss(MacroAssembler* masm);
|
static void GenerateMiss(MacroAssembler* masm);
|
||||||
static void GenerateRuntimeGetProperty(MacroAssembler* masm,
|
static void GenerateRuntimeGetProperty(MacroAssembler* masm);
|
||||||
LanguageMode language_mode);
|
|
||||||
static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); }
|
static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); }
|
||||||
static void GenerateMegamorphic(MacroAssembler* masm,
|
static void GenerateMegamorphic(MacroAssembler* masm);
|
||||||
LanguageMode language_mode);
|
|
||||||
|
|
||||||
// Bit mask to be tested against bit field for the cases when
|
// Bit mask to be tested against bit field for the cases when
|
||||||
// generic stub should go into slow case.
|
// generic stub should go into slow case.
|
||||||
|
@ -159,8 +159,7 @@ static void GenerateKeyedLoadReceiverCheck(MacroAssembler* masm,
|
|||||||
static void GenerateFastArrayLoad(MacroAssembler* masm, Register receiver,
|
static void GenerateFastArrayLoad(MacroAssembler* masm, Register receiver,
|
||||||
Register key, Register elements,
|
Register key, Register elements,
|
||||||
Register scratch1, Register scratch2,
|
Register scratch1, Register scratch2,
|
||||||
Register result, Label* slow,
|
Register result, Label* slow) {
|
||||||
LanguageMode language_mode) {
|
|
||||||
// Register use:
|
// Register use:
|
||||||
//
|
//
|
||||||
// receiver - holds the receiver on entry.
|
// receiver - holds the receiver on entry.
|
||||||
@ -216,13 +215,8 @@ static void GenerateFastArrayLoad(MacroAssembler* masm, Register receiver,
|
|||||||
__ Branch(&check_next_prototype);
|
__ Branch(&check_next_prototype);
|
||||||
|
|
||||||
__ bind(&absent);
|
__ bind(&absent);
|
||||||
if (is_strong(language_mode)) {
|
__ LoadRoot(result, Heap::kUndefinedValueRootIndex);
|
||||||
// Strong mode accesses must throw in this case, so call the runtime.
|
__ Branch(&done);
|
||||||
__ Branch(slow);
|
|
||||||
} else {
|
|
||||||
__ LoadRoot(result, Heap::kUndefinedValueRootIndex);
|
|
||||||
__ Branch(&done);
|
|
||||||
}
|
|
||||||
|
|
||||||
__ bind(&in_bounds);
|
__ bind(&in_bounds);
|
||||||
// Fast case: Do the load.
|
// Fast case: Do the load.
|
||||||
@ -270,8 +264,7 @@ static void GenerateKeyNameCheck(MacroAssembler* masm, Register key,
|
|||||||
__ bind(&unique);
|
__ bind(&unique);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LoadIC::GenerateNormal(MacroAssembler* masm) {
|
||||||
void LoadIC::GenerateNormal(MacroAssembler* masm, LanguageMode language_mode) {
|
|
||||||
Register dictionary = a0;
|
Register dictionary = a0;
|
||||||
DCHECK(!dictionary.is(LoadDescriptor::ReceiverRegister()));
|
DCHECK(!dictionary.is(LoadDescriptor::ReceiverRegister()));
|
||||||
DCHECK(!dictionary.is(LoadDescriptor::NameRegister()));
|
DCHECK(!dictionary.is(LoadDescriptor::NameRegister()));
|
||||||
@ -286,7 +279,7 @@ void LoadIC::GenerateNormal(MacroAssembler* masm, LanguageMode language_mode) {
|
|||||||
|
|
||||||
// Dictionary load failed, go slow (but don't miss).
|
// Dictionary load failed, go slow (but don't miss).
|
||||||
__ bind(&slow);
|
__ bind(&slow);
|
||||||
GenerateRuntimeGetProperty(masm, language_mode);
|
GenerateRuntimeGetProperty(masm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -318,17 +311,14 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) {
|
|||||||
__ TailCallRuntime(Runtime::kLoadIC_Miss);
|
__ TailCallRuntime(Runtime::kLoadIC_Miss);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
|
||||||
void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm,
|
|
||||||
LanguageMode language_mode) {
|
|
||||||
// The return address is in ra.
|
// The return address is in ra.
|
||||||
|
|
||||||
__ mov(LoadIC_TempRegister(), LoadDescriptor::ReceiverRegister());
|
__ mov(LoadIC_TempRegister(), LoadDescriptor::ReceiverRegister());
|
||||||
__ Push(LoadIC_TempRegister(), LoadDescriptor::NameRegister());
|
__ Push(LoadIC_TempRegister(), LoadDescriptor::NameRegister());
|
||||||
|
|
||||||
// Do tail-call to runtime routine.
|
// Do tail-call to runtime routine.
|
||||||
__ TailCallRuntime(is_strong(language_mode) ? Runtime::kGetPropertyStrong
|
__ TailCallRuntime(Runtime::kGetProperty);
|
||||||
: Runtime::kGetProperty);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -346,21 +336,16 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
|
|||||||
__ TailCallRuntime(Runtime::kKeyedLoadIC_Miss);
|
__ TailCallRuntime(Runtime::kKeyedLoadIC_Miss);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
|
||||||
void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm,
|
|
||||||
LanguageMode language_mode) {
|
|
||||||
// The return address is in ra.
|
// The return address is in ra.
|
||||||
|
|
||||||
__ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister());
|
__ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister());
|
||||||
|
|
||||||
// Do tail-call to runtime routine.
|
// Do tail-call to runtime routine.
|
||||||
__ TailCallRuntime(is_strong(language_mode) ? Runtime::kKeyedGetPropertyStrong
|
__ TailCallRuntime(Runtime::kKeyedGetProperty);
|
||||||
: Runtime::kKeyedGetProperty);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void KeyedLoadIC::GenerateMegamorphic(MacroAssembler* masm) {
|
||||||
void KeyedLoadIC::GenerateMegamorphic(MacroAssembler* masm,
|
|
||||||
LanguageMode language_mode) {
|
|
||||||
// The return address is in ra.
|
// The return address is in ra.
|
||||||
Label slow, check_name, index_smi, index_name, property_array_property;
|
Label slow, check_name, index_smi, index_name, property_array_property;
|
||||||
Label probe_dictionary, check_number_dictionary;
|
Label probe_dictionary, check_number_dictionary;
|
||||||
@ -384,8 +369,7 @@ void KeyedLoadIC::GenerateMegamorphic(MacroAssembler* masm,
|
|||||||
// Check the receiver's map to see if it has fast elements.
|
// Check the receiver's map to see if it has fast elements.
|
||||||
__ CheckFastElements(a0, a3, &check_number_dictionary);
|
__ CheckFastElements(a0, a3, &check_number_dictionary);
|
||||||
|
|
||||||
GenerateFastArrayLoad(masm, receiver, key, a0, a3, t0, v0, &slow,
|
GenerateFastArrayLoad(masm, receiver, key, a0, a3, t0, v0, &slow);
|
||||||
language_mode);
|
|
||||||
__ IncrementCounter(isolate->counters()->ic_keyed_load_generic_smi(), 1, t0,
|
__ IncrementCounter(isolate->counters()->ic_keyed_load_generic_smi(), 1, t0,
|
||||||
a3);
|
a3);
|
||||||
__ Ret();
|
__ Ret();
|
||||||
@ -407,7 +391,7 @@ void KeyedLoadIC::GenerateMegamorphic(MacroAssembler* masm,
|
|||||||
__ bind(&slow);
|
__ bind(&slow);
|
||||||
__ IncrementCounter(isolate->counters()->ic_keyed_load_generic_slow(), 1, t0,
|
__ IncrementCounter(isolate->counters()->ic_keyed_load_generic_slow(), 1, t0,
|
||||||
a3);
|
a3);
|
||||||
GenerateRuntimeGetProperty(masm, language_mode);
|
GenerateRuntimeGetProperty(masm);
|
||||||
|
|
||||||
__ bind(&check_name);
|
__ bind(&check_name);
|
||||||
GenerateKeyNameCheck(masm, key, a0, a3, &index_name, &slow);
|
GenerateKeyNameCheck(masm, key, a0, a3, &index_name, &slow);
|
||||||
|
@ -158,8 +158,7 @@ static void GenerateKeyedLoadReceiverCheck(MacroAssembler* masm,
|
|||||||
static void GenerateFastArrayLoad(MacroAssembler* masm, Register receiver,
|
static void GenerateFastArrayLoad(MacroAssembler* masm, Register receiver,
|
||||||
Register key, Register elements,
|
Register key, Register elements,
|
||||||
Register scratch1, Register scratch2,
|
Register scratch1, Register scratch2,
|
||||||
Register result, Label* slow,
|
Register result, Label* slow) {
|
||||||
LanguageMode language_mode) {
|
|
||||||
// Register use:
|
// Register use:
|
||||||
//
|
//
|
||||||
// receiver - holds the receiver on entry.
|
// receiver - holds the receiver on entry.
|
||||||
@ -215,12 +214,8 @@ static void GenerateFastArrayLoad(MacroAssembler* masm, Register receiver,
|
|||||||
__ Branch(&check_next_prototype);
|
__ Branch(&check_next_prototype);
|
||||||
|
|
||||||
__ bind(&absent);
|
__ bind(&absent);
|
||||||
if (is_strong(language_mode)) {
|
__ LoadRoot(result, Heap::kUndefinedValueRootIndex);
|
||||||
__ Branch(slow);
|
__ Branch(&done);
|
||||||
} else {
|
|
||||||
__ LoadRoot(result, Heap::kUndefinedValueRootIndex);
|
|
||||||
__ Branch(&done);
|
|
||||||
}
|
|
||||||
|
|
||||||
__ bind(&in_bounds);
|
__ bind(&in_bounds);
|
||||||
// Fast case: Do the load.
|
// Fast case: Do the load.
|
||||||
@ -269,8 +264,7 @@ static void GenerateKeyNameCheck(MacroAssembler* masm, Register key,
|
|||||||
__ bind(&unique);
|
__ bind(&unique);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LoadIC::GenerateNormal(MacroAssembler* masm) {
|
||||||
void LoadIC::GenerateNormal(MacroAssembler* masm, LanguageMode language_mode) {
|
|
||||||
Register dictionary = a0;
|
Register dictionary = a0;
|
||||||
DCHECK(!dictionary.is(LoadDescriptor::ReceiverRegister()));
|
DCHECK(!dictionary.is(LoadDescriptor::ReceiverRegister()));
|
||||||
DCHECK(!dictionary.is(LoadDescriptor::NameRegister()));
|
DCHECK(!dictionary.is(LoadDescriptor::NameRegister()));
|
||||||
@ -284,7 +278,7 @@ void LoadIC::GenerateNormal(MacroAssembler* masm, LanguageMode language_mode) {
|
|||||||
|
|
||||||
// Dictionary load failed, go slow (but don't miss).
|
// Dictionary load failed, go slow (but don't miss).
|
||||||
__ bind(&slow);
|
__ bind(&slow);
|
||||||
GenerateRuntimeGetProperty(masm, language_mode);
|
GenerateRuntimeGetProperty(masm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -316,17 +310,14 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) {
|
|||||||
__ TailCallRuntime(Runtime::kLoadIC_Miss);
|
__ TailCallRuntime(Runtime::kLoadIC_Miss);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
|
||||||
void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm,
|
|
||||||
LanguageMode language_mode) {
|
|
||||||
// The return address is in ra.
|
// The return address is in ra.
|
||||||
|
|
||||||
__ mov(LoadIC_TempRegister(), LoadDescriptor::ReceiverRegister());
|
__ mov(LoadIC_TempRegister(), LoadDescriptor::ReceiverRegister());
|
||||||
__ Push(LoadIC_TempRegister(), LoadDescriptor::NameRegister());
|
__ Push(LoadIC_TempRegister(), LoadDescriptor::NameRegister());
|
||||||
|
|
||||||
// Do tail-call to runtime routine.
|
// Do tail-call to runtime routine.
|
||||||
__ TailCallRuntime(is_strong(language_mode) ? Runtime::kGetPropertyStrong
|
__ TailCallRuntime(Runtime::kGetProperty);
|
||||||
: Runtime::kGetProperty);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -344,21 +335,16 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
|
|||||||
__ TailCallRuntime(Runtime::kKeyedLoadIC_Miss);
|
__ TailCallRuntime(Runtime::kKeyedLoadIC_Miss);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
|
||||||
void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm,
|
|
||||||
LanguageMode language_mode) {
|
|
||||||
// The return address is in ra.
|
// The return address is in ra.
|
||||||
|
|
||||||
__ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister());
|
__ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister());
|
||||||
|
|
||||||
// Do tail-call to runtime routine.
|
// Do tail-call to runtime routine.
|
||||||
__ TailCallRuntime(is_strong(language_mode) ? Runtime::kKeyedGetPropertyStrong
|
__ TailCallRuntime(Runtime::kKeyedGetProperty);
|
||||||
: Runtime::kKeyedGetProperty);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void KeyedLoadIC::GenerateMegamorphic(MacroAssembler* masm) {
|
||||||
void KeyedLoadIC::GenerateMegamorphic(MacroAssembler* masm,
|
|
||||||
LanguageMode language_mode) {
|
|
||||||
// The return address is in ra.
|
// The return address is in ra.
|
||||||
Label slow, check_name, index_smi, index_name, property_array_property;
|
Label slow, check_name, index_smi, index_name, property_array_property;
|
||||||
Label probe_dictionary, check_number_dictionary;
|
Label probe_dictionary, check_number_dictionary;
|
||||||
@ -382,8 +368,7 @@ void KeyedLoadIC::GenerateMegamorphic(MacroAssembler* masm,
|
|||||||
// Check the receiver's map to see if it has fast elements.
|
// Check the receiver's map to see if it has fast elements.
|
||||||
__ CheckFastElements(a0, a3, &check_number_dictionary);
|
__ CheckFastElements(a0, a3, &check_number_dictionary);
|
||||||
|
|
||||||
GenerateFastArrayLoad(masm, receiver, key, a0, a3, a4, v0, &slow,
|
GenerateFastArrayLoad(masm, receiver, key, a0, a3, a4, v0, &slow);
|
||||||
language_mode);
|
|
||||||
__ IncrementCounter(isolate->counters()->ic_keyed_load_generic_smi(), 1, a4,
|
__ IncrementCounter(isolate->counters()->ic_keyed_load_generic_smi(), 1, a4,
|
||||||
a3);
|
a3);
|
||||||
__ Ret();
|
__ Ret();
|
||||||
@ -405,7 +390,7 @@ void KeyedLoadIC::GenerateMegamorphic(MacroAssembler* masm,
|
|||||||
__ bind(&slow);
|
__ bind(&slow);
|
||||||
__ IncrementCounter(isolate->counters()->ic_keyed_load_generic_slow(), 1, a4,
|
__ IncrementCounter(isolate->counters()->ic_keyed_load_generic_slow(), 1, a4,
|
||||||
a3);
|
a3);
|
||||||
GenerateRuntimeGetProperty(masm, language_mode);
|
GenerateRuntimeGetProperty(masm);
|
||||||
|
|
||||||
__ bind(&check_name);
|
__ bind(&check_name);
|
||||||
GenerateKeyNameCheck(masm, key, a0, a3, &index_name, &slow);
|
GenerateKeyNameCheck(masm, key, a0, a3, &index_name, &slow);
|
||||||
|
@ -163,8 +163,7 @@ static void GenerateKeyedLoadReceiverCheck(MacroAssembler* masm,
|
|||||||
static void GenerateFastArrayLoad(MacroAssembler* masm, Register receiver,
|
static void GenerateFastArrayLoad(MacroAssembler* masm, Register receiver,
|
||||||
Register key, Register elements,
|
Register key, Register elements,
|
||||||
Register scratch1, Register scratch2,
|
Register scratch1, Register scratch2,
|
||||||
Register result, Label* slow,
|
Register result, Label* slow) {
|
||||||
LanguageMode language_mode) {
|
|
||||||
// Register use:
|
// Register use:
|
||||||
//
|
//
|
||||||
// receiver - holds the receiver on entry.
|
// receiver - holds the receiver on entry.
|
||||||
@ -221,13 +220,8 @@ static void GenerateFastArrayLoad(MacroAssembler* masm, Register receiver,
|
|||||||
__ jmp(&check_next_prototype);
|
__ jmp(&check_next_prototype);
|
||||||
|
|
||||||
__ bind(&absent);
|
__ bind(&absent);
|
||||||
if (is_strong(language_mode)) {
|
__ LoadRoot(result, Heap::kUndefinedValueRootIndex);
|
||||||
// Strong mode accesses must throw in this case, so call the runtime.
|
__ jmp(&done);
|
||||||
__ jmp(slow);
|
|
||||||
} else {
|
|
||||||
__ LoadRoot(result, Heap::kUndefinedValueRootIndex);
|
|
||||||
__ jmp(&done);
|
|
||||||
}
|
|
||||||
|
|
||||||
__ bind(&in_bounds);
|
__ bind(&in_bounds);
|
||||||
// Fast case: Do the load.
|
// Fast case: Do the load.
|
||||||
@ -274,8 +268,7 @@ static void GenerateKeyNameCheck(MacroAssembler* masm, Register key,
|
|||||||
__ bind(&unique);
|
__ bind(&unique);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LoadIC::GenerateNormal(MacroAssembler* masm) {
|
||||||
void LoadIC::GenerateNormal(MacroAssembler* masm, LanguageMode language_mode) {
|
|
||||||
Register dictionary = r3;
|
Register dictionary = r3;
|
||||||
DCHECK(!dictionary.is(LoadDescriptor::ReceiverRegister()));
|
DCHECK(!dictionary.is(LoadDescriptor::ReceiverRegister()));
|
||||||
DCHECK(!dictionary.is(LoadDescriptor::NameRegister()));
|
DCHECK(!dictionary.is(LoadDescriptor::NameRegister()));
|
||||||
@ -290,7 +283,7 @@ void LoadIC::GenerateNormal(MacroAssembler* masm, LanguageMode language_mode) {
|
|||||||
|
|
||||||
// Dictionary load failed, go slow (but don't miss).
|
// Dictionary load failed, go slow (but don't miss).
|
||||||
__ bind(&slow);
|
__ bind(&slow);
|
||||||
GenerateRuntimeGetProperty(masm, language_mode);
|
GenerateRuntimeGetProperty(masm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -322,17 +315,14 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) {
|
|||||||
__ TailCallRuntime(Runtime::kLoadIC_Miss);
|
__ TailCallRuntime(Runtime::kLoadIC_Miss);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
|
||||||
void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm,
|
|
||||||
LanguageMode language_mode) {
|
|
||||||
// The return address is in lr.
|
// The return address is in lr.
|
||||||
|
|
||||||
__ mr(LoadIC_TempRegister(), LoadDescriptor::ReceiverRegister());
|
__ mr(LoadIC_TempRegister(), LoadDescriptor::ReceiverRegister());
|
||||||
__ Push(LoadIC_TempRegister(), LoadDescriptor::NameRegister());
|
__ Push(LoadIC_TempRegister(), LoadDescriptor::NameRegister());
|
||||||
|
|
||||||
// Do tail-call to runtime routine.
|
// Do tail-call to runtime routine.
|
||||||
__ TailCallRuntime(is_strong(language_mode) ? Runtime::kGetPropertyStrong
|
__ TailCallRuntime(Runtime::kGetProperty);
|
||||||
: Runtime::kGetProperty);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -350,21 +340,16 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
|
|||||||
__ TailCallRuntime(Runtime::kKeyedLoadIC_Miss);
|
__ TailCallRuntime(Runtime::kKeyedLoadIC_Miss);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
|
||||||
void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm,
|
|
||||||
LanguageMode language_mode) {
|
|
||||||
// The return address is in lr.
|
// The return address is in lr.
|
||||||
|
|
||||||
__ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister());
|
__ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister());
|
||||||
|
|
||||||
// Do tail-call to runtime routine.
|
// Do tail-call to runtime routine.
|
||||||
__ TailCallRuntime(is_strong(language_mode) ? Runtime::kKeyedGetPropertyStrong
|
__ TailCallRuntime(Runtime::kKeyedGetProperty);
|
||||||
: Runtime::kKeyedGetProperty);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void KeyedLoadIC::GenerateMegamorphic(MacroAssembler* masm) {
|
||||||
void KeyedLoadIC::GenerateMegamorphic(MacroAssembler* masm,
|
|
||||||
LanguageMode language_mode) {
|
|
||||||
// The return address is in lr.
|
// The return address is in lr.
|
||||||
Label slow, check_name, index_smi, index_name, property_array_property;
|
Label slow, check_name, index_smi, index_name, property_array_property;
|
||||||
Label probe_dictionary, check_number_dictionary;
|
Label probe_dictionary, check_number_dictionary;
|
||||||
@ -388,8 +373,7 @@ void KeyedLoadIC::GenerateMegamorphic(MacroAssembler* masm,
|
|||||||
// Check the receiver's map to see if it has fast elements.
|
// Check the receiver's map to see if it has fast elements.
|
||||||
__ CheckFastElements(r3, r6, &check_number_dictionary);
|
__ CheckFastElements(r3, r6, &check_number_dictionary);
|
||||||
|
|
||||||
GenerateFastArrayLoad(masm, receiver, key, r3, r6, r7, r3, &slow,
|
GenerateFastArrayLoad(masm, receiver, key, r3, r6, r7, r3, &slow);
|
||||||
language_mode);
|
|
||||||
__ IncrementCounter(isolate->counters()->ic_keyed_load_generic_smi(), 1, r7,
|
__ IncrementCounter(isolate->counters()->ic_keyed_load_generic_smi(), 1, r7,
|
||||||
r6);
|
r6);
|
||||||
__ Ret();
|
__ Ret();
|
||||||
@ -412,7 +396,7 @@ void KeyedLoadIC::GenerateMegamorphic(MacroAssembler* masm,
|
|||||||
__ bind(&slow);
|
__ bind(&slow);
|
||||||
__ IncrementCounter(isolate->counters()->ic_keyed_load_generic_slow(), 1, r7,
|
__ IncrementCounter(isolate->counters()->ic_keyed_load_generic_slow(), 1, r7,
|
||||||
r6);
|
r6);
|
||||||
GenerateRuntimeGetProperty(masm, language_mode);
|
GenerateRuntimeGetProperty(masm);
|
||||||
|
|
||||||
__ bind(&check_name);
|
__ bind(&check_name);
|
||||||
GenerateKeyNameCheck(masm, key, r3, r6, &index_name, &slow);
|
GenerateKeyNameCheck(masm, key, r3, r6, &index_name, &slow);
|
||||||
|
@ -167,7 +167,7 @@ static void GenerateKeyedLoadReceiverCheck(MacroAssembler* masm,
|
|||||||
static void GenerateFastArrayLoad(MacroAssembler* masm, Register receiver,
|
static void GenerateFastArrayLoad(MacroAssembler* masm, Register receiver,
|
||||||
Register key, Register elements,
|
Register key, Register elements,
|
||||||
Register scratch, Register result,
|
Register scratch, Register result,
|
||||||
Label* slow, LanguageMode language_mode) {
|
Label* slow) {
|
||||||
// Register use:
|
// Register use:
|
||||||
//
|
//
|
||||||
// receiver - holds the receiver on entry.
|
// receiver - holds the receiver on entry.
|
||||||
@ -222,13 +222,8 @@ static void GenerateFastArrayLoad(MacroAssembler* masm, Register receiver,
|
|||||||
__ jmp(&check_next_prototype);
|
__ jmp(&check_next_prototype);
|
||||||
|
|
||||||
__ bind(&absent);
|
__ bind(&absent);
|
||||||
if (is_strong(language_mode)) {
|
__ LoadRoot(result, Heap::kUndefinedValueRootIndex);
|
||||||
// Strong mode accesses must throw in this case, so call the runtime.
|
__ jmp(&done);
|
||||||
__ jmp(slow);
|
|
||||||
} else {
|
|
||||||
__ LoadRoot(result, Heap::kUndefinedValueRootIndex);
|
|
||||||
__ jmp(&done);
|
|
||||||
}
|
|
||||||
|
|
||||||
__ bind(&in_bounds);
|
__ bind(&in_bounds);
|
||||||
// Fast case: Do the load.
|
// Fast case: Do the load.
|
||||||
@ -274,9 +269,7 @@ static void GenerateKeyNameCheck(MacroAssembler* masm, Register key,
|
|||||||
__ bind(&unique);
|
__ bind(&unique);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void KeyedLoadIC::GenerateMegamorphic(MacroAssembler* masm) {
|
||||||
void KeyedLoadIC::GenerateMegamorphic(MacroAssembler* masm,
|
|
||||||
LanguageMode language_mode) {
|
|
||||||
// The return address is on the stack.
|
// The return address is on the stack.
|
||||||
Label slow, check_name, index_smi, index_name, property_array_property;
|
Label slow, check_name, index_smi, index_name, property_array_property;
|
||||||
Label probe_dictionary, check_number_dictionary;
|
Label probe_dictionary, check_number_dictionary;
|
||||||
@ -298,8 +291,7 @@ void KeyedLoadIC::GenerateMegamorphic(MacroAssembler* masm,
|
|||||||
// Check the receiver's map to see if it has fast elements.
|
// Check the receiver's map to see if it has fast elements.
|
||||||
__ CheckFastElements(rax, &check_number_dictionary);
|
__ CheckFastElements(rax, &check_number_dictionary);
|
||||||
|
|
||||||
GenerateFastArrayLoad(masm, receiver, key, rax, rbx, rax, &slow,
|
GenerateFastArrayLoad(masm, receiver, key, rax, rbx, rax, &slow);
|
||||||
language_mode);
|
|
||||||
Counters* counters = masm->isolate()->counters();
|
Counters* counters = masm->isolate()->counters();
|
||||||
__ IncrementCounter(counters->ic_keyed_load_generic_smi(), 1);
|
__ IncrementCounter(counters->ic_keyed_load_generic_smi(), 1);
|
||||||
__ ret(0);
|
__ ret(0);
|
||||||
@ -320,7 +312,7 @@ void KeyedLoadIC::GenerateMegamorphic(MacroAssembler* masm,
|
|||||||
__ bind(&slow);
|
__ bind(&slow);
|
||||||
// Slow case: Jump to runtime.
|
// Slow case: Jump to runtime.
|
||||||
__ IncrementCounter(counters->ic_keyed_load_generic_slow(), 1);
|
__ IncrementCounter(counters->ic_keyed_load_generic_slow(), 1);
|
||||||
KeyedLoadIC::GenerateRuntimeGetProperty(masm, language_mode);
|
KeyedLoadIC::GenerateRuntimeGetProperty(masm);
|
||||||
|
|
||||||
__ bind(&check_name);
|
__ bind(&check_name);
|
||||||
GenerateKeyNameCheck(masm, key, rax, rbx, &index_name, &slow);
|
GenerateKeyNameCheck(masm, key, rax, rbx, &index_name, &slow);
|
||||||
@ -626,8 +618,7 @@ void KeyedStoreIC::GenerateMegamorphic(MacroAssembler* masm,
|
|||||||
GenerateMiss(masm);
|
GenerateMiss(masm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LoadIC::GenerateNormal(MacroAssembler* masm) {
|
||||||
void LoadIC::GenerateNormal(MacroAssembler* masm, LanguageMode language_mode) {
|
|
||||||
Register dictionary = rax;
|
Register dictionary = rax;
|
||||||
DCHECK(!dictionary.is(LoadDescriptor::ReceiverRegister()));
|
DCHECK(!dictionary.is(LoadDescriptor::ReceiverRegister()));
|
||||||
DCHECK(!dictionary.is(LoadDescriptor::NameRegister()));
|
DCHECK(!dictionary.is(LoadDescriptor::NameRegister()));
|
||||||
@ -642,7 +633,7 @@ void LoadIC::GenerateNormal(MacroAssembler* masm, LanguageMode language_mode) {
|
|||||||
|
|
||||||
// Dictionary load failed, go slow (but don't miss).
|
// Dictionary load failed, go slow (but don't miss).
|
||||||
__ bind(&slow);
|
__ bind(&slow);
|
||||||
LoadIC::GenerateRuntimeGetProperty(masm, language_mode);
|
LoadIC::GenerateRuntimeGetProperty(masm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -675,9 +666,7 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) {
|
|||||||
__ TailCallRuntime(Runtime::kLoadIC_Miss);
|
__ TailCallRuntime(Runtime::kLoadIC_Miss);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
|
||||||
void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm,
|
|
||||||
LanguageMode language_mode) {
|
|
||||||
// The return address is on the stack.
|
// The return address is on the stack.
|
||||||
Register receiver = LoadDescriptor::ReceiverRegister();
|
Register receiver = LoadDescriptor::ReceiverRegister();
|
||||||
Register name = LoadDescriptor::NameRegister();
|
Register name = LoadDescriptor::NameRegister();
|
||||||
@ -690,8 +679,7 @@ void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm,
|
|||||||
__ PushReturnAddressFrom(rbx);
|
__ PushReturnAddressFrom(rbx);
|
||||||
|
|
||||||
// Do tail-call to runtime routine.
|
// Do tail-call to runtime routine.
|
||||||
__ TailCallRuntime(is_strong(language_mode) ? Runtime::kGetPropertyStrong
|
__ TailCallRuntime(Runtime::kGetProperty);
|
||||||
: Runtime::kGetProperty);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -706,9 +694,7 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
|
|||||||
__ TailCallRuntime(Runtime::kKeyedLoadIC_Miss);
|
__ TailCallRuntime(Runtime::kKeyedLoadIC_Miss);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
|
||||||
void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm,
|
|
||||||
LanguageMode language_mode) {
|
|
||||||
// The return address is on the stack.
|
// The return address is on the stack.
|
||||||
Register receiver = LoadDescriptor::ReceiverRegister();
|
Register receiver = LoadDescriptor::ReceiverRegister();
|
||||||
Register name = LoadDescriptor::NameRegister();
|
Register name = LoadDescriptor::NameRegister();
|
||||||
@ -721,8 +707,7 @@ void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm,
|
|||||||
__ PushReturnAddressFrom(rbx);
|
__ PushReturnAddressFrom(rbx);
|
||||||
|
|
||||||
// Do tail-call to runtime routine.
|
// Do tail-call to runtime routine.
|
||||||
__ TailCallRuntime(is_strong(language_mode) ? Runtime::kKeyedGetPropertyStrong
|
__ TailCallRuntime(Runtime::kKeyedGetProperty);
|
||||||
: Runtime::kKeyedGetProperty);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -167,7 +167,7 @@ static void GenerateKeyedLoadReceiverCheck(MacroAssembler* masm,
|
|||||||
static void GenerateFastArrayLoad(MacroAssembler* masm, Register receiver,
|
static void GenerateFastArrayLoad(MacroAssembler* masm, Register receiver,
|
||||||
Register key, Register scratch,
|
Register key, Register scratch,
|
||||||
Register scratch2, Register result,
|
Register scratch2, Register result,
|
||||||
Label* slow, LanguageMode language_mode) {
|
Label* slow) {
|
||||||
// Register use:
|
// Register use:
|
||||||
// receiver - holds the receiver and is unchanged.
|
// receiver - holds the receiver and is unchanged.
|
||||||
// key - holds the key and is unchanged (must be a smi).
|
// key - holds the key and is unchanged (must be a smi).
|
||||||
@ -211,13 +211,8 @@ static void GenerateFastArrayLoad(MacroAssembler* masm, Register receiver,
|
|||||||
__ jmp(&check_next_prototype);
|
__ jmp(&check_next_prototype);
|
||||||
|
|
||||||
__ bind(&absent);
|
__ bind(&absent);
|
||||||
if (is_strong(language_mode)) {
|
__ mov(result, masm->isolate()->factory()->undefined_value());
|
||||||
// Strong mode accesses must throw in this case, so call the runtime.
|
__ jmp(&done);
|
||||||
__ jmp(slow);
|
|
||||||
} else {
|
|
||||||
__ mov(result, masm->isolate()->factory()->undefined_value());
|
|
||||||
__ jmp(&done);
|
|
||||||
}
|
|
||||||
|
|
||||||
__ bind(&in_bounds);
|
__ bind(&in_bounds);
|
||||||
// Fast case: Do the load.
|
// Fast case: Do the load.
|
||||||
@ -262,9 +257,7 @@ static void GenerateKeyNameCheck(MacroAssembler* masm, Register key,
|
|||||||
__ bind(&unique);
|
__ bind(&unique);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void KeyedLoadIC::GenerateMegamorphic(MacroAssembler* masm) {
|
||||||
void KeyedLoadIC::GenerateMegamorphic(MacroAssembler* masm,
|
|
||||||
LanguageMode language_mode) {
|
|
||||||
// The return address is on the stack.
|
// The return address is on the stack.
|
||||||
Label slow, check_name, index_smi, index_name, property_array_property;
|
Label slow, check_name, index_smi, index_name, property_array_property;
|
||||||
Label probe_dictionary, check_number_dictionary;
|
Label probe_dictionary, check_number_dictionary;
|
||||||
@ -286,8 +279,7 @@ void KeyedLoadIC::GenerateMegamorphic(MacroAssembler* masm,
|
|||||||
// Check the receiver's map to see if it has fast elements.
|
// Check the receiver's map to see if it has fast elements.
|
||||||
__ CheckFastElements(eax, &check_number_dictionary);
|
__ CheckFastElements(eax, &check_number_dictionary);
|
||||||
|
|
||||||
GenerateFastArrayLoad(masm, receiver, key, eax, ebx, eax, &slow,
|
GenerateFastArrayLoad(masm, receiver, key, eax, ebx, eax, &slow);
|
||||||
language_mode);
|
|
||||||
Isolate* isolate = masm->isolate();
|
Isolate* isolate = masm->isolate();
|
||||||
Counters* counters = isolate->counters();
|
Counters* counters = isolate->counters();
|
||||||
__ IncrementCounter(counters->ic_keyed_load_generic_smi(), 1);
|
__ IncrementCounter(counters->ic_keyed_load_generic_smi(), 1);
|
||||||
@ -319,7 +311,7 @@ void KeyedLoadIC::GenerateMegamorphic(MacroAssembler* masm,
|
|||||||
__ bind(&slow);
|
__ bind(&slow);
|
||||||
// Slow case: jump to runtime.
|
// Slow case: jump to runtime.
|
||||||
__ IncrementCounter(counters->ic_keyed_load_generic_slow(), 1);
|
__ IncrementCounter(counters->ic_keyed_load_generic_slow(), 1);
|
||||||
GenerateRuntimeGetProperty(masm, language_mode);
|
GenerateRuntimeGetProperty(masm);
|
||||||
|
|
||||||
__ bind(&check_name);
|
__ bind(&check_name);
|
||||||
GenerateKeyNameCheck(masm, key, eax, ebx, &index_name, &slow);
|
GenerateKeyNameCheck(masm, key, eax, ebx, &index_name, &slow);
|
||||||
@ -628,8 +620,7 @@ void KeyedStoreIC::GenerateMegamorphic(MacroAssembler* masm,
|
|||||||
GenerateMiss(masm);
|
GenerateMiss(masm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LoadIC::GenerateNormal(MacroAssembler* masm) {
|
||||||
void LoadIC::GenerateNormal(MacroAssembler* masm, LanguageMode language_mode) {
|
|
||||||
Register dictionary = eax;
|
Register dictionary = eax;
|
||||||
DCHECK(!dictionary.is(LoadDescriptor::ReceiverRegister()));
|
DCHECK(!dictionary.is(LoadDescriptor::ReceiverRegister()));
|
||||||
DCHECK(!dictionary.is(LoadDescriptor::NameRegister()));
|
DCHECK(!dictionary.is(LoadDescriptor::NameRegister()));
|
||||||
@ -644,7 +635,7 @@ void LoadIC::GenerateNormal(MacroAssembler* masm, LanguageMode language_mode) {
|
|||||||
|
|
||||||
// Dictionary load failed, go slow (but don't miss).
|
// Dictionary load failed, go slow (but don't miss).
|
||||||
__ bind(&slow);
|
__ bind(&slow);
|
||||||
GenerateRuntimeGetProperty(masm, language_mode);
|
GenerateRuntimeGetProperty(masm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -675,9 +666,7 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) {
|
|||||||
__ TailCallRuntime(Runtime::kLoadIC_Miss);
|
__ TailCallRuntime(Runtime::kLoadIC_Miss);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
|
||||||
void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm,
|
|
||||||
LanguageMode language_mode) {
|
|
||||||
// Return address is on the stack.
|
// Return address is on the stack.
|
||||||
Register receiver = LoadDescriptor::ReceiverRegister();
|
Register receiver = LoadDescriptor::ReceiverRegister();
|
||||||
Register name = LoadDescriptor::NameRegister();
|
Register name = LoadDescriptor::NameRegister();
|
||||||
@ -689,8 +678,7 @@ void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm,
|
|||||||
__ push(ebx);
|
__ push(ebx);
|
||||||
|
|
||||||
// Do tail-call to runtime routine.
|
// Do tail-call to runtime routine.
|
||||||
__ TailCallRuntime(is_strong(language_mode) ? Runtime::kGetPropertyStrong
|
__ TailCallRuntime(Runtime::kGetProperty);
|
||||||
: Runtime::kGetProperty);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -704,9 +692,7 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
|
|||||||
__ TailCallRuntime(Runtime::kKeyedLoadIC_Miss);
|
__ TailCallRuntime(Runtime::kKeyedLoadIC_Miss);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
|
||||||
void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm,
|
|
||||||
LanguageMode language_mode) {
|
|
||||||
// Return address is on the stack.
|
// Return address is on the stack.
|
||||||
Register receiver = LoadDescriptor::ReceiverRegister();
|
Register receiver = LoadDescriptor::ReceiverRegister();
|
||||||
Register name = LoadDescriptor::NameRegister();
|
Register name = LoadDescriptor::NameRegister();
|
||||||
@ -718,8 +704,7 @@ void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm,
|
|||||||
__ push(ebx);
|
__ push(ebx);
|
||||||
|
|
||||||
// Do tail-call to runtime routine.
|
// Do tail-call to runtime routine.
|
||||||
__ TailCallRuntime(is_strong(language_mode) ? Runtime::kKeyedGetPropertyStrong
|
__ TailCallRuntime(Runtime::kKeyedGetProperty);
|
||||||
: Runtime::kKeyedGetProperty);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -364,11 +364,10 @@ void BytecodeArrayBuilder::MoveRegisterUntranslated(Register from,
|
|||||||
}
|
}
|
||||||
|
|
||||||
BytecodeArrayBuilder& BytecodeArrayBuilder::LoadGlobal(
|
BytecodeArrayBuilder& BytecodeArrayBuilder::LoadGlobal(
|
||||||
const Handle<String> name, int feedback_slot, LanguageMode language_mode,
|
const Handle<String> name, int feedback_slot, TypeofMode typeof_mode) {
|
||||||
TypeofMode typeof_mode) {
|
// TODO(rmcilroy): Potentially store typeof information in an
|
||||||
// TODO(rmcilroy): Potentially store language and typeof information in an
|
|
||||||
// operand rather than having extra bytecodes.
|
// operand rather than having extra bytecodes.
|
||||||
Bytecode bytecode = BytecodeForLoadGlobal(language_mode, typeof_mode);
|
Bytecode bytecode = BytecodeForLoadGlobal(typeof_mode);
|
||||||
size_t name_index = GetConstantPoolEntry(name);
|
size_t name_index = GetConstantPoolEntry(name);
|
||||||
if (FitsInIdx8Operand(name_index) && FitsInIdx8Operand(feedback_slot)) {
|
if (FitsInIdx8Operand(name_index) && FitsInIdx8Operand(feedback_slot)) {
|
||||||
Output(bytecode, static_cast<uint8_t>(name_index),
|
Output(bytecode, static_cast<uint8_t>(name_index),
|
||||||
@ -468,16 +467,15 @@ BytecodeArrayBuilder& BytecodeArrayBuilder::StoreLookupSlot(
|
|||||||
}
|
}
|
||||||
|
|
||||||
BytecodeArrayBuilder& BytecodeArrayBuilder::LoadNamedProperty(
|
BytecodeArrayBuilder& BytecodeArrayBuilder::LoadNamedProperty(
|
||||||
Register object, const Handle<Name> name, int feedback_slot,
|
Register object, const Handle<Name> name, int feedback_slot) {
|
||||||
LanguageMode language_mode) {
|
|
||||||
Bytecode bytecode = BytecodeForLoadIC(language_mode);
|
|
||||||
size_t name_index = GetConstantPoolEntry(name);
|
size_t name_index = GetConstantPoolEntry(name);
|
||||||
if (FitsInIdx8Operand(name_index) && FitsInIdx8Operand(feedback_slot)) {
|
if (FitsInIdx8Operand(name_index) && FitsInIdx8Operand(feedback_slot)) {
|
||||||
Output(bytecode, object.ToRawOperand(), static_cast<uint8_t>(name_index),
|
Output(Bytecode::kLoadIC, object.ToRawOperand(),
|
||||||
|
static_cast<uint8_t>(name_index),
|
||||||
static_cast<uint8_t>(feedback_slot));
|
static_cast<uint8_t>(feedback_slot));
|
||||||
} else if (FitsInIdx16Operand(name_index) &&
|
} else if (FitsInIdx16Operand(name_index) &&
|
||||||
FitsInIdx16Operand(feedback_slot)) {
|
FitsInIdx16Operand(feedback_slot)) {
|
||||||
Output(BytecodeForWideOperands(bytecode), object.ToRawOperand(),
|
Output(Bytecode::kLoadICWide, object.ToRawOperand(),
|
||||||
static_cast<uint16_t>(name_index),
|
static_cast<uint16_t>(name_index),
|
||||||
static_cast<uint16_t>(feedback_slot));
|
static_cast<uint16_t>(feedback_slot));
|
||||||
} else {
|
} else {
|
||||||
@ -486,15 +484,13 @@ BytecodeArrayBuilder& BytecodeArrayBuilder::LoadNamedProperty(
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BytecodeArrayBuilder& BytecodeArrayBuilder::LoadKeyedProperty(
|
BytecodeArrayBuilder& BytecodeArrayBuilder::LoadKeyedProperty(
|
||||||
Register object, int feedback_slot, LanguageMode language_mode) {
|
Register object, int feedback_slot) {
|
||||||
Bytecode bytecode = BytecodeForKeyedLoadIC(language_mode);
|
|
||||||
if (FitsInIdx8Operand(feedback_slot)) {
|
if (FitsInIdx8Operand(feedback_slot)) {
|
||||||
Output(bytecode, object.ToRawOperand(),
|
Output(Bytecode::kKeyedLoadIC, object.ToRawOperand(),
|
||||||
static_cast<uint8_t>(feedback_slot));
|
static_cast<uint8_t>(feedback_slot));
|
||||||
} else if (FitsInIdx16Operand(feedback_slot)) {
|
} else if (FitsInIdx16Operand(feedback_slot)) {
|
||||||
Output(BytecodeForWideOperands(bytecode), object.ToRawOperand(),
|
Output(Bytecode::kKeyedLoadICWide, object.ToRawOperand(),
|
||||||
static_cast<uint16_t>(feedback_slot));
|
static_cast<uint16_t>(feedback_slot));
|
||||||
} else {
|
} else {
|
||||||
UNIMPLEMENTED();
|
UNIMPLEMENTED();
|
||||||
@ -1429,14 +1425,10 @@ Bytecode BytecodeArrayBuilder::BytecodeForCompareOperation(Token::Value op) {
|
|||||||
// static
|
// static
|
||||||
Bytecode BytecodeArrayBuilder::BytecodeForWideOperands(Bytecode bytecode) {
|
Bytecode BytecodeArrayBuilder::BytecodeForWideOperands(Bytecode bytecode) {
|
||||||
switch (bytecode) {
|
switch (bytecode) {
|
||||||
case Bytecode::kLoadICSloppy:
|
case Bytecode::kLoadIC:
|
||||||
return Bytecode::kLoadICSloppyWide;
|
return Bytecode::kLoadICWide;
|
||||||
case Bytecode::kLoadICStrict:
|
case Bytecode::kKeyedLoadIC:
|
||||||
return Bytecode::kLoadICStrictWide;
|
return Bytecode::kKeyedLoadICWide;
|
||||||
case Bytecode::kKeyedLoadICSloppy:
|
|
||||||
return Bytecode::kKeyedLoadICSloppyWide;
|
|
||||||
case Bytecode::kKeyedLoadICStrict:
|
|
||||||
return Bytecode::kKeyedLoadICStrictWide;
|
|
||||||
case Bytecode::kStoreICSloppy:
|
case Bytecode::kStoreICSloppy:
|
||||||
return Bytecode::kStoreICSloppyWide;
|
return Bytecode::kStoreICSloppyWide;
|
||||||
case Bytecode::kStoreICStrict:
|
case Bytecode::kStoreICStrict:
|
||||||
@ -1445,14 +1437,10 @@ Bytecode BytecodeArrayBuilder::BytecodeForWideOperands(Bytecode bytecode) {
|
|||||||
return Bytecode::kKeyedStoreICSloppyWide;
|
return Bytecode::kKeyedStoreICSloppyWide;
|
||||||
case Bytecode::kKeyedStoreICStrict:
|
case Bytecode::kKeyedStoreICStrict:
|
||||||
return Bytecode::kKeyedStoreICStrictWide;
|
return Bytecode::kKeyedStoreICStrictWide;
|
||||||
case Bytecode::kLdaGlobalSloppy:
|
case Bytecode::kLdaGlobal:
|
||||||
return Bytecode::kLdaGlobalSloppyWide;
|
return Bytecode::kLdaGlobalWide;
|
||||||
case Bytecode::kLdaGlobalStrict:
|
case Bytecode::kLdaGlobalInsideTypeof:
|
||||||
return Bytecode::kLdaGlobalStrictWide;
|
return Bytecode::kLdaGlobalInsideTypeofWide;
|
||||||
case Bytecode::kLdaGlobalInsideTypeofSloppy:
|
|
||||||
return Bytecode::kLdaGlobalInsideTypeofSloppyWide;
|
|
||||||
case Bytecode::kLdaGlobalInsideTypeofStrict:
|
|
||||||
return Bytecode::kLdaGlobalInsideTypeofStrictWide;
|
|
||||||
case Bytecode::kStaGlobalSloppy:
|
case Bytecode::kStaGlobalSloppy:
|
||||||
return Bytecode::kStaGlobalSloppyWide;
|
return Bytecode::kStaGlobalSloppyWide;
|
||||||
case Bytecode::kStaGlobalStrict:
|
case Bytecode::kStaGlobalStrict:
|
||||||
@ -1472,39 +1460,6 @@ Bytecode BytecodeArrayBuilder::BytecodeForWideOperands(Bytecode bytecode) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// static
|
|
||||||
Bytecode BytecodeArrayBuilder::BytecodeForLoadIC(LanguageMode language_mode) {
|
|
||||||
switch (language_mode) {
|
|
||||||
case SLOPPY:
|
|
||||||
return Bytecode::kLoadICSloppy;
|
|
||||||
case STRICT:
|
|
||||||
return Bytecode::kLoadICStrict;
|
|
||||||
case STRONG:
|
|
||||||
UNIMPLEMENTED();
|
|
||||||
default:
|
|
||||||
UNREACHABLE();
|
|
||||||
}
|
|
||||||
return static_cast<Bytecode>(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// static
|
|
||||||
Bytecode BytecodeArrayBuilder::BytecodeForKeyedLoadIC(
|
|
||||||
LanguageMode language_mode) {
|
|
||||||
switch (language_mode) {
|
|
||||||
case SLOPPY:
|
|
||||||
return Bytecode::kKeyedLoadICSloppy;
|
|
||||||
case STRICT:
|
|
||||||
return Bytecode::kKeyedLoadICStrict;
|
|
||||||
case STRONG:
|
|
||||||
UNIMPLEMENTED();
|
|
||||||
default:
|
|
||||||
UNREACHABLE();
|
|
||||||
}
|
|
||||||
return static_cast<Bytecode>(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// static
|
// static
|
||||||
Bytecode BytecodeArrayBuilder::BytecodeForStoreIC(LanguageMode language_mode) {
|
Bytecode BytecodeArrayBuilder::BytecodeForStoreIC(LanguageMode language_mode) {
|
||||||
switch (language_mode) {
|
switch (language_mode) {
|
||||||
@ -1539,23 +1494,9 @@ Bytecode BytecodeArrayBuilder::BytecodeForKeyedStoreIC(
|
|||||||
|
|
||||||
|
|
||||||
// static
|
// static
|
||||||
Bytecode BytecodeArrayBuilder::BytecodeForLoadGlobal(LanguageMode language_mode,
|
Bytecode BytecodeArrayBuilder::BytecodeForLoadGlobal(TypeofMode typeof_mode) {
|
||||||
TypeofMode typeof_mode) {
|
return typeof_mode == INSIDE_TYPEOF ? Bytecode::kLdaGlobalInsideTypeof
|
||||||
switch (language_mode) {
|
: Bytecode::kLdaGlobal;
|
||||||
case SLOPPY:
|
|
||||||
return typeof_mode == INSIDE_TYPEOF
|
|
||||||
? Bytecode::kLdaGlobalInsideTypeofSloppy
|
|
||||||
: Bytecode::kLdaGlobalSloppy;
|
|
||||||
case STRICT:
|
|
||||||
return typeof_mode == INSIDE_TYPEOF
|
|
||||||
? Bytecode::kLdaGlobalInsideTypeofStrict
|
|
||||||
: Bytecode::kLdaGlobalStrict;
|
|
||||||
case STRONG:
|
|
||||||
UNIMPLEMENTED();
|
|
||||||
default:
|
|
||||||
UNREACHABLE();
|
|
||||||
}
|
|
||||||
return static_cast<Bytecode>(-1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -93,7 +93,6 @@ class BytecodeArrayBuilder final : public ZoneObject, private RegisterMover {
|
|||||||
|
|
||||||
// Global loads to the accumulator and stores from the accumulator.
|
// Global loads to the accumulator and stores from the accumulator.
|
||||||
BytecodeArrayBuilder& LoadGlobal(const Handle<String> name, int feedback_slot,
|
BytecodeArrayBuilder& LoadGlobal(const Handle<String> name, int feedback_slot,
|
||||||
LanguageMode language_mode,
|
|
||||||
TypeofMode typeof_mode);
|
TypeofMode typeof_mode);
|
||||||
BytecodeArrayBuilder& StoreGlobal(const Handle<String> name,
|
BytecodeArrayBuilder& StoreGlobal(const Handle<String> name,
|
||||||
int feedback_slot,
|
int feedback_slot,
|
||||||
@ -115,11 +114,9 @@ class BytecodeArrayBuilder final : public ZoneObject, private RegisterMover {
|
|||||||
// Named load property.
|
// Named load property.
|
||||||
BytecodeArrayBuilder& LoadNamedProperty(Register object,
|
BytecodeArrayBuilder& LoadNamedProperty(Register object,
|
||||||
const Handle<Name> name,
|
const Handle<Name> name,
|
||||||
int feedback_slot,
|
int feedback_slot);
|
||||||
LanguageMode language_mode);
|
|
||||||
// Keyed load property. The key should be in the accumulator.
|
// Keyed load property. The key should be in the accumulator.
|
||||||
BytecodeArrayBuilder& LoadKeyedProperty(Register object, int feedback_slot,
|
BytecodeArrayBuilder& LoadKeyedProperty(Register object, int feedback_slot);
|
||||||
LanguageMode language_mode);
|
|
||||||
|
|
||||||
// Store properties. The value to be stored should be in the accumulator.
|
// Store properties. The value to be stored should be in the accumulator.
|
||||||
BytecodeArrayBuilder& StoreNamedProperty(Register object,
|
BytecodeArrayBuilder& StoreNamedProperty(Register object,
|
||||||
@ -276,12 +273,9 @@ class BytecodeArrayBuilder final : public ZoneObject, private RegisterMover {
|
|||||||
static Bytecode BytecodeForCountOperation(Token::Value op);
|
static Bytecode BytecodeForCountOperation(Token::Value op);
|
||||||
static Bytecode BytecodeForCompareOperation(Token::Value op);
|
static Bytecode BytecodeForCompareOperation(Token::Value op);
|
||||||
static Bytecode BytecodeForWideOperands(Bytecode bytecode);
|
static Bytecode BytecodeForWideOperands(Bytecode bytecode);
|
||||||
static Bytecode BytecodeForLoadIC(LanguageMode language_mode);
|
|
||||||
static Bytecode BytecodeForKeyedLoadIC(LanguageMode language_mode);
|
|
||||||
static Bytecode BytecodeForStoreIC(LanguageMode language_mode);
|
static Bytecode BytecodeForStoreIC(LanguageMode language_mode);
|
||||||
static Bytecode BytecodeForKeyedStoreIC(LanguageMode language_mode);
|
static Bytecode BytecodeForKeyedStoreIC(LanguageMode language_mode);
|
||||||
static Bytecode BytecodeForLoadGlobal(LanguageMode language_mode,
|
static Bytecode BytecodeForLoadGlobal(TypeofMode typeof_mode);
|
||||||
TypeofMode typeof_mode);
|
|
||||||
static Bytecode BytecodeForStoreGlobal(LanguageMode language_mode);
|
static Bytecode BytecodeForStoreGlobal(LanguageMode language_mode);
|
||||||
static Bytecode BytecodeForStoreLookupSlot(LanguageMode language_mode);
|
static Bytecode BytecodeForStoreLookupSlot(LanguageMode language_mode);
|
||||||
static Bytecode BytecodeForCreateArguments(CreateArgumentsType type);
|
static Bytecode BytecodeForCreateArguments(CreateArgumentsType type);
|
||||||
|
@ -1312,7 +1312,7 @@ void BytecodeGenerator::VisitClassLiteralContents(ClassLiteral* expr) {
|
|||||||
FeedbackVectorSlot slot = expr->PrototypeSlot();
|
FeedbackVectorSlot slot = expr->PrototypeSlot();
|
||||||
builder()
|
builder()
|
||||||
->StoreAccumulatorInRegister(literal)
|
->StoreAccumulatorInRegister(literal)
|
||||||
.LoadNamedProperty(literal, name, feedback_index(slot), language_mode())
|
.LoadNamedProperty(literal, name, feedback_index(slot))
|
||||||
.StoreAccumulatorInRegister(prototype);
|
.StoreAccumulatorInRegister(prototype);
|
||||||
|
|
||||||
VisitClassLiteralProperties(expr, literal, prototype);
|
VisitClassLiteralProperties(expr, literal, prototype);
|
||||||
@ -1781,7 +1781,7 @@ void BytecodeGenerator::VisitVariableLoad(Variable* variable,
|
|||||||
case VariableLocation::GLOBAL:
|
case VariableLocation::GLOBAL:
|
||||||
case VariableLocation::UNALLOCATED: {
|
case VariableLocation::UNALLOCATED: {
|
||||||
builder()->LoadGlobal(variable->name(), feedback_index(slot),
|
builder()->LoadGlobal(variable->name(), feedback_index(slot),
|
||||||
language_mode(), typeof_mode);
|
typeof_mode);
|
||||||
execution_result()->SetResultInAccumulator();
|
execution_result()->SetResultInAccumulator();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1864,20 +1864,15 @@ void BytecodeGenerator::PrepareKeyedSuperPropertyArguments(
|
|||||||
|
|
||||||
void BytecodeGenerator::BuildNamedSuperPropertyLoad(
|
void BytecodeGenerator::BuildNamedSuperPropertyLoad(
|
||||||
SuperPropertyArguments* super_args) {
|
SuperPropertyArguments* super_args) {
|
||||||
builder()
|
// TODO(oth): Abstraction not suitable for 3 args, will over-allocate regs.
|
||||||
->LoadLiteral(Smi::FromInt(static_cast<int>(language_mode())))
|
builder()->CallRuntime(Runtime::kLoadFromSuper, super_args->receiver(), 3);
|
||||||
.StoreAccumulatorInRegister(super_args->language_mode());
|
|
||||||
builder()->CallRuntime(Runtime::kLoadFromSuper, super_args->receiver(),
|
|
||||||
super_args->count());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void BytecodeGenerator::BuildKeyedSuperPropertyLoad(
|
void BytecodeGenerator::BuildKeyedSuperPropertyLoad(
|
||||||
SuperPropertyArguments* super_args) {
|
SuperPropertyArguments* super_args) {
|
||||||
builder()
|
// TODO(oth): Abstraction not suitable for 3 args, will over-allocate regs.
|
||||||
->LoadLiteral(Smi::FromInt(static_cast<int>(language_mode())))
|
|
||||||
.StoreAccumulatorInRegister(super_args->language_mode());
|
|
||||||
builder()->CallRuntime(Runtime::kLoadKeyedFromSuper, super_args->receiver(),
|
builder()->CallRuntime(Runtime::kLoadKeyedFromSuper, super_args->receiver(),
|
||||||
super_args->count());
|
3);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BytecodeGenerator::BuildNamedSuperPropertyStore(
|
void BytecodeGenerator::BuildNamedSuperPropertyStore(
|
||||||
@ -2168,8 +2163,7 @@ void BytecodeGenerator::VisitAssignment(Assignment* expr) {
|
|||||||
FeedbackVectorSlot slot = property->PropertyFeedbackSlot();
|
FeedbackVectorSlot slot = property->PropertyFeedbackSlot();
|
||||||
old_value = register_allocator()->NewRegister();
|
old_value = register_allocator()->NewRegister();
|
||||||
builder()
|
builder()
|
||||||
->LoadNamedProperty(object, name, feedback_index(slot),
|
->LoadNamedProperty(object, name, feedback_index(slot))
|
||||||
language_mode())
|
|
||||||
.StoreAccumulatorInRegister(old_value);
|
.StoreAccumulatorInRegister(old_value);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -2179,7 +2173,7 @@ void BytecodeGenerator::VisitAssignment(Assignment* expr) {
|
|||||||
FeedbackVectorSlot slot = property->PropertyFeedbackSlot();
|
FeedbackVectorSlot slot = property->PropertyFeedbackSlot();
|
||||||
old_value = register_allocator()->NewRegister();
|
old_value = register_allocator()->NewRegister();
|
||||||
builder()
|
builder()
|
||||||
->LoadKeyedProperty(object, feedback_index(slot), language_mode())
|
->LoadKeyedProperty(object, feedback_index(slot))
|
||||||
.StoreAccumulatorInRegister(old_value);
|
.StoreAccumulatorInRegister(old_value);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -2256,12 +2250,12 @@ void BytecodeGenerator::VisitPropertyLoad(Register obj, Property* expr) {
|
|||||||
case NAMED_PROPERTY: {
|
case NAMED_PROPERTY: {
|
||||||
builder()->LoadNamedProperty(obj,
|
builder()->LoadNamedProperty(obj,
|
||||||
expr->key()->AsLiteral()->AsPropertyName(),
|
expr->key()->AsLiteral()->AsPropertyName(),
|
||||||
feedback_index(slot), language_mode());
|
feedback_index(slot));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case KEYED_PROPERTY: {
|
case KEYED_PROPERTY: {
|
||||||
VisitForAccumulatorValue(expr->key());
|
VisitForAccumulatorValue(expr->key());
|
||||||
builder()->LoadKeyedProperty(obj, feedback_index(slot), language_mode());
|
builder()->LoadKeyedProperty(obj, feedback_index(slot));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case NAMED_SUPER_PROPERTY:
|
case NAMED_SUPER_PROPERTY:
|
||||||
@ -2680,8 +2674,7 @@ void BytecodeGenerator::VisitCountOperation(CountOperation* expr) {
|
|||||||
FeedbackVectorSlot slot = property->PropertyFeedbackSlot();
|
FeedbackVectorSlot slot = property->PropertyFeedbackSlot();
|
||||||
object = VisitForRegisterValue(property->obj());
|
object = VisitForRegisterValue(property->obj());
|
||||||
name = property->key()->AsLiteral()->AsPropertyName();
|
name = property->key()->AsLiteral()->AsPropertyName();
|
||||||
builder()->LoadNamedProperty(object, name, feedback_index(slot),
|
builder()->LoadNamedProperty(object, name, feedback_index(slot));
|
||||||
language_mode());
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case KEYED_PROPERTY: {
|
case KEYED_PROPERTY: {
|
||||||
@ -2692,7 +2685,7 @@ void BytecodeGenerator::VisitCountOperation(CountOperation* expr) {
|
|||||||
key = register_allocator()->NewRegister();
|
key = register_allocator()->NewRegister();
|
||||||
VisitForAccumulatorValue(property->key());
|
VisitForAccumulatorValue(property->key());
|
||||||
builder()->StoreAccumulatorInRegister(key).LoadKeyedProperty(
|
builder()->StoreAccumulatorInRegister(key).LoadKeyedProperty(
|
||||||
object, feedback_index(slot), language_mode());
|
object, feedback_index(slot));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case NAMED_SUPER_PROPERTY: {
|
case NAMED_SUPER_PROPERTY: {
|
||||||
|
@ -75,14 +75,10 @@ namespace interpreter {
|
|||||||
V(LdaConstantWide, OperandType::kIdx16) \
|
V(LdaConstantWide, OperandType::kIdx16) \
|
||||||
\
|
\
|
||||||
/* Globals */ \
|
/* Globals */ \
|
||||||
V(LdaGlobalSloppy, OperandType::kIdx8, OperandType::kIdx8) \
|
V(LdaGlobal, OperandType::kIdx8, OperandType::kIdx8) \
|
||||||
V(LdaGlobalStrict, OperandType::kIdx8, OperandType::kIdx8) \
|
V(LdaGlobalInsideTypeof, OperandType::kIdx8, OperandType::kIdx8) \
|
||||||
V(LdaGlobalInsideTypeofSloppy, OperandType::kIdx8, OperandType::kIdx8) \
|
V(LdaGlobalWide, OperandType::kIdx16, OperandType::kIdx16) \
|
||||||
V(LdaGlobalInsideTypeofStrict, OperandType::kIdx8, OperandType::kIdx8) \
|
V(LdaGlobalInsideTypeofWide, OperandType::kIdx16, OperandType::kIdx16) \
|
||||||
V(LdaGlobalSloppyWide, OperandType::kIdx16, OperandType::kIdx16) \
|
|
||||||
V(LdaGlobalStrictWide, OperandType::kIdx16, OperandType::kIdx16) \
|
|
||||||
V(LdaGlobalInsideTypeofSloppyWide, OperandType::kIdx16, OperandType::kIdx16) \
|
|
||||||
V(LdaGlobalInsideTypeofStrictWide, OperandType::kIdx16, OperandType::kIdx16) \
|
|
||||||
V(StaGlobalSloppy, OperandType::kIdx8, OperandType::kIdx8) \
|
V(StaGlobalSloppy, OperandType::kIdx8, OperandType::kIdx8) \
|
||||||
V(StaGlobalStrict, OperandType::kIdx8, OperandType::kIdx8) \
|
V(StaGlobalStrict, OperandType::kIdx8, OperandType::kIdx8) \
|
||||||
V(StaGlobalSloppyWide, OperandType::kIdx16, OperandType::kIdx16) \
|
V(StaGlobalSloppyWide, OperandType::kIdx16, OperandType::kIdx16) \
|
||||||
@ -115,16 +111,10 @@ namespace interpreter {
|
|||||||
V(MovWide, OperandType::kReg16, OperandType::kRegOut16) \
|
V(MovWide, OperandType::kReg16, OperandType::kRegOut16) \
|
||||||
\
|
\
|
||||||
/* LoadIC operations */ \
|
/* LoadIC operations */ \
|
||||||
V(LoadICSloppy, OperandType::kReg8, OperandType::kIdx8, OperandType::kIdx8) \
|
V(LoadIC, OperandType::kReg8, OperandType::kIdx8, OperandType::kIdx8) \
|
||||||
V(LoadICStrict, OperandType::kReg8, OperandType::kIdx8, OperandType::kIdx8) \
|
V(KeyedLoadIC, OperandType::kReg8, OperandType::kIdx8) \
|
||||||
V(KeyedLoadICSloppy, OperandType::kReg8, OperandType::kIdx8) \
|
V(LoadICWide, OperandType::kReg8, OperandType::kIdx16, OperandType::kIdx16) \
|
||||||
V(KeyedLoadICStrict, OperandType::kReg8, OperandType::kIdx8) \
|
V(KeyedLoadICWide, OperandType::kReg8, OperandType::kIdx16) \
|
||||||
V(LoadICSloppyWide, OperandType::kReg8, OperandType::kIdx16, \
|
|
||||||
OperandType::kIdx16) \
|
|
||||||
V(LoadICStrictWide, OperandType::kReg8, OperandType::kIdx16, \
|
|
||||||
OperandType::kIdx16) \
|
|
||||||
V(KeyedLoadICSloppyWide, OperandType::kReg8, OperandType::kIdx16) \
|
|
||||||
V(KeyedLoadICStrictWide, OperandType::kReg8, OperandType::kIdx16) \
|
|
||||||
\
|
\
|
||||||
/* StoreIC operations */ \
|
/* StoreIC operations */ \
|
||||||
V(StoreICSloppy, OperandType::kReg8, OperandType::kIdx8, OperandType::kIdx8) \
|
V(StoreICSloppy, OperandType::kReg8, OperandType::kIdx8, OperandType::kIdx8) \
|
||||||
|
@ -263,98 +263,47 @@ void Interpreter::DoLoadGlobal(Callable ic, InterpreterAssembler* assembler) {
|
|||||||
__ Dispatch();
|
__ Dispatch();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// LdaGlobal <name_index> <slot>
|
||||||
// LdaGlobalSloppy <name_index> <slot>
|
|
||||||
//
|
//
|
||||||
// Load the global with name in constant pool entry <name_index> into the
|
// Load the global with name in constant pool entry <name_index> into the
|
||||||
// accumulator using FeedBackVector slot <slot> in sloppy mode.
|
// accumulator using FeedBackVector slot <slot> outside of a typeof.
|
||||||
void Interpreter::DoLdaGlobalSloppy(InterpreterAssembler* assembler) {
|
void Interpreter::DoLdaGlobal(InterpreterAssembler* assembler) {
|
||||||
Callable ic = CodeFactory::LoadICInOptimizedCode(isolate_, NOT_INSIDE_TYPEOF,
|
Callable ic = CodeFactory::LoadICInOptimizedCode(isolate_, NOT_INSIDE_TYPEOF,
|
||||||
SLOPPY, UNINITIALIZED);
|
UNINITIALIZED);
|
||||||
DoLoadGlobal(ic, assembler);
|
DoLoadGlobal(ic, assembler);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// LdaGlobalInsideTypeof <name_index> <slot>
|
||||||
// LdaGlobalSloppy <name_index> <slot>
|
|
||||||
//
|
//
|
||||||
// Load the global with name in constant pool entry <name_index> into the
|
// Load the global with name in constant pool entry <name_index> into the
|
||||||
// accumulator using FeedBackVector slot <slot> in strict mode.
|
// accumulator using FeedBackVector slot <slot> inside of a typeof.
|
||||||
void Interpreter::DoLdaGlobalStrict(InterpreterAssembler* assembler) {
|
void Interpreter::DoLdaGlobalInsideTypeof(InterpreterAssembler* assembler) {
|
||||||
|
Callable ic = CodeFactory::LoadICInOptimizedCode(isolate_, INSIDE_TYPEOF,
|
||||||
|
UNINITIALIZED);
|
||||||
|
DoLoadGlobal(ic, assembler);
|
||||||
|
}
|
||||||
|
|
||||||
|
// LdaGlobalWide <name_index> <slot>
|
||||||
|
//
|
||||||
|
// Load the global with name in constant pool entry <name_index> into the
|
||||||
|
// accumulator using FeedBackVector slot <slot> outside of a typeof.
|
||||||
|
void Interpreter::DoLdaGlobalWide(InterpreterAssembler* assembler) {
|
||||||
Callable ic = CodeFactory::LoadICInOptimizedCode(isolate_, NOT_INSIDE_TYPEOF,
|
Callable ic = CodeFactory::LoadICInOptimizedCode(isolate_, NOT_INSIDE_TYPEOF,
|
||||||
STRICT, UNINITIALIZED);
|
UNINITIALIZED);
|
||||||
DoLoadGlobal(ic, assembler);
|
DoLoadGlobal(ic, assembler);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// LdaGlobalInsideTypeofWide <name_index> <slot>
|
||||||
// LdaGlobalInsideTypeofSloppy <name_index> <slot>
|
|
||||||
//
|
//
|
||||||
// Load the global with name in constant pool entry <name_index> into the
|
// Load the global with name in constant pool entry <name_index> into the
|
||||||
// accumulator using FeedBackVector slot <slot> in sloppy mode.
|
// accumulator using FeedBackVector slot <slot> inside of a typeof.
|
||||||
void Interpreter::DoLdaGlobalInsideTypeofSloppy(
|
void Interpreter::DoLdaGlobalInsideTypeofWide(InterpreterAssembler* assembler) {
|
||||||
InterpreterAssembler* assembler) {
|
|
||||||
Callable ic = CodeFactory::LoadICInOptimizedCode(isolate_, INSIDE_TYPEOF,
|
Callable ic = CodeFactory::LoadICInOptimizedCode(isolate_, INSIDE_TYPEOF,
|
||||||
SLOPPY, UNINITIALIZED);
|
UNINITIALIZED);
|
||||||
DoLoadGlobal(ic, assembler);
|
DoLoadGlobal(ic, assembler);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// LdaGlobalInsideTypeofStrict <name_index> <slot>
|
|
||||||
//
|
|
||||||
// Load the global with name in constant pool entry <name_index> into the
|
|
||||||
// accumulator using FeedBackVector slot <slot> in strict mode.
|
|
||||||
void Interpreter::DoLdaGlobalInsideTypeofStrict(
|
|
||||||
InterpreterAssembler* assembler) {
|
|
||||||
Callable ic = CodeFactory::LoadICInOptimizedCode(isolate_, INSIDE_TYPEOF,
|
|
||||||
STRICT, UNINITIALIZED);
|
|
||||||
DoLoadGlobal(ic, assembler);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// LdaGlobalSloppyWide <name_index> <slot>
|
|
||||||
//
|
|
||||||
// Load the global with name in constant pool entry <name_index> into the
|
|
||||||
// accumulator using FeedBackVector slot <slot> in sloppy mode.
|
|
||||||
void Interpreter::DoLdaGlobalSloppyWide(InterpreterAssembler* assembler) {
|
|
||||||
Callable ic = CodeFactory::LoadICInOptimizedCode(isolate_, NOT_INSIDE_TYPEOF,
|
|
||||||
SLOPPY, UNINITIALIZED);
|
|
||||||
DoLoadGlobal(ic, assembler);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// LdaGlobalSloppyWide <name_index> <slot>
|
|
||||||
//
|
|
||||||
// Load the global with name in constant pool entry <name_index> into the
|
|
||||||
// accumulator using FeedBackVector slot <slot> in strict mode.
|
|
||||||
void Interpreter::DoLdaGlobalStrictWide(InterpreterAssembler* assembler) {
|
|
||||||
Callable ic = CodeFactory::LoadICInOptimizedCode(isolate_, NOT_INSIDE_TYPEOF,
|
|
||||||
STRICT, UNINITIALIZED);
|
|
||||||
DoLoadGlobal(ic, assembler);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// LdaGlobalInsideTypeofSloppyWide <name_index> <slot>
|
|
||||||
//
|
|
||||||
// Load the global with name in constant pool entry <name_index> into the
|
|
||||||
// accumulator using FeedBackVector slot <slot> in sloppy mode.
|
|
||||||
void Interpreter::DoLdaGlobalInsideTypeofSloppyWide(
|
|
||||||
InterpreterAssembler* assembler) {
|
|
||||||
Callable ic = CodeFactory::LoadICInOptimizedCode(isolate_, INSIDE_TYPEOF,
|
|
||||||
SLOPPY, UNINITIALIZED);
|
|
||||||
DoLoadGlobal(ic, assembler);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// LdaGlobalInsideTypeofSloppyWide <name_index> <slot>
|
|
||||||
//
|
|
||||||
// Load the global with name in constant pool entry <name_index> into the
|
|
||||||
// accumulator using FeedBackVector slot <slot> in strict mode.
|
|
||||||
void Interpreter::DoLdaGlobalInsideTypeofStrictWide(
|
|
||||||
InterpreterAssembler* assembler) {
|
|
||||||
Callable ic = CodeFactory::LoadICInOptimizedCode(isolate_, INSIDE_TYPEOF,
|
|
||||||
STRICT, UNINITIALIZED);
|
|
||||||
DoLoadGlobal(ic, assembler);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Interpreter::DoStoreGlobal(Callable ic, InterpreterAssembler* assembler) {
|
void Interpreter::DoStoreGlobal(Callable ic, InterpreterAssembler* assembler) {
|
||||||
// Get the global object.
|
// Get the global object.
|
||||||
Node* context = __ GetContext();
|
Node* context = __ GetContext();
|
||||||
@ -575,50 +524,27 @@ void Interpreter::DoLoadIC(Callable ic, InterpreterAssembler* assembler) {
|
|||||||
__ Dispatch();
|
__ Dispatch();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// LoadIC <object> <name_index> <slot>
|
||||||
// LoadICSloppy <object> <name_index> <slot>
|
|
||||||
//
|
//
|
||||||
// Calls the sloppy mode LoadIC at FeedBackVector slot <slot> for <object> and
|
// Calls the LoadIC at FeedBackVector slot <slot> for <object> and the name at
|
||||||
// the name at constant pool entry <name_index>.
|
// constant pool entry <name_index>.
|
||||||
void Interpreter::DoLoadICSloppy(InterpreterAssembler* assembler) {
|
void Interpreter::DoLoadIC(InterpreterAssembler* assembler) {
|
||||||
Callable ic = CodeFactory::LoadICInOptimizedCode(isolate_, NOT_INSIDE_TYPEOF,
|
Callable ic = CodeFactory::LoadICInOptimizedCode(isolate_, NOT_INSIDE_TYPEOF,
|
||||||
SLOPPY, UNINITIALIZED);
|
UNINITIALIZED);
|
||||||
DoLoadIC(ic, assembler);
|
DoLoadIC(ic, assembler);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// LoadICWide <object> <name_index> <slot>
|
||||||
// LoadICStrict <object> <name_index> <slot>
|
|
||||||
//
|
//
|
||||||
// Calls the sloppy mode LoadIC at FeedBackVector slot <slot> for <object> and
|
// Calls the LoadIC at FeedBackVector slot <slot> for <object> and the name at
|
||||||
// the name at constant pool entry <name_index>.
|
// constant pool entry <name_index>.
|
||||||
void Interpreter::DoLoadICStrict(InterpreterAssembler* assembler) {
|
void Interpreter::DoLoadICWide(InterpreterAssembler* assembler) {
|
||||||
Callable ic = CodeFactory::LoadICInOptimizedCode(isolate_, NOT_INSIDE_TYPEOF,
|
Callable ic = CodeFactory::LoadICInOptimizedCode(isolate_, NOT_INSIDE_TYPEOF,
|
||||||
STRICT, UNINITIALIZED);
|
UNINITIALIZED);
|
||||||
DoLoadIC(ic, assembler);
|
DoLoadIC(ic, assembler);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// LoadICSloppyWide <object> <name_index> <slot>
|
|
||||||
//
|
|
||||||
// Calls the sloppy mode LoadIC at FeedBackVector slot <slot> for <object> and
|
|
||||||
// the name at constant pool entry <name_index>.
|
|
||||||
void Interpreter::DoLoadICSloppyWide(InterpreterAssembler* assembler) {
|
|
||||||
Callable ic = CodeFactory::LoadICInOptimizedCode(isolate_, NOT_INSIDE_TYPEOF,
|
|
||||||
SLOPPY, UNINITIALIZED);
|
|
||||||
DoLoadIC(ic, assembler);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// LoadICStrictWide <object> <name_index> <slot>
|
|
||||||
//
|
|
||||||
// Calls the sloppy mode LoadIC at FeedBackVector slot <slot> for <object> and
|
|
||||||
// the name at constant pool entry <name_index>.
|
|
||||||
void Interpreter::DoLoadICStrictWide(InterpreterAssembler* assembler) {
|
|
||||||
Callable ic = CodeFactory::LoadICInOptimizedCode(isolate_, NOT_INSIDE_TYPEOF,
|
|
||||||
STRICT, UNINITIALIZED);
|
|
||||||
DoLoadIC(ic, assembler);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Interpreter::DoKeyedLoadIC(Callable ic, InterpreterAssembler* assembler) {
|
void Interpreter::DoKeyedLoadIC(Callable ic, InterpreterAssembler* assembler) {
|
||||||
Node* code_target = __ HeapConstant(ic.code());
|
Node* code_target = __ HeapConstant(ic.code());
|
||||||
Node* reg_index = __ BytecodeOperandReg(0);
|
Node* reg_index = __ BytecodeOperandReg(0);
|
||||||
@ -634,50 +560,27 @@ void Interpreter::DoKeyedLoadIC(Callable ic, InterpreterAssembler* assembler) {
|
|||||||
__ Dispatch();
|
__ Dispatch();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// KeyedLoadIC <object> <slot>
|
||||||
// KeyedLoadICSloppy <object> <slot>
|
|
||||||
//
|
//
|
||||||
// Calls the sloppy mode KeyedLoadIC at FeedBackVector slot <slot> for <object>
|
// Calls the KeyedLoadIC at FeedBackVector slot <slot> for <object> and the key
|
||||||
// and the key in the accumulator.
|
// in the accumulator.
|
||||||
void Interpreter::DoKeyedLoadICSloppy(InterpreterAssembler* assembler) {
|
void Interpreter::DoKeyedLoadIC(InterpreterAssembler* assembler) {
|
||||||
Callable ic =
|
Callable ic =
|
||||||
CodeFactory::KeyedLoadICInOptimizedCode(isolate_, SLOPPY, UNINITIALIZED);
|
CodeFactory::KeyedLoadICInOptimizedCode(isolate_, UNINITIALIZED);
|
||||||
DoKeyedLoadIC(ic, assembler);
|
DoKeyedLoadIC(ic, assembler);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// KeyedLoadICWide <object> <slot>
|
||||||
// KeyedLoadICStrict <object> <slot>
|
|
||||||
//
|
//
|
||||||
// Calls the strict mode KeyedLoadIC at FeedBackVector slot <slot> for <object>
|
// Calls the KeyedLoadIC at FeedBackVector slot <slot> for <object> and the key
|
||||||
// and the key in the accumulator.
|
// in the accumulator.
|
||||||
void Interpreter::DoKeyedLoadICStrict(InterpreterAssembler* assembler) {
|
void Interpreter::DoKeyedLoadICWide(InterpreterAssembler* assembler) {
|
||||||
Callable ic =
|
Callable ic =
|
||||||
CodeFactory::KeyedLoadICInOptimizedCode(isolate_, STRICT, UNINITIALIZED);
|
CodeFactory::KeyedLoadICInOptimizedCode(isolate_, UNINITIALIZED);
|
||||||
DoKeyedLoadIC(ic, assembler);
|
DoKeyedLoadIC(ic, assembler);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// KeyedLoadICSloppyWide <object> <slot>
|
|
||||||
//
|
|
||||||
// Calls the sloppy mode KeyedLoadIC at FeedBackVector slot <slot> for <object>
|
|
||||||
// and the key in the accumulator.
|
|
||||||
void Interpreter::DoKeyedLoadICSloppyWide(InterpreterAssembler* assembler) {
|
|
||||||
Callable ic =
|
|
||||||
CodeFactory::KeyedLoadICInOptimizedCode(isolate_, SLOPPY, UNINITIALIZED);
|
|
||||||
DoKeyedLoadIC(ic, assembler);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// KeyedLoadICStrictWide <object> <slot>
|
|
||||||
//
|
|
||||||
// Calls the strict mode KeyedLoadIC at FeedBackVector slot <slot> for <object>
|
|
||||||
// and the key in the accumulator.
|
|
||||||
void Interpreter::DoKeyedLoadICStrictWide(InterpreterAssembler* assembler) {
|
|
||||||
Callable ic =
|
|
||||||
CodeFactory::KeyedLoadICInOptimizedCode(isolate_, STRICT, UNINITIALIZED);
|
|
||||||
DoKeyedLoadIC(ic, assembler);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Interpreter::DoStoreIC(Callable ic, InterpreterAssembler* assembler) {
|
void Interpreter::DoStoreIC(Callable ic, InterpreterAssembler* assembler) {
|
||||||
Node* code_target = __ HeapConstant(ic.code());
|
Node* code_target = __ HeapConstant(ic.code());
|
||||||
Node* object_reg_index = __ BytecodeOperandReg(0);
|
Node* object_reg_index = __ BytecodeOperandReg(0);
|
||||||
|
@ -1018,20 +1018,16 @@ bool Object::HasSpecificClassOf(String* name) {
|
|||||||
return this->IsJSObject() && (JSObject::cast(this)->class_name() == name);
|
return this->IsJSObject() && (JSObject::cast(this)->class_name() == name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
MaybeHandle<Object> Object::GetProperty(Handle<Object> object,
|
MaybeHandle<Object> Object::GetProperty(Handle<Object> object,
|
||||||
Handle<Name> name,
|
Handle<Name> name) {
|
||||||
LanguageMode language_mode) {
|
|
||||||
LookupIterator it(object, name);
|
LookupIterator it(object, name);
|
||||||
return GetProperty(&it, language_mode);
|
return GetProperty(&it);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
MaybeHandle<Object> Object::GetElement(Isolate* isolate, Handle<Object> object,
|
MaybeHandle<Object> Object::GetElement(Isolate* isolate, Handle<Object> object,
|
||||||
uint32_t index,
|
uint32_t index) {
|
||||||
LanguageMode language_mode) {
|
|
||||||
LookupIterator it(isolate, object, index);
|
LookupIterator it(isolate, object, index);
|
||||||
return GetProperty(&it, language_mode);
|
return GetProperty(&it);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1057,12 +1053,10 @@ MaybeHandle<Object> JSReceiver::GetPrototype(Isolate* isolate,
|
|||||||
return PrototypeIterator::GetCurrent(iter);
|
return PrototypeIterator::GetCurrent(iter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
MaybeHandle<Object> Object::GetProperty(Isolate* isolate, Handle<Object> object,
|
MaybeHandle<Object> Object::GetProperty(Isolate* isolate, Handle<Object> object,
|
||||||
const char* name,
|
const char* name) {
|
||||||
LanguageMode language_mode) {
|
|
||||||
Handle<String> str = isolate->factory()->InternalizeUtf8String(name);
|
Handle<String> str = isolate->factory()->InternalizeUtf8String(name);
|
||||||
return GetProperty(object, str, language_mode);
|
return GetProperty(object, str);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -6924,22 +6918,19 @@ Maybe<bool> Object::LessThanOrEqual(Handle<Object> x, Handle<Object> y) {
|
|||||||
return Nothing<bool>();
|
return Nothing<bool>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
MaybeHandle<Object> Object::GetPropertyOrElement(Handle<Object> object,
|
MaybeHandle<Object> Object::GetPropertyOrElement(Handle<Object> object,
|
||||||
Handle<Name> name,
|
Handle<Name> name) {
|
||||||
LanguageMode language_mode) {
|
|
||||||
LookupIterator it =
|
LookupIterator it =
|
||||||
LookupIterator::PropertyOrElement(name->GetIsolate(), object, name);
|
LookupIterator::PropertyOrElement(name->GetIsolate(), object, name);
|
||||||
return GetProperty(&it, language_mode);
|
return GetProperty(&it);
|
||||||
}
|
}
|
||||||
|
|
||||||
MaybeHandle<Object> Object::GetPropertyOrElement(Handle<Object> receiver,
|
MaybeHandle<Object> Object::GetPropertyOrElement(Handle<Object> receiver,
|
||||||
Handle<Name> name,
|
Handle<Name> name,
|
||||||
Handle<JSReceiver> holder,
|
Handle<JSReceiver> holder) {
|
||||||
LanguageMode language_mode) {
|
|
||||||
LookupIterator it = LookupIterator::PropertyOrElement(
|
LookupIterator it = LookupIterator::PropertyOrElement(
|
||||||
name->GetIsolate(), receiver, name, holder);
|
name->GetIsolate(), receiver, name, holder);
|
||||||
return GetProperty(&it, language_mode);
|
return GetProperty(&it);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -708,8 +708,7 @@ Maybe<bool> JSReceiver::HasProperty(LookupIterator* it) {
|
|||||||
|
|
||||||
|
|
||||||
// static
|
// static
|
||||||
MaybeHandle<Object> Object::GetProperty(LookupIterator* it,
|
MaybeHandle<Object> Object::GetProperty(LookupIterator* it) {
|
||||||
LanguageMode language_mode) {
|
|
||||||
for (; it->IsFound(); it->Next()) {
|
for (; it->IsFound(); it->Next()) {
|
||||||
switch (it->state()) {
|
switch (it->state()) {
|
||||||
case LookupIterator::NOT_FOUND:
|
case LookupIterator::NOT_FOUND:
|
||||||
@ -717,8 +716,7 @@ MaybeHandle<Object> Object::GetProperty(LookupIterator* it,
|
|||||||
UNREACHABLE();
|
UNREACHABLE();
|
||||||
case LookupIterator::JSPROXY:
|
case LookupIterator::JSPROXY:
|
||||||
return JSProxy::GetProperty(it->isolate(), it->GetHolder<JSProxy>(),
|
return JSProxy::GetProperty(it->isolate(), it->GetHolder<JSProxy>(),
|
||||||
it->GetName(), it->GetReceiver(),
|
it->GetName(), it->GetReceiver());
|
||||||
language_mode);
|
|
||||||
case LookupIterator::INTERCEPTOR: {
|
case LookupIterator::INTERCEPTOR: {
|
||||||
bool done;
|
bool done;
|
||||||
Handle<Object> result;
|
Handle<Object> result;
|
||||||
@ -732,14 +730,14 @@ MaybeHandle<Object> Object::GetProperty(LookupIterator* it,
|
|||||||
if (it->HasAccess()) break;
|
if (it->HasAccess()) break;
|
||||||
return JSObject::GetPropertyWithFailedAccessCheck(it);
|
return JSObject::GetPropertyWithFailedAccessCheck(it);
|
||||||
case LookupIterator::ACCESSOR:
|
case LookupIterator::ACCESSOR:
|
||||||
return GetPropertyWithAccessor(it, language_mode);
|
return GetPropertyWithAccessor(it);
|
||||||
case LookupIterator::INTEGER_INDEXED_EXOTIC:
|
case LookupIterator::INTEGER_INDEXED_EXOTIC:
|
||||||
return ReadAbsentProperty(it, language_mode);
|
return ReadAbsentProperty(it);
|
||||||
case LookupIterator::DATA:
|
case LookupIterator::DATA:
|
||||||
return it->GetDataValue();
|
return it->GetDataValue();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return ReadAbsentProperty(it, language_mode);
|
return ReadAbsentProperty(it);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -758,8 +756,7 @@ MaybeHandle<Object> Object::GetProperty(LookupIterator* it,
|
|||||||
MaybeHandle<Object> JSProxy::GetProperty(Isolate* isolate,
|
MaybeHandle<Object> JSProxy::GetProperty(Isolate* isolate,
|
||||||
Handle<JSProxy> proxy,
|
Handle<JSProxy> proxy,
|
||||||
Handle<Name> name,
|
Handle<Name> name,
|
||||||
Handle<Object> receiver,
|
Handle<Object> receiver) {
|
||||||
LanguageMode language_mode) {
|
|
||||||
if (receiver->IsJSGlobalObject()) {
|
if (receiver->IsJSGlobalObject()) {
|
||||||
THROW_NEW_ERROR(
|
THROW_NEW_ERROR(
|
||||||
isolate,
|
isolate,
|
||||||
@ -792,7 +789,7 @@ MaybeHandle<Object> JSProxy::GetProperty(Isolate* isolate,
|
|||||||
// 7.a Return target.[[Get]](P, Receiver).
|
// 7.a Return target.[[Get]](P, Receiver).
|
||||||
LookupIterator it =
|
LookupIterator it =
|
||||||
LookupIterator::PropertyOrElement(isolate, receiver, name, target);
|
LookupIterator::PropertyOrElement(isolate, receiver, name, target);
|
||||||
return Object::GetProperty(&it, language_mode);
|
return Object::GetProperty(&it);
|
||||||
}
|
}
|
||||||
// 8. Let trapResult be ? Call(trap, handler, «target, P, Receiver»).
|
// 8. Let trapResult be ? Call(trap, handler, «target, P, Receiver»).
|
||||||
Handle<Object> trap_result;
|
Handle<Object> trap_result;
|
||||||
@ -1062,9 +1059,7 @@ MaybeHandle<Object> JSProxy::GetPrototype(Handle<JSProxy> proxy) {
|
|||||||
return handler_proto;
|
return handler_proto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MaybeHandle<Object> Object::GetPropertyWithAccessor(LookupIterator* it) {
|
||||||
MaybeHandle<Object> Object::GetPropertyWithAccessor(
|
|
||||||
LookupIterator* it, LanguageMode language_mode) {
|
|
||||||
Isolate* isolate = it->isolate();
|
Isolate* isolate = it->isolate();
|
||||||
Handle<Object> structure = it->GetAccessors();
|
Handle<Object> structure = it->GetAccessors();
|
||||||
Handle<Object> receiver = it->GetReceiver();
|
Handle<Object> receiver = it->GetReceiver();
|
||||||
@ -1095,7 +1090,7 @@ MaybeHandle<Object> Object::GetPropertyWithAccessor(
|
|||||||
v8::Local<v8::Value> result = args.Call(call_fun, v8::Utils::ToLocal(name));
|
v8::Local<v8::Value> result = args.Call(call_fun, v8::Utils::ToLocal(name));
|
||||||
RETURN_EXCEPTION_IF_SCHEDULED_EXCEPTION(isolate, Object);
|
RETURN_EXCEPTION_IF_SCHEDULED_EXCEPTION(isolate, Object);
|
||||||
if (result.IsEmpty()) {
|
if (result.IsEmpty()) {
|
||||||
return ReadAbsentProperty(isolate, receiver, name, language_mode);
|
return ReadAbsentProperty(isolate, receiver, name);
|
||||||
}
|
}
|
||||||
Handle<Object> return_value = v8::Utils::OpenHandle(*result);
|
Handle<Object> return_value = v8::Utils::OpenHandle(*result);
|
||||||
return_value->VerifyApiCallResultType();
|
return_value->VerifyApiCallResultType();
|
||||||
@ -1122,7 +1117,7 @@ MaybeHandle<Object> Object::GetPropertyWithAccessor(
|
|||||||
receiver, Handle<JSReceiver>::cast(getter));
|
receiver, Handle<JSReceiver>::cast(getter));
|
||||||
}
|
}
|
||||||
// Getter is not a function.
|
// Getter is not a function.
|
||||||
return ReadAbsentProperty(isolate, receiver, it->GetName(), language_mode);
|
return ReadAbsentProperty(isolate, receiver, it->GetName());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1272,7 +1267,7 @@ MaybeHandle<Object> JSObject::GetPropertyWithFailedAccessCheck(
|
|||||||
Handle<JSObject> checked = it->GetHolder<JSObject>();
|
Handle<JSObject> checked = it->GetHolder<JSObject>();
|
||||||
while (AllCanRead(it)) {
|
while (AllCanRead(it)) {
|
||||||
if (it->state() == LookupIterator::ACCESSOR) {
|
if (it->state() == LookupIterator::ACCESSOR) {
|
||||||
return GetPropertyWithAccessor(it, SLOPPY);
|
return GetPropertyWithAccessor(it);
|
||||||
}
|
}
|
||||||
DCHECK_EQ(LookupIterator::INTERCEPTOR, it->state());
|
DCHECK_EQ(LookupIterator::INTERCEPTOR, it->state());
|
||||||
bool done;
|
bool done;
|
||||||
@ -4343,28 +4338,13 @@ Maybe<bool> Object::SetSuperProperty(LookupIterator* it, Handle<Object> value,
|
|||||||
store_mode);
|
store_mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MaybeHandle<Object> Object::ReadAbsentProperty(LookupIterator* it) {
|
||||||
MaybeHandle<Object> Object::ReadAbsentProperty(LookupIterator* it,
|
|
||||||
LanguageMode language_mode) {
|
|
||||||
if (is_strong(language_mode)) {
|
|
||||||
THROW_NEW_ERROR(it->isolate(),
|
|
||||||
NewTypeError(MessageTemplate::kStrongPropertyAccess,
|
|
||||||
it->GetName(), it->GetReceiver()),
|
|
||||||
Object);
|
|
||||||
}
|
|
||||||
return it->isolate()->factory()->undefined_value();
|
return it->isolate()->factory()->undefined_value();
|
||||||
}
|
}
|
||||||
|
|
||||||
MaybeHandle<Object> Object::ReadAbsentProperty(Isolate* isolate,
|
MaybeHandle<Object> Object::ReadAbsentProperty(Isolate* isolate,
|
||||||
Handle<Object> receiver,
|
Handle<Object> receiver,
|
||||||
Handle<Object> name,
|
Handle<Object> name) {
|
||||||
LanguageMode language_mode) {
|
|
||||||
if (is_strong(language_mode)) {
|
|
||||||
THROW_NEW_ERROR(
|
|
||||||
isolate,
|
|
||||||
NewTypeError(MessageTemplate::kStrongPropertyAccess, name, receiver),
|
|
||||||
Object);
|
|
||||||
}
|
|
||||||
return isolate->factory()->undefined_value();
|
return isolate->factory()->undefined_value();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -8964,7 +8944,7 @@ MaybeHandle<FixedArray> GetOwnValuesOrEntries(Isolate* isolate,
|
|||||||
|
|
||||||
Handle<Object> value;
|
Handle<Object> value;
|
||||||
ASSIGN_RETURN_ON_EXCEPTION_VALUE(
|
ASSIGN_RETURN_ON_EXCEPTION_VALUE(
|
||||||
isolate, value, JSReceiver::GetPropertyOrElement(object, key, STRICT),
|
isolate, value, JSReceiver::GetPropertyOrElement(object, key),
|
||||||
MaybeHandle<FixedArray>());
|
MaybeHandle<FixedArray>());
|
||||||
|
|
||||||
if (get_entries) {
|
if (get_entries) {
|
||||||
|
@ -1215,8 +1215,7 @@ class Object {
|
|||||||
Handle<Object> lhs,
|
Handle<Object> lhs,
|
||||||
Handle<Object> rhs);
|
Handle<Object> rhs);
|
||||||
|
|
||||||
MUST_USE_RESULT static MaybeHandle<Object> GetProperty(
|
MUST_USE_RESULT static MaybeHandle<Object> GetProperty(LookupIterator* it);
|
||||||
LookupIterator* it, LanguageMode language_mode = SLOPPY);
|
|
||||||
|
|
||||||
// ES6 [[Set]] (when passed DONT_THROW)
|
// ES6 [[Set]] (when passed DONT_THROW)
|
||||||
// Invariants for this and related functions (unless stated otherwise):
|
// Invariants for this and related functions (unless stated otherwise):
|
||||||
@ -1239,10 +1238,9 @@ class Object {
|
|||||||
StoreFromKeyed store_mode);
|
StoreFromKeyed store_mode);
|
||||||
|
|
||||||
MUST_USE_RESULT static MaybeHandle<Object> ReadAbsentProperty(
|
MUST_USE_RESULT static MaybeHandle<Object> ReadAbsentProperty(
|
||||||
LookupIterator* it, LanguageMode language_mode);
|
LookupIterator* it);
|
||||||
MUST_USE_RESULT static MaybeHandle<Object> ReadAbsentProperty(
|
MUST_USE_RESULT static MaybeHandle<Object> ReadAbsentProperty(
|
||||||
Isolate* isolate, Handle<Object> receiver, Handle<Object> name,
|
Isolate* isolate, Handle<Object> receiver, Handle<Object> name);
|
||||||
LanguageMode language_mode);
|
|
||||||
MUST_USE_RESULT static Maybe<bool> CannotCreateProperty(
|
MUST_USE_RESULT static Maybe<bool> CannotCreateProperty(
|
||||||
Isolate* isolate, Handle<Object> receiver, Handle<Object> name,
|
Isolate* isolate, Handle<Object> receiver, Handle<Object> name,
|
||||||
Handle<Object> value, ShouldThrow should_throw);
|
Handle<Object> value, ShouldThrow should_throw);
|
||||||
@ -1260,20 +1258,16 @@ class Object {
|
|||||||
LookupIterator* it, Handle<Object> value, PropertyAttributes attributes,
|
LookupIterator* it, Handle<Object> value, PropertyAttributes attributes,
|
||||||
ShouldThrow should_throw, StoreFromKeyed store_mode);
|
ShouldThrow should_throw, StoreFromKeyed store_mode);
|
||||||
MUST_USE_RESULT static inline MaybeHandle<Object> GetPropertyOrElement(
|
MUST_USE_RESULT static inline MaybeHandle<Object> GetPropertyOrElement(
|
||||||
Handle<Object> object, Handle<Name> name,
|
Handle<Object> object, Handle<Name> name);
|
||||||
LanguageMode language_mode = SLOPPY);
|
|
||||||
MUST_USE_RESULT static inline MaybeHandle<Object> GetPropertyOrElement(
|
MUST_USE_RESULT static inline MaybeHandle<Object> GetPropertyOrElement(
|
||||||
Handle<Object> receiver, Handle<Name> name, Handle<JSReceiver> holder,
|
Handle<Object> receiver, Handle<Name> name, Handle<JSReceiver> holder);
|
||||||
LanguageMode language_mode = SLOPPY);
|
|
||||||
MUST_USE_RESULT static inline MaybeHandle<Object> GetProperty(
|
MUST_USE_RESULT static inline MaybeHandle<Object> GetProperty(
|
||||||
Isolate* isolate, Handle<Object> object, const char* key,
|
Isolate* isolate, Handle<Object> object, const char* key);
|
||||||
LanguageMode language_mode = SLOPPY);
|
|
||||||
MUST_USE_RESULT static inline MaybeHandle<Object> GetProperty(
|
MUST_USE_RESULT static inline MaybeHandle<Object> GetProperty(
|
||||||
Handle<Object> object, Handle<Name> name,
|
Handle<Object> object, Handle<Name> name);
|
||||||
LanguageMode language_mode = SLOPPY);
|
|
||||||
|
|
||||||
MUST_USE_RESULT static MaybeHandle<Object> GetPropertyWithAccessor(
|
MUST_USE_RESULT static MaybeHandle<Object> GetPropertyWithAccessor(
|
||||||
LookupIterator* it, LanguageMode language_mode);
|
LookupIterator* it);
|
||||||
MUST_USE_RESULT static Maybe<bool> SetPropertyWithAccessor(
|
MUST_USE_RESULT static Maybe<bool> SetPropertyWithAccessor(
|
||||||
LookupIterator* it, Handle<Object> value, ShouldThrow should_throw);
|
LookupIterator* it, Handle<Object> value, ShouldThrow should_throw);
|
||||||
|
|
||||||
@ -1285,8 +1279,7 @@ class Object {
|
|||||||
ShouldThrow should_throw);
|
ShouldThrow should_throw);
|
||||||
|
|
||||||
MUST_USE_RESULT static inline MaybeHandle<Object> GetElement(
|
MUST_USE_RESULT static inline MaybeHandle<Object> GetElement(
|
||||||
Isolate* isolate, Handle<Object> object, uint32_t index,
|
Isolate* isolate, Handle<Object> object, uint32_t index);
|
||||||
LanguageMode language_mode = SLOPPY);
|
|
||||||
|
|
||||||
MUST_USE_RESULT static inline MaybeHandle<Object> SetElement(
|
MUST_USE_RESULT static inline MaybeHandle<Object> SetElement(
|
||||||
Isolate* isolate, Handle<Object> object, uint32_t index,
|
Isolate* isolate, Handle<Object> object, uint32_t index,
|
||||||
@ -9745,7 +9738,7 @@ class JSProxy: public JSReceiver {
|
|||||||
// ES6 9.5.8
|
// ES6 9.5.8
|
||||||
MUST_USE_RESULT static MaybeHandle<Object> GetProperty(
|
MUST_USE_RESULT static MaybeHandle<Object> GetProperty(
|
||||||
Isolate* isolate, Handle<JSProxy> proxy, Handle<Name> name,
|
Isolate* isolate, Handle<JSProxy> proxy, Handle<Name> name,
|
||||||
Handle<Object> receiver, LanguageMode language_mode);
|
Handle<Object> receiver);
|
||||||
|
|
||||||
// ES6 9.5.9
|
// ES6 9.5.9
|
||||||
MUST_USE_RESULT static Maybe<bool> SetProperty(Handle<JSProxy> proxy,
|
MUST_USE_RESULT static Maybe<bool> SetProperty(Handle<JSProxy> proxy,
|
||||||
|
@ -104,8 +104,7 @@ static MaybeHandle<Object> DefineClass(Isolate* isolate,
|
|||||||
ASSIGN_RETURN_ON_EXCEPTION(
|
ASSIGN_RETURN_ON_EXCEPTION(
|
||||||
isolate, prototype_parent,
|
isolate, prototype_parent,
|
||||||
Runtime::GetObjectProperty(isolate, super_class,
|
Runtime::GetObjectProperty(isolate, super_class,
|
||||||
isolate->factory()->prototype_string(),
|
isolate->factory()->prototype_string()),
|
||||||
SLOPPY),
|
|
||||||
Object);
|
Object);
|
||||||
if (!prototype_parent->IsNull() && !prototype_parent->IsJSReceiver()) {
|
if (!prototype_parent->IsNull() && !prototype_parent->IsJSReceiver()) {
|
||||||
THROW_NEW_ERROR(
|
THROW_NEW_ERROR(
|
||||||
@ -223,12 +222,10 @@ RUNTIME_FUNCTION(Runtime_FinalizeClassDefinition) {
|
|||||||
return *constructor;
|
return *constructor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static MaybeHandle<Object> LoadFromSuper(Isolate* isolate,
|
static MaybeHandle<Object> LoadFromSuper(Isolate* isolate,
|
||||||
Handle<Object> receiver,
|
Handle<Object> receiver,
|
||||||
Handle<JSObject> home_object,
|
Handle<JSObject> home_object,
|
||||||
Handle<Name> name,
|
Handle<Name> name) {
|
||||||
LanguageMode language_mode) {
|
|
||||||
if (home_object->IsAccessCheckNeeded() &&
|
if (home_object->IsAccessCheckNeeded() &&
|
||||||
!isolate->MayAccess(handle(isolate->context()), home_object)) {
|
!isolate->MayAccess(handle(isolate->context()), home_object)) {
|
||||||
isolate->ReportFailedAccessCheck(home_object);
|
isolate->ReportFailedAccessCheck(home_object);
|
||||||
@ -238,22 +235,19 @@ static MaybeHandle<Object> LoadFromSuper(Isolate* isolate,
|
|||||||
PrototypeIterator iter(isolate, home_object);
|
PrototypeIterator iter(isolate, home_object);
|
||||||
Handle<Object> proto = PrototypeIterator::GetCurrent(iter);
|
Handle<Object> proto = PrototypeIterator::GetCurrent(iter);
|
||||||
if (!proto->IsJSReceiver()) {
|
if (!proto->IsJSReceiver()) {
|
||||||
return Object::ReadAbsentProperty(isolate, proto, name, language_mode);
|
return Object::ReadAbsentProperty(isolate, proto, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
LookupIterator it(receiver, name, Handle<JSReceiver>::cast(proto));
|
LookupIterator it(receiver, name, Handle<JSReceiver>::cast(proto));
|
||||||
Handle<Object> result;
|
Handle<Object> result;
|
||||||
ASSIGN_RETURN_ON_EXCEPTION(isolate, result,
|
ASSIGN_RETURN_ON_EXCEPTION(isolate, result, Object::GetProperty(&it), Object);
|
||||||
Object::GetProperty(&it, language_mode), Object);
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static MaybeHandle<Object> LoadElementFromSuper(Isolate* isolate,
|
static MaybeHandle<Object> LoadElementFromSuper(Isolate* isolate,
|
||||||
Handle<Object> receiver,
|
Handle<Object> receiver,
|
||||||
Handle<JSObject> home_object,
|
Handle<JSObject> home_object,
|
||||||
uint32_t index,
|
uint32_t index) {
|
||||||
LanguageMode language_mode) {
|
|
||||||
if (home_object->IsAccessCheckNeeded() &&
|
if (home_object->IsAccessCheckNeeded() &&
|
||||||
!isolate->MayAccess(handle(isolate->context()), home_object)) {
|
!isolate->MayAccess(handle(isolate->context()), home_object)) {
|
||||||
isolate->ReportFailedAccessCheck(home_object);
|
isolate->ReportFailedAccessCheck(home_object);
|
||||||
@ -264,50 +258,44 @@ static MaybeHandle<Object> LoadElementFromSuper(Isolate* isolate,
|
|||||||
Handle<Object> proto = PrototypeIterator::GetCurrent(iter);
|
Handle<Object> proto = PrototypeIterator::GetCurrent(iter);
|
||||||
if (!proto->IsJSReceiver()) {
|
if (!proto->IsJSReceiver()) {
|
||||||
Handle<Object> name = isolate->factory()->NewNumberFromUint(index);
|
Handle<Object> name = isolate->factory()->NewNumberFromUint(index);
|
||||||
return Object::ReadAbsentProperty(isolate, proto, name, language_mode);
|
return Object::ReadAbsentProperty(isolate, proto, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
LookupIterator it(isolate, receiver, index, Handle<JSReceiver>::cast(proto));
|
LookupIterator it(isolate, receiver, index, Handle<JSReceiver>::cast(proto));
|
||||||
Handle<Object> result;
|
Handle<Object> result;
|
||||||
ASSIGN_RETURN_ON_EXCEPTION(isolate, result,
|
ASSIGN_RETURN_ON_EXCEPTION(isolate, result, Object::GetProperty(&it), Object);
|
||||||
Object::GetProperty(&it, language_mode), Object);
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// TODO(conradw): It would be more efficient to have a separate runtime function
|
|
||||||
// for strong mode.
|
|
||||||
RUNTIME_FUNCTION(Runtime_LoadFromSuper) {
|
RUNTIME_FUNCTION(Runtime_LoadFromSuper) {
|
||||||
HandleScope scope(isolate);
|
HandleScope scope(isolate);
|
||||||
DCHECK(args.length() == 4);
|
DCHECK_EQ(3, args.length());
|
||||||
CONVERT_ARG_HANDLE_CHECKED(Object, receiver, 0);
|
CONVERT_ARG_HANDLE_CHECKED(Object, receiver, 0);
|
||||||
CONVERT_ARG_HANDLE_CHECKED(JSObject, home_object, 1);
|
CONVERT_ARG_HANDLE_CHECKED(JSObject, home_object, 1);
|
||||||
CONVERT_ARG_HANDLE_CHECKED(Name, name, 2);
|
CONVERT_ARG_HANDLE_CHECKED(Name, name, 2);
|
||||||
CONVERT_LANGUAGE_MODE_ARG_CHECKED(language_mode, 3);
|
|
||||||
|
|
||||||
Handle<Object> result;
|
Handle<Object> result;
|
||||||
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
|
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
|
||||||
isolate, result,
|
isolate, result, LoadFromSuper(isolate, receiver, home_object, name));
|
||||||
LoadFromSuper(isolate, receiver, home_object, name, language_mode));
|
|
||||||
return *result;
|
return *result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
RUNTIME_FUNCTION(Runtime_LoadKeyedFromSuper) {
|
RUNTIME_FUNCTION(Runtime_LoadKeyedFromSuper) {
|
||||||
HandleScope scope(isolate);
|
HandleScope scope(isolate);
|
||||||
DCHECK(args.length() == 4);
|
DCHECK_EQ(3, args.length());
|
||||||
CONVERT_ARG_HANDLE_CHECKED(Object, receiver, 0);
|
CONVERT_ARG_HANDLE_CHECKED(Object, receiver, 0);
|
||||||
CONVERT_ARG_HANDLE_CHECKED(JSObject, home_object, 1);
|
CONVERT_ARG_HANDLE_CHECKED(JSObject, home_object, 1);
|
||||||
CONVERT_ARG_HANDLE_CHECKED(Object, key, 2);
|
CONVERT_ARG_HANDLE_CHECKED(Object, key, 2);
|
||||||
CONVERT_LANGUAGE_MODE_ARG_CHECKED(language_mode, 3);
|
|
||||||
|
|
||||||
uint32_t index = 0;
|
uint32_t index = 0;
|
||||||
Handle<Object> result;
|
Handle<Object> result;
|
||||||
|
|
||||||
if (key->ToArrayIndex(&index)) {
|
if (key->ToArrayIndex(&index)) {
|
||||||
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
|
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
|
||||||
isolate, result, LoadElementFromSuper(isolate, receiver, home_object,
|
isolate, result,
|
||||||
index, language_mode));
|
LoadElementFromSuper(isolate, receiver, home_object, index));
|
||||||
return *result;
|
return *result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -317,13 +305,12 @@ RUNTIME_FUNCTION(Runtime_LoadKeyedFromSuper) {
|
|||||||
// TODO(verwaest): Unify using LookupIterator.
|
// TODO(verwaest): Unify using LookupIterator.
|
||||||
if (name->AsArrayIndex(&index)) {
|
if (name->AsArrayIndex(&index)) {
|
||||||
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
|
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
|
||||||
isolate, result, LoadElementFromSuper(isolate, receiver, home_object,
|
isolate, result,
|
||||||
index, language_mode));
|
LoadElementFromSuper(isolate, receiver, home_object, index));
|
||||||
return *result;
|
return *result;
|
||||||
}
|
}
|
||||||
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
|
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
|
||||||
isolate, result,
|
isolate, result, LoadFromSuper(isolate, receiver, home_object, name));
|
||||||
LoadFromSuper(isolate, receiver, home_object, name, language_mode));
|
|
||||||
return *result;
|
return *result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ static Handle<Object> DebugGetProperty(LookupIterator* it,
|
|||||||
return it->isolate()->factory()->undefined_value();
|
return it->isolate()->factory()->undefined_value();
|
||||||
}
|
}
|
||||||
MaybeHandle<Object> maybe_result =
|
MaybeHandle<Object> maybe_result =
|
||||||
JSObject::GetPropertyWithAccessor(it, SLOPPY);
|
JSObject::GetPropertyWithAccessor(it);
|
||||||
Handle<Object> result;
|
Handle<Object> result;
|
||||||
if (!maybe_result.ToHandle(&result)) {
|
if (!maybe_result.ToHandle(&result)) {
|
||||||
result = handle(it->isolate()->pending_exception(), it->isolate());
|
result = handle(it->isolate()->pending_exception(), it->isolate());
|
||||||
|
@ -15,11 +15,9 @@
|
|||||||
namespace v8 {
|
namespace v8 {
|
||||||
namespace internal {
|
namespace internal {
|
||||||
|
|
||||||
|
|
||||||
MaybeHandle<Object> Runtime::GetObjectProperty(Isolate* isolate,
|
MaybeHandle<Object> Runtime::GetObjectProperty(Isolate* isolate,
|
||||||
Handle<Object> object,
|
Handle<Object> object,
|
||||||
Handle<Object> key,
|
Handle<Object> key) {
|
||||||
LanguageMode language_mode) {
|
|
||||||
if (object->IsUndefined() || object->IsNull()) {
|
if (object->IsUndefined() || object->IsNull()) {
|
||||||
THROW_NEW_ERROR(
|
THROW_NEW_ERROR(
|
||||||
isolate,
|
isolate,
|
||||||
@ -32,14 +30,12 @@ MaybeHandle<Object> Runtime::GetObjectProperty(Isolate* isolate,
|
|||||||
LookupIterator::PropertyOrElement(isolate, object, key, &success);
|
LookupIterator::PropertyOrElement(isolate, object, key, &success);
|
||||||
if (!success) return MaybeHandle<Object>();
|
if (!success) return MaybeHandle<Object>();
|
||||||
|
|
||||||
return Object::GetProperty(&it, language_mode);
|
return Object::GetProperty(&it);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static MaybeHandle<Object> KeyedGetObjectProperty(Isolate* isolate,
|
static MaybeHandle<Object> KeyedGetObjectProperty(Isolate* isolate,
|
||||||
Handle<Object> receiver_obj,
|
Handle<Object> receiver_obj,
|
||||||
Handle<Object> key_obj,
|
Handle<Object> key_obj) {
|
||||||
LanguageMode language_mode) {
|
|
||||||
// Fast cases for getting named properties of the receiver JSObject
|
// Fast cases for getting named properties of the receiver JSObject
|
||||||
// itself.
|
// itself.
|
||||||
//
|
//
|
||||||
@ -113,8 +109,7 @@ static MaybeHandle<Object> KeyedGetObjectProperty(Isolate* isolate,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Fall back to GetObjectProperty.
|
// Fall back to GetObjectProperty.
|
||||||
return Runtime::GetObjectProperty(isolate, receiver_obj, key_obj,
|
return Runtime::GetObjectProperty(isolate, receiver_obj, key_obj);
|
||||||
language_mode);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -386,23 +381,7 @@ RUNTIME_FUNCTION(Runtime_GetProperty) {
|
|||||||
|
|
||||||
Handle<Object> result;
|
Handle<Object> result;
|
||||||
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
|
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
|
||||||
isolate, result,
|
isolate, result, Runtime::GetObjectProperty(isolate, object, key));
|
||||||
Runtime::GetObjectProperty(isolate, object, key, SLOPPY));
|
|
||||||
return *result;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
RUNTIME_FUNCTION(Runtime_GetPropertyStrong) {
|
|
||||||
HandleScope scope(isolate);
|
|
||||||
DCHECK(args.length() == 2);
|
|
||||||
|
|
||||||
CONVERT_ARG_HANDLE_CHECKED(Object, object, 0);
|
|
||||||
CONVERT_ARG_HANDLE_CHECKED(Object, key, 1);
|
|
||||||
|
|
||||||
Handle<Object> result;
|
|
||||||
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
|
|
||||||
isolate, result,
|
|
||||||
Runtime::GetObjectProperty(isolate, object, key, STRONG));
|
|
||||||
return *result;
|
return *result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -417,23 +396,7 @@ RUNTIME_FUNCTION(Runtime_KeyedGetProperty) {
|
|||||||
|
|
||||||
Handle<Object> result;
|
Handle<Object> result;
|
||||||
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
|
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
|
||||||
isolate, result,
|
isolate, result, KeyedGetObjectProperty(isolate, receiver_obj, key_obj));
|
||||||
KeyedGetObjectProperty(isolate, receiver_obj, key_obj, SLOPPY));
|
|
||||||
return *result;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
RUNTIME_FUNCTION(Runtime_KeyedGetPropertyStrong) {
|
|
||||||
HandleScope scope(isolate);
|
|
||||||
DCHECK(args.length() == 2);
|
|
||||||
|
|
||||||
CONVERT_ARG_HANDLE_CHECKED(Object, receiver_obj, 0);
|
|
||||||
CONVERT_ARG_HANDLE_CHECKED(Object, key_obj, 1);
|
|
||||||
|
|
||||||
Handle<Object> result;
|
|
||||||
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
|
|
||||||
isolate, result,
|
|
||||||
KeyedGetObjectProperty(isolate, receiver_obj, key_obj, STRONG));
|
|
||||||
return *result;
|
return *result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -84,8 +84,8 @@ namespace internal {
|
|||||||
F(HomeObjectSymbol, 0, 1) \
|
F(HomeObjectSymbol, 0, 1) \
|
||||||
F(DefineClass, 4, 1) \
|
F(DefineClass, 4, 1) \
|
||||||
F(FinalizeClassDefinition, 2, 1) \
|
F(FinalizeClassDefinition, 2, 1) \
|
||||||
F(LoadFromSuper, 4, 1) \
|
F(LoadFromSuper, 3, 1) \
|
||||||
F(LoadKeyedFromSuper, 4, 1) \
|
F(LoadKeyedFromSuper, 3, 1) \
|
||||||
F(StoreToSuper_Strict, 4, 1) \
|
F(StoreToSuper_Strict, 4, 1) \
|
||||||
F(StoreToSuper_Sloppy, 4, 1) \
|
F(StoreToSuper_Sloppy, 4, 1) \
|
||||||
F(StoreKeyedToSuper_Strict, 4, 1) \
|
F(StoreKeyedToSuper_Strict, 4, 1) \
|
||||||
@ -419,9 +419,7 @@ namespace internal {
|
|||||||
F(GetOwnProperty_Legacy, 2, 1) \
|
F(GetOwnProperty_Legacy, 2, 1) \
|
||||||
F(OptimizeObjectForAddingMultipleProperties, 2, 1) \
|
F(OptimizeObjectForAddingMultipleProperties, 2, 1) \
|
||||||
F(GetProperty, 2, 1) \
|
F(GetProperty, 2, 1) \
|
||||||
F(GetPropertyStrong, 2, 1) \
|
|
||||||
F(KeyedGetProperty, 2, 1) \
|
F(KeyedGetProperty, 2, 1) \
|
||||||
F(KeyedGetPropertyStrong, 2, 1) \
|
|
||||||
F(LoadGlobalViaContext, 1, 1) \
|
F(LoadGlobalViaContext, 1, 1) \
|
||||||
F(StoreGlobalViaContext_Sloppy, 2, 1) \
|
F(StoreGlobalViaContext_Sloppy, 2, 1) \
|
||||||
F(StoreGlobalViaContext_Strict, 2, 1) \
|
F(StoreGlobalViaContext_Strict, 2, 1) \
|
||||||
@ -1134,8 +1132,7 @@ class Runtime : public AllStatic {
|
|||||||
Handle<Object> value, LanguageMode language_mode);
|
Handle<Object> value, LanguageMode language_mode);
|
||||||
|
|
||||||
MUST_USE_RESULT static MaybeHandle<Object> GetObjectProperty(
|
MUST_USE_RESULT static MaybeHandle<Object> GetObjectProperty(
|
||||||
Isolate* isolate, Handle<Object> object, Handle<Object> key,
|
Isolate* isolate, Handle<Object> object, Handle<Object> key);
|
||||||
LanguageMode language_mode = SLOPPY);
|
|
||||||
|
|
||||||
enum TypedArrayId {
|
enum TypedArrayId {
|
||||||
// arrayIds below should be synchronized with typedarray.js natives.
|
// arrayIds below should be synchronized with typedarray.js natives.
|
||||||
|
@ -89,6 +89,10 @@
|
|||||||
'test-func-name-inference/UpperCaseClass': [FAIL],
|
'test-func-name-inference/UpperCaseClass': [FAIL],
|
||||||
'test-func-name-inference/LowerCaseClass': [FAIL],
|
'test-func-name-inference/LowerCaseClass': [FAIL],
|
||||||
|
|
||||||
|
# BUG(3956). Strong mode is being deprecated. Decide about these tests.
|
||||||
|
'test-api/StrongModeAccessCheckAllowed': [FAIL],
|
||||||
|
'test-api/StrongModeAccessCheckBlocked': [FAIL],
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
# TurboFan compiler failures.
|
# TurboFan compiler failures.
|
||||||
|
|
||||||
@ -514,13 +518,8 @@
|
|||||||
'test-api/IsGeneratorFunctionOrObject': [FAIL],
|
'test-api/IsGeneratorFunctionOrObject': [FAIL],
|
||||||
|
|
||||||
# TODO(rmcilroy,4680): Strong mode failures.
|
# TODO(rmcilroy,4680): Strong mode failures.
|
||||||
'test-parsing/StrongModeFreeVariablesDeclaredByLanguage': [FAIL],
|
|
||||||
'test-parsing/StrongModeFreeVariablesDeclaredInGlobalPrototype': [FAIL],
|
|
||||||
'test-parsing/StrongModeFreeVariablesDeclaredByPreviousScript': [FAIL],
|
|
||||||
'test-api/StrongModeAccessCheckBlocked': [FAIL],
|
|
||||||
'test-api/AccessorShouldThrowOnError': [FAIL],
|
'test-api/AccessorShouldThrowOnError': [FAIL],
|
||||||
'test-api/InterceptorShouldThrowOnError': [FAIL],
|
'test-api/InterceptorShouldThrowOnError': [FAIL],
|
||||||
'test-api/StrongModeAccessCheckAllowed': [FAIL],
|
|
||||||
|
|
||||||
# TODO(rmcilroy,4680): The function_data field should be a BytecodeArray on interpreter entry
|
# TODO(rmcilroy,4680): The function_data field should be a BytecodeArray on interpreter entry
|
||||||
'test-api/SetFunctionEntryHook': [FAIL],
|
'test-api/SetFunctionEntryHook': [FAIL],
|
||||||
|
@ -1065,8 +1065,6 @@ TEST(PropertyLoads) {
|
|||||||
// These are a hack used by the LoadICXXXWide tests below.
|
// These are a hack used by the LoadICXXXWide tests below.
|
||||||
int wide_idx_1 = vector->GetIndex(slot1) - 2;
|
int wide_idx_1 = vector->GetIndex(slot1) - 2;
|
||||||
int wide_idx_2 = vector->GetIndex(slot1) - 2;
|
int wide_idx_2 = vector->GetIndex(slot1) - 2;
|
||||||
int wide_idx_3 = vector->GetIndex(slot1) - 2;
|
|
||||||
int wide_idx_4 = vector->GetIndex(slot1) - 2;
|
|
||||||
|
|
||||||
// clang-format off
|
// clang-format off
|
||||||
ExpectedSnippet<const char*> snippets[] = {
|
ExpectedSnippet<const char*> snippets[] = {
|
||||||
@ -1078,7 +1076,7 @@ TEST(PropertyLoads) {
|
|||||||
B(StackCheck), //
|
B(StackCheck), //
|
||||||
B(Ldar), A(1, 2), //
|
B(Ldar), A(1, 2), //
|
||||||
B(Star), R(0), //
|
B(Star), R(0), //
|
||||||
B(LoadICSloppy), R(0), U8(0), U8(vector->GetIndex(slot1)), //
|
B(LoadIC), R(0), U8(0), U8(vector->GetIndex(slot1)), //
|
||||||
B(Return), //
|
B(Return), //
|
||||||
},
|
},
|
||||||
1,
|
1,
|
||||||
@ -1091,7 +1089,7 @@ TEST(PropertyLoads) {
|
|||||||
B(StackCheck), //
|
B(StackCheck), //
|
||||||
B(Ldar), A(1, 2), //
|
B(Ldar), A(1, 2), //
|
||||||
B(Star), R(0), //
|
B(Star), R(0), //
|
||||||
B(LoadICSloppy), R(0), U8(0), U8(vector->GetIndex(slot1)), //
|
B(LoadIC), R(0), U8(0), U8(vector->GetIndex(slot1)), //
|
||||||
B(Return) //
|
B(Return) //
|
||||||
},
|
},
|
||||||
1,
|
1,
|
||||||
@ -1105,7 +1103,7 @@ TEST(PropertyLoads) {
|
|||||||
B(Ldar), A(1, 2), //
|
B(Ldar), A(1, 2), //
|
||||||
B(Star), R(0), //
|
B(Star), R(0), //
|
||||||
B(LdaSmi8), U8(100), //
|
B(LdaSmi8), U8(100), //
|
||||||
B(KeyedLoadICSloppy), R(0), U8(vector->GetIndex(slot1)), //
|
B(KeyedLoadIC), R(0), U8(vector->GetIndex(slot1)), //
|
||||||
B(Return) //
|
B(Return) //
|
||||||
},
|
},
|
||||||
0},
|
0},
|
||||||
@ -1118,7 +1116,7 @@ TEST(PropertyLoads) {
|
|||||||
B(Ldar), A(1, 3), //
|
B(Ldar), A(1, 3), //
|
||||||
B(Star), R(0), //
|
B(Star), R(0), //
|
||||||
B(Ldar), A(1, 2), //
|
B(Ldar), A(1, 2), //
|
||||||
B(KeyedLoadICSloppy), R(0), U8(vector->GetIndex(slot1)), //
|
B(KeyedLoadIC), R(0), U8(vector->GetIndex(slot1)), //
|
||||||
B(Return) //
|
B(Return) //
|
||||||
},
|
},
|
||||||
0},
|
0},
|
||||||
@ -1131,43 +1129,16 @@ TEST(PropertyLoads) {
|
|||||||
B(StackCheck), //
|
B(StackCheck), //
|
||||||
B(Ldar), A(1, 2), //
|
B(Ldar), A(1, 2), //
|
||||||
B(Star), R(1), //
|
B(Star), R(1), //
|
||||||
B(LoadICSloppy), R(1), U8(0), U8(vector->GetIndex(slot1)), //
|
B(LoadIC), R(1), U8(0), U8(vector->GetIndex(slot1)), //
|
||||||
B(Star), R(0), //
|
B(Star), R(0), //
|
||||||
B(Ldar), A(1, 2), //
|
B(Ldar), A(1, 2), //
|
||||||
B(Star), R(1), //
|
B(Star), R(1), //
|
||||||
B(LdaSmi8), U8(-124), //
|
B(LdaSmi8), U8(-124), //
|
||||||
B(KeyedLoadICSloppy), R(1), U8(vector->GetIndex(slot2)), //
|
B(KeyedLoadIC), R(1), U8(vector->GetIndex(slot2)), //
|
||||||
B(Return), //
|
B(Return), //
|
||||||
},
|
},
|
||||||
1,
|
1,
|
||||||
{"name"}},
|
{"name"}},
|
||||||
{"function f(a) { \"use strict\"; return a.name; }\nf({name : \"test\"})",
|
|
||||||
1 * kPointerSize,
|
|
||||||
2,
|
|
||||||
10,
|
|
||||||
{
|
|
||||||
B(StackCheck), //
|
|
||||||
B(Ldar), A(1, 2), //
|
|
||||||
B(Star), R(0), //
|
|
||||||
B(LoadICStrict), R(0), U8(0), U8(vector->GetIndex(slot1)), //
|
|
||||||
B(Return), //
|
|
||||||
},
|
|
||||||
1,
|
|
||||||
{"name"}},
|
|
||||||
{"function f(a, b) { \"use strict\"; return a[b]; }\n"
|
|
||||||
"f({arg : \"test\"}, \"arg\")",
|
|
||||||
1 * kPointerSize,
|
|
||||||
3,
|
|
||||||
11,
|
|
||||||
{
|
|
||||||
B(StackCheck), //
|
|
||||||
B(Ldar), A(1, 3), //
|
|
||||||
B(Star), R(0), //
|
|
||||||
B(Ldar), A(2, 3), //
|
|
||||||
B(KeyedLoadICStrict), R(0), U8(vector->GetIndex(slot1)), //
|
|
||||||
B(Return), //
|
|
||||||
},
|
|
||||||
0},
|
|
||||||
{"function f(a) {\n"
|
{"function f(a) {\n"
|
||||||
" var b;\n"
|
" var b;\n"
|
||||||
"b = a.name;"
|
"b = a.name;"
|
||||||
@ -1181,45 +1152,17 @@ TEST(PropertyLoads) {
|
|||||||
B(StackCheck), //
|
B(StackCheck), //
|
||||||
B(Ldar), A(1, 2), //
|
B(Ldar), A(1, 2), //
|
||||||
B(Star), R(1), //
|
B(Star), R(1), //
|
||||||
B(LoadICSloppy), R(1), U8(0), U8(wide_idx_1 += 2), //
|
B(LoadIC), R(1), U8(0), U8(wide_idx_1 += 2), //
|
||||||
B(Star), R(0), //
|
B(Star), R(0), //
|
||||||
REPEAT_127(COMMA, //
|
REPEAT_127(COMMA, //
|
||||||
B(Ldar), A(1, 2), //
|
B(Ldar), A(1, 2), //
|
||||||
B(Star), R(1), //
|
B(Star), R(1), //
|
||||||
B(LoadICSloppy), R(1), U8(0), //
|
B(LoadIC), R(1), U8(0), //
|
||||||
U8((wide_idx_1 += 2)), //
|
U8((wide_idx_1 += 2)), //
|
||||||
B(Star), R(0)), //
|
B(Star), R(0)), //
|
||||||
B(Ldar), A(1, 2), //
|
B(Ldar), A(1, 2), //
|
||||||
B(Star), R(1), //
|
B(Star), R(1), //
|
||||||
B(LoadICSloppyWide), R(1), U16(0), U16(wide_idx_1 + 2), //
|
B(LoadICWide), R(1), U16(0), U16(wide_idx_1 + 2), //
|
||||||
B(Return), //
|
|
||||||
},
|
|
||||||
1,
|
|
||||||
{"name"}},
|
|
||||||
{"function f(a) {\n"
|
|
||||||
" 'use strict'; var b;\n"
|
|
||||||
" b = a.name;\n"
|
|
||||||
REPEAT_127(SPACE, " b = a.name; ")
|
|
||||||
" return a.name; }\n"
|
|
||||||
"f({name : \"test\"})\n",
|
|
||||||
2 * kPointerSize,
|
|
||||||
2,
|
|
||||||
1292,
|
|
||||||
{
|
|
||||||
B(StackCheck), //
|
|
||||||
B(Ldar), A(1, 2), //
|
|
||||||
B(Star), R(1), //
|
|
||||||
B(LoadICStrict), R(1), U8(0), U8((wide_idx_2 += 2)), //
|
|
||||||
B(Star), R(0), //
|
|
||||||
REPEAT_127(COMMA, //
|
|
||||||
B(Ldar), A(1, 2), //
|
|
||||||
B(Star), R(1), //
|
|
||||||
B(LoadICStrict), R(1), U8(0), //
|
|
||||||
U8((wide_idx_2 += 2)), //
|
|
||||||
B(Star), R(0)), //
|
|
||||||
B(Ldar), A(1, 2), //
|
|
||||||
B(Star), R(1), //
|
|
||||||
B(LoadICStrictWide), R(1), U16(0), U16(wide_idx_2 + 2), //
|
|
||||||
B(Return), //
|
B(Return), //
|
||||||
},
|
},
|
||||||
1,
|
1,
|
||||||
@ -1238,46 +1181,18 @@ TEST(PropertyLoads) {
|
|||||||
B(Ldar), A(1, 3), //
|
B(Ldar), A(1, 3), //
|
||||||
B(Star), R(1), //
|
B(Star), R(1), //
|
||||||
B(Ldar), A(2, 3), //
|
B(Ldar), A(2, 3), //
|
||||||
B(KeyedLoadICSloppy), R(1), U8((wide_idx_3 += 2)), //
|
B(KeyedLoadIC), R(1), U8((wide_idx_2 += 2)), //
|
||||||
B(Star), R(0), //
|
B(Star), R(0), //
|
||||||
REPEAT_127(COMMA, //
|
REPEAT_127(COMMA, //
|
||||||
B(Ldar), A(1, 3), //
|
B(Ldar), A(1, 3), //
|
||||||
B(Star), R(1), //
|
B(Star), R(1), //
|
||||||
B(Ldar), A(2, 3), //
|
B(Ldar), A(2, 3), //
|
||||||
B(KeyedLoadICSloppy), R(1), U8((wide_idx_3 += 2)), //
|
B(KeyedLoadIC), R(1), U8((wide_idx_2 += 2)), //
|
||||||
B(Star), R(0)), //
|
B(Star), R(0)), //
|
||||||
B(Ldar), A(1, 3), //
|
B(Ldar), A(1, 3), //
|
||||||
B(Star), R(1), //
|
B(Star), R(1), //
|
||||||
B(Ldar), A(2, 3), //
|
B(Ldar), A(2, 3), //
|
||||||
B(KeyedLoadICSloppyWide), R(1), U16(wide_idx_3 + 2), //
|
B(KeyedLoadICWide), R(1), U16(wide_idx_2 + 2), //
|
||||||
B(Return), //
|
|
||||||
}},
|
|
||||||
{"function f(a, b) {\n"
|
|
||||||
" 'use strict'; var c;\n"
|
|
||||||
" c = a[b];"
|
|
||||||
REPEAT_127(SPACE, " c = a[b]; ")
|
|
||||||
" return a[b]; }\n"
|
|
||||||
"f({name : \"test\"}, \"name\")\n",
|
|
||||||
2 * kPointerSize,
|
|
||||||
3,
|
|
||||||
1420,
|
|
||||||
{
|
|
||||||
B(StackCheck), //
|
|
||||||
B(Ldar), A(1, 3), //
|
|
||||||
B(Star), R(1), //
|
|
||||||
B(Ldar), A(2, 3), //
|
|
||||||
B(KeyedLoadICStrict), R(1), U8((wide_idx_4 += 2)), //
|
|
||||||
B(Star), R(0), //
|
|
||||||
REPEAT_127(COMMA, //
|
|
||||||
B(Ldar), A(1, 3), //
|
|
||||||
B(Star), R(1), //
|
|
||||||
B(Ldar), A(2, 3), //
|
|
||||||
B(KeyedLoadICStrict), R(1), U8((wide_idx_4 += 2)), //
|
|
||||||
B(Star), R(0)), //
|
|
||||||
B(Ldar), A(1, 3), //
|
|
||||||
B(Star), R(1), //
|
|
||||||
B(Ldar), A(2, 3), //
|
|
||||||
B(KeyedLoadICStrictWide), R(1), U16(wide_idx_4 + 2), //
|
|
||||||
B(Return), //
|
B(Return), //
|
||||||
}},
|
}},
|
||||||
};
|
};
|
||||||
@ -1389,7 +1304,7 @@ TEST(PropertyStores) {
|
|||||||
B(Ldar), A(1, 2), //
|
B(Ldar), A(1, 2), //
|
||||||
B(Star), R(1), //
|
B(Star), R(1), //
|
||||||
B(LdaSmi8), U8(-124), //
|
B(LdaSmi8), U8(-124), //
|
||||||
B(KeyedLoadICSloppy), R(1), U8(vector->GetIndex(slot1)), //
|
B(KeyedLoadIC), R(1), U8(vector->GetIndex(slot1)), //
|
||||||
B(StoreICSloppy), R(0), U8(0), U8(vector->GetIndex(slot2)), //
|
B(StoreICSloppy), R(0), U8(0), U8(vector->GetIndex(slot2)), //
|
||||||
B(LdaUndefined), //
|
B(LdaUndefined), //
|
||||||
B(Return), //
|
B(Return), //
|
||||||
@ -1595,7 +1510,7 @@ TEST(PropertyCall) {
|
|||||||
B(StackCheck), //
|
B(StackCheck), //
|
||||||
B(Ldar), A(1, 2), //
|
B(Ldar), A(1, 2), //
|
||||||
B(Star), R(1), //
|
B(Star), R(1), //
|
||||||
B(LoadICSloppy), R(1), U8(0), U8(vector->GetIndex(slot2)), //
|
B(LoadIC), R(1), U8(0), U8(vector->GetIndex(slot2)), //
|
||||||
B(Star), R(0), //
|
B(Star), R(0), //
|
||||||
B(Call), R(0), R(1), U8(1), U8(vector->GetIndex(slot1)), //
|
B(Call), R(0), R(1), U8(1), U8(vector->GetIndex(slot1)), //
|
||||||
B(Return), //
|
B(Return), //
|
||||||
@ -1610,7 +1525,7 @@ TEST(PropertyCall) {
|
|||||||
B(StackCheck), //
|
B(StackCheck), //
|
||||||
B(Ldar), A(1, 4), //
|
B(Ldar), A(1, 4), //
|
||||||
B(Star), R(1), //
|
B(Star), R(1), //
|
||||||
B(LoadICSloppy), R(1), U8(0), U8(vector->GetIndex(slot2)), //
|
B(LoadIC), R(1), U8(0), U8(vector->GetIndex(slot2)), //
|
||||||
B(Star), R(0), //
|
B(Star), R(0), //
|
||||||
B(Ldar), A(2, 4), //
|
B(Ldar), A(2, 4), //
|
||||||
B(Star), R(2), //
|
B(Star), R(2), //
|
||||||
@ -1629,7 +1544,7 @@ TEST(PropertyCall) {
|
|||||||
B(StackCheck), //
|
B(StackCheck), //
|
||||||
B(Ldar), A(1, 3), //
|
B(Ldar), A(1, 3), //
|
||||||
B(Star), R(1), //
|
B(Star), R(1), //
|
||||||
B(LoadICSloppy), R(1), U8(0), U8(vector->GetIndex(slot2)), //
|
B(LoadIC), R(1), U8(0), U8(vector->GetIndex(slot2)), //
|
||||||
B(Star), R(0), //
|
B(Star), R(0), //
|
||||||
B(Ldar), A(2, 3), //
|
B(Ldar), A(2, 3), //
|
||||||
B(Star), R(3), //
|
B(Star), R(3), //
|
||||||
@ -1653,14 +1568,14 @@ TEST(PropertyCall) {
|
|||||||
B(StackCheck), //
|
B(StackCheck), //
|
||||||
B(Ldar), A(1, 2), //
|
B(Ldar), A(1, 2), //
|
||||||
B(Star), R(0), //
|
B(Star), R(0), //
|
||||||
B(LoadICSloppy), R(0), U8(0), U8(wide_idx += 2), //
|
B(LoadIC), R(0), U8(0), U8(wide_idx += 2), //
|
||||||
REPEAT_127(COMMA, //
|
REPEAT_127(COMMA, //
|
||||||
B(Ldar), A(1, 2), //
|
B(Ldar), A(1, 2), //
|
||||||
B(Star), R(0), //
|
B(Star), R(0), //
|
||||||
B(LoadICSloppy), R(0), U8(0), U8((wide_idx += 2))), //
|
B(LoadIC), R(0), U8(0), U8((wide_idx += 2))), //
|
||||||
B(Ldar), A(1, 2), //
|
B(Ldar), A(1, 2), //
|
||||||
B(Star), R(1), //
|
B(Star), R(1), //
|
||||||
B(LoadICSloppyWide), R(1), U16(0), U16(wide_idx + 4), //
|
B(LoadICWide), R(1), U16(0), U16(wide_idx + 4), //
|
||||||
B(Star), R(0), //
|
B(Star), R(0), //
|
||||||
B(CallWide), R16(0), R16(1), U16(1), U16(wide_idx + 2), //
|
B(CallWide), R16(0), R16(1), U16(1), U16(wide_idx + 2), //
|
||||||
B(Return), //
|
B(Return), //
|
||||||
@ -1691,7 +1606,6 @@ TEST(LoadGlobal) {
|
|||||||
|
|
||||||
// These are a hack used by the LdaGlobalXXXWide tests below.
|
// These are a hack used by the LdaGlobalXXXWide tests below.
|
||||||
int wide_idx_1 = vector->GetIndex(slot) - 2;
|
int wide_idx_1 = vector->GetIndex(slot) - 2;
|
||||||
int wide_idx_2 = vector->GetIndex(slot) - 2;
|
|
||||||
|
|
||||||
// clang-format off
|
// clang-format off
|
||||||
ExpectedSnippet<const char*> snippets[] = {
|
ExpectedSnippet<const char*> snippets[] = {
|
||||||
@ -1701,7 +1615,7 @@ TEST(LoadGlobal) {
|
|||||||
5,
|
5,
|
||||||
{
|
{
|
||||||
B(StackCheck), //
|
B(StackCheck), //
|
||||||
B(LdaGlobalSloppy), U8(0), U8(vector->GetIndex(slot)), //
|
B(LdaGlobal), U8(0), U8(vector->GetIndex(slot)), //
|
||||||
B(Return) //
|
B(Return) //
|
||||||
},
|
},
|
||||||
1,
|
1,
|
||||||
@ -1712,29 +1626,18 @@ TEST(LoadGlobal) {
|
|||||||
5,
|
5,
|
||||||
{
|
{
|
||||||
B(StackCheck), //
|
B(StackCheck), //
|
||||||
B(LdaGlobalSloppy), U8(0), U8(vector->GetIndex(slot)), //
|
B(LdaGlobal), U8(0), U8(vector->GetIndex(slot)), //
|
||||||
B(Return) //
|
B(Return) //
|
||||||
},
|
},
|
||||||
1,
|
1,
|
||||||
{"t"}},
|
{"t"}},
|
||||||
{"'use strict'; var a = 1;\nfunction f() { return a; }\nf()",
|
|
||||||
0,
|
|
||||||
1,
|
|
||||||
5,
|
|
||||||
{
|
|
||||||
B(StackCheck), //
|
|
||||||
B(LdaGlobalStrict), U8(0), U8(vector->GetIndex(slot)), //
|
|
||||||
B(Return) //
|
|
||||||
},
|
|
||||||
1,
|
|
||||||
{"a"}},
|
|
||||||
{"a = 1;\nfunction f() { return a; }\nf()",
|
{"a = 1;\nfunction f() { return a; }\nf()",
|
||||||
0,
|
0,
|
||||||
1,
|
1,
|
||||||
5,
|
5,
|
||||||
{
|
{
|
||||||
B(StackCheck), //
|
B(StackCheck), //
|
||||||
B(LdaGlobalSloppy), U8(0), U8(vector->GetIndex(slot)), //
|
B(LdaGlobal), U8(0), U8(vector->GetIndex(slot)), //
|
||||||
B(Return) //
|
B(Return) //
|
||||||
},
|
},
|
||||||
1,
|
1,
|
||||||
@ -1752,36 +1655,12 @@ TEST(LoadGlobal) {
|
|||||||
B(StackCheck), //
|
B(StackCheck), //
|
||||||
B(Ldar), A(1, 2), //
|
B(Ldar), A(1, 2), //
|
||||||
B(Star), R(0), //
|
B(Star), R(0), //
|
||||||
B(LoadICSloppy), R(0), U8(0), U8(wide_idx_1 += 2), //
|
B(LoadIC), R(0), U8(0), U8(wide_idx_1 += 2), //
|
||||||
REPEAT_127(COMMA, //
|
REPEAT_127(COMMA, //
|
||||||
B(Ldar), A(1, 2), //
|
B(Ldar), A(1, 2), //
|
||||||
B(Star), R(0), //
|
B(Star), R(0), //
|
||||||
B(LoadICSloppy), R(0), U8(0), U8(wide_idx_1 += 2)), //
|
B(LoadIC), R(0), U8(0), U8(wide_idx_1 += 2)), //
|
||||||
B(LdaGlobalSloppyWide), U16(1), U16(wide_idx_1 + 2), //
|
B(LdaGlobalWide), U16(1), U16(wide_idx_1 + 2), //
|
||||||
B(Return), //
|
|
||||||
},
|
|
||||||
2,
|
|
||||||
{"name", "a"}},
|
|
||||||
{"a = 1;"
|
|
||||||
"function f(b) {\n"
|
|
||||||
" 'use strict';\n"
|
|
||||||
" b.name\n"
|
|
||||||
REPEAT_127(SPACE, "b.name; ")
|
|
||||||
" return a;"
|
|
||||||
"}\nf({name: 1});",
|
|
||||||
kPointerSize,
|
|
||||||
2,
|
|
||||||
1031,
|
|
||||||
{
|
|
||||||
B(StackCheck), //
|
|
||||||
B(Ldar), A(1, 2), //
|
|
||||||
B(Star), R(0), //
|
|
||||||
B(LoadICStrict), R(0), U8(0), U8(wide_idx_2 += 2), //
|
|
||||||
REPEAT_127(COMMA, //
|
|
||||||
B(Ldar), A(1, 2), //
|
|
||||||
B(Star), R(0), //
|
|
||||||
B(LoadICStrict), R(0), U8(0), U8(wide_idx_2 += 2)), //
|
|
||||||
B(LdaGlobalStrictWide), U16(1), U16(wide_idx_2 + 2), //
|
|
||||||
B(Return), //
|
B(Return), //
|
||||||
},
|
},
|
||||||
2,
|
2,
|
||||||
@ -1879,11 +1758,11 @@ TEST(StoreGlobal) {
|
|||||||
B(StackCheck), //
|
B(StackCheck), //
|
||||||
B(Ldar), A(1, 2), //
|
B(Ldar), A(1, 2), //
|
||||||
B(Star), R(0), //
|
B(Star), R(0), //
|
||||||
B(LoadICSloppy), R(0), U8(0), U8(wide_idx_1 += 2), //
|
B(LoadIC), R(0), U8(0), U8(wide_idx_1 += 2), //
|
||||||
REPEAT_127(COMMA, //
|
REPEAT_127(COMMA, //
|
||||||
B(Ldar), A(1, 2), //
|
B(Ldar), A(1, 2), //
|
||||||
B(Star), R(0), //
|
B(Star), R(0), //
|
||||||
B(LoadICSloppy), R(0), U8(0), U8(wide_idx_1 += 2)), //
|
B(LoadIC), R(0), U8(0), U8(wide_idx_1 += 2)), //
|
||||||
B(LdaSmi8), U8(2), //
|
B(LdaSmi8), U8(2), //
|
||||||
B(StaGlobalSloppyWide), U16(1), U16(wide_idx_1 + 2), //
|
B(StaGlobalSloppyWide), U16(1), U16(wide_idx_1 + 2), //
|
||||||
B(LdaUndefined), //
|
B(LdaUndefined), //
|
||||||
@ -1905,11 +1784,11 @@ TEST(StoreGlobal) {
|
|||||||
B(StackCheck), //
|
B(StackCheck), //
|
||||||
B(Ldar), A(1, 2), //
|
B(Ldar), A(1, 2), //
|
||||||
B(Star), R(0), //
|
B(Star), R(0), //
|
||||||
B(LoadICStrict), R(0), U8(0), U8(wide_idx_2 += 2), //
|
B(LoadIC), R(0), U8(0), U8(wide_idx_2 += 2), //
|
||||||
REPEAT_127(COMMA, //
|
REPEAT_127(COMMA, //
|
||||||
B(Ldar), A(1, 2), //
|
B(Ldar), A(1, 2), //
|
||||||
B(Star), R(0), //
|
B(Star), R(0), //
|
||||||
B(LoadICStrict), R(0), U8(0), U8(wide_idx_2 += 2)), //
|
B(LoadIC), R(0), U8(0), U8(wide_idx_2 += 2)), //
|
||||||
B(LdaSmi8), U8(2), //
|
B(LdaSmi8), U8(2), //
|
||||||
B(StaGlobalStrictWide), U16(1), U16(wide_idx_2 + 2), //
|
B(StaGlobalStrictWide), U16(1), U16(wide_idx_2 + 2), //
|
||||||
B(LdaUndefined), //
|
B(LdaUndefined), //
|
||||||
@ -1950,7 +1829,7 @@ TEST(CallGlobal) {
|
|||||||
B(StackCheck), //
|
B(StackCheck), //
|
||||||
B(LdaUndefined), //
|
B(LdaUndefined), //
|
||||||
B(Star), R(1), //
|
B(Star), R(1), //
|
||||||
B(LdaGlobalSloppy), U8(0), U8(vector->GetIndex(slot2)), //
|
B(LdaGlobal), U8(0), U8(vector->GetIndex(slot2)), //
|
||||||
B(Star), R(0), //
|
B(Star), R(0), //
|
||||||
B(Call), R(0), R(1), U8(1), U8(vector->GetIndex(slot1)), //
|
B(Call), R(0), R(1), U8(1), U8(vector->GetIndex(slot1)), //
|
||||||
B(Return) //
|
B(Return) //
|
||||||
@ -1965,7 +1844,7 @@ TEST(CallGlobal) {
|
|||||||
B(StackCheck), //
|
B(StackCheck), //
|
||||||
B(LdaUndefined), //
|
B(LdaUndefined), //
|
||||||
B(Star), R(1), //
|
B(Star), R(1), //
|
||||||
B(LdaGlobalSloppy), U8(0), U8(vector->GetIndex(slot2)), //
|
B(LdaGlobal), U8(0), U8(vector->GetIndex(slot2)), //
|
||||||
B(Star), R(0), //
|
B(Star), R(0), //
|
||||||
B(LdaSmi8), U8(1), //
|
B(LdaSmi8), U8(1), //
|
||||||
B(Star), R(2), //
|
B(Star), R(2), //
|
||||||
@ -2419,8 +2298,7 @@ TEST(DeclareGlobals) {
|
|||||||
B(StackCheck), //
|
B(StackCheck), //
|
||||||
B(LdaUndefined), //
|
B(LdaUndefined), //
|
||||||
B(Star), R(2), //
|
B(Star), R(2), //
|
||||||
B(LdaGlobalSloppy), U8(1), //
|
B(LdaGlobal), U8(1), U8(load_vector->GetIndex(load_slot_1)), //
|
||||||
/* */ U8(load_vector->GetIndex(load_slot_1)), //
|
|
||||||
B(Star), R(1), //
|
B(Star), R(1), //
|
||||||
B(Call), R(1), R(2), U8(1), //
|
B(Call), R(1), R(2), U8(1), //
|
||||||
/* */ U8(load_vector->GetIndex(call_slot_1)), //
|
/* */ U8(load_vector->GetIndex(call_slot_1)), //
|
||||||
@ -3659,28 +3537,10 @@ TEST(Typeof) {
|
|||||||
1,
|
1,
|
||||||
6,
|
6,
|
||||||
{
|
{
|
||||||
B(StackCheck), //
|
B(StackCheck), //
|
||||||
B(LdaGlobalInsideTypeofSloppy), U8(0), //
|
B(LdaGlobalInsideTypeof), U8(0), U8(vector->GetIndex(slot)), //
|
||||||
/* */ U8(vector->GetIndex(slot)), //
|
B(TypeOf), //
|
||||||
B(TypeOf), //
|
B(Return), //
|
||||||
B(Return), //
|
|
||||||
},
|
|
||||||
1,
|
|
||||||
{"x"}},
|
|
||||||
{"var x = 13;\n"
|
|
||||||
"function f() {\n"
|
|
||||||
" 'use strict';\n"
|
|
||||||
" return typeof(x);\n"
|
|
||||||
"}; f();",
|
|
||||||
0,
|
|
||||||
1,
|
|
||||||
6,
|
|
||||||
{
|
|
||||||
B(StackCheck), //
|
|
||||||
B(LdaGlobalInsideTypeofStrict), U8(0), //
|
|
||||||
/* */ U8(vector->GetIndex(slot)), //
|
|
||||||
B(TypeOf), //
|
|
||||||
B(Return), //
|
|
||||||
},
|
},
|
||||||
1,
|
1,
|
||||||
{"x"}},
|
{"x"}},
|
||||||
@ -3825,7 +3685,7 @@ TEST(GlobalDelete) {
|
|||||||
1,
|
1,
|
||||||
11,
|
11,
|
||||||
{B(StackCheck), //
|
{B(StackCheck), //
|
||||||
B(LdaGlobalSloppy), U8(0), U8(vector->GetIndex(slot)), //
|
B(LdaGlobal), U8(0), U8(vector->GetIndex(slot)), //
|
||||||
B(Star), R(0), //
|
B(Star), R(0), //
|
||||||
B(LdaConstant), U8(1), //
|
B(LdaConstant), U8(1), //
|
||||||
B(DeletePropertySloppy), R(0), //
|
B(DeletePropertySloppy), R(0), //
|
||||||
@ -3839,7 +3699,7 @@ TEST(GlobalDelete) {
|
|||||||
1,
|
1,
|
||||||
11,
|
11,
|
||||||
{B(StackCheck), //
|
{B(StackCheck), //
|
||||||
B(LdaGlobalStrict), U8(0), U8(vector->GetIndex(slot)), //
|
B(LdaGlobal), U8(0), U8(vector->GetIndex(slot)), //
|
||||||
B(Star), R(0), //
|
B(Star), R(0), //
|
||||||
B(LdaSmi8), U8(1), //
|
B(LdaSmi8), U8(1), //
|
||||||
B(DeletePropertyStrict), R(0), //
|
B(DeletePropertyStrict), R(0), //
|
||||||
@ -3997,7 +3857,7 @@ TEST(RegExpLiterals) {
|
|||||||
B(StackCheck), //
|
B(StackCheck), //
|
||||||
B(CreateRegExpLiteral), U8(0), U8(0), U8(0), //
|
B(CreateRegExpLiteral), U8(0), U8(0), U8(0), //
|
||||||
B(Star), R(1), //
|
B(Star), R(1), //
|
||||||
B(LoadICSloppy), R(1), U8(1), U8(vector->GetIndex(slot2)), //
|
B(LoadIC), R(1), U8(1), U8(vector->GetIndex(slot2)), //
|
||||||
B(Star), R(0), //
|
B(Star), R(0), //
|
||||||
B(LdaConstant), U8(2), //
|
B(LdaConstant), U8(2), //
|
||||||
B(Star), R(2), //
|
B(Star), R(2), //
|
||||||
@ -5036,7 +4896,7 @@ TEST(CallNew) {
|
|||||||
11,
|
11,
|
||||||
{
|
{
|
||||||
B(StackCheck), //
|
B(StackCheck), //
|
||||||
B(LdaGlobalSloppy), U8(0), U8(vector->GetIndex(slot2)), //
|
B(LdaGlobal), U8(0), U8(vector->GetIndex(slot2)), //
|
||||||
B(Star), R(0), //
|
B(Star), R(0), //
|
||||||
B(New), R(0), R(0), U8(0), //
|
B(New), R(0), R(0), U8(0), //
|
||||||
B(Return), //
|
B(Return), //
|
||||||
@ -5051,7 +4911,7 @@ TEST(CallNew) {
|
|||||||
17,
|
17,
|
||||||
{
|
{
|
||||||
B(StackCheck), //
|
B(StackCheck), //
|
||||||
B(LdaGlobalSloppy), U8(0), U8(vector->GetIndex(slot2)), //
|
B(LdaGlobal), U8(0), U8(vector->GetIndex(slot2)), //
|
||||||
B(Star), R(0), //
|
B(Star), R(0), //
|
||||||
B(LdaSmi8), U8(3), //
|
B(LdaSmi8), U8(3), //
|
||||||
B(Star), R(1), //
|
B(Star), R(1), //
|
||||||
@ -5074,7 +4934,7 @@ TEST(CallNew) {
|
|||||||
25,
|
25,
|
||||||
{
|
{
|
||||||
B(StackCheck), //
|
B(StackCheck), //
|
||||||
B(LdaGlobalSloppy), U8(0), U8(vector->GetIndex(slot2)), //
|
B(LdaGlobal), U8(0), U8(vector->GetIndex(slot2)), //
|
||||||
B(Star), R(0), //
|
B(Star), R(0), //
|
||||||
B(LdaSmi8), U8(3), //
|
B(LdaSmi8), U8(3), //
|
||||||
B(Star), R(1), //
|
B(Star), R(1), //
|
||||||
@ -5244,7 +5104,7 @@ TEST(ContextVariables) {
|
|||||||
B(StaContextSlot), R(context), U8(wide_slot++)), //
|
B(StaContextSlot), R(context), U8(wide_slot++)), //
|
||||||
B(LdaUndefined), //
|
B(LdaUndefined), //
|
||||||
B(Star), R(2), //
|
B(Star), R(2), //
|
||||||
B(LdaGlobalStrict), U8(0), U8(1), //
|
B(LdaGlobal), U8(0), U8(1), //
|
||||||
B(Star), R(1), //
|
B(Star), R(1), //
|
||||||
B(Call), R(1), R(2), U8(1), U8(0), //
|
B(Call), R(1), R(2), U8(1), U8(0), //
|
||||||
B(LdaSmi8), U8(100), //
|
B(LdaSmi8), U8(100), //
|
||||||
@ -5514,7 +5374,7 @@ TEST(CountOperators) {
|
|||||||
B(Star), R(1), //
|
B(Star), R(1), //
|
||||||
B(Star), R(0), //
|
B(Star), R(0), //
|
||||||
B(Star), R(1), //
|
B(Star), R(1), //
|
||||||
B(LoadICSloppy), R(1), U8(1), U8(vector->GetIndex(slot1)), //
|
B(LoadIC), R(1), U8(1), U8(vector->GetIndex(slot1)), //
|
||||||
B(ToNumber), //
|
B(ToNumber), //
|
||||||
B(Star), R(2), //
|
B(Star), R(2), //
|
||||||
B(Inc), //
|
B(Inc), //
|
||||||
@ -5535,7 +5395,7 @@ TEST(CountOperators) {
|
|||||||
B(Star), R(1), //
|
B(Star), R(1), //
|
||||||
B(Star), R(0), //
|
B(Star), R(0), //
|
||||||
B(Star), R(1), //
|
B(Star), R(1), //
|
||||||
B(LoadICSloppy), R(1), U8(1), U8(vector->GetIndex(slot1)), //
|
B(LoadIC), R(1), U8(1), U8(vector->GetIndex(slot1)), //
|
||||||
B(ToNumber), //
|
B(ToNumber), //
|
||||||
B(Dec), //
|
B(Dec), //
|
||||||
B(StoreICSloppy), R(1), U8(1), U8(vector->GetIndex(slot2)), //
|
B(StoreICSloppy), R(1), U8(1), U8(vector->GetIndex(slot2)), //
|
||||||
@ -5558,7 +5418,7 @@ TEST(CountOperators) {
|
|||||||
B(Star), R(2), //
|
B(Star), R(2), //
|
||||||
B(Ldar), R(0), //
|
B(Ldar), R(0), //
|
||||||
B(Star), R(3), //
|
B(Star), R(3), //
|
||||||
B(KeyedLoadICSloppy), R(2), U8(vector->GetIndex(slot1)), //
|
B(KeyedLoadIC), R(2), U8(vector->GetIndex(slot1)), //
|
||||||
B(ToNumber), //
|
B(ToNumber), //
|
||||||
B(Star), R(4), //
|
B(Star), R(4), //
|
||||||
B(Dec), //
|
B(Dec), //
|
||||||
@ -5583,7 +5443,7 @@ TEST(CountOperators) {
|
|||||||
B(Star), R(2), //
|
B(Star), R(2), //
|
||||||
B(Ldar), R(0), //
|
B(Ldar), R(0), //
|
||||||
B(Star), R(3), //
|
B(Star), R(3), //
|
||||||
B(KeyedLoadICSloppy), R(2), U8(vector->GetIndex(slot1)), //
|
B(KeyedLoadIC), R(2), U8(vector->GetIndex(slot1)), //
|
||||||
B(ToNumber), //
|
B(ToNumber), //
|
||||||
B(Inc), //
|
B(Inc), //
|
||||||
B(KeyedStoreICSloppy), R(2), R(3), U8(vector->GetIndex(slot2)), //
|
B(KeyedStoreICSloppy), R(2), R(3), U8(vector->GetIndex(slot2)), //
|
||||||
@ -5690,7 +5550,7 @@ TEST(GlobalCountOperators) {
|
|||||||
10,
|
10,
|
||||||
{
|
{
|
||||||
B(StackCheck), //
|
B(StackCheck), //
|
||||||
B(LdaGlobalSloppy), U8(0), U8(vector->GetIndex(slot1)), //
|
B(LdaGlobal), U8(0), U8(vector->GetIndex(slot1)), //
|
||||||
B(ToNumber), //
|
B(ToNumber), //
|
||||||
B(Inc), //
|
B(Inc), //
|
||||||
B(StaGlobalSloppy), U8(0), U8(vector->GetIndex(slot2)), //
|
B(StaGlobalSloppy), U8(0), U8(vector->GetIndex(slot2)), //
|
||||||
@ -5704,7 +5564,7 @@ TEST(GlobalCountOperators) {
|
|||||||
14,
|
14,
|
||||||
{
|
{
|
||||||
B(StackCheck), //
|
B(StackCheck), //
|
||||||
B(LdaGlobalSloppy), U8(0), U8(vector->GetIndex(slot1)), //
|
B(LdaGlobal), U8(0), U8(vector->GetIndex(slot1)), //
|
||||||
B(ToNumber), //
|
B(ToNumber), //
|
||||||
B(Star), R(0), //
|
B(Star), R(0), //
|
||||||
B(Dec), //
|
B(Dec), //
|
||||||
@ -5721,7 +5581,7 @@ TEST(GlobalCountOperators) {
|
|||||||
10,
|
10,
|
||||||
{
|
{
|
||||||
B(StackCheck), //
|
B(StackCheck), //
|
||||||
B(LdaGlobalStrict), U8(0), U8(vector->GetIndex(slot1)), //
|
B(LdaGlobal), U8(0), U8(vector->GetIndex(slot1)), //
|
||||||
B(ToNumber), //
|
B(ToNumber), //
|
||||||
B(Dec), //
|
B(Dec), //
|
||||||
B(StaGlobalStrict), U8(0), U8(vector->GetIndex(slot2)), //
|
B(StaGlobalStrict), U8(0), U8(vector->GetIndex(slot2)), //
|
||||||
@ -5735,7 +5595,7 @@ TEST(GlobalCountOperators) {
|
|||||||
14,
|
14,
|
||||||
{
|
{
|
||||||
B(StackCheck), //
|
B(StackCheck), //
|
||||||
B(LdaGlobalSloppy), U8(0), U8(vector->GetIndex(slot1)), //
|
B(LdaGlobal), U8(0), U8(vector->GetIndex(slot1)), //
|
||||||
B(ToNumber), //
|
B(ToNumber), //
|
||||||
B(Star), R(0), //
|
B(Star), R(0), //
|
||||||
B(Inc), //
|
B(Inc), //
|
||||||
@ -5817,7 +5677,7 @@ TEST(CompoundExpressions) {
|
|||||||
B(Star), R(1), //
|
B(Star), R(1), //
|
||||||
B(Star), R(0), //
|
B(Star), R(0), //
|
||||||
B(Star), R(1), //
|
B(Star), R(1), //
|
||||||
B(LoadICSloppy), R(1), U8(1), U8(vector->GetIndex(slot1)), //
|
B(LoadIC), R(1), U8(1), U8(vector->GetIndex(slot1)), //
|
||||||
B(Star), R(2), //
|
B(Star), R(2), //
|
||||||
B(LdaSmi8), U8(2), //
|
B(LdaSmi8), U8(2), //
|
||||||
B(Mul), R(2), //
|
B(Mul), R(2), //
|
||||||
@ -5840,7 +5700,7 @@ TEST(CompoundExpressions) {
|
|||||||
B(Star), R(1), //
|
B(Star), R(1), //
|
||||||
B(LdaSmi8), U8(1), //
|
B(LdaSmi8), U8(1), //
|
||||||
B(Star), R(2), //
|
B(Star), R(2), //
|
||||||
B(KeyedLoadICSloppy), R(1), U8(vector->GetIndex(slot1)), //
|
B(KeyedLoadIC), R(1), U8(vector->GetIndex(slot1)), //
|
||||||
B(Star), R(3), //
|
B(Star), R(3), //
|
||||||
B(LdaSmi8), U8(2), //
|
B(LdaSmi8), U8(2), //
|
||||||
B(BitwiseXor), R(3), //
|
B(BitwiseXor), R(3), //
|
||||||
@ -5903,7 +5763,7 @@ TEST(GlobalCompoundExpressions) {
|
|||||||
14,
|
14,
|
||||||
{
|
{
|
||||||
B(StackCheck), //
|
B(StackCheck), //
|
||||||
B(LdaGlobalSloppy), U8(0), U8(vector->GetIndex(slot1)), //
|
B(LdaGlobal), U8(0), U8(vector->GetIndex(slot1)), //
|
||||||
B(Star), R(0), //
|
B(Star), R(0), //
|
||||||
B(LdaSmi8), U8(1), //
|
B(LdaSmi8), U8(1), //
|
||||||
B(BitwiseAnd), R(0), //
|
B(BitwiseAnd), R(0), //
|
||||||
@ -5918,7 +5778,7 @@ TEST(GlobalCompoundExpressions) {
|
|||||||
14,
|
14,
|
||||||
{
|
{
|
||||||
B(StackCheck), //
|
B(StackCheck), //
|
||||||
B(LdaGlobalSloppy), U8(0), U8(vector->GetIndex(slot1)), //
|
B(LdaGlobal), U8(0), U8(vector->GetIndex(slot1)), //
|
||||||
B(Star), R(0), //
|
B(Star), R(0), //
|
||||||
B(LdaSmi8), U8(1), //
|
B(LdaSmi8), U8(1), //
|
||||||
B(Add), R(0), //
|
B(Add), R(0), //
|
||||||
@ -5977,7 +5837,7 @@ TEST(CreateArguments) {
|
|||||||
B(Ldar), R(0), //
|
B(Ldar), R(0), //
|
||||||
B(Star), R(1), //
|
B(Star), R(1), //
|
||||||
B(LdaZero), //
|
B(LdaZero), //
|
||||||
B(KeyedLoadICSloppy), R(1), U8(vector->GetIndex(slot)), //
|
B(KeyedLoadIC), R(1), U8(vector->GetIndex(slot)), //
|
||||||
B(Return), //
|
B(Return), //
|
||||||
}},
|
}},
|
||||||
{"function f() { 'use strict'; return arguments; }",
|
{"function f() { 'use strict'; return arguments; }",
|
||||||
@ -6007,7 +5867,7 @@ TEST(CreateArguments) {
|
|||||||
B(Ldar), R(0), //
|
B(Ldar), R(0), //
|
||||||
B(Star), R(2), //
|
B(Star), R(2), //
|
||||||
B(LdaZero), //
|
B(LdaZero), //
|
||||||
B(KeyedLoadICSloppy), R(2), U8(vector->GetIndex(slot)), //
|
B(KeyedLoadIC), R(2), U8(vector->GetIndex(slot)), //
|
||||||
B(Return), //
|
B(Return), //
|
||||||
}},
|
}},
|
||||||
{"function f(a, b, c) { return arguments; }",
|
{"function f(a, b, c) { return arguments; }",
|
||||||
@ -6110,7 +5970,7 @@ TEST(CreateRestParameter) {
|
|||||||
B(Ldar), R(0), //
|
B(Ldar), R(0), //
|
||||||
B(Star), R(2), //
|
B(Star), R(2), //
|
||||||
B(LdaZero), //
|
B(LdaZero), //
|
||||||
B(KeyedLoadICSloppy), R(2), U8(vector->GetIndex(slot)), //
|
B(KeyedLoadIC), R(2), U8(vector->GetIndex(slot)), //
|
||||||
B(Return), //
|
B(Return), //
|
||||||
},
|
},
|
||||||
0,
|
0,
|
||||||
@ -6132,12 +5992,12 @@ TEST(CreateRestParameter) {
|
|||||||
B(Ldar), R(1), //
|
B(Ldar), R(1), //
|
||||||
B(Star), R(3), //
|
B(Star), R(3), //
|
||||||
B(LdaZero), //
|
B(LdaZero), //
|
||||||
B(KeyedLoadICSloppy), R(3), U8(vector->GetIndex(slot)), //
|
B(KeyedLoadIC), R(3), U8(vector->GetIndex(slot)), //
|
||||||
B(Star), R(4), //
|
B(Star), R(4), //
|
||||||
B(Ldar), R(0), //
|
B(Ldar), R(0), //
|
||||||
B(Star), R(3), //
|
B(Star), R(3), //
|
||||||
B(LdaZero), //
|
B(LdaZero), //
|
||||||
B(KeyedLoadICSloppy), R(3), U8(vector->GetIndex(slot1)), //
|
B(KeyedLoadIC), R(3), U8(vector->GetIndex(slot1)), //
|
||||||
B(Add), R(4), //
|
B(Add), R(4), //
|
||||||
B(Return), //
|
B(Return), //
|
||||||
},
|
},
|
||||||
@ -6350,7 +6210,7 @@ TEST(ForIn) {
|
|||||||
B(StackCheck), //
|
B(StackCheck), //
|
||||||
B(Ldar), R(0), //
|
B(Ldar), R(0), //
|
||||||
B(Star), R(6), //
|
B(Star), R(6), //
|
||||||
B(LoadICSloppy), R(6), U8(2), U8(vector->GetIndex(slot2)), //
|
B(LoadIC), R(6), U8(2), U8(vector->GetIndex(slot2)), //
|
||||||
B(Star), R(7), //
|
B(Star), R(7), //
|
||||||
B(LdaSmi8), U8(10), //
|
B(LdaSmi8), U8(10), //
|
||||||
B(TestEqual), R(7), //
|
B(TestEqual), R(7), //
|
||||||
@ -6358,7 +6218,7 @@ TEST(ForIn) {
|
|||||||
B(Jump), U8(20), //
|
B(Jump), U8(20), //
|
||||||
B(Ldar), R(0), //
|
B(Ldar), R(0), //
|
||||||
B(Star), R(6), //
|
B(Star), R(6), //
|
||||||
B(LoadICSloppy), R(6), U8(2), U8(vector->GetIndex(slot3)), //
|
B(LoadIC), R(6), U8(2), U8(vector->GetIndex(slot3)), //
|
||||||
B(Star), R(7), //
|
B(Star), R(7), //
|
||||||
B(LdaSmi8), U8(20), //
|
B(LdaSmi8), U8(20), //
|
||||||
B(TestEqual), R(7), //
|
B(TestEqual), R(7), //
|
||||||
@ -6406,7 +6266,7 @@ TEST(ForIn) {
|
|||||||
B(Ldar), R(0), //
|
B(Ldar), R(0), //
|
||||||
B(Star), R(6), //
|
B(Star), R(6), //
|
||||||
B(LdaSmi8), U8(3), //
|
B(LdaSmi8), U8(3), //
|
||||||
B(KeyedLoadICSloppy), R(6), U8(vector->GetIndex(slot2)), //
|
B(KeyedLoadIC), R(6), U8(vector->GetIndex(slot2)), //
|
||||||
B(Return), //
|
B(Return), //
|
||||||
B(ForInStep), R(5), //
|
B(ForInStep), R(5), //
|
||||||
B(Star), R(5), //
|
B(Star), R(5), //
|
||||||
@ -6460,13 +6320,13 @@ TEST(ForOf) {
|
|||||||
B(CreateArrayLiteral), U8(0), U8(0), U8(array_literal_flags), //
|
B(CreateArrayLiteral), U8(0), U8(0), U8(array_literal_flags), //
|
||||||
B(Star), R(5), //
|
B(Star), R(5), //
|
||||||
B(LdaConstant), U8(1), //
|
B(LdaConstant), U8(1), //
|
||||||
B(KeyedLoadICSloppy), R(5), U8(vector->GetIndex(slot2)), //
|
B(KeyedLoadIC), R(5), U8(vector->GetIndex(slot2)), //
|
||||||
B(Star), R(4), //
|
B(Star), R(4), //
|
||||||
B(Call), R(4), R(5), U8(1), U8(vector->GetIndex(slot1)), //
|
B(Call), R(4), R(5), U8(1), U8(vector->GetIndex(slot1)), //
|
||||||
B(Star), R(1), //
|
B(Star), R(1), //
|
||||||
B(Ldar), R(1), //
|
B(Ldar), R(1), //
|
||||||
B(Star), R(6), //
|
B(Star), R(6), //
|
||||||
B(LoadICSloppy), R(6), U8(2), U8(vector->GetIndex(slot4)), //
|
B(LoadIC), R(6), U8(2), U8(vector->GetIndex(slot4)), //
|
||||||
B(Star), R(5), //
|
B(Star), R(5), //
|
||||||
B(Call), R(5), R(6), U8(1), U8(vector->GetIndex(slot3)), //
|
B(Call), R(5), R(6), U8(1), U8(vector->GetIndex(slot3)), //
|
||||||
B(Star), R(2), //
|
B(Star), R(2), //
|
||||||
@ -6480,11 +6340,11 @@ TEST(ForOf) {
|
|||||||
/* */ R(4), U8(1), //
|
/* */ R(4), U8(1), //
|
||||||
B(Ldar), R(2), //
|
B(Ldar), R(2), //
|
||||||
B(Star), R(4), //
|
B(Star), R(4), //
|
||||||
B(LoadICSloppy), R(4), U8(3), U8(vector->GetIndex(slot5)), //
|
B(LoadIC), R(4), U8(3), U8(vector->GetIndex(slot5)), //
|
||||||
B(JumpIfToBooleanTrue), U8(19), //
|
B(JumpIfToBooleanTrue), U8(19), //
|
||||||
B(Ldar), R(2), //
|
B(Ldar), R(2), //
|
||||||
B(Star), R(4), //
|
B(Star), R(4), //
|
||||||
B(LoadICSloppy), R(4), U8(4), U8(vector->GetIndex(slot6)), //
|
B(LoadIC), R(4), U8(4), U8(vector->GetIndex(slot6)), //
|
||||||
B(Star), R(0), //
|
B(Star), R(0), //
|
||||||
B(StackCheck), //
|
B(StackCheck), //
|
||||||
B(Ldar), R(0), //
|
B(Ldar), R(0), //
|
||||||
@ -6509,13 +6369,13 @@ TEST(ForOf) {
|
|||||||
B(Star), R(3), //
|
B(Star), R(3), //
|
||||||
B(Star), R(6), //
|
B(Star), R(6), //
|
||||||
B(LdaConstant), U8(1), //
|
B(LdaConstant), U8(1), //
|
||||||
B(KeyedLoadICSloppy), R(6), U8(vector->GetIndex(slot2)), //
|
B(KeyedLoadIC), R(6), U8(vector->GetIndex(slot2)), //
|
||||||
B(Star), R(5), //
|
B(Star), R(5), //
|
||||||
B(Call), R(5), R(6), U8(1), U8(vector->GetIndex(slot1)), //
|
B(Call), R(5), R(6), U8(1), U8(vector->GetIndex(slot1)), //
|
||||||
B(Star), R(1), //
|
B(Star), R(1), //
|
||||||
B(Ldar), R(1), //
|
B(Ldar), R(1), //
|
||||||
B(Star), R(7), //
|
B(Star), R(7), //
|
||||||
B(LoadICSloppy), R(7), U8(2), U8(vector->GetIndex(slot4)), //
|
B(LoadIC), R(7), U8(2), U8(vector->GetIndex(slot4)), //
|
||||||
B(Star), R(6), //
|
B(Star), R(6), //
|
||||||
B(Call), R(6), R(7), U8(1), U8(vector->GetIndex(slot3)), //
|
B(Call), R(6), R(7), U8(1), U8(vector->GetIndex(slot3)), //
|
||||||
B(Star), R(2), //
|
B(Star), R(2), //
|
||||||
@ -6529,11 +6389,11 @@ TEST(ForOf) {
|
|||||||
/* */ R(5), U8(1), //
|
/* */ R(5), U8(1), //
|
||||||
B(Ldar), R(2), //
|
B(Ldar), R(2), //
|
||||||
B(Star), R(5), //
|
B(Star), R(5), //
|
||||||
B(LoadICSloppy), R(5), U8(3), U8(vector->GetIndex(slot5)), //
|
B(LoadIC), R(5), U8(3), U8(vector->GetIndex(slot5)), //
|
||||||
B(JumpIfToBooleanTrue), U8(18), //
|
B(JumpIfToBooleanTrue), U8(18), //
|
||||||
B(Ldar), R(2), //
|
B(Ldar), R(2), //
|
||||||
B(Star), R(5), //
|
B(Star), R(5), //
|
||||||
B(LoadICSloppy), R(5), U8(4), U8(vector->GetIndex(slot6)), //
|
B(LoadIC), R(5), U8(4), U8(vector->GetIndex(slot6)), //
|
||||||
B(Star), R(0), //
|
B(Star), R(0), //
|
||||||
B(StackCheck), //
|
B(StackCheck), //
|
||||||
B(Ldar), R(0), //
|
B(Ldar), R(0), //
|
||||||
@ -6560,13 +6420,13 @@ TEST(ForOf) {
|
|||||||
B(CreateArrayLiteral), U8(0), U8(0), U8(array_literal_flags), //
|
B(CreateArrayLiteral), U8(0), U8(0), U8(array_literal_flags), //
|
||||||
B(Star), R(5), //
|
B(Star), R(5), //
|
||||||
B(LdaConstant), U8(1), //
|
B(LdaConstant), U8(1), //
|
||||||
B(KeyedLoadICSloppy), R(5), U8(vector->GetIndex(slot2)), //
|
B(KeyedLoadIC), R(5), U8(vector->GetIndex(slot2)), //
|
||||||
B(Star), R(4), //
|
B(Star), R(4), //
|
||||||
B(Call), R(4), R(5), U8(1), U8(vector->GetIndex(slot1)), //
|
B(Call), R(4), R(5), U8(1), U8(vector->GetIndex(slot1)), //
|
||||||
B(Star), R(1), //
|
B(Star), R(1), //
|
||||||
B(Ldar), R(1), //
|
B(Ldar), R(1), //
|
||||||
B(Star), R(6), //
|
B(Star), R(6), //
|
||||||
B(LoadICSloppy), R(6), U8(2), U8(vector->GetIndex(slot4)), //
|
B(LoadIC), R(6), U8(2), U8(vector->GetIndex(slot4)), //
|
||||||
B(Star), R(5), //
|
B(Star), R(5), //
|
||||||
B(Call), R(5), R(6), U8(1), U8(vector->GetIndex(slot3)), //
|
B(Call), R(5), R(6), U8(1), U8(vector->GetIndex(slot3)), //
|
||||||
B(Star), R(2), //
|
B(Star), R(2), //
|
||||||
@ -6580,11 +6440,11 @@ TEST(ForOf) {
|
|||||||
/* */ R(4), U8(1), //
|
/* */ R(4), U8(1), //
|
||||||
B(Ldar), R(2), //
|
B(Ldar), R(2), //
|
||||||
B(Star), R(4), //
|
B(Star), R(4), //
|
||||||
B(LoadICSloppy), R(4), U8(3), U8(vector->GetIndex(slot5)), //
|
B(LoadIC), R(4), U8(3), U8(vector->GetIndex(slot5)), //
|
||||||
B(JumpIfToBooleanTrue), U8(41), //
|
B(JumpIfToBooleanTrue), U8(41), //
|
||||||
B(Ldar), R(2), //
|
B(Ldar), R(2), //
|
||||||
B(Star), R(4), //
|
B(Star), R(4), //
|
||||||
B(LoadICSloppy), R(4), U8(4), U8(vector->GetIndex(slot6)), //
|
B(LoadIC), R(4), U8(4), U8(vector->GetIndex(slot6)), //
|
||||||
B(Star), R(0), //
|
B(Star), R(0), //
|
||||||
B(StackCheck), //
|
B(StackCheck), //
|
||||||
B(Ldar), R(0), //
|
B(Ldar), R(0), //
|
||||||
@ -6622,13 +6482,13 @@ TEST(ForOf) {
|
|||||||
B(CreateArrayLiteral), U8(1), U8(1), U8(array_literal_flags), //
|
B(CreateArrayLiteral), U8(1), U8(1), U8(array_literal_flags), //
|
||||||
B(Star), R(4), //
|
B(Star), R(4), //
|
||||||
B(LdaConstant), U8(2), //
|
B(LdaConstant), U8(2), //
|
||||||
B(KeyedLoadICSloppy), R(4), U8(vector->GetIndex(slot2)), //
|
B(KeyedLoadIC), R(4), U8(vector->GetIndex(slot2)), //
|
||||||
B(Star), R(3), //
|
B(Star), R(3), //
|
||||||
B(Call), R(3), R(4), U8(1), U8(vector->GetIndex(slot1)), //
|
B(Call), R(3), R(4), U8(1), U8(vector->GetIndex(slot1)), //
|
||||||
B(Star), R(0), //
|
B(Star), R(0), //
|
||||||
B(Ldar), R(0), //
|
B(Ldar), R(0), //
|
||||||
B(Star), R(5), //
|
B(Star), R(5), //
|
||||||
B(LoadICSloppy), R(5), U8(3), U8(vector->GetIndex(slot4)), //
|
B(LoadIC), R(5), U8(3), U8(vector->GetIndex(slot4)), //
|
||||||
B(Star), R(4), //
|
B(Star), R(4), //
|
||||||
B(Call), R(4), R(5), U8(1), U8(vector->GetIndex(slot3)), //
|
B(Call), R(4), R(5), U8(1), U8(vector->GetIndex(slot3)), //
|
||||||
B(Star), R(1), //
|
B(Star), R(1), //
|
||||||
@ -6642,18 +6502,18 @@ TEST(ForOf) {
|
|||||||
/* */ R(3), U8(1), //
|
/* */ R(3), U8(1), //
|
||||||
B(Ldar), R(1), //
|
B(Ldar), R(1), //
|
||||||
B(Star), R(3), //
|
B(Star), R(3), //
|
||||||
B(LoadICSloppy), R(3), U8(4), U8(vector->GetIndex(slot5)), //
|
B(LoadIC), R(3), U8(4), U8(vector->GetIndex(slot5)), //
|
||||||
B(JumpIfToBooleanTrue), U8(28), //
|
B(JumpIfToBooleanTrue), U8(28), //
|
||||||
B(Ldar), R(2), //
|
B(Ldar), R(2), //
|
||||||
B(Star), R(3), //
|
B(Star), R(3), //
|
||||||
B(Ldar), R(1), //
|
B(Ldar), R(1), //
|
||||||
B(Star), R(4), //
|
B(Star), R(4), //
|
||||||
B(LoadICSloppy), R(4), U8(5), U8(vector->GetIndex(slot6)), //
|
B(LoadIC), R(4), U8(5), U8(vector->GetIndex(slot6)), //
|
||||||
B(StoreICSloppy), R(3), U8(6), U8(vector->GetIndex(slot7)), //
|
B(StoreICSloppy), R(3), U8(6), U8(vector->GetIndex(slot7)), //
|
||||||
B(StackCheck), //
|
B(StackCheck), //
|
||||||
B(Ldar), R(2), //
|
B(Ldar), R(2), //
|
||||||
B(Star), R(3), //
|
B(Star), R(3), //
|
||||||
B(LoadICSloppy), R(3), U8(6), U8(vector->GetIndex(slot8)), //
|
B(LoadIC), R(3), U8(6), U8(vector->GetIndex(slot8)), //
|
||||||
B(Return), //
|
B(Return), //
|
||||||
B(LdaUndefined), //
|
B(LdaUndefined), //
|
||||||
B(Return), //
|
B(Return), //
|
||||||
@ -9040,7 +8900,7 @@ TEST(ClassDeclarations) {
|
|||||||
B(Star), R(5), //
|
B(Star), R(5), //
|
||||||
B(CallRuntime), U16(Runtime::kDefineClass), R(2), U8(4), //
|
B(CallRuntime), U16(Runtime::kDefineClass), R(2), U8(4), //
|
||||||
B(Star), R(2), //
|
B(Star), R(2), //
|
||||||
B(LoadICSloppy), R(2), U8(2), U8(1), //
|
B(LoadIC), R(2), U8(2), U8(1), //
|
||||||
B(Star), R(3), //
|
B(Star), R(3), //
|
||||||
B(Mov), R(3), R(4), //
|
B(Mov), R(3), R(4), //
|
||||||
B(LdaConstant), U8(3), //
|
B(LdaConstant), U8(3), //
|
||||||
@ -9086,7 +8946,7 @@ TEST(ClassDeclarations) {
|
|||||||
B(Star), R(5), //
|
B(Star), R(5), //
|
||||||
B(CallRuntime), U16(Runtime::kDefineClass), R(2), U8(4), //
|
B(CallRuntime), U16(Runtime::kDefineClass), R(2), U8(4), //
|
||||||
B(Star), R(2), //
|
B(Star), R(2), //
|
||||||
B(LoadICSloppy), R(2), U8(2), U8(1), //
|
B(LoadIC), R(2), U8(2), U8(1), //
|
||||||
B(Star), R(3), //
|
B(Star), R(3), //
|
||||||
B(Mov), R(3), R(4), //
|
B(Mov), R(3), R(4), //
|
||||||
B(LdaConstant), U8(3), //
|
B(LdaConstant), U8(3), //
|
||||||
@ -9141,7 +9001,7 @@ TEST(ClassDeclarations) {
|
|||||||
B(Star), R(6), //
|
B(Star), R(6), //
|
||||||
B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(4), //
|
B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(4), //
|
||||||
B(Star), R(3), //
|
B(Star), R(3), //
|
||||||
B(LoadICSloppy), R(3), U8(3), U8(1), //
|
B(LoadIC), R(3), U8(3), U8(1), //
|
||||||
B(Star), R(4), //
|
B(Star), R(4), //
|
||||||
B(Mov), R(4), R(5), //
|
B(Mov), R(4), R(5), //
|
||||||
B(LdaContextSlot), R(context), U8(4), //
|
B(LdaContextSlot), R(context), U8(4), //
|
||||||
@ -9207,7 +9067,7 @@ TEST(ClassDeclarations) {
|
|||||||
B(Star), R(6), //
|
B(Star), R(6), //
|
||||||
B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(4), //
|
B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(4), //
|
||||||
B(Star), R(3), //
|
B(Star), R(3), //
|
||||||
B(LoadICSloppy), R(3), U8(1), U8(1), //
|
B(LoadIC), R(3), U8(1), U8(1), //
|
||||||
B(Star), R(4), //
|
B(Star), R(4), //
|
||||||
B(CallRuntime), U16(Runtime::kFinalizeClassDefinition), R(3), U8(2), //
|
B(CallRuntime), U16(Runtime::kFinalizeClassDefinition), R(3), U8(2), //
|
||||||
B(Star), R(0), //
|
B(Star), R(0), //
|
||||||
|
@ -744,8 +744,7 @@ TEST(InterpreterLoadNamedProperty) {
|
|||||||
|
|
||||||
BytecodeArrayBuilder builder(handles.main_isolate(), handles.main_zone(), 1,
|
BytecodeArrayBuilder builder(handles.main_isolate(), handles.main_zone(), 1,
|
||||||
0, 0);
|
0, 0);
|
||||||
builder.LoadNamedProperty(builder.Parameter(0), name, vector->GetIndex(slot),
|
builder.LoadNamedProperty(builder.Parameter(0), name, vector->GetIndex(slot))
|
||||||
i::SLOPPY)
|
|
||||||
.Return();
|
.Return();
|
||||||
Handle<BytecodeArray> bytecode_array = builder.ToBytecodeArray();
|
Handle<BytecodeArray> bytecode_array = builder.ToBytecodeArray();
|
||||||
|
|
||||||
@ -799,8 +798,7 @@ TEST(InterpreterLoadKeyedProperty) {
|
|||||||
BytecodeArrayBuilder builder(handles.main_isolate(), handles.main_zone(), 1,
|
BytecodeArrayBuilder builder(handles.main_isolate(), handles.main_zone(), 1,
|
||||||
0, 1);
|
0, 1);
|
||||||
builder.LoadLiteral(key)
|
builder.LoadLiteral(key)
|
||||||
.LoadKeyedProperty(builder.Parameter(0), vector->GetIndex(slot),
|
.LoadKeyedProperty(builder.Parameter(0), vector->GetIndex(slot))
|
||||||
i::STRICT)
|
|
||||||
.Return();
|
.Return();
|
||||||
Handle<BytecodeArray> bytecode_array = builder.ToBytecodeArray();
|
Handle<BytecodeArray> bytecode_array = builder.ToBytecodeArray();
|
||||||
|
|
||||||
@ -951,7 +949,7 @@ TEST(InterpreterCall) {
|
|||||||
{
|
{
|
||||||
BytecodeArrayBuilder builder(handles.main_isolate(), handles.main_zone(), 1,
|
BytecodeArrayBuilder builder(handles.main_isolate(), handles.main_zone(), 1,
|
||||||
0, 1);
|
0, 1);
|
||||||
builder.LoadNamedProperty(builder.Parameter(0), name, slot_index, i::SLOPPY)
|
builder.LoadNamedProperty(builder.Parameter(0), name, slot_index)
|
||||||
.StoreAccumulatorInRegister(Register(0))
|
.StoreAccumulatorInRegister(Register(0))
|
||||||
.Call(Register(0), builder.Parameter(0), 1, 0)
|
.Call(Register(0), builder.Parameter(0), 1, 0)
|
||||||
.Return();
|
.Return();
|
||||||
@ -970,7 +968,7 @@ TEST(InterpreterCall) {
|
|||||||
{
|
{
|
||||||
BytecodeArrayBuilder builder(handles.main_isolate(), handles.main_zone(), 1,
|
BytecodeArrayBuilder builder(handles.main_isolate(), handles.main_zone(), 1,
|
||||||
0, 1);
|
0, 1);
|
||||||
builder.LoadNamedProperty(builder.Parameter(0), name, slot_index, i::SLOPPY)
|
builder.LoadNamedProperty(builder.Parameter(0), name, slot_index)
|
||||||
.StoreAccumulatorInRegister(Register(0))
|
.StoreAccumulatorInRegister(Register(0))
|
||||||
.Call(Register(0), builder.Parameter(0), 1, 0)
|
.Call(Register(0), builder.Parameter(0), 1, 0)
|
||||||
.Return();
|
.Return();
|
||||||
@ -992,7 +990,7 @@ TEST(InterpreterCall) {
|
|||||||
{
|
{
|
||||||
BytecodeArrayBuilder builder(handles.main_isolate(), handles.main_zone(), 1,
|
BytecodeArrayBuilder builder(handles.main_isolate(), handles.main_zone(), 1,
|
||||||
0, 4);
|
0, 4);
|
||||||
builder.LoadNamedProperty(builder.Parameter(0), name, slot_index, i::SLOPPY)
|
builder.LoadNamedProperty(builder.Parameter(0), name, slot_index)
|
||||||
.StoreAccumulatorInRegister(Register(0))
|
.StoreAccumulatorInRegister(Register(0))
|
||||||
.LoadAccumulatorWithRegister(builder.Parameter(0))
|
.LoadAccumulatorWithRegister(builder.Parameter(0))
|
||||||
.StoreAccumulatorInRegister(Register(1))
|
.StoreAccumulatorInRegister(Register(1))
|
||||||
@ -1019,7 +1017,7 @@ TEST(InterpreterCall) {
|
|||||||
{
|
{
|
||||||
BytecodeArrayBuilder builder(handles.main_isolate(), handles.main_zone(), 1,
|
BytecodeArrayBuilder builder(handles.main_isolate(), handles.main_zone(), 1,
|
||||||
0, 12);
|
0, 12);
|
||||||
builder.LoadNamedProperty(builder.Parameter(0), name, slot_index, i::SLOPPY)
|
builder.LoadNamedProperty(builder.Parameter(0), name, slot_index)
|
||||||
.StoreAccumulatorInRegister(Register(0))
|
.StoreAccumulatorInRegister(Register(0))
|
||||||
.LoadAccumulatorWithRegister(builder.Parameter(0))
|
.LoadAccumulatorWithRegister(builder.Parameter(0))
|
||||||
.StoreAccumulatorInRegister(Register(1))
|
.StoreAccumulatorInRegister(Register(1))
|
||||||
|
@ -122,12 +122,18 @@
|
|||||||
'debug-listbreakpoints': [PASS, NO_VARIANTS], # arm64 nosnap with turbofan
|
'debug-listbreakpoints': [PASS, NO_VARIANTS], # arm64 nosnap with turbofan
|
||||||
'debug-enable-disable-breakpoints': [PASS, NO_VARIANTS], #arm64 nosnap with turbofan.
|
'debug-enable-disable-breakpoints': [PASS, NO_VARIANTS], #arm64 nosnap with turbofan.
|
||||||
|
|
||||||
# TODO(rossberg)
|
# Issue 3956: Strong mode is deprecating. The expectations inside the
|
||||||
# TODO(mstarzinger): Strong mode is deprecating. The expectations inside the
|
|
||||||
# following tests should be updated once deprecation is complete.
|
# following tests should be updated once deprecation is complete.
|
||||||
|
'strong/destructuring': [SKIP],
|
||||||
'strong/implicit-conversions': [SKIP],
|
'strong/implicit-conversions': [SKIP],
|
||||||
'strong/implicit-conversions-count': [SKIP],
|
'strong/implicit-conversions-count': [SKIP],
|
||||||
'strong/implicit-conversions-inlining': [SKIP],
|
'strong/implicit-conversions-inlining': [SKIP],
|
||||||
|
'strong/load-builtins': [SKIP],
|
||||||
|
'strong/load-element': [SKIP],
|
||||||
|
'strong/load-element-mutate-backing-store': [SKIP],
|
||||||
|
'strong/load-property': [SKIP],
|
||||||
|
'strong/load-property-mutate-backing-store': [SKIP],
|
||||||
|
'strong/load-super': [SKIP],
|
||||||
'strong/literals': [SKIP], # Rest arguments do not respect strongness in Turbofan.
|
'strong/literals': [SKIP], # Rest arguments do not respect strongness in Turbofan.
|
||||||
|
|
||||||
# Issue 4035: unexpected frame->context() in debugger
|
# Issue 4035: unexpected frame->context() in debugger
|
||||||
@ -290,7 +296,6 @@
|
|||||||
'readonly': [PASS, SLOW],
|
'readonly': [PASS, SLOW],
|
||||||
'regress/regress-1200351': [PASS, ['mode == debug', SLOW]],
|
'regress/regress-1200351': [PASS, ['mode == debug', SLOW]],
|
||||||
'regress/regress-crbug-474297': [PASS, ['mode == debug', SLOW]],
|
'regress/regress-crbug-474297': [PASS, ['mode == debug', SLOW]],
|
||||||
'strong/load-element-mutate-backing-store': [PASS, SLOW],
|
|
||||||
|
|
||||||
# TODO(titzer): correct WASM adapter frame alignment on arm64
|
# TODO(titzer): correct WASM adapter frame alignment on arm64
|
||||||
'wasm/*': [PASS, ['arch == arm64', SKIP]],
|
'wasm/*': [PASS, ['arch == arm64', SKIP]],
|
||||||
|
@ -600,37 +600,34 @@ TEST_F(JSTypedLoweringTest, JSLoadPropertyFromExternalTypedArray) {
|
|||||||
NewArrayBuffer(backing_store, sizeof(backing_store));
|
NewArrayBuffer(backing_store, sizeof(backing_store));
|
||||||
VectorSlotPair feedback;
|
VectorSlotPair feedback;
|
||||||
TRACED_FOREACH(ExternalArrayType, type, kExternalArrayTypes) {
|
TRACED_FOREACH(ExternalArrayType, type, kExternalArrayTypes) {
|
||||||
TRACED_FOREACH(LanguageMode, language_mode, kLanguageModes) {
|
Handle<JSTypedArray> array =
|
||||||
Handle<JSTypedArray> array =
|
factory()->NewJSTypedArray(type, buffer, 0, kLength);
|
||||||
factory()->NewJSTypedArray(type, buffer, 0, kLength);
|
int const element_size = static_cast<int>(array->element_size());
|
||||||
int const element_size = static_cast<int>(array->element_size());
|
|
||||||
|
|
||||||
Node* key = Parameter(
|
Node* key = Parameter(
|
||||||
Type::Range(kMinInt / element_size, kMaxInt / element_size, zone()));
|
Type::Range(kMinInt / element_size, kMaxInt / element_size, zone()));
|
||||||
Node* base = HeapConstant(array);
|
Node* base = HeapConstant(array);
|
||||||
Node* vector = UndefinedConstant();
|
Node* vector = UndefinedConstant();
|
||||||
Node* context = UndefinedConstant();
|
Node* context = UndefinedConstant();
|
||||||
Node* effect = graph()->start();
|
Node* effect = graph()->start();
|
||||||
Node* control = graph()->start();
|
Node* control = graph()->start();
|
||||||
Reduction r = Reduce(
|
Reduction r = Reduce(graph()->NewNode(
|
||||||
graph()->NewNode(javascript()->LoadProperty(language_mode, feedback),
|
javascript()->LoadProperty(feedback), base, key, vector, context,
|
||||||
base, key, vector, context, EmptyFrameState(),
|
EmptyFrameState(), EmptyFrameState(), effect, control));
|
||||||
EmptyFrameState(), effect, control));
|
|
||||||
|
|
||||||
Matcher<Node*> offset_matcher =
|
Matcher<Node*> offset_matcher =
|
||||||
element_size == 1
|
element_size == 1
|
||||||
? key
|
? key
|
||||||
: IsWord32Shl(key, IsInt32Constant(WhichPowerOf2(element_size)));
|
: IsWord32Shl(key, IsInt32Constant(WhichPowerOf2(element_size)));
|
||||||
|
|
||||||
ASSERT_TRUE(r.Changed());
|
ASSERT_TRUE(r.Changed());
|
||||||
EXPECT_THAT(
|
EXPECT_THAT(
|
||||||
r.replacement(),
|
r.replacement(),
|
||||||
IsLoadBuffer(BufferAccess(type),
|
IsLoadBuffer(BufferAccess(type),
|
||||||
IsIntPtrConstant(bit_cast<intptr_t>(&backing_store[0])),
|
IsIntPtrConstant(bit_cast<intptr_t>(&backing_store[0])),
|
||||||
offset_matcher,
|
offset_matcher,
|
||||||
IsNumberConstant(array->byte_length()->Number()), effect,
|
IsNumberConstant(array->byte_length()->Number()), effect,
|
||||||
control));
|
control));
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -642,32 +639,29 @@ TEST_F(JSTypedLoweringTest, JSLoadPropertyFromExternalTypedArrayWithSafeKey) {
|
|||||||
NewArrayBuffer(backing_store, sizeof(backing_store));
|
NewArrayBuffer(backing_store, sizeof(backing_store));
|
||||||
VectorSlotPair feedback;
|
VectorSlotPair feedback;
|
||||||
TRACED_FOREACH(ExternalArrayType, type, kExternalArrayTypes) {
|
TRACED_FOREACH(ExternalArrayType, type, kExternalArrayTypes) {
|
||||||
TRACED_FOREACH(LanguageMode, language_mode, kLanguageModes) {
|
Handle<JSTypedArray> array =
|
||||||
Handle<JSTypedArray> array =
|
factory()->NewJSTypedArray(type, buffer, 0, kLength);
|
||||||
factory()->NewJSTypedArray(type, buffer, 0, kLength);
|
ElementAccess access = AccessBuilder::ForTypedArrayElement(type, true);
|
||||||
ElementAccess access = AccessBuilder::ForTypedArrayElement(type, true);
|
|
||||||
|
|
||||||
int min = random_number_generator()->NextInt(static_cast<int>(kLength));
|
int min = random_number_generator()->NextInt(static_cast<int>(kLength));
|
||||||
int max = random_number_generator()->NextInt(static_cast<int>(kLength));
|
int max = random_number_generator()->NextInt(static_cast<int>(kLength));
|
||||||
if (min > max) std::swap(min, max);
|
if (min > max) std::swap(min, max);
|
||||||
Node* key = Parameter(Type::Range(min, max, zone()));
|
Node* key = Parameter(Type::Range(min, max, zone()));
|
||||||
Node* base = HeapConstant(array);
|
Node* base = HeapConstant(array);
|
||||||
Node* vector = UndefinedConstant();
|
Node* vector = UndefinedConstant();
|
||||||
Node* context = UndefinedConstant();
|
Node* context = UndefinedConstant();
|
||||||
Node* effect = graph()->start();
|
Node* effect = graph()->start();
|
||||||
Node* control = graph()->start();
|
Node* control = graph()->start();
|
||||||
Reduction r = Reduce(
|
Reduction r = Reduce(graph()->NewNode(
|
||||||
graph()->NewNode(javascript()->LoadProperty(language_mode, feedback),
|
javascript()->LoadProperty(feedback), base, key, vector, context,
|
||||||
base, key, vector, context, EmptyFrameState(),
|
EmptyFrameState(), EmptyFrameState(), effect, control));
|
||||||
EmptyFrameState(), effect, control));
|
|
||||||
|
|
||||||
ASSERT_TRUE(r.Changed());
|
ASSERT_TRUE(r.Changed());
|
||||||
EXPECT_THAT(
|
EXPECT_THAT(
|
||||||
r.replacement(),
|
r.replacement(),
|
||||||
IsLoadElement(access,
|
IsLoadElement(access,
|
||||||
IsIntPtrConstant(bit_cast<intptr_t>(&backing_store[0])),
|
IsIntPtrConstant(bit_cast<intptr_t>(&backing_store[0])),
|
||||||
key, effect, control));
|
key, effect, control));
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -820,15 +814,12 @@ TEST_F(JSTypedLoweringTest, JSLoadNamedStringLength) {
|
|||||||
Node* const context = UndefinedConstant();
|
Node* const context = UndefinedConstant();
|
||||||
Node* const effect = graph()->start();
|
Node* const effect = graph()->start();
|
||||||
Node* const control = graph()->start();
|
Node* const control = graph()->start();
|
||||||
TRACED_FOREACH(LanguageMode, language_mode, kLanguageModes) {
|
Reduction const r = Reduce(graph()->NewNode(
|
||||||
Reduction const r = Reduce(
|
javascript()->LoadNamed(name, feedback), receiver, vector, context,
|
||||||
graph()->NewNode(javascript()->LoadNamed(language_mode, name, feedback),
|
EmptyFrameState(), EmptyFrameState(), effect, control));
|
||||||
receiver, vector, context, EmptyFrameState(),
|
ASSERT_TRUE(r.Changed());
|
||||||
EmptyFrameState(), effect, control));
|
EXPECT_THAT(r.replacement(), IsLoadField(AccessBuilder::ForStringLength(),
|
||||||
ASSERT_TRUE(r.Changed());
|
receiver, effect, control));
|
||||||
EXPECT_THAT(r.replacement(), IsLoadField(AccessBuilder::ForStringLength(),
|
|
||||||
receiver, effect, control));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -842,14 +833,11 @@ TEST_F(JSTypedLoweringTest, JSLoadNamedFunctionPrototype) {
|
|||||||
Node* const context = Parameter(Type::Internal(), 2);
|
Node* const context = Parameter(Type::Internal(), 2);
|
||||||
Node* const effect = graph()->start();
|
Node* const effect = graph()->start();
|
||||||
Node* const control = graph()->start();
|
Node* const control = graph()->start();
|
||||||
TRACED_FOREACH(LanguageMode, language_mode, kLanguageModes) {
|
Reduction const r = Reduce(graph()->NewNode(
|
||||||
Reduction const r = Reduce(
|
javascript()->LoadNamed(name, feedback), receiver, vector, context,
|
||||||
graph()->NewNode(javascript()->LoadNamed(language_mode, name, feedback),
|
EmptyFrameState(), EmptyFrameState(), effect, control));
|
||||||
receiver, vector, context, EmptyFrameState(),
|
ASSERT_TRUE(r.Changed());
|
||||||
EmptyFrameState(), effect, control));
|
EXPECT_THAT(r.replacement(), IsHeapConstant(function_prototype));
|
||||||
ASSERT_TRUE(r.Changed());
|
|
||||||
EXPECT_THAT(r.replacement(), IsHeapConstant(function_prototype));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -57,11 +57,8 @@ TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) {
|
|||||||
// Emit global load / store operations.
|
// Emit global load / store operations.
|
||||||
Factory* factory = isolate()->factory();
|
Factory* factory = isolate()->factory();
|
||||||
Handle<String> name = factory->NewStringFromStaticChars("var_name");
|
Handle<String> name = factory->NewStringFromStaticChars("var_name");
|
||||||
builder.LoadGlobal(name, 1, LanguageMode::SLOPPY,
|
builder.LoadGlobal(name, 1, TypeofMode::NOT_INSIDE_TYPEOF)
|
||||||
TypeofMode::NOT_INSIDE_TYPEOF)
|
.LoadGlobal(name, 1, TypeofMode::INSIDE_TYPEOF)
|
||||||
.LoadGlobal(name, 1, LanguageMode::STRICT, TypeofMode::NOT_INSIDE_TYPEOF)
|
|
||||||
.LoadGlobal(name, 1, LanguageMode::SLOPPY, TypeofMode::INSIDE_TYPEOF)
|
|
||||||
.LoadGlobal(name, 1, LanguageMode::STRICT, TypeofMode::INSIDE_TYPEOF)
|
|
||||||
.StoreGlobal(name, 1, LanguageMode::SLOPPY)
|
.StoreGlobal(name, 1, LanguageMode::SLOPPY)
|
||||||
.StoreGlobal(name, 1, LanguageMode::STRICT);
|
.StoreGlobal(name, 1, LanguageMode::STRICT);
|
||||||
|
|
||||||
@ -72,12 +69,10 @@ TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) {
|
|||||||
.StoreContextSlot(reg, 1);
|
.StoreContextSlot(reg, 1);
|
||||||
|
|
||||||
// Emit load / store property operations.
|
// Emit load / store property operations.
|
||||||
builder.LoadNamedProperty(reg, name, 0, LanguageMode::SLOPPY)
|
builder.LoadNamedProperty(reg, name, 0)
|
||||||
.LoadKeyedProperty(reg, 0, LanguageMode::SLOPPY)
|
.LoadKeyedProperty(reg, 0)
|
||||||
.StoreNamedProperty(reg, name, 0, LanguageMode::SLOPPY)
|
.StoreNamedProperty(reg, name, 0, LanguageMode::SLOPPY)
|
||||||
.StoreKeyedProperty(reg, reg, 0, LanguageMode::SLOPPY)
|
.StoreKeyedProperty(reg, reg, 0, LanguageMode::SLOPPY)
|
||||||
.LoadNamedProperty(reg, name, 0, LanguageMode::STRICT)
|
|
||||||
.LoadKeyedProperty(reg, 0, LanguageMode::STRICT)
|
|
||||||
.StoreNamedProperty(reg, name, 0, LanguageMode::STRICT)
|
.StoreNamedProperty(reg, name, 0, LanguageMode::STRICT)
|
||||||
.StoreKeyedProperty(reg, reg, 0, LanguageMode::STRICT);
|
.StoreKeyedProperty(reg, reg, 0, LanguageMode::STRICT);
|
||||||
|
|
||||||
@ -224,22 +219,16 @@ TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) {
|
|||||||
Handle<String> wide_name = factory->NewStringFromStaticChars("var_wide_name");
|
Handle<String> wide_name = factory->NewStringFromStaticChars("var_wide_name");
|
||||||
|
|
||||||
// Emit wide global load / store operations.
|
// Emit wide global load / store operations.
|
||||||
builder.LoadGlobal(name, 1024, LanguageMode::SLOPPY,
|
builder.LoadGlobal(name, 1024, TypeofMode::NOT_INSIDE_TYPEOF)
|
||||||
TypeofMode::NOT_INSIDE_TYPEOF)
|
.LoadGlobal(name, 1024, TypeofMode::INSIDE_TYPEOF)
|
||||||
.LoadGlobal(wide_name, 1, LanguageMode::STRICT,
|
|
||||||
TypeofMode::NOT_INSIDE_TYPEOF)
|
|
||||||
.LoadGlobal(name, 1024, LanguageMode::SLOPPY, TypeofMode::INSIDE_TYPEOF)
|
|
||||||
.LoadGlobal(wide_name, 1, LanguageMode::STRICT, TypeofMode::INSIDE_TYPEOF)
|
|
||||||
.StoreGlobal(name, 1024, LanguageMode::SLOPPY)
|
.StoreGlobal(name, 1024, LanguageMode::SLOPPY)
|
||||||
.StoreGlobal(wide_name, 1, LanguageMode::STRICT);
|
.StoreGlobal(wide_name, 1, LanguageMode::STRICT);
|
||||||
|
|
||||||
// Emit wide load / store property operations.
|
// Emit wide load / store property operations.
|
||||||
builder.LoadNamedProperty(reg, wide_name, 0, LanguageMode::SLOPPY)
|
builder.LoadNamedProperty(reg, wide_name, 0)
|
||||||
.LoadKeyedProperty(reg, 2056, LanguageMode::SLOPPY)
|
.LoadKeyedProperty(reg, 2056)
|
||||||
.StoreNamedProperty(reg, wide_name, 0, LanguageMode::SLOPPY)
|
.StoreNamedProperty(reg, wide_name, 0, LanguageMode::SLOPPY)
|
||||||
.StoreKeyedProperty(reg, reg, 2056, LanguageMode::SLOPPY)
|
.StoreKeyedProperty(reg, reg, 2056, LanguageMode::SLOPPY)
|
||||||
.LoadNamedProperty(reg, wide_name, 0, LanguageMode::STRICT)
|
|
||||||
.LoadKeyedProperty(reg, 2056, LanguageMode::STRICT)
|
|
||||||
.StoreNamedProperty(reg, wide_name, 0, LanguageMode::STRICT)
|
.StoreNamedProperty(reg, wide_name, 0, LanguageMode::STRICT)
|
||||||
.StoreKeyedProperty(reg, reg, 2056, LanguageMode::STRICT);
|
.StoreKeyedProperty(reg, reg, 2056, LanguageMode::STRICT);
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ TEST_F(BytecodeArrayIteratorTest, IteratesBytecodeArray) {
|
|||||||
.LoadLiteral(smi_0)
|
.LoadLiteral(smi_0)
|
||||||
.LoadLiteral(smi_1)
|
.LoadLiteral(smi_1)
|
||||||
.LoadAccumulatorWithRegister(reg_0)
|
.LoadAccumulatorWithRegister(reg_0)
|
||||||
.LoadNamedProperty(reg_1, name, feedback_slot, LanguageMode::SLOPPY)
|
.LoadNamedProperty(reg_1, name, feedback_slot)
|
||||||
.StoreAccumulatorInRegister(reg_2)
|
.StoreAccumulatorInRegister(reg_2)
|
||||||
.CallRuntime(Runtime::kLoadIC_Miss, reg_0, 1)
|
.CallRuntime(Runtime::kLoadIC_Miss, reg_0, 1)
|
||||||
.Debugger()
|
.Debugger()
|
||||||
@ -79,7 +79,7 @@ TEST_F(BytecodeArrayIteratorTest, IteratesBytecodeArray) {
|
|||||||
CHECK(!iterator.done());
|
CHECK(!iterator.done());
|
||||||
iterator.Advance();
|
iterator.Advance();
|
||||||
|
|
||||||
CHECK_EQ(iterator.current_bytecode(), Bytecode::kLoadICSloppy);
|
CHECK_EQ(iterator.current_bytecode(), Bytecode::kLoadIC);
|
||||||
CHECK_EQ(iterator.GetRegisterOperand(0).index(), reg_1.index());
|
CHECK_EQ(iterator.GetRegisterOperand(0).index(), reg_1.index());
|
||||||
CHECK_EQ(iterator.GetIndexOperand(1), name_index);
|
CHECK_EQ(iterator.GetIndexOperand(1), name_index);
|
||||||
CHECK_EQ(iterator.GetIndexOperand(2), feedback_slot);
|
CHECK_EQ(iterator.GetIndexOperand(2), feedback_slot);
|
||||||
|
Loading…
Reference in New Issue
Block a user