OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/interpreter/bytecode-array-builder.h" | 7 #include "src/interpreter/bytecode-array-builder.h" |
8 #include "src/interpreter/bytecode-array-iterator.h" | 8 #include "src/interpreter/bytecode-array-iterator.h" |
9 #include "src/interpreter/bytecode-label.h" | 9 #include "src/interpreter/bytecode-label.h" |
10 #include "src/interpreter/bytecode-register-allocator.h" | 10 #include "src/interpreter/bytecode-register-allocator.h" |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 .StoreKeyedProperty(reg, reg, 0, LanguageMode::SLOPPY) | 93 .StoreKeyedProperty(reg, reg, 0, LanguageMode::SLOPPY) |
94 .StoreNamedProperty(reg, name, 0, LanguageMode::STRICT) | 94 .StoreNamedProperty(reg, name, 0, LanguageMode::STRICT) |
95 .StoreKeyedProperty(reg, reg, 0, LanguageMode::STRICT); | 95 .StoreKeyedProperty(reg, reg, 0, LanguageMode::STRICT); |
96 | 96 |
97 // Emit load / store lookup slots. | 97 // Emit load / store lookup slots. |
98 builder.LoadLookupSlot(name, TypeofMode::NOT_INSIDE_TYPEOF) | 98 builder.LoadLookupSlot(name, TypeofMode::NOT_INSIDE_TYPEOF) |
99 .LoadLookupSlot(name, TypeofMode::INSIDE_TYPEOF) | 99 .LoadLookupSlot(name, TypeofMode::INSIDE_TYPEOF) |
100 .StoreLookupSlot(name, LanguageMode::SLOPPY) | 100 .StoreLookupSlot(name, LanguageMode::SLOPPY) |
101 .StoreLookupSlot(name, LanguageMode::STRICT); | 101 .StoreLookupSlot(name, LanguageMode::STRICT); |
102 | 102 |
| 103 // Emit load / store lookup slots with context fast paths. |
| 104 builder.LoadLookupContextSlot(name, TypeofMode::NOT_INSIDE_TYPEOF, 1, 0) |
| 105 .LoadLookupContextSlot(name, TypeofMode::INSIDE_TYPEOF, 1, 0); |
| 106 |
103 // Emit closure operations. | 107 // Emit closure operations. |
104 builder.CreateClosure(0, NOT_TENURED); | 108 builder.CreateClosure(0, NOT_TENURED); |
105 | 109 |
106 // Emit create context operation. | 110 // Emit create context operation. |
107 builder.CreateBlockContext(factory->NewScopeInfo(1)); | 111 builder.CreateBlockContext(factory->NewScopeInfo(1)); |
108 builder.CreateCatchContext(reg, name, factory->NewScopeInfo(1)); | 112 builder.CreateCatchContext(reg, name, factory->NewScopeInfo(1)); |
109 builder.CreateFunctionContext(1); | 113 builder.CreateFunctionContext(1); |
110 builder.CreateWithContext(reg, factory->NewScopeInfo(1)); | 114 builder.CreateWithContext(reg, factory->NewScopeInfo(1)); |
111 | 115 |
112 // Emit literal creation operations. | 116 // Emit literal creation operations. |
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
757 iterator.Advance(); | 761 iterator.Advance(); |
758 } | 762 } |
759 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); | 763 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); |
760 iterator.Advance(); | 764 iterator.Advance(); |
761 CHECK(iterator.done()); | 765 CHECK(iterator.done()); |
762 } | 766 } |
763 | 767 |
764 } // namespace interpreter | 768 } // namespace interpreter |
765 } // namespace internal | 769 } // namespace internal |
766 } // namespace v8 | 770 } // namespace v8 |
OLD | NEW |