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

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

Issue 1362383002: [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, 0);
54 55
55 // Emit binary operator invocations. 56 // Emit binary operator invocations.
56 builder.BinaryOperation(Token::Value::ADD, reg) 57 builder.BinaryOperation(Token::Value::ADD, reg)
57 .BinaryOperation(Token::Value::SUB, reg) 58 .BinaryOperation(Token::Value::SUB, reg)
58 .BinaryOperation(Token::Value::MUL, reg) 59 .BinaryOperation(Token::Value::MUL, reg)
59 .BinaryOperation(Token::Value::DIV, reg) 60 .BinaryOperation(Token::Value::DIV, reg)
60 .BinaryOperation(Token::Value::MOD, reg); 61 .BinaryOperation(Token::Value::MOD, reg);
61 62
62 // Emit test operator invocations. 63 // Emit test operator invocations.
63 builder.CompareOperation(Token::Value::EQ, reg, LanguageMode::SLOPPY) 64 builder.CompareOperation(Token::Value::EQ, reg, LanguageMode::SLOPPY)
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 } 389 }
389 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); 390 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn);
390 iterator.Advance(); 391 iterator.Advance();
391 CHECK(iterator.done()); 392 CHECK(iterator.done());
392 } 393 }
393 394
394 395
395 } // namespace interpreter 396 } // namespace interpreter
396 } // namespace internal 397 } // namespace internal
397 } // namespace v8 398 } // namespace v8
OLDNEW
« src/x64/builtins-x64.cc ('K') | « test/unittests/compiler/interpreter-assembler-unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698