| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |