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

Side by Side Diff: test/fuzzer/parser.cc

Issue 2268513002: Cleanup: Move ParseInfo to a separate file. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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 <limits.h> 5 #include <limits.h>
6 #include <stddef.h> 6 #include <stddef.h>
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "include/v8.h" 9 #include "include/v8.h"
10 #include "src/objects.h" 10 #include "src/objects.h"
11 #include "src/parsing/parse-info.h"
11 #include "src/parsing/parser.h" 12 #include "src/parsing/parser.h"
12 #include "src/parsing/preparser.h" 13 #include "src/parsing/preparser.h"
13 #include "test/fuzzer/fuzzer-support.h" 14 #include "test/fuzzer/fuzzer-support.h"
14 15
15 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { 16 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
16 v8_fuzzer::FuzzerSupport* support = v8_fuzzer::FuzzerSupport::Get(); 17 v8_fuzzer::FuzzerSupport* support = v8_fuzzer::FuzzerSupport::Get();
17 v8::Isolate* isolate = support->GetIsolate(); 18 v8::Isolate* isolate = support->GetIsolate();
18 19
19 v8::Isolate::Scope isolate_scope(isolate); 20 v8::Isolate::Scope isolate_scope(isolate);
20 v8::HandleScope handle_scope(isolate); 21 v8::HandleScope handle_scope(isolate);
(...skipping 14 matching lines...) Expand all
35 factory->NewScript(source.ToHandleChecked()); 36 factory->NewScript(source.ToHandleChecked());
36 v8::internal::Zone zone(i_isolate->allocator()); 37 v8::internal::Zone zone(i_isolate->allocator());
37 v8::internal::ParseInfo info(&zone, script); 38 v8::internal::ParseInfo info(&zone, script);
38 info.set_global(); 39 info.set_global();
39 v8::internal::Parser parser(&info); 40 v8::internal::Parser parser(&info);
40 parser.Parse(&info); 41 parser.Parse(&info);
41 isolate->RequestGarbageCollectionForTesting( 42 isolate->RequestGarbageCollectionForTesting(
42 v8::Isolate::kFullGarbageCollection); 43 v8::Isolate::kFullGarbageCollection);
43 return 0; 44 return 0;
44 } 45 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698