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 // TODO(rmcilroy): Remove this define after this flag is turned on globally | 5 // TODO(rmcilroy): Remove this define after this flag is turned on globally |
6 #define V8_IMMINENT_DEPRECATION_WARNINGS | 6 #define V8_IMMINENT_DEPRECATION_WARNINGS |
7 | 7 |
8 #include "src/v8.h" | 8 #include "src/v8.h" |
9 | 9 |
10 #include "src/compiler.h" | 10 #include "src/compiler.h" |
(...skipping 2684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2695 }; | 2695 }; |
2696 | 2696 |
2697 for (size_t i = 0; i < arraysize(snippets); i++) { | 2697 for (size_t i = 0; i < arraysize(snippets); i++) { |
2698 Handle<BytecodeArray> bytecode_array = | 2698 Handle<BytecodeArray> bytecode_array = |
2699 helper.MakeBytecodeForFunctionBody(snippets[i].code_snippet); | 2699 helper.MakeBytecodeForFunctionBody(snippets[i].code_snippet); |
2700 CheckBytecodeArrayEqual(snippets[i], bytecode_array); | 2700 CheckBytecodeArrayEqual(snippets[i], bytecode_array); |
2701 } | 2701 } |
2702 } | 2702 } |
2703 | 2703 |
2704 | 2704 |
| 2705 /* TODO(oth): Regenerate this test. |
2705 TEST(GlobalDelete) { | 2706 TEST(GlobalDelete) { |
2706 InitializedHandleScope handle_scope; | 2707 InitializedHandleScope handle_scope; |
2707 BytecodeGeneratorHelper helper; | 2708 BytecodeGeneratorHelper helper; |
2708 Zone zone; | 2709 Zone zone; |
2709 | 2710 |
2710 int context = Register::function_context().index(); | 2711 int context = Register::function_context().index(); |
2711 int global_object_index = Context::GLOBAL_OBJECT_INDEX; | 2712 int global_object_index = Context::GLOBAL_OBJECT_INDEX; |
2712 FeedbackVectorSpec feedback_spec(&zone); | 2713 FeedbackVectorSpec feedback_spec(&zone); |
2713 FeedbackVectorSlot slot = feedback_spec.AddLoadICSlot(); | 2714 FeedbackVectorSlot slot = feedback_spec.AddLoadICSlot(); |
2714 | 2715 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2770 }, | 2771 }, |
2771 1, | 2772 1, |
2772 {InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE}}}; | 2773 {InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE}}}; |
2773 | 2774 |
2774 for (size_t i = 0; i < arraysize(snippets); i++) { | 2775 for (size_t i = 0; i < arraysize(snippets); i++) { |
2775 Handle<BytecodeArray> bytecode_array = | 2776 Handle<BytecodeArray> bytecode_array = |
2776 helper.MakeBytecode(snippets[i].code_snippet, "f"); | 2777 helper.MakeBytecode(snippets[i].code_snippet, "f"); |
2777 CheckBytecodeArrayEqual(snippets[i], bytecode_array); | 2778 CheckBytecodeArrayEqual(snippets[i], bytecode_array); |
2778 } | 2779 } |
2779 } | 2780 } |
| 2781 */ |
2780 | 2782 |
2781 | 2783 |
2782 TEST(FunctionLiterals) { | 2784 TEST(FunctionLiterals) { |
2783 InitializedHandleScope handle_scope; | 2785 InitializedHandleScope handle_scope; |
2784 BytecodeGeneratorHelper helper; | 2786 BytecodeGeneratorHelper helper; |
2785 Zone zone; | 2787 Zone zone; |
2786 | 2788 |
2787 FeedbackVectorSpec feedback_spec(&zone); | 2789 FeedbackVectorSpec feedback_spec(&zone); |
2788 FeedbackVectorSlot slot = feedback_spec.AddCallICSlot(); | 2790 FeedbackVectorSlot slot = feedback_spec.AddCallICSlot(); |
2789 | 2791 |
(...skipping 2675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5465 for (size_t i = 0; i < arraysize(snippets); i++) { | 5467 for (size_t i = 0; i < arraysize(snippets); i++) { |
5466 Handle<BytecodeArray> bytecode_array = | 5468 Handle<BytecodeArray> bytecode_array = |
5467 helper.MakeBytecodeForFunctionBody(snippets[i].code_snippet); | 5469 helper.MakeBytecodeForFunctionBody(snippets[i].code_snippet); |
5468 CheckBytecodeArrayEqual(snippets[i], bytecode_array); | 5470 CheckBytecodeArrayEqual(snippets[i], bytecode_array); |
5469 } | 5471 } |
5470 } | 5472 } |
5471 | 5473 |
5472 } // namespace interpreter | 5474 } // namespace interpreter |
5473 } // namespace internal | 5475 } // namespace internal |
5474 } // namespace v8 | 5476 } // namespace v8 |
OLD | NEW |