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

Side by Side Diff: test/unittests/interpreter/bytecode-array-builder-unittest.cc

Issue 1402153004: Revert of [Interpreter] Support for operator new. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 | « test/cctest/interpreter/test-interpreter.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "test/unittests/test-utils.h" 9 #include "test/unittests/test-utils.h"
10 10
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 .BinaryOperation(Token::Value::BIT_AND, reg, Strength::WEAK); 83 .BinaryOperation(Token::Value::BIT_AND, reg, Strength::WEAK);
84 84
85 // Emit shift operator invocations 85 // Emit shift operator invocations
86 builder.BinaryOperation(Token::Value::SHL, reg, Strength::WEAK) 86 builder.BinaryOperation(Token::Value::SHL, reg, Strength::WEAK)
87 .BinaryOperation(Token::Value::SAR, reg, Strength::WEAK) 87 .BinaryOperation(Token::Value::SAR, reg, Strength::WEAK)
88 .BinaryOperation(Token::Value::SHR, reg, Strength::WEAK); 88 .BinaryOperation(Token::Value::SHR, reg, Strength::WEAK);
89 89
90 // Emit unary operator invocations. 90 // Emit unary operator invocations.
91 builder.LogicalNot().TypeOf(); 91 builder.LogicalNot().TypeOf();
92 92
93 // Emit new.
94 builder.New(reg, reg, 0);
95
96 // Emit test operator invocations. 93 // Emit test operator invocations.
97 builder.CompareOperation(Token::Value::EQ, reg, Strength::WEAK) 94 builder.CompareOperation(Token::Value::EQ, reg, Strength::WEAK)
98 .CompareOperation(Token::Value::NE, reg, Strength::WEAK) 95 .CompareOperation(Token::Value::NE, reg, Strength::WEAK)
99 .CompareOperation(Token::Value::EQ_STRICT, reg, Strength::WEAK) 96 .CompareOperation(Token::Value::EQ_STRICT, reg, Strength::WEAK)
100 .CompareOperation(Token::Value::NE_STRICT, reg, Strength::WEAK) 97 .CompareOperation(Token::Value::NE_STRICT, reg, Strength::WEAK)
101 .CompareOperation(Token::Value::LT, reg, Strength::WEAK) 98 .CompareOperation(Token::Value::LT, reg, Strength::WEAK)
102 .CompareOperation(Token::Value::GT, reg, Strength::WEAK) 99 .CompareOperation(Token::Value::GT, reg, Strength::WEAK)
103 .CompareOperation(Token::Value::LTE, reg, Strength::WEAK) 100 .CompareOperation(Token::Value::LTE, reg, Strength::WEAK)
104 .CompareOperation(Token::Value::GTE, reg, Strength::WEAK) 101 .CompareOperation(Token::Value::GTE, reg, Strength::WEAK)
105 .CompareOperation(Token::Value::INSTANCEOF, reg, Strength::WEAK) 102 .CompareOperation(Token::Value::INSTANCEOF, reg, Strength::WEAK)
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 475
479 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); 476 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn);
480 iterator.Advance(); 477 iterator.Advance();
481 CHECK(iterator.done()); 478 CHECK(iterator.done());
482 } 479 }
483 480
484 481
485 } // namespace interpreter 482 } // namespace interpreter
486 } // namespace internal 483 } // namespace internal
487 } // namespace v8 484 } // namespace v8
OLDNEW
« no previous file with comments | « test/cctest/interpreter/test-interpreter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698