Chromium Code Reviews| 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 7632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 7643 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE}}, | 7643 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE}}, |
| 7644 }; | 7644 }; |
| 7645 | 7645 |
| 7646 for (size_t i = 0; i < arraysize(snippets); i++) { | 7646 for (size_t i = 0; i < arraysize(snippets); i++) { |
| 7647 Handle<BytecodeArray> bytecode_array = | 7647 Handle<BytecodeArray> bytecode_array = |
| 7648 helper.MakeBytecodeForFunctionBody(snippets[i].code_snippet); | 7648 helper.MakeBytecodeForFunctionBody(snippets[i].code_snippet); |
| 7649 CheckBytecodeArrayEqual(snippets[i], bytecode_array); | 7649 CheckBytecodeArrayEqual(snippets[i], bytecode_array); |
| 7650 } | 7650 } |
| 7651 } | 7651 } |
| 7652 | 7652 |
| 7653 TEST(DoDebugger) { | |
| 7654 InitializedHandleScope handle_scope; | |
| 7655 BytecodeGeneratorHelper helper; | |
| 7656 | |
| 7657 ExpectedSnippet<const char*> snippet = {"debugger;", | |
| 7658 0, | |
| 7659 1, | |
| 7660 3, | |
| 7661 { | |
| 7662 B(Debugger), // | |
|
rmcilroy
2016/02/04 12:37:17
https://codereview.chromium.org/1665853002/ will a
Yang
2016/02/04 13:47:06
Done.
| |
| 7663 B(LdaUndefined), // | |
| 7664 B(Return) // | |
| 7665 }, | |
| 7666 0}; | |
| 7667 | |
| 7668 Handle<BytecodeArray> bytecode_array = | |
| 7669 helper.MakeBytecodeForFunctionBody(snippet.code_snippet); | |
| 7670 CheckBytecodeArrayEqual(snippet, bytecode_array); | |
| 7671 } | |
| 7672 | |
| 7653 } // namespace interpreter | 7673 } // namespace interpreter |
| 7654 } // namespace internal | 7674 } // namespace internal |
| 7655 } // namespace v8 | 7675 } // namespace v8 |
| OLD | NEW |