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

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: rebased the patch 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
« 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 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).Delete(reg, LanguageMode::STRICT);
108 110
109 // Emit new. 111 // Emit new.
110 builder.New(reg, reg, 0); 112 builder.New(reg, reg, 0);
111 113
112 // Emit test operator invocations. 114 // Emit test operator invocations.
113 builder.CompareOperation(Token::Value::EQ, reg, Strength::WEAK) 115 builder.CompareOperation(Token::Value::EQ, reg, Strength::WEAK)
114 .CompareOperation(Token::Value::NE, reg, Strength::WEAK) 116 .CompareOperation(Token::Value::NE, reg, Strength::WEAK)
115 .CompareOperation(Token::Value::EQ_STRICT, reg, Strength::WEAK) 117 .CompareOperation(Token::Value::EQ_STRICT, reg, Strength::WEAK)
116 .CompareOperation(Token::Value::NE_STRICT, reg, Strength::WEAK) 118 .CompareOperation(Token::Value::NE_STRICT, reg, Strength::WEAK)
117 .CompareOperation(Token::Value::LT, reg, Strength::WEAK) 119 .CompareOperation(Token::Value::LT, reg, Strength::WEAK)
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 539
538 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); 540 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn);
539 iterator.Advance(); 541 iterator.Advance();
540 CHECK(iterator.done()); 542 CHECK(iterator.done());
541 } 543 }
542 544
543 545
544 } // namespace interpreter 546 } // namespace interpreter
545 } // namespace internal 547 } // namespace internal
546 } // namespace v8 548 } // 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