// Copyright 2016 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Test specific cases of the lazy/eager-parse decision. // // Note that presently most unit tests for parsing are found in // cctest/test-parsing.cc. #include #include "include/v8.h" #include "src/api.h" #include "src/handles-inl.h" #include "src/isolate.h" #include "src/utils.h" #include "test/cctest/cctest.h" using namespace v8::internal; namespace { // Record the 'compiled' state of all top level functions. void GetTopLevelFunctionInfo( v8::Local script, std::unordered_map* is_compiled) { // Get the v8::internal::Script object from the API v8::Script. // The API object 'wraps' the compiled top-level function, not the i::Script. Handle toplevel_fn = v8::Utils::OpenHandle(*script); Handle