OLD | NEW |
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 "src/api.h" | 7 #include "src/api.h" |
8 #include "src/interpreter/bytecode-label.h" | 8 #include "src/interpreter/bytecode-label.h" |
9 #include "src/interpreter/bytecode-register.h" | 9 #include "src/interpreter/bytecode-register.h" |
10 #include "src/interpreter/constant-array-builder.h" | 10 #include "src/interpreter/constant-array-builder.h" |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 case Bytecode::kJumpIfToBooleanTrue: | 156 case Bytecode::kJumpIfToBooleanTrue: |
157 return Bytecode::kJumpIfToBooleanTrueConstant; | 157 return Bytecode::kJumpIfToBooleanTrueConstant; |
158 case Bytecode::kJumpIfToBooleanFalse: | 158 case Bytecode::kJumpIfToBooleanFalse: |
159 return Bytecode::kJumpIfToBooleanFalseConstant; | 159 return Bytecode::kJumpIfToBooleanFalseConstant; |
160 case Bytecode::kJumpIfNotHole: | 160 case Bytecode::kJumpIfNotHole: |
161 return Bytecode::kJumpIfNotHoleConstant; | 161 return Bytecode::kJumpIfNotHoleConstant; |
162 case Bytecode::kJumpIfNull: | 162 case Bytecode::kJumpIfNull: |
163 return Bytecode::kJumpIfNullConstant; | 163 return Bytecode::kJumpIfNullConstant; |
164 case Bytecode::kJumpIfUndefined: | 164 case Bytecode::kJumpIfUndefined: |
165 return Bytecode::kJumpIfUndefinedConstant; | 165 return Bytecode::kJumpIfUndefinedConstant; |
| 166 case Bytecode::kJumpIfJSReceiver: |
| 167 return Bytecode::kJumpIfJSReceiverConstant; |
166 default: | 168 default: |
167 UNREACHABLE(); | 169 UNREACHABLE(); |
168 return Bytecode::kIllegal; | 170 return Bytecode::kIllegal; |
169 } | 171 } |
170 } | 172 } |
171 | 173 |
172 void BytecodeArrayWriter::PatchJumpWith8BitOperand(size_t jump_location, | 174 void BytecodeArrayWriter::PatchJumpWith8BitOperand(size_t jump_location, |
173 int delta) { | 175 int delta) { |
174 Bytecode jump_bytecode = Bytecodes::FromByte(bytecodes()->at(jump_location)); | 176 Bytecode jump_bytecode = Bytecodes::FromByte(bytecodes()->at(jump_location)); |
175 DCHECK(Bytecodes::IsJumpImmediate(jump_bytecode)); | 177 DCHECK(Bytecodes::IsJumpImmediate(jump_bytecode)); |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 node->set_bytecode(node->bytecode(), k32BitJumpPlaceholder); | 319 node->set_bytecode(node->bytecode(), k32BitJumpPlaceholder); |
318 break; | 320 break; |
319 } | 321 } |
320 } | 322 } |
321 EmitBytecode(node); | 323 EmitBytecode(node); |
322 } | 324 } |
323 | 325 |
324 } // namespace interpreter | 326 } // namespace interpreter |
325 } // namespace internal | 327 } // namespace internal |
326 } // namespace v8 | 328 } // namespace v8 |
OLD | NEW |