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

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

Issue 1456453002: [Interpreter] Add support for Call bytecode to bytecode graph builder. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Compilation fix (signed/unsigned). 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/unittests/compiler/node-test-utils.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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 // Emit argument creation operations. 95 // Emit argument creation operations.
96 builder.CreateArguments(CreateArgumentsType::kMappedArguments) 96 builder.CreateArguments(CreateArgumentsType::kMappedArguments)
97 .CreateArguments(CreateArgumentsType::kUnmappedArguments); 97 .CreateArguments(CreateArgumentsType::kUnmappedArguments);
98 98
99 // Emit literal creation operations 99 // Emit literal creation operations
100 builder.CreateRegExpLiteral(0, reg) 100 builder.CreateRegExpLiteral(0, reg)
101 .CreateArrayLiteral(0, 0) 101 .CreateArrayLiteral(0, 0)
102 .CreateObjectLiteral(0, 0); 102 .CreateObjectLiteral(0, 0);
103 103
104 // Call operations. 104 // Call operations.
105 builder.Call(reg, reg, 0) 105 builder.Call(reg, reg, 0, 0)
106 .Call(reg, reg, 0, 1024)
106 .CallRuntime(Runtime::kIsArray, reg, 1) 107 .CallRuntime(Runtime::kIsArray, reg, 1)
107 .CallJSRuntime(Context::SPREAD_ITERABLE_INDEX, reg, 1); 108 .CallJSRuntime(Context::SPREAD_ITERABLE_INDEX, reg, 1);
108 109
109 // Emit binary operator invocations. 110 // Emit binary operator invocations.
110 builder.BinaryOperation(Token::Value::ADD, reg, Strength::WEAK) 111 builder.BinaryOperation(Token::Value::ADD, reg, Strength::WEAK)
111 .BinaryOperation(Token::Value::SUB, reg, Strength::WEAK) 112 .BinaryOperation(Token::Value::SUB, reg, Strength::WEAK)
112 .BinaryOperation(Token::Value::MUL, reg, Strength::WEAK) 113 .BinaryOperation(Token::Value::MUL, reg, Strength::WEAK)
113 .BinaryOperation(Token::Value::DIV, reg, Strength::WEAK) 114 .BinaryOperation(Token::Value::DIV, reg, Strength::WEAK)
114 .BinaryOperation(Token::Value::MOD, reg, Strength::WEAK); 115 .BinaryOperation(Token::Value::MOD, reg, Strength::WEAK);
115 116
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after
701 702
702 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); 703 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn);
703 iterator.Advance(); 704 iterator.Advance();
704 CHECK(iterator.done()); 705 CHECK(iterator.done());
705 } 706 }
706 707
707 708
708 } // namespace interpreter 709 } // namespace interpreter
709 } // namespace internal 710 } // namespace internal
710 } // namespace v8 711 } // namespace v8
OLDNEW
« no previous file with comments | « test/unittests/compiler/node-test-utils.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698