| 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" | 
| 11 #include "src/interpreter/bytecode-array-iterator.h" | 11 #include "src/interpreter/bytecode-array-iterator.h" | 
| 12 #include "src/interpreter/bytecode-generator.h" | 12 #include "src/interpreter/bytecode-generator.h" | 
| 13 #include "src/interpreter/interpreter.h" | 13 #include "src/interpreter/interpreter.h" | 
| 14 #include "test/cctest/cctest.h" | 14 #include "test/cctest/cctest.h" | 
| 15 #include "test/cctest/test-feedback-vector.h" | 15 #include "test/cctest/test-feedback-vector.h" | 
| 16 | 16 | 
| 17 namespace v8 { | 17 namespace v8 { | 
| 18 namespace internal { | 18 namespace internal { | 
| 19 namespace interpreter { | 19 namespace interpreter { | 
| 20 | 20 | 
| 21 class BytecodeGeneratorHelper { | 21 class BytecodeGeneratorHelper { | 
| 22  public: | 22  public: | 
| 23   const char* kFunctionName = "f"; | 23   const char* kFunctionName = "f"; | 
| 24 | 24 | 
| 25   static const int kLastParamIndex = | 25   static const int kLastParamIndex = | 
| 26       -InterpreterFrameConstants::kLastParamFromRegisterPointer / kPointerSize; | 26       -InterpreterFrameConstants::kLastParamFromRegisterPointer / kPointerSize; | 
| 27 | 27 | 
| 28   BytecodeGeneratorHelper() { | 28   BytecodeGeneratorHelper() { | 
| 29     i::FLAG_vector_stores = true; |  | 
| 30     i::FLAG_ignition = true; | 29     i::FLAG_ignition = true; | 
| 31     i::FLAG_ignition_fake_try_catch = true; | 30     i::FLAG_ignition_fake_try_catch = true; | 
| 32     i::FLAG_ignition_filter = StrDup(kFunctionName); | 31     i::FLAG_ignition_filter = StrDup(kFunctionName); | 
| 33     i::FLAG_always_opt = false; | 32     i::FLAG_always_opt = false; | 
| 34     i::FLAG_allow_natives_syntax = true; | 33     i::FLAG_allow_natives_syntax = true; | 
| 35     CcTest::i_isolate()->interpreter()->Initialize(); | 34     CcTest::i_isolate()->interpreter()->Initialize(); | 
| 36   } | 35   } | 
| 37 | 36 | 
| 38   Isolate* isolate() { return CcTest::i_isolate(); } | 37   Isolate* isolate() { return CcTest::i_isolate(); } | 
| 39   Factory* factory() { return CcTest::i_isolate()->factory(); } | 38   Factory* factory() { return CcTest::i_isolate()->factory(); } | 
| (...skipping 5184 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 5224   for (size_t i = 0; i < arraysize(snippets); i++) { | 5223   for (size_t i = 0; i < arraysize(snippets); i++) { | 
| 5225     Handle<BytecodeArray> bytecode_array = | 5224     Handle<BytecodeArray> bytecode_array = | 
| 5226         helper.MakeBytecodeForFunctionBody(snippets[i].code_snippet); | 5225         helper.MakeBytecodeForFunctionBody(snippets[i].code_snippet); | 
| 5227     CheckBytecodeArrayEqual(snippets[i], bytecode_array); | 5226     CheckBytecodeArrayEqual(snippets[i], bytecode_array); | 
| 5228   } | 5227   } | 
| 5229 } | 5228 } | 
| 5230 | 5229 | 
| 5231 }  // namespace interpreter | 5230 }  // namespace interpreter | 
| 5232 }  // namespace internal | 5231 }  // namespace internal | 
| 5233 }  // namespace v8 | 5232 }  // namespace v8 | 
| OLD | NEW | 
|---|