Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(257)

Side by Side Diff: test/unittests/interpreter/bytecode-array-builder-unittest.cc

Issue 2248633002: [interpreter] Add CreateBlockContext bytecode (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: comments Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/cctest/interpreter/bytecode_expectations/Generators.golden ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 builder.CreateBlockContext(factory->NewScopeInfo(1));
106
105 // Emit create context operation. 107 // Emit create context operation.
106 builder.CreateFunctionContext(1); 108 builder.CreateFunctionContext(1);
107 109
108 // Emit literal creation operations. 110 // Emit literal creation operations.
109 builder.CreateRegExpLiteral(factory->NewStringFromStaticChars("a"), 0, 0) 111 builder.CreateRegExpLiteral(factory->NewStringFromStaticChars("a"), 0, 0)
110 .CreateArrayLiteral(factory->NewFixedArray(1), 0, 0) 112 .CreateArrayLiteral(factory->NewFixedArray(1), 0, 0)
111 .CreateObjectLiteral(factory->NewFixedArray(1), 0, 0, reg); 113 .CreateObjectLiteral(factory->NewFixedArray(1), 0, 0, reg);
112 114
113 // Call operations. 115 // Call operations.
114 builder.Call(reg, other, 0, 1) 116 builder.Call(reg, other, 0, 1)
(...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after
851 iterator.Advance(); 853 iterator.Advance();
852 } 854 }
853 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); 855 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn);
854 iterator.Advance(); 856 iterator.Advance();
855 CHECK(iterator.done()); 857 CHECK(iterator.done());
856 } 858 }
857 859
858 } // namespace interpreter 860 } // namespace interpreter
859 } // namespace internal 861 } // namespace internal
860 } // namespace v8 862 } // namespace v8
OLDNEW
« no previous file with comments | « test/cctest/interpreter/bytecode_expectations/Generators.golden ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698