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

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

Issue 2302013002: Store the scope info in catch contexts (Closed)
Patch Set: updates Created 4 years, 3 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/unittests/compiler/js-create-lowering-unittest.cc ('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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 closure operations. 103 // Emit closure operations.
104 builder.CreateClosure(0, NOT_TENURED); 104 builder.CreateClosure(0, NOT_TENURED);
105 105
106 // Emit create context operation. 106 // Emit create context operation.
107 builder.CreateBlockContext(factory->NewScopeInfo(1)); 107 builder.CreateBlockContext(factory->NewScopeInfo(1));
108 builder.CreateCatchContext(reg, name); 108 builder.CreateCatchContext(reg, name, factory->NewScopeInfo(1));
109 builder.CreateFunctionContext(1); 109 builder.CreateFunctionContext(1);
110 builder.CreateWithContext(reg); 110 builder.CreateWithContext(reg);
111 111
112 // Emit literal creation operations. 112 // Emit literal creation operations.
113 builder.CreateRegExpLiteral(factory->NewStringFromStaticChars("a"), 0, 0) 113 builder.CreateRegExpLiteral(factory->NewStringFromStaticChars("a"), 0, 0)
114 .CreateArrayLiteral(factory->NewFixedArray(1), 0, 0) 114 .CreateArrayLiteral(factory->NewFixedArray(1), 0, 0)
115 .CreateObjectLiteral(factory->NewFixedArray(1), 0, 0, reg); 115 .CreateObjectLiteral(factory->NewFixedArray(1), 0, 0, reg);
116 116
117 // Call operations. 117 // Call operations.
118 builder.Call(reg, other, 0, 1) 118 builder.Call(reg, other, 0, 1)
(...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after
855 iterator.Advance(); 855 iterator.Advance();
856 } 856 }
857 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); 857 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn);
858 iterator.Advance(); 858 iterator.Advance();
859 CHECK(iterator.done()); 859 CHECK(iterator.done());
860 } 860 }
861 861
862 } // namespace interpreter 862 } // namespace interpreter
863 } // namespace internal 863 } // namespace internal
864 } // namespace v8 864 } // namespace v8
OLDNEW
« no previous file with comments | « test/unittests/compiler/js-create-lowering-unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698