OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/compiler.h" | 7 #include "src/compiler.h" |
8 #include "src/interpreter/bytecode-array-iterator.h" | 8 #include "src/interpreter/bytecode-array-iterator.h" |
9 #include "src/interpreter/bytecode-generator.h" | 9 #include "src/interpreter/bytecode-generator.h" |
10 #include "src/interpreter/interpreter.h" | 10 #include "src/interpreter/interpreter.h" |
(...skipping 5299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5310 B(LdaUndefined), // | 5310 B(LdaUndefined), // |
5311 B(Return), // | 5311 B(Return), // |
5312 }, | 5312 }, |
5313 1, | 5313 1, |
5314 {InstanceType::FIXED_ARRAY_TYPE}}, | 5314 {InstanceType::FIXED_ARRAY_TYPE}}, |
5315 {"var x = { 'a': 1, 'b': 2 };\n" | 5315 {"var x = { 'a': 1, 'b': 2 };\n" |
5316 "for (x['a'] in [10, 20, 30]) {\n" | 5316 "for (x['a'] in [10, 20, 30]) {\n" |
5317 " if (x['a'] == 10) continue;\n" | 5317 " if (x['a'] == 10) continue;\n" |
5318 " if (x['a'] == 20) break;\n" | 5318 " if (x['a'] == 20) break;\n" |
5319 "}", | 5319 "}", |
5320 9 * kPointerSize, | 5320 8 * kPointerSize, |
5321 1, | 5321 1, |
5322 94, | 5322 94, |
5323 { | 5323 { |
5324 B(CreateObjectLiteral), U8(0), U8(0), U8(deep_elements_flags), // | 5324 B(CreateObjectLiteral), U8(0), U8(0), U8(deep_elements_flags), // |
5325 B(Star), R(0), // | 5325 B(Star), R(0), // |
5326 B(CreateArrayLiteral), U8(1), U8(1), U8(simple_flags), // | 5326 B(CreateArrayLiteral), U8(1), U8(1), U8(simple_flags), // |
5327 B(JumpIfUndefined), U8(82), // | 5327 B(JumpIfUndefined), U8(82), // |
5328 B(JumpIfNull), U8(80), // | 5328 B(JumpIfNull), U8(80), // |
5329 B(ToObject), // | 5329 B(ToObject), // |
5330 B(JumpIfNull), U8(77), // | 5330 B(JumpIfNull), U8(77), // |
5331 B(Star), R(1), // | 5331 B(Star), R(1), // |
5332 B(ForInPrepare), R(2), R(3), R(4), // | 5332 B(ForInPrepare), R(2), R(3), R(4), // |
5333 B(LdaZero), // | 5333 B(LdaZero), // |
5334 B(Star), R(5), // | 5334 B(Star), R(5), // |
5335 B(ForInDone), R(5), R(4), // | 5335 B(ForInDone), R(5), R(4), // |
5336 B(JumpIfTrue), U8(63), // | 5336 B(JumpIfTrue), U8(63), // |
5337 B(ForInNext), R(1), R(2), R(3), R(5), // | 5337 B(ForInNext), R(1), R(2), R(3), R(5), // |
5338 B(JumpIfUndefined), U8(50), // | 5338 B(JumpIfUndefined), U8(50), // |
5339 B(Star), R(6), // | 5339 B(Star), R(6), // |
5340 B(Ldar), R(0), // | 5340 B(Ldar), R(0), // |
5341 B(Star), R(7), // | 5341 B(Star), R(7), // |
5342 B(Ldar), R(6), // | 5342 B(Ldar), R(6), // |
5343 B(StoreICSloppy), R(7), U8(2), U8(vector->GetIndex(slot4)), // | 5343 B(StoreICSloppy), R(7), U8(2), U8(vector->GetIndex(slot4)), // |
5344 B(Ldar), R(0), // | 5344 B(Ldar), R(0), // |
5345 B(Star), R(6), // | 5345 B(Star), R(6), // |
5346 B(LoadICSloppy), R(6), U8(2), U8(vector->GetIndex(slot2)), // | 5346 B(LoadICSloppy), R(6), U8(2), U8(vector->GetIndex(slot2)), // |
5347 B(Star), R(8), // | 5347 B(Star), R(7), // |
5348 B(LdaSmi8), U8(10), // | 5348 B(LdaSmi8), U8(10), // |
5349 B(TestEqual), R(8), // | 5349 B(TestEqual), R(7), // |
5350 B(JumpIfFalse), U8(4), // | 5350 B(JumpIfFalse), U8(4), // |
5351 B(Jump), U8(20), // | 5351 B(Jump), U8(20), // |
5352 B(Ldar), R(0), // | 5352 B(Ldar), R(0), // |
5353 B(Star), R(6), // | 5353 B(Star), R(6), // |
5354 B(LoadICSloppy), R(6), U8(2), U8(vector->GetIndex(slot3)), // | 5354 B(LoadICSloppy), R(6), U8(2), U8(vector->GetIndex(slot3)), // |
5355 B(Star), R(8), // | 5355 B(Star), R(7), // |
5356 B(LdaSmi8), U8(20), // | 5356 B(LdaSmi8), U8(20), // |
5357 B(TestEqual), R(8), // | 5357 B(TestEqual), R(7), // |
5358 B(JumpIfFalse), U8(4), // | 5358 B(JumpIfFalse), U8(4), // |
5359 B(Jump), U8(8), // | 5359 B(Jump), U8(8), // |
5360 B(ForInStep), R(5), // | 5360 B(ForInStep), R(5), // |
5361 B(Star), R(5), // | 5361 B(Star), R(5), // |
5362 B(Jump), U8(-64), // | 5362 B(Jump), U8(-64), // |
5363 B(LdaUndefined), // | 5363 B(LdaUndefined), // |
5364 B(Return), // | 5364 B(Return), // |
5365 }, | 5365 }, |
5366 3, | 5366 3, |
5367 {InstanceType::FIXED_ARRAY_TYPE, InstanceType::FIXED_ARRAY_TYPE, | 5367 {InstanceType::FIXED_ARRAY_TYPE, InstanceType::FIXED_ARRAY_TYPE, |
(...skipping 1350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6718 std::string(function_epilogue); | 6718 std::string(function_epilogue); |
6719 Handle<BytecodeArray> bytecode_array = | 6719 Handle<BytecodeArray> bytecode_array = |
6720 helper.MakeBytecode(script.c_str(), "t", "f"); | 6720 helper.MakeBytecode(script.c_str(), "t", "f"); |
6721 CheckBytecodeArrayEqual(snippets[i], bytecode_array); | 6721 CheckBytecodeArrayEqual(snippets[i], bytecode_array); |
6722 } | 6722 } |
6723 } | 6723 } |
6724 | 6724 |
6725 } // namespace interpreter | 6725 } // namespace interpreter |
6726 } // namespace internal | 6726 } // namespace internal |
6727 } // namespace v8 | 6727 } // namespace v8 |
OLD | NEW |