| Index: src/compiler/bytecode-graph-builder.cc
|
| diff --git a/src/compiler/bytecode-graph-builder.cc b/src/compiler/bytecode-graph-builder.cc
|
| index 064b4b85585e55ef1dea765ad6841e876c3a7d4d..b6b5682a76b6dc08201417bcd5cb8521791947d5 100644
|
| --- a/src/compiler/bytecode-graph-builder.cc
|
| +++ b/src/compiler/bytecode-graph-builder.cc
|
| @@ -460,89 +460,144 @@ void BytecodeGraphBuilder::VisitLoadICStrict(
|
| }
|
|
|
|
|
| -void BytecodeGraphBuilder::VisitKeyedLoadICSloppy(
|
| +void BytecodeGraphBuilder::VisitLoadICSloppyWide(
|
| const interpreter::BytecodeArrayIterator& iterator) {
|
| - UNIMPLEMENTED();
|
| + DCHECK(is_sloppy(language_mode()));
|
| + BuildNamedLoad(iterator);
|
| }
|
|
|
|
|
| -void BytecodeGraphBuilder::VisitKeyedLoadICStrict(
|
| +void BytecodeGraphBuilder::VisitLoadICStrictWide(
|
| const interpreter::BytecodeArrayIterator& iterator) {
|
| - UNIMPLEMENTED();
|
| + DCHECK(is_strict(language_mode()));
|
| + BuildNamedLoad(iterator);
|
| }
|
|
|
|
|
| -void BytecodeGraphBuilder::VisitLoadICSloppyWide(
|
| +void BytecodeGraphBuilder::BuildKeyedLoad(
|
| + const interpreter::BytecodeArrayIterator& iterator) {
|
| + Node* key = environment()->LookupAccumulator();
|
| + Node* object = environment()->LookupRegister(iterator.GetRegisterOperand(0));
|
| + VectorSlotPair feedback = CreateVectorSlotPair(iterator.GetIndexOperand(1));
|
| +
|
| + const Operator* op = javascript()->LoadProperty(language_mode(), feedback);
|
| + Node* node = NewNode(op, object, key, BuildLoadFeedbackVector());
|
| + AddEmptyFrameStateInputs(node);
|
| + environment()->BindAccumulator(node);
|
| +}
|
| +
|
| +
|
| +void BytecodeGraphBuilder::VisitKeyedLoadICSloppy(
|
| const interpreter::BytecodeArrayIterator& iterator) {
|
| DCHECK(is_sloppy(language_mode()));
|
| - BuildNamedLoad(iterator);
|
| + BuildKeyedLoad(iterator);
|
| }
|
|
|
|
|
| -void BytecodeGraphBuilder::VisitLoadICStrictWide(
|
| +void BytecodeGraphBuilder::VisitKeyedLoadICStrict(
|
| const interpreter::BytecodeArrayIterator& iterator) {
|
| DCHECK(is_strict(language_mode()));
|
| - BuildNamedLoad(iterator);
|
| + BuildKeyedLoad(iterator);
|
| }
|
|
|
|
|
| void BytecodeGraphBuilder::VisitKeyedLoadICSloppyWide(
|
| const interpreter::BytecodeArrayIterator& iterator) {
|
| - UNIMPLEMENTED();
|
| + DCHECK(is_sloppy(language_mode()));
|
| + BuildKeyedLoad(iterator);
|
| }
|
|
|
|
|
| void BytecodeGraphBuilder::VisitKeyedLoadICStrictWide(
|
| const interpreter::BytecodeArrayIterator& iterator) {
|
| - UNIMPLEMENTED();
|
| + DCHECK(is_strict(language_mode()));
|
| + BuildKeyedLoad(iterator);
|
| +}
|
| +
|
| +
|
| +void BytecodeGraphBuilder::BuildNamedStore(
|
| + const interpreter::BytecodeArrayIterator& iterator) {
|
| + Node* value = environment()->LookupAccumulator();
|
| + Node* object = environment()->LookupRegister(iterator.GetRegisterOperand(0));
|
| + Handle<Name> name =
|
| + Handle<Name>::cast(iterator.GetConstantForIndexOperand(1));
|
| + VectorSlotPair feedback = CreateVectorSlotPair(iterator.GetIndexOperand(2));
|
| +
|
| + const Operator* op =
|
| + javascript()->StoreNamed(language_mode(), name, feedback);
|
| + Node* node = NewNode(op, object, value, BuildLoadFeedbackVector());
|
| + AddEmptyFrameStateInputs(node);
|
| + environment()->BindAccumulator(value);
|
| }
|
|
|
|
|
| void BytecodeGraphBuilder::VisitStoreICSloppy(
|
| const interpreter::BytecodeArrayIterator& iterator) {
|
| - UNIMPLEMENTED();
|
| + DCHECK(is_sloppy(language_mode()));
|
| + BuildNamedStore(iterator);
|
| }
|
|
|
|
|
| void BytecodeGraphBuilder::VisitStoreICStrict(
|
| const interpreter::BytecodeArrayIterator& iterator) {
|
| - UNIMPLEMENTED();
|
| + DCHECK(is_strict(language_mode()));
|
| + BuildNamedStore(iterator);
|
| }
|
|
|
|
|
| -void BytecodeGraphBuilder::VisitKeyedStoreICSloppy(
|
| +void BytecodeGraphBuilder::VisitStoreICSloppyWide(
|
| const interpreter::BytecodeArrayIterator& iterator) {
|
| - UNIMPLEMENTED();
|
| + DCHECK(is_sloppy(language_mode()));
|
| + BuildNamedStore(iterator);
|
| }
|
|
|
|
|
| -void BytecodeGraphBuilder::VisitKeyedStoreICStrict(
|
| +void BytecodeGraphBuilder::VisitStoreICStrictWide(
|
| const interpreter::BytecodeArrayIterator& iterator) {
|
| - UNIMPLEMENTED();
|
| + DCHECK(is_strict(language_mode()));
|
| + BuildNamedStore(iterator);
|
| }
|
|
|
|
|
| -void BytecodeGraphBuilder::VisitStoreICSloppyWide(
|
| +void BytecodeGraphBuilder::BuildKeyedStore(
|
| const interpreter::BytecodeArrayIterator& iterator) {
|
| - UNIMPLEMENTED();
|
| + Node* value = environment()->LookupAccumulator();
|
| + Node* object = environment()->LookupRegister(iterator.GetRegisterOperand(0));
|
| + Node* key = environment()->LookupRegister(iterator.GetRegisterOperand(1));
|
| + VectorSlotPair feedback = CreateVectorSlotPair(iterator.GetIndexOperand(2));
|
| +
|
| + const Operator* op = javascript()->StoreProperty(language_mode(), feedback);
|
| + Node* node = NewNode(op, object, key, value, BuildLoadFeedbackVector());
|
| + AddEmptyFrameStateInputs(node);
|
| + environment()->BindAccumulator(value);
|
| }
|
|
|
|
|
| -void BytecodeGraphBuilder::VisitStoreICStrictWide(
|
| +void BytecodeGraphBuilder::VisitKeyedStoreICSloppy(
|
| const interpreter::BytecodeArrayIterator& iterator) {
|
| - UNIMPLEMENTED();
|
| + DCHECK(is_sloppy(language_mode()));
|
| + BuildKeyedStore(iterator);
|
| +}
|
| +
|
| +
|
| +void BytecodeGraphBuilder::VisitKeyedStoreICStrict(
|
| + const interpreter::BytecodeArrayIterator& iterator) {
|
| + DCHECK(is_strict(language_mode()));
|
| + BuildKeyedStore(iterator);
|
| }
|
|
|
|
|
| void BytecodeGraphBuilder::VisitKeyedStoreICSloppyWide(
|
| const interpreter::BytecodeArrayIterator& iterator) {
|
| - UNIMPLEMENTED();
|
| + DCHECK(is_sloppy(language_mode()));
|
| + BuildKeyedStore(iterator);
|
| }
|
|
|
|
|
| void BytecodeGraphBuilder::VisitKeyedStoreICStrictWide(
|
| const interpreter::BytecodeArrayIterator& iterator) {
|
| - UNIMPLEMENTED();
|
| + DCHECK(is_strict(language_mode()));
|
| + BuildKeyedStore(iterator);
|
| }
|
|
|
|
|
|
|