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

Side by Side Diff: src/interpreter/interpreter.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
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/interpreter/interpreter.h" 5 #include "src/interpreter/interpreter.h"
6 6
7 #include <fstream> 7 #include <fstream>
8 #include <memory> 8 #include <memory>
9 9
10 #include "src/ast/prettyprinter.h" 10 #include "src/ast/prettyprinter.h"
(...skipping 1285 matching lines...) Expand 10 before | Expand all | Expand 10 after
1296 Node* slot_index = __ BytecodeOperandIdx(0); 1296 Node* slot_index = __ BytecodeOperandIdx(0);
1297 Node* type_feedback_vector = __ LoadTypeFeedbackVector(); 1297 Node* type_feedback_vector = __ LoadTypeFeedbackVector();
1298 Node* result = Generator::Generate(assembler, value, context, 1298 Node* result = Generator::Generate(assembler, value, context,
1299 type_feedback_vector, slot_index); 1299 type_feedback_vector, slot_index);
1300 __ SetAccumulator(result); 1300 __ SetAccumulator(result);
1301 __ Dispatch(); 1301 __ Dispatch();
1302 } 1302 }
1303 1303
1304 // ToName 1304 // ToName
1305 // 1305 //
1306 // Cast the object referenced by the accumulator to a name. 1306 // Convert the object referenced by the accumulator to a name.
1307 void Interpreter::DoToName(InterpreterAssembler* assembler) { 1307 void Interpreter::DoToName(InterpreterAssembler* assembler) {
1308 Node* result = BuildUnaryOp(CodeFactory::ToName(isolate_), assembler); 1308 Node* result = BuildUnaryOp(CodeFactory::ToName(isolate_), assembler);
1309 __ StoreRegister(result, __ BytecodeOperandReg(0)); 1309 __ StoreRegister(result, __ BytecodeOperandReg(0));
1310 __ Dispatch(); 1310 __ Dispatch();
1311 } 1311 }
1312 1312
1313 // ToNumber 1313 // ToNumber
1314 // 1314 //
1315 // Cast the object referenced by the accumulator to a number. 1315 // Convert the object referenced by the accumulator to a number.
1316 void Interpreter::DoToNumber(InterpreterAssembler* assembler) { 1316 void Interpreter::DoToNumber(InterpreterAssembler* assembler) {
1317 Node* result = BuildUnaryOp(CodeFactory::ToNumber(isolate_), assembler); 1317 Node* result = BuildUnaryOp(CodeFactory::ToNumber(isolate_), assembler);
1318 __ StoreRegister(result, __ BytecodeOperandReg(0)); 1318 __ StoreRegister(result, __ BytecodeOperandReg(0));
1319 __ Dispatch(); 1319 __ Dispatch();
1320 } 1320 }
1321 1321
1322 // ToObject 1322 // ToObject
1323 // 1323 //
1324 // Cast the object referenced by the accumulator to a JSObject. 1324 // Convert the object referenced by the accumulator to a JSReceiver.
1325 void Interpreter::DoToObject(InterpreterAssembler* assembler) { 1325 void Interpreter::DoToObject(InterpreterAssembler* assembler) {
1326 Node* result = BuildUnaryOp(CodeFactory::ToObject(isolate_), assembler); 1326 Node* result = BuildUnaryOp(CodeFactory::ToObject(isolate_), assembler);
1327 __ StoreRegister(result, __ BytecodeOperandReg(0)); 1327 __ StoreRegister(result, __ BytecodeOperandReg(0));
1328 __ Dispatch(); 1328 __ Dispatch();
1329 } 1329 }
1330 1330
1331 // Inc 1331 // Inc
1332 // 1332 //
1333 // Increments value in the accumulator by one. 1333 // Increments value in the accumulator by one.
1334 void Interpreter::DoInc(InterpreterAssembler* assembler) { 1334 void Interpreter::DoInc(InterpreterAssembler* assembler) {
(...skipping 1129 matching lines...) Expand 10 before | Expand all | Expand 10 after
2464 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, 2464 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset,
2465 __ SmiTag(new_state)); 2465 __ SmiTag(new_state));
2466 __ SetAccumulator(old_state); 2466 __ SetAccumulator(old_state);
2467 2467
2468 __ Dispatch(); 2468 __ Dispatch();
2469 } 2469 }
2470 2470
2471 } // namespace interpreter 2471 } // namespace interpreter
2472 } // namespace internal 2472 } // namespace internal
2473 } // namespace v8 2473 } // namespace v8
OLDNEW
« no previous file with comments | « src/interpreter/bytecode-generator.cc ('k') | test/unittests/interpreter/bytecode-array-builder-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698