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

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: 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
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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 builder.BinaryOperation(Token::Value::BIT_OR, reg, Strength::WEAK) 87 builder.BinaryOperation(Token::Value::BIT_OR, reg, Strength::WEAK)
88 .BinaryOperation(Token::Value::BIT_XOR, reg, Strength::WEAK) 88 .BinaryOperation(Token::Value::BIT_XOR, reg, Strength::WEAK)
89 .BinaryOperation(Token::Value::BIT_AND, reg, Strength::WEAK); 89 .BinaryOperation(Token::Value::BIT_AND, reg, Strength::WEAK);
90 90
91 // Emit shift operator invocations 91 // Emit shift operator invocations
92 builder.BinaryOperation(Token::Value::SHL, reg, Strength::WEAK) 92 builder.BinaryOperation(Token::Value::SHL, reg, Strength::WEAK)
93 .BinaryOperation(Token::Value::SAR, reg, Strength::WEAK) 93 .BinaryOperation(Token::Value::SAR, reg, Strength::WEAK)
94 .BinaryOperation(Token::Value::SHR, reg, Strength::WEAK); 94 .BinaryOperation(Token::Value::SHR, reg, Strength::WEAK);
95 95
96 // Emit unary operator invocations. 96 // Emit unary operator invocations.
97 builder.LogicalNot().TypeOf(); 97 builder.LogicalNot()
98 .TypeOf()
99 .Delete(reg, LanguageMode::SLOPPY)
rmcilroy 2015/10/21 14:52:54 nit - make this a different section (since the byt
mythria 2015/10/23 14:48:01 Done.
100 .Delete(reg, LanguageMode::STRICT);
98 101
99 // Emit new. 102 // Emit new.
100 builder.New(reg, reg, 0); 103 builder.New(reg, reg, 0);
101 104
102 // Emit test operator invocations. 105 // Emit test operator invocations.
103 builder.CompareOperation(Token::Value::EQ, reg, Strength::WEAK) 106 builder.CompareOperation(Token::Value::EQ, reg, Strength::WEAK)
104 .CompareOperation(Token::Value::NE, reg, Strength::WEAK) 107 .CompareOperation(Token::Value::NE, reg, Strength::WEAK)
105 .CompareOperation(Token::Value::EQ_STRICT, reg, Strength::WEAK) 108 .CompareOperation(Token::Value::EQ_STRICT, reg, Strength::WEAK)
106 .CompareOperation(Token::Value::NE_STRICT, reg, Strength::WEAK) 109 .CompareOperation(Token::Value::NE_STRICT, reg, Strength::WEAK)
107 .CompareOperation(Token::Value::LT, reg, Strength::WEAK) 110 .CompareOperation(Token::Value::LT, reg, Strength::WEAK)
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 499
497 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); 500 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn);
498 iterator.Advance(); 501 iterator.Advance();
499 CHECK(iterator.done()); 502 CHECK(iterator.done());
500 } 503 }
501 504
502 505
503 } // namespace interpreter 506 } // namespace interpreter
504 } // namespace internal 507 } // namespace internal
505 } // namespace v8 508 } // 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