OLD | NEW |
---|---|
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/interpreter/bytecode-generator.h" | 5 #include "src/interpreter/bytecode-generator.h" |
6 | 6 |
7 #include "src/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
8 #include "src/compiler.h" | 8 #include "src/compiler.h" |
9 #include "src/interpreter/control-flow-builders.h" | 9 #include "src/interpreter/control-flow-builders.h" |
10 #include "src/objects.h" | 10 #include "src/objects.h" |
(...skipping 1763 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1774 // Deleting local var/let/const, context variables, and arguments | 1774 // Deleting local var/let/const, context variables, and arguments |
1775 // does not have any effect. | 1775 // does not have any effect. |
1776 if (variable->HasThisName(isolate())) { | 1776 if (variable->HasThisName(isolate())) { |
1777 builder()->LoadTrue(); | 1777 builder()->LoadTrue(); |
1778 } else { | 1778 } else { |
1779 builder()->LoadFalse(); | 1779 builder()->LoadFalse(); |
1780 } | 1780 } |
1781 break; | 1781 break; |
1782 } | 1782 } |
1783 case VariableLocation::LOOKUP: { | 1783 case VariableLocation::LOOKUP: { |
1784 UNIMPLEMENTED(); | 1784 builder()->LoadLiteral(variable->name()).DeleteLookupSlot(); |
mythria
2015/12/22 11:22:55
I load the name to the accumulator instead of pass
oth
2015/12/22 16:00:56
Yes, this seems reasonable. We should have more da
| |
1785 break; | 1785 break; |
1786 } | 1786 } |
1787 default: | 1787 default: |
1788 UNREACHABLE(); | 1788 UNREACHABLE(); |
1789 } | 1789 } |
1790 } else { | 1790 } else { |
1791 // Delete of an unresolvable reference returns true. | 1791 // Delete of an unresolvable reference returns true. |
1792 VisitForEffect(expr->expression()); | 1792 VisitForEffect(expr->expression()); |
1793 builder()->LoadTrue(); | 1793 builder()->LoadTrue(); |
1794 } | 1794 } |
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2207 } | 2207 } |
2208 | 2208 |
2209 | 2209 |
2210 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const { | 2210 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const { |
2211 return info()->feedback_vector()->GetIndex(slot); | 2211 return info()->feedback_vector()->GetIndex(slot); |
2212 } | 2212 } |
2213 | 2213 |
2214 } // namespace interpreter | 2214 } // namespace interpreter |
2215 } // namespace internal | 2215 } // namespace internal |
2216 } // namespace v8 | 2216 } // namespace v8 |
OLD | NEW |