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

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

Issue 1410953003: [Interpreter] Adds delete operator to interpreter. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Added more tests for delete and addressed review comments Created 5 years, 1 month 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
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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 .BinaryOperation(Token::Value::SAR, reg, Strength::WEAK) 98 .BinaryOperation(Token::Value::SAR, reg, Strength::WEAK)
99 .BinaryOperation(Token::Value::SHR, reg, Strength::WEAK); 99 .BinaryOperation(Token::Value::SHR, reg, Strength::WEAK);
100 100
101 // Emit count operatior invocations 101 // Emit count operatior invocations
102 builder.CountOperation(Token::Value::ADD, Strength::WEAK) 102 builder.CountOperation(Token::Value::ADD, Strength::WEAK)
103 .CountOperation(Token::Value::SUB, Strength::WEAK); 103 .CountOperation(Token::Value::SUB, Strength::WEAK);
104 104
105 // Emit unary operator invocations. 105 // Emit unary operator invocations.
106 builder.LogicalNot().TypeOf(); 106 builder.LogicalNot().TypeOf();
107 107
108 // Emit delete
109 builder.Delete(reg, LanguageMode::SLOPPY)
110 .Delete(reg, LanguageMode::STRICT);
108 111
109 // Emit new. 112 // Emit new.
110 builder.New(reg, reg, 0); 113 builder.New(reg, reg, 0);
111 114
112 // Emit test operator invocations. 115 // Emit test operator invocations.
113 builder.CompareOperation(Token::Value::EQ, reg, Strength::WEAK) 116 builder.CompareOperation(Token::Value::EQ, reg, Strength::WEAK)
114 .CompareOperation(Token::Value::NE, reg, Strength::WEAK) 117 .CompareOperation(Token::Value::NE, reg, Strength::WEAK)
115 .CompareOperation(Token::Value::EQ_STRICT, reg, Strength::WEAK) 118 .CompareOperation(Token::Value::EQ_STRICT, reg, Strength::WEAK)
116 .CompareOperation(Token::Value::NE_STRICT, reg, Strength::WEAK) 119 .CompareOperation(Token::Value::NE_STRICT, reg, Strength::WEAK)
117 .CompareOperation(Token::Value::LT, reg, Strength::WEAK) 120 .CompareOperation(Token::Value::LT, reg, Strength::WEAK)
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 540
538 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); 541 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn);
539 iterator.Advance(); 542 iterator.Advance();
540 CHECK(iterator.done()); 543 CHECK(iterator.done());
541 } 544 }
542 545
543 546
544 } // namespace interpreter 547 } // namespace interpreter
545 } // namespace internal 548 } // namespace internal
546 } // namespace v8 549 } // namespace v8
OLDNEW
« test/cctest/interpreter/test-interpreter.cc ('K') | « test/cctest/interpreter/test-interpreter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698