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-builder.h" | 5 #include "src/interpreter/bytecode-array-builder.h" |
6 | 6 |
7 namespace v8 { | 7 namespace v8 { |
8 namespace internal { | 8 namespace internal { |
9 namespace interpreter { | 9 namespace interpreter { |
10 | 10 |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 switch (Bytecodes::FromByte(bytecodes()->at(last_bytecode_start_))) { | 281 switch (Bytecodes::FromByte(bytecodes()->at(last_bytecode_start_))) { |
282 case Bytecode::kToBoolean: | 282 case Bytecode::kToBoolean: |
283 UNREACHABLE(); | 283 UNREACHABLE(); |
284 case Bytecode::kLdaTrue: | 284 case Bytecode::kLdaTrue: |
285 case Bytecode::kLdaFalse: | 285 case Bytecode::kLdaFalse: |
286 case Bytecode::kTestEqual: | 286 case Bytecode::kTestEqual: |
287 case Bytecode::kTestNotEqual: | 287 case Bytecode::kTestNotEqual: |
288 case Bytecode::kTestEqualStrict: | 288 case Bytecode::kTestEqualStrict: |
289 case Bytecode::kTestNotEqualStrict: | 289 case Bytecode::kTestNotEqualStrict: |
290 case Bytecode::kTestLessThan: | 290 case Bytecode::kTestLessThan: |
291 case Bytecode::kTestLessThanEqual: | 291 case Bytecode::kTestLessThanOrEqual: |
292 case Bytecode::kTestGreaterThan: | 292 case Bytecode::kTestGreaterThan: |
293 case Bytecode::kTestGreaterThanEqual: | 293 case Bytecode::kTestGreaterThanOrEqual: |
294 case Bytecode::kTestInstanceOf: | 294 case Bytecode::kTestInstanceOf: |
295 case Bytecode::kTestIn: | 295 case Bytecode::kTestIn: |
296 break; | 296 break; |
297 default: | 297 default: |
298 Output(Bytecode::kToBoolean); | 298 Output(Bytecode::kToBoolean); |
299 } | 299 } |
300 } | 300 } |
301 return *this; | 301 return *this; |
302 } | 302 } |
303 | 303 |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
552 return Bytecode::kTestNotEqual; | 552 return Bytecode::kTestNotEqual; |
553 case Token::Value::EQ_STRICT: | 553 case Token::Value::EQ_STRICT: |
554 return Bytecode::kTestEqualStrict; | 554 return Bytecode::kTestEqualStrict; |
555 case Token::Value::NE_STRICT: | 555 case Token::Value::NE_STRICT: |
556 return Bytecode::kTestNotEqualStrict; | 556 return Bytecode::kTestNotEqualStrict; |
557 case Token::Value::LT: | 557 case Token::Value::LT: |
558 return Bytecode::kTestLessThan; | 558 return Bytecode::kTestLessThan; |
559 case Token::Value::GT: | 559 case Token::Value::GT: |
560 return Bytecode::kTestGreaterThan; | 560 return Bytecode::kTestGreaterThan; |
561 case Token::Value::LTE: | 561 case Token::Value::LTE: |
562 return Bytecode::kTestLessThanEqual; | 562 return Bytecode::kTestLessThanOrEqual; |
563 case Token::Value::GTE: | 563 case Token::Value::GTE: |
564 return Bytecode::kTestGreaterThanEqual; | 564 return Bytecode::kTestGreaterThanOrEqual; |
565 case Token::Value::INSTANCEOF: | 565 case Token::Value::INSTANCEOF: |
566 return Bytecode::kTestInstanceOf; | 566 return Bytecode::kTestInstanceOf; |
567 case Token::Value::IN: | 567 case Token::Value::IN: |
568 return Bytecode::kTestIn; | 568 return Bytecode::kTestIn; |
569 default: | 569 default: |
570 UNREACHABLE(); | 570 UNREACHABLE(); |
571 return static_cast<Bytecode>(-1); | 571 return static_cast<Bytecode>(-1); |
572 } | 572 } |
573 } | 573 } |
574 | 574 |
(...skipping 29 matching lines...) Expand all Loading... |
604 | 604 |
605 Register TemporaryRegisterScope::NewRegister() { | 605 Register TemporaryRegisterScope::NewRegister() { |
606 count_++; | 606 count_++; |
607 last_register_index_ = builder_->BorrowTemporaryRegister(); | 607 last_register_index_ = builder_->BorrowTemporaryRegister(); |
608 return Register(last_register_index_); | 608 return Register(last_register_index_); |
609 } | 609 } |
610 | 610 |
611 } // namespace interpreter | 611 } // namespace interpreter |
612 } // namespace internal | 612 } // namespace internal |
613 } // namespace v8 | 613 } // namespace v8 |
OLD | NEW |