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

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

Issue 2302163003: [interpreter] Clarify some names and comments. (Closed)
Patch Set: 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 | « src/interpreter/interpreter.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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 builder.CompareOperation(Token::Value::EQ, reg, 1) 178 builder.CompareOperation(Token::Value::EQ, reg, 1)
179 .CompareOperation(Token::Value::NE, reg, 2) 179 .CompareOperation(Token::Value::NE, reg, 2)
180 .CompareOperation(Token::Value::EQ_STRICT, reg, 3) 180 .CompareOperation(Token::Value::EQ_STRICT, reg, 3)
181 .CompareOperation(Token::Value::LT, reg, 4) 181 .CompareOperation(Token::Value::LT, reg, 4)
182 .CompareOperation(Token::Value::GT, reg, 5) 182 .CompareOperation(Token::Value::GT, reg, 5)
183 .CompareOperation(Token::Value::LTE, reg, 6) 183 .CompareOperation(Token::Value::LTE, reg, 6)
184 .CompareOperation(Token::Value::GTE, reg, 7) 184 .CompareOperation(Token::Value::GTE, reg, 7)
185 .CompareOperation(Token::Value::INSTANCEOF, reg, 8) 185 .CompareOperation(Token::Value::INSTANCEOF, reg, 8)
186 .CompareOperation(Token::Value::IN, reg, 9); 186 .CompareOperation(Token::Value::IN, reg, 9);
187 187
188 // Emit cast operator invocations. 188 // Emit conversion operator invocations.
189 builder.CastAccumulatorToNumber(reg) 189 builder.ConvertAccumulatorToNumber(reg)
190 .CastAccumulatorToJSObject(reg) 190 .ConvertAccumulatorToObject(reg)
191 .CastAccumulatorToName(reg); 191 .ConvertAccumulatorToName(reg);
192 192
193 // Emit control flow. Return must be the last instruction. 193 // Emit control flow. Return must be the last instruction.
194 BytecodeLabel start; 194 BytecodeLabel start;
195 builder.Bind(&start); 195 builder.Bind(&start);
196 { 196 {
197 // Short jumps with Imm8 operands 197 // Short jumps with Imm8 operands
198 BytecodeLabel after_jump; 198 BytecodeLabel after_jump;
199 builder.Jump(&start) 199 builder.Jump(&start)
200 .Bind(&after_jump) 200 .Bind(&after_jump)
201 .JumpIfNull(&start) 201 .JumpIfNull(&start)
(...skipping 653 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 | « src/interpreter/interpreter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698