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

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

Issue 1369123002: [Interpreter] Add interpreter support for compare ops and ToBoolean. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Incorporate review feedback from mstarzinger and rmcilroy. Created 5 years, 2 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/compiler/bytecode-graph-builder.cc ('k') | src/interpreter/bytecodes.h » ('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-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 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 switch (Bytecodes::FromByte(bytecodes()->at(last_bytecode_start_))) { 282 switch (Bytecodes::FromByte(bytecodes()->at(last_bytecode_start_))) {
283 case Bytecode::kToBoolean: 283 case Bytecode::kToBoolean:
284 UNREACHABLE(); 284 UNREACHABLE();
285 case Bytecode::kLdaTrue: 285 case Bytecode::kLdaTrue:
286 case Bytecode::kLdaFalse: 286 case Bytecode::kLdaFalse:
287 case Bytecode::kTestEqual: 287 case Bytecode::kTestEqual:
288 case Bytecode::kTestNotEqual: 288 case Bytecode::kTestNotEqual:
289 case Bytecode::kTestEqualStrict: 289 case Bytecode::kTestEqualStrict:
290 case Bytecode::kTestNotEqualStrict: 290 case Bytecode::kTestNotEqualStrict:
291 case Bytecode::kTestLessThan: 291 case Bytecode::kTestLessThan:
292 case Bytecode::kTestLessThanEqual: 292 case Bytecode::kTestLessThanOrEqual:
293 case Bytecode::kTestGreaterThan: 293 case Bytecode::kTestGreaterThan:
294 case Bytecode::kTestGreaterThanEqual: 294 case Bytecode::kTestGreaterThanOrEqual:
295 case Bytecode::kTestInstanceOf: 295 case Bytecode::kTestInstanceOf:
296 case Bytecode::kTestIn: 296 case Bytecode::kTestIn:
297 break; 297 break;
298 default: 298 default:
299 Output(Bytecode::kToBoolean); 299 Output(Bytecode::kToBoolean);
300 } 300 }
301 } 301 }
302 return *this; 302 return *this;
303 } 303 }
304 304
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 return Bytecode::kTestNotEqual; 553 return Bytecode::kTestNotEqual;
554 case Token::Value::EQ_STRICT: 554 case Token::Value::EQ_STRICT:
555 return Bytecode::kTestEqualStrict; 555 return Bytecode::kTestEqualStrict;
556 case Token::Value::NE_STRICT: 556 case Token::Value::NE_STRICT:
557 return Bytecode::kTestNotEqualStrict; 557 return Bytecode::kTestNotEqualStrict;
558 case Token::Value::LT: 558 case Token::Value::LT:
559 return Bytecode::kTestLessThan; 559 return Bytecode::kTestLessThan;
560 case Token::Value::GT: 560 case Token::Value::GT:
561 return Bytecode::kTestGreaterThan; 561 return Bytecode::kTestGreaterThan;
562 case Token::Value::LTE: 562 case Token::Value::LTE:
563 return Bytecode::kTestLessThanEqual; 563 return Bytecode::kTestLessThanOrEqual;
564 case Token::Value::GTE: 564 case Token::Value::GTE:
565 return Bytecode::kTestGreaterThanEqual; 565 return Bytecode::kTestGreaterThanOrEqual;
566 case Token::Value::INSTANCEOF: 566 case Token::Value::INSTANCEOF:
567 return Bytecode::kTestInstanceOf; 567 return Bytecode::kTestInstanceOf;
568 case Token::Value::IN: 568 case Token::Value::IN:
569 return Bytecode::kTestIn; 569 return Bytecode::kTestIn;
570 default: 570 default:
571 UNREACHABLE(); 571 UNREACHABLE();
572 return static_cast<Bytecode>(-1); 572 return static_cast<Bytecode>(-1);
573 } 573 }
574 } 574 }
575 575
(...skipping 29 matching lines...) Expand all
605 605
606 Register TemporaryRegisterScope::NewRegister() { 606 Register TemporaryRegisterScope::NewRegister() {
607 count_++; 607 count_++;
608 last_register_index_ = builder_->BorrowTemporaryRegister(); 608 last_register_index_ = builder_->BorrowTemporaryRegister();
609 return Register(last_register_index_); 609 return Register(last_register_index_);
610 } 610 }
611 611
612 } // namespace interpreter 612 } // namespace interpreter
613 } // namespace internal 613 } // namespace internal
614 } // namespace v8 614 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/bytecode-graph-builder.cc ('k') | src/interpreter/bytecodes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698