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

Side by Side Diff: test/cctest/test-parsing.cc

Issue 2396963003: [parser] Deprecate ParseInfo constructor taking closure. (Closed)
Patch Set: Rebased. Created 4 years, 2 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
« no previous file with comments | « test/cctest/compiler/test-run-bytecode-graph-builder.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 3360 matching lines...) Expand 10 before | Expand all | Expand 10 after
3371 i::SNPrintF(program, "%s%s%s%s%s", prefix, outer, midfix, inner, 3371 i::SNPrintF(program, "%s%s%s%s%s", prefix, outer, midfix, inner,
3372 suffix); 3372 suffix);
3373 3373
3374 i::Zone zone(CcTest::i_isolate()->allocator()); 3374 i::Zone zone(CcTest::i_isolate()->allocator());
3375 std::unique_ptr<i::ParseInfo> info; 3375 std::unique_ptr<i::ParseInfo> info;
3376 if (lazy) { 3376 if (lazy) {
3377 printf("%s\n", program.start()); 3377 printf("%s\n", program.start());
3378 v8::Local<v8::Value> v = CompileRun(program.start()); 3378 v8::Local<v8::Value> v = CompileRun(program.start());
3379 i::Handle<i::Object> o = v8::Utils::OpenHandle(*v); 3379 i::Handle<i::Object> o = v8::Utils::OpenHandle(*v);
3380 i::Handle<i::JSFunction> f = i::Handle<i::JSFunction>::cast(o); 3380 i::Handle<i::JSFunction> f = i::Handle<i::JSFunction>::cast(o);
3381 info = std::unique_ptr<i::ParseInfo>(new i::ParseInfo(&zone, f)); 3381 i::Handle<i::SharedFunctionInfo> shared = i::handle(f->shared());
3382 info = std::unique_ptr<i::ParseInfo>(new i::ParseInfo(&zone, shared));
3382 } else { 3383 } else {
3383 i::Handle<i::String> source = 3384 i::Handle<i::String> source =
3384 factory->InternalizeUtf8String(program.start()); 3385 factory->InternalizeUtf8String(program.start());
3385 source->PrintOn(stdout); 3386 source->PrintOn(stdout);
3386 printf("\n"); 3387 printf("\n");
3387 i::Handle<i::Script> script = factory->NewScript(source); 3388 i::Handle<i::Script> script = factory->NewScript(source);
3388 info = std::unique_ptr<i::ParseInfo>(new i::ParseInfo(&zone, script)); 3389 info = std::unique_ptr<i::ParseInfo>(new i::ParseInfo(&zone, script));
3389 } 3390 }
3390 i::Parser parser(info.get()); 3391 i::Parser parser(info.get());
3391 CHECK(parser.Parse(info.get())); 3392 CHECK(parser.Parse(info.get()));
(...skipping 4932 matching lines...) Expand 10 before | Expand all | Expand 10 after
8324 const char* data[] = { 8325 const char* data[] = {
8325 "const arguments = 1", 8326 "const arguments = 1",
8326 "let arguments", 8327 "let arguments",
8327 "var arguments", 8328 "var arguments",
8328 NULL 8329 NULL
8329 }; 8330 };
8330 // clang-format on 8331 // clang-format on
8331 RunParserSyncTest(context_data, data, kSuccess); 8332 RunParserSyncTest(context_data, data, kSuccess);
8332 } 8333 }
8333 } 8334 }
OLDNEW
« no previous file with comments | « test/cctest/compiler/test-run-bytecode-graph-builder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698