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

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

Issue 1379933003: Revert of [Interpreter] Add CallRuntime support to the 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 builder.LoadGlobal(1); 44 builder.LoadGlobal(1);
45 45
46 // Emit load / store property operations. 46 // Emit load / store property operations.
47 builder.LoadNamedProperty(reg, 0, LanguageMode::SLOPPY) 47 builder.LoadNamedProperty(reg, 0, LanguageMode::SLOPPY)
48 .LoadKeyedProperty(reg, 0, LanguageMode::SLOPPY) 48 .LoadKeyedProperty(reg, 0, LanguageMode::SLOPPY)
49 .StoreNamedProperty(reg, reg, 0, LanguageMode::SLOPPY) 49 .StoreNamedProperty(reg, reg, 0, LanguageMode::SLOPPY)
50 .StoreKeyedProperty(reg, reg, 0, LanguageMode::SLOPPY); 50 .StoreKeyedProperty(reg, reg, 0, LanguageMode::SLOPPY);
51 51
52 // Call operations. 52 // Call operations.
53 builder.Call(reg, reg, 0); 53 builder.Call(reg, reg, 0);
54 builder.CallRuntime(Runtime::kIsArray, reg, 1);
55 54
56 // Emit binary operator invocations. 55 // Emit binary operator invocations.
57 builder.BinaryOperation(Token::Value::ADD, reg) 56 builder.BinaryOperation(Token::Value::ADD, reg)
58 .BinaryOperation(Token::Value::SUB, reg) 57 .BinaryOperation(Token::Value::SUB, reg)
59 .BinaryOperation(Token::Value::MUL, reg) 58 .BinaryOperation(Token::Value::MUL, reg)
60 .BinaryOperation(Token::Value::DIV, reg) 59 .BinaryOperation(Token::Value::DIV, reg)
61 .BinaryOperation(Token::Value::MOD, reg); 60 .BinaryOperation(Token::Value::MOD, reg);
62 61
63 // Emit test operator invocations. 62 // Emit test operator invocations.
64 builder.CompareOperation(Token::Value::EQ, reg, LanguageMode::SLOPPY) 63 builder.CompareOperation(Token::Value::EQ, reg, LanguageMode::SLOPPY)
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 434
436 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); 435 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn);
437 iterator.Advance(); 436 iterator.Advance();
438 CHECK(iterator.done()); 437 CHECK(iterator.done());
439 } 438 }
440 439
441 440
442 } // namespace interpreter 441 } // namespace interpreter
443 } // namespace internal 442 } // namespace internal
444 } // namespace v8 443 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698