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

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

Issue 1410003003: [Interpreter] Add support for JS runtime calls. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@int_api_builtin
Patch Set: Rebased 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/interpreter-assembler-unittest.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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 // Emit argument creation operations. 92 // Emit argument creation operations.
93 builder.CreateArguments(CreateArgumentsType::kMappedArguments) 93 builder.CreateArguments(CreateArgumentsType::kMappedArguments)
94 .CreateArguments(CreateArgumentsType::kUnmappedArguments); 94 .CreateArguments(CreateArgumentsType::kUnmappedArguments);
95 95
96 // Emit literal creation operations 96 // Emit literal creation operations
97 builder.CreateRegExpLiteral(0, reg) 97 builder.CreateRegExpLiteral(0, reg)
98 .CreateArrayLiteral(0, 0) 98 .CreateArrayLiteral(0, 0)
99 .CreateObjectLiteral(0, 0); 99 .CreateObjectLiteral(0, 0);
100 100
101 // Call operations. 101 // Call operations.
102 builder.Call(reg, reg, 0); 102 builder.Call(reg, reg, 0)
103 builder.CallRuntime(Runtime::kIsArray, reg, 1); 103 .CallRuntime(Runtime::kIsArray, reg, 1)
104 .CallJSRuntime(Context::SPREAD_ITERABLE_INDEX, reg, 1);
104 105
105 // Emit binary operator invocations. 106 // Emit binary operator invocations.
106 builder.BinaryOperation(Token::Value::ADD, reg, Strength::WEAK) 107 builder.BinaryOperation(Token::Value::ADD, reg, Strength::WEAK)
107 .BinaryOperation(Token::Value::SUB, reg, Strength::WEAK) 108 .BinaryOperation(Token::Value::SUB, reg, Strength::WEAK)
108 .BinaryOperation(Token::Value::MUL, reg, Strength::WEAK) 109 .BinaryOperation(Token::Value::MUL, reg, Strength::WEAK)
109 .BinaryOperation(Token::Value::DIV, reg, Strength::WEAK) 110 .BinaryOperation(Token::Value::DIV, reg, Strength::WEAK)
110 .BinaryOperation(Token::Value::MOD, reg, Strength::WEAK); 111 .BinaryOperation(Token::Value::MOD, reg, Strength::WEAK);
111 112
112 // Emit bitwise operator invocations 113 // Emit bitwise operator invocations
113 builder.BinaryOperation(Token::Value::BIT_OR, reg, Strength::WEAK) 114 builder.BinaryOperation(Token::Value::BIT_OR, reg, Strength::WEAK)
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after
697 698
698 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); 699 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn);
699 iterator.Advance(); 700 iterator.Advance();
700 CHECK(iterator.done()); 701 CHECK(iterator.done());
701 } 702 }
702 703
703 704
704 } // namespace interpreter 705 } // namespace interpreter
705 } // namespace internal 706 } // namespace internal
706 } // namespace v8 707 } // namespace v8
OLDNEW
« no previous file with comments | « 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