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

Side by Side Diff: src/interpreter/bytecode-array-writer.cc

Issue 1979523002: [interpreter] Remove BytecodeArrayBuilder::Illegal(). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 years, 7 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/bytecode-array-builder.cc ('k') | src/interpreter/bytecode-generator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/bytecode-array-writer.h" 5 #include "src/interpreter/bytecode-array-writer.h"
6 6
7 #include <iomanip> 7 #include <iomanip>
8 #include "src/interpreter/source-position-table.h" 8 #include "src/interpreter/source-position-table.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 23 matching lines...) Expand all
34 int bytecode_offset = static_cast<int>(bytecodes()->size()); 34 int bytecode_offset = static_cast<int>(bytecodes()->size());
35 const BytecodeSourceInfo& source_info = node->source_info(); 35 const BytecodeSourceInfo& source_info = node->source_info();
36 if (source_info.is_valid()) { 36 if (source_info.is_valid()) {
37 source_position_table_builder_->AddPosition(bytecode_offset, 37 source_position_table_builder_->AddPosition(bytecode_offset,
38 source_info.source_position(), 38 source_info.source_position(),
39 source_info.is_statement()); 39 source_info.is_statement());
40 } 40 }
41 } 41 }
42 42
43 void BytecodeArrayWriter::EmitBytecode(const BytecodeNode* const node) { 43 void BytecodeArrayWriter::EmitBytecode(const BytecodeNode* const node) {
44 DCHECK_NE(node->bytecode(), Bytecode::kIllegal);
45
44 OperandScale operand_scale = node->operand_scale(); 46 OperandScale operand_scale = node->operand_scale();
45 if (operand_scale != OperandScale::kSingle) { 47 if (operand_scale != OperandScale::kSingle) {
46 Bytecode prefix = Bytecodes::OperandScaleToPrefixBytecode(operand_scale); 48 Bytecode prefix = Bytecodes::OperandScaleToPrefixBytecode(operand_scale);
47 bytecodes()->push_back(Bytecodes::ToByte(prefix)); 49 bytecodes()->push_back(Bytecodes::ToByte(prefix));
48 } 50 }
49 51
50 Bytecode bytecode = node->bytecode(); 52 Bytecode bytecode = node->bytecode();
51 bytecodes()->push_back(Bytecodes::ToByte(bytecode)); 53 bytecodes()->push_back(Bytecodes::ToByte(bytecode));
52 54
53 int register_operand_bitmap = Bytecodes::GetRegisterOperandBitmap(bytecode); 55 int register_operand_bitmap = Bytecodes::GetRegisterOperandBitmap(bytecode);
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 // override 96 // override
95 void BytecodeArrayWriter::FlushBasicBlock() {} 97 void BytecodeArrayWriter::FlushBasicBlock() {}
96 98
97 int BytecodeArrayWriter::GetMaximumFrameSizeUsed() { 99 int BytecodeArrayWriter::GetMaximumFrameSizeUsed() {
98 return max_register_count_ * kPointerSize; 100 return max_register_count_ * kPointerSize;
99 } 101 }
100 102
101 } // namespace interpreter 103 } // namespace interpreter
102 } // namespace internal 104 } // namespace internal
103 } // namespace v8 105 } // namespace v8
OLDNEW
« no previous file with comments | « src/interpreter/bytecode-array-builder.cc ('k') | src/interpreter/bytecode-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698