Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: test/cctest/interpreter/test-bytecode-generator.cc

Issue 1595223004: [Interpreter] Change ignition fallback flag to only fallback on catch, not eval. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"
11 #include "test/cctest/cctest.h" 11 #include "test/cctest/cctest.h"
12 #include "test/cctest/test-feedback-vector.h" 12 #include "test/cctest/test-feedback-vector.h"
13 13
14 namespace v8 { 14 namespace v8 {
15 namespace internal { 15 namespace internal {
16 namespace interpreter { 16 namespace interpreter {
17 17
18 class BytecodeGeneratorHelper { 18 class BytecodeGeneratorHelper {
19 public: 19 public:
20 const char* kFunctionName = "f"; 20 const char* kFunctionName = "f";
21 21
22 static const int kLastParamIndex = 22 static const int kLastParamIndex =
23 -InterpreterFrameConstants::kLastParamFromRegisterPointer / kPointerSize; 23 -InterpreterFrameConstants::kLastParamFromRegisterPointer / kPointerSize;
24 24
25 BytecodeGeneratorHelper() { 25 BytecodeGeneratorHelper() {
26 i::FLAG_ignition = true; 26 i::FLAG_ignition = true;
27 i::FLAG_ignition_fake_try_catch = true; 27 i::FLAG_ignition_fake_try_catch = true;
28 i::FLAG_ignition_fallback_on_eval_and_catch = false; 28 i::FLAG_ignition_fallback_on_catch = false;
29 i::FLAG_ignition_filter = StrDup(kFunctionName); 29 i::FLAG_ignition_filter = StrDup(kFunctionName);
30 i::FLAG_always_opt = false; 30 i::FLAG_always_opt = false;
31 i::FLAG_allow_natives_syntax = true; 31 i::FLAG_allow_natives_syntax = true;
32 i::FLAG_legacy_const = true; 32 i::FLAG_legacy_const = true;
33 CcTest::i_isolate()->interpreter()->Initialize(); 33 CcTest::i_isolate()->interpreter()->Initialize();
34 } 34 }
35 35
36 Isolate* isolate() { return CcTest::i_isolate(); } 36 Isolate* isolate() { return CcTest::i_isolate(); }
37 Factory* factory() { return CcTest::i_isolate()->factory(); } 37 Factory* factory() { return CcTest::i_isolate()->factory(); }
38 38
(...skipping 6688 matching lines...) Expand 10 before | Expand all | Expand 10 after
6727 std::string(function_epilogue); 6727 std::string(function_epilogue);
6728 Handle<BytecodeArray> bytecode_array = 6728 Handle<BytecodeArray> bytecode_array =
6729 helper.MakeBytecode(script.c_str(), "*", "f"); 6729 helper.MakeBytecode(script.c_str(), "*", "f");
6730 CheckBytecodeArrayEqual(snippets[i], bytecode_array); 6730 CheckBytecodeArrayEqual(snippets[i], bytecode_array);
6731 } 6731 }
6732 } 6732 }
6733 6733
6734 } // namespace interpreter 6734 } // namespace interpreter
6735 } // namespace internal 6735 } // namespace internal
6736 } // namespace v8 6736 } // namespace v8
OLDNEW
« no previous file with comments | « test/cctest/compiler/test-run-bytecode-graph-builder.cc ('k') | test/cctest/interpreter/test-interpreter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698