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

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

Issue 2541113004: [Ignition/turbo] Add a NewWithSpread bytecode. (Closed)
Patch Set: Add todo Created 4 years 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/cctest/interpreter/bytecode_expectations/SuperCallAndSpread.golden ('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 "src/interpreter/bytecode-label.h" 9 #include "src/interpreter/bytecode-label.h"
10 #include "src/interpreter/bytecode-register-allocator.h" 10 #include "src/interpreter/bytecode-register-allocator.h"
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 .CreateArrayLiteral(factory->NewFixedArray(1), 0, 0) 128 .CreateArrayLiteral(factory->NewFixedArray(1), 0, 0)
129 .CreateObjectLiteral(factory->NewFixedArray(1), 0, 0, reg); 129 .CreateObjectLiteral(factory->NewFixedArray(1), 0, 0, reg);
130 130
131 // Call operations. 131 // Call operations.
132 builder.Call(reg, reg_list, 1, Call::GLOBAL_CALL) 132 builder.Call(reg, reg_list, 1, Call::GLOBAL_CALL)
133 .Call(reg, reg_list, 1, Call::NAMED_PROPERTY_CALL, 133 .Call(reg, reg_list, 1, Call::NAMED_PROPERTY_CALL,
134 TailCallMode::kDisallow) 134 TailCallMode::kDisallow)
135 .Call(reg, reg_list, 1, Call::GLOBAL_CALL, TailCallMode::kAllow) 135 .Call(reg, reg_list, 1, Call::GLOBAL_CALL, TailCallMode::kAllow)
136 .CallRuntime(Runtime::kIsArray, reg) 136 .CallRuntime(Runtime::kIsArray, reg)
137 .CallRuntimeForPair(Runtime::kLoadLookupSlotForCall, reg_list, pair) 137 .CallRuntimeForPair(Runtime::kLoadLookupSlotForCall, reg_list, pair)
138 .CallJSRuntime(Context::SPREAD_ITERABLE_INDEX, reg_list); 138 .CallJSRuntime(Context::SPREAD_ITERABLE_INDEX, reg_list)
139 .NewWithSpread(reg_list);
139 140
140 // Emit binary operator invocations. 141 // Emit binary operator invocations.
141 builder.BinaryOperation(Token::Value::ADD, reg, 1) 142 builder.BinaryOperation(Token::Value::ADD, reg, 1)
142 .BinaryOperation(Token::Value::SUB, reg, 2) 143 .BinaryOperation(Token::Value::SUB, reg, 2)
143 .BinaryOperation(Token::Value::MUL, reg, 3) 144 .BinaryOperation(Token::Value::MUL, reg, 3)
144 .BinaryOperation(Token::Value::DIV, reg, 4) 145 .BinaryOperation(Token::Value::DIV, reg, 4)
145 .BinaryOperation(Token::Value::MOD, reg, 5); 146 .BinaryOperation(Token::Value::MOD, reg, 5);
146 147
147 // Emit bitwise operator invocations 148 // Emit bitwise operator invocations
148 builder.BinaryOperation(Token::Value::BIT_OR, reg, 6) 149 builder.BinaryOperation(Token::Value::BIT_OR, reg, 6)
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after
730 iterator.Advance(); 731 iterator.Advance();
731 } 732 }
732 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); 733 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn);
733 iterator.Advance(); 734 iterator.Advance();
734 CHECK(iterator.done()); 735 CHECK(iterator.done());
735 } 736 }
736 737
737 } // namespace interpreter 738 } // namespace interpreter
738 } // namespace internal 739 } // namespace internal
739 } // namespace v8 740 } // namespace v8
OLDNEW
« no previous file with comments | « test/cctest/interpreter/bytecode_expectations/SuperCallAndSpread.golden ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698