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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 | 95 |
96 // Emit load / store lookup slots. | 96 // Emit load / store lookup slots. |
97 builder.LoadLookupSlot(name, TypeofMode::NOT_INSIDE_TYPEOF) | 97 builder.LoadLookupSlot(name, TypeofMode::NOT_INSIDE_TYPEOF) |
98 .LoadLookupSlot(name, TypeofMode::INSIDE_TYPEOF) | 98 .LoadLookupSlot(name, TypeofMode::INSIDE_TYPEOF) |
99 .StoreLookupSlot(name, LanguageMode::SLOPPY) | 99 .StoreLookupSlot(name, LanguageMode::SLOPPY) |
100 .StoreLookupSlot(name, LanguageMode::STRICT); | 100 .StoreLookupSlot(name, LanguageMode::STRICT); |
101 | 101 |
102 // Emit closure operations. | 102 // Emit closure operations. |
103 builder.CreateClosure(0, NOT_TENURED); | 103 builder.CreateClosure(0, NOT_TENURED); |
104 | 104 |
| 105 // Emit create context operation. |
105 builder.CreateBlockContext(factory->NewScopeInfo(1)); | 106 builder.CreateBlockContext(factory->NewScopeInfo(1)); |
106 | 107 builder.CreateCatchContext(reg, name); |
107 // Emit create context operation. | |
108 builder.CreateFunctionContext(1); | 108 builder.CreateFunctionContext(1); |
109 | |
110 builder.CreateWithContext(reg); | 109 builder.CreateWithContext(reg); |
111 | 110 |
112 // Emit literal creation operations. | 111 // Emit literal creation operations. |
113 builder.CreateRegExpLiteral(factory->NewStringFromStaticChars("a"), 0, 0) | 112 builder.CreateRegExpLiteral(factory->NewStringFromStaticChars("a"), 0, 0) |
114 .CreateArrayLiteral(factory->NewFixedArray(1), 0, 0) | 113 .CreateArrayLiteral(factory->NewFixedArray(1), 0, 0) |
115 .CreateObjectLiteral(factory->NewFixedArray(1), 0, 0, reg); | 114 .CreateObjectLiteral(factory->NewFixedArray(1), 0, 0, reg); |
116 | 115 |
117 // Call operations. | 116 // Call operations. |
118 builder.Call(reg, other, 0, 1) | 117 builder.Call(reg, other, 0, 1) |
119 .Call(reg, wide, 0, 1) | 118 .Call(reg, wide, 0, 1) |
(...skipping 735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
855 iterator.Advance(); | 854 iterator.Advance(); |
856 } | 855 } |
857 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); | 856 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); |
858 iterator.Advance(); | 857 iterator.Advance(); |
859 CHECK(iterator.done()); | 858 CHECK(iterator.done()); |
860 } | 859 } |
861 | 860 |
862 } // namespace interpreter | 861 } // namespace interpreter |
863 } // namespace internal | 862 } // namespace internal |
864 } // namespace v8 | 863 } // namespace v8 |
OLD | NEW |