| 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 "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 // Required to get M_E etc. in MSVC. | 7 // Required to get M_E etc. in MSVC. |
| 8 #if defined(_WIN32) | 8 #if defined(_WIN32) |
| 9 #define _USE_MATH_DEFINES | 9 #define _USE_MATH_DEFINES |
| 10 #endif | 10 #endif |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 bool Build() { | 116 bool Build() { |
| 117 InitializeInitFunction(); | 117 InitializeInitFunction(); |
| 118 if (!typer_->ValidateBeforeFunctionsPhase()) { | 118 if (!typer_->ValidateBeforeFunctionsPhase()) { |
| 119 return false; | 119 return false; |
| 120 } | 120 } |
| 121 DCHECK(!HasStackOverflow()); | 121 DCHECK(!HasStackOverflow()); |
| 122 VisitFunctionLiteral(literal_); | 122 VisitFunctionLiteral(literal_); |
| 123 if (HasStackOverflow()) { | 123 if (HasStackOverflow()) { |
| 124 return false; | 124 return false; |
| 125 } | 125 } |
| 126 if (!typer_finished_) { | 126 if (!typer_finished_ && !typer_failed_) { |
| 127 typer_->FailWithMessage("Module missing export section."); | 127 typer_->FailWithMessage("Module missing export section."); |
| 128 typer_failed_ = true; | 128 typer_failed_ = true; |
| 129 } | 129 } |
| 130 if (typer_failed_) { | 130 if (typer_failed_) { |
| 131 return false; | 131 return false; |
| 132 } | 132 } |
| 133 BuildForeignInitFunction(); | 133 BuildForeignInitFunction(); |
| 134 return true; | 134 return true; |
| 135 } | 135 } |
| 136 | 136 |
| (...skipping 1858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1995 impl.builder_->WriteAsmJsOffsetTable(*asm_offsets_buffer); | 1995 impl.builder_->WriteAsmJsOffsetTable(*asm_offsets_buffer); |
| 1996 return {module_buffer, asm_offsets_buffer, success}; | 1996 return {module_buffer, asm_offsets_buffer, success}; |
| 1997 } | 1997 } |
| 1998 | 1998 |
| 1999 const char* AsmWasmBuilder::foreign_init_name = "__foreign_init__"; | 1999 const char* AsmWasmBuilder::foreign_init_name = "__foreign_init__"; |
| 2000 const char* AsmWasmBuilder::single_function_name = "__single_function__"; | 2000 const char* AsmWasmBuilder::single_function_name = "__single_function__"; |
| 2001 | 2001 |
| 2002 } // namespace wasm | 2002 } // namespace wasm |
| 2003 } // namespace internal | 2003 } // namespace internal |
| 2004 } // namespace v8 | 2004 } // namespace v8 |
| OLD | NEW |