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

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: Move function address calculation into bytecode handler and have an option on CEntry stub for argv_… 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);
oth 2015/09/29 09:33:36 Curious why this works with arg_count == 0? Runtim
rmcilroy 2015/10/01 17:02:45 Because the code generated by this test is never a
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 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 435
435 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); 436 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn);
436 iterator.Advance(); 437 iterator.Advance();
437 CHECK(iterator.done()); 438 CHECK(iterator.done());
438 } 439 }
439 440
440 441
441 } // namespace interpreter 442 } // namespace interpreter
442 } // namespace internal 443 } // namespace internal
443 } // namespace v8 444 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698