OLD | NEW |
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-register-allocator.h" | 9 #include "src/interpreter/bytecode-register-allocator.h" |
10 #include "test/unittests/test-utils.h" | 10 #include "test/unittests/test-utils.h" |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 .BinaryOperation(Token::Value::ADD, reg, Strength::WEAK) | 202 .BinaryOperation(Token::Value::ADD, reg, Strength::WEAK) |
203 .JumpIfFalse(&start); | 203 .JumpIfFalse(&start); |
204 | 204 |
205 // Emit throw in it's own basic block so that the rest of the code isn't | 205 // Emit throw in it's own basic block so that the rest of the code isn't |
206 // omitted due to being dead. | 206 // omitted due to being dead. |
207 BytecodeLabel after_throw; | 207 BytecodeLabel after_throw; |
208 builder.Jump(&after_throw) | 208 builder.Jump(&after_throw) |
209 .Throw() | 209 .Throw() |
210 .Bind(&after_throw); | 210 .Bind(&after_throw); |
211 | 211 |
212 builder.ForInPrepare(reg, reg, reg) | 212 builder.ForInPrepare(reg) |
213 .ForInDone(reg, reg) | 213 .ForInDone(reg, reg) |
214 .ForInNext(reg, reg, reg, reg) | 214 .ForInNext(reg, reg, reg) |
215 .ForInStep(reg); | 215 .ForInStep(reg); |
216 | 216 |
217 // Wide constant pool loads | 217 // Wide constant pool loads |
218 for (int i = 0; i < 256; i++) { | 218 for (int i = 0; i < 256; i++) { |
219 // Emit junk in constant pool to force wide constant pool index. | 219 // Emit junk in constant pool to force wide constant pool index. |
220 builder.LoadLiteral(factory->NewNumber(2.5321 + i)); | 220 builder.LoadLiteral(factory->NewNumber(2.5321 + i)); |
221 } | 221 } |
222 builder.LoadLiteral(Smi::FromInt(20000000)); | 222 builder.LoadLiteral(Smi::FromInt(20000000)); |
223 Handle<String> wide_name = factory->NewStringFromStaticChars("var_wide_name"); | 223 Handle<String> wide_name = factory->NewStringFromStaticChars("var_wide_name"); |
224 | 224 |
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
683 } | 683 } |
684 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); | 684 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); |
685 iterator.Advance(); | 685 iterator.Advance(); |
686 CHECK(iterator.done()); | 686 CHECK(iterator.done()); |
687 } | 687 } |
688 | 688 |
689 | 689 |
690 } // namespace interpreter | 690 } // namespace interpreter |
691 } // namespace internal | 691 } // namespace internal |
692 } // namespace v8 | 692 } // namespace v8 |
OLD | NEW |