| 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 <utility> | 5 #include <utility> |
| 6 | 6 |
| 7 #include "src/compiler/pipeline.h" | 7 #include "src/compiler/pipeline.h" |
| 8 #include "src/execution.h" | 8 #include "src/execution.h" |
| 9 #include "src/handles.h" | 9 #include "src/handles.h" |
| 10 #include "src/interpreter/bytecode-array-builder.h" | 10 #include "src/interpreter/bytecode-array-builder.h" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 | 63 |
| 64 | 64 |
| 65 class BytecodeGraphTester { | 65 class BytecodeGraphTester { |
| 66 public: | 66 public: |
| 67 BytecodeGraphTester(Isolate* isolate, Zone* zone, const char* script, | 67 BytecodeGraphTester(Isolate* isolate, Zone* zone, const char* script, |
| 68 const char* filter = kFunctionName) | 68 const char* filter = kFunctionName) |
| 69 : isolate_(isolate), zone_(zone), script_(script) { | 69 : isolate_(isolate), zone_(zone), script_(script) { |
| 70 i::FLAG_ignition = true; | 70 i::FLAG_ignition = true; |
| 71 i::FLAG_always_opt = false; | 71 i::FLAG_always_opt = false; |
| 72 i::FLAG_allow_natives_syntax = true; | 72 i::FLAG_allow_natives_syntax = true; |
| 73 i::FLAG_ignition_fallback_on_catch = false; | |
| 74 // Set ignition filter flag via SetFlagsFromString to avoid double-free | 73 // Set ignition filter flag via SetFlagsFromString to avoid double-free |
| 75 // (or potential leak with StrDup() based on ownership confusion). | 74 // (or potential leak with StrDup() based on ownership confusion). |
| 76 ScopedVector<char> ignition_filter(64); | 75 ScopedVector<char> ignition_filter(64); |
| 77 SNPrintF(ignition_filter, "--ignition-filter=%s", filter); | 76 SNPrintF(ignition_filter, "--ignition-filter=%s", filter); |
| 78 FlagList::SetFlagsFromString(ignition_filter.start(), | 77 FlagList::SetFlagsFromString(ignition_filter.start(), |
| 79 ignition_filter.length()); | 78 ignition_filter.length()); |
| 80 // Ensure handler table is generated. | 79 // Ensure handler table is generated. |
| 81 isolate->interpreter()->Initialize(); | 80 isolate->interpreter()->Initialize(); |
| 82 } | 81 } |
| 83 virtual ~BytecodeGraphTester() {} | 82 virtual ~BytecodeGraphTester() {} |
| (...skipping 2339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2423 callable(factory->NewNumberFromInt(a)).ToHandleChecked(); | 2422 callable(factory->NewNumberFromInt(a)).ToHandleChecked(); |
| 2424 static const int results[] = {11, 12, 2}; | 2423 static const int results[] = {11, 12, 2}; |
| 2425 CHECK_EQ(Handle<Smi>::cast(return_val)->value(), results[a]); | 2424 CHECK_EQ(Handle<Smi>::cast(return_val)->value(), results[a]); |
| 2426 } | 2425 } |
| 2427 } | 2426 } |
| 2428 } | 2427 } |
| 2429 | 2428 |
| 2430 } // namespace compiler | 2429 } // namespace compiler |
| 2431 } // namespace internal | 2430 } // namespace internal |
| 2432 } // namespace v8 | 2431 } // namespace v8 |
| OLD | NEW |