| OLD | NEW |
| 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 <cstring> | 5 #include <cstring> |
| 6 #include <functional> | 6 #include <functional> |
| 7 #include <iostream> | 7 #include <iostream> |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "src/asmjs/asm-typer.h" | 10 #include "src/asmjs/asm-typer.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 validation_type_(type), | 45 validation_type_(type), |
| 46 handles_(), | 46 handles_(), |
| 47 zone_(handles_.main_zone()), | 47 zone_(handles_.main_zone()), |
| 48 isolate_(CcTest::i_isolate()), | 48 isolate_(CcTest::i_isolate()), |
| 49 ast_value_factory_(zone_, isolate_->heap()->HashSeed()), | 49 ast_value_factory_(zone_, isolate_->heap()->HashSeed()), |
| 50 factory_(isolate_->factory()), | 50 factory_(isolate_->factory()), |
| 51 source_code_( | 51 source_code_( |
| 52 factory_->NewStringFromUtf8(CStrVector(source)).ToHandleChecked()), | 52 factory_->NewStringFromUtf8(CStrVector(source)).ToHandleChecked()), |
| 53 script_(factory_->NewScript(source_code_)) { | 53 script_(factory_->NewScript(source_code_)) { |
| 54 ParseInfo info(zone_, script_); | 54 ParseInfo info(zone_, script_); |
| 55 info.set_global(); | |
| 56 info.set_lazy(false); | 55 info.set_lazy(false); |
| 57 info.set_allow_lazy_parsing(false); | 56 info.set_allow_lazy_parsing(false); |
| 58 info.set_toplevel(true); | 57 info.set_toplevel(true); |
| 59 info.set_ast_value_factory(&ast_value_factory_); | 58 info.set_ast_value_factory(&ast_value_factory_); |
| 60 info.set_ast_value_factory_owned(false); | 59 info.set_ast_value_factory_owned(false); |
| 61 Parser parser(&info); | 60 Parser parser(&info); |
| 62 | 61 |
| 63 if (!Compiler::ParseAndAnalyze(&info)) { | 62 if (!Compiler::ParseAndAnalyze(&info)) { |
| 64 std::cerr << "Failed to parse:\n" << source_ << "\n"; | 63 std::cerr << "Failed to parse:\n" << source_ << "\n"; |
| 65 CHECK(false); | 64 CHECK(false); |
| (...skipping 1928 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1994 for (size_t ii = 0; ii < arraysize(kTests); ++ii) { | 1993 for (size_t ii = 0; ii < arraysize(kTests); ++ii) { |
| 1995 if (!ValidationOf(Module(kTests[ii])) | 1994 if (!ValidationOf(Module(kTests[ii])) |
| 1996 ->FailsWithMessage("Can't assign to immutable symbol")) { | 1995 ->FailsWithMessage("Can't assign to immutable symbol")) { |
| 1997 std::cerr << "Test:\n" << kTests[ii]; | 1996 std::cerr << "Test:\n" << kTests[ii]; |
| 1998 CHECK(false); | 1997 CHECK(false); |
| 1999 } | 1998 } |
| 2000 } | 1999 } |
| 2001 } | 2000 } |
| 2002 | 2001 |
| 2003 } // namespace | 2002 } // namespace |
| OLD | NEW |