| 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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 | 204 |
| 205 void VisitStatements(ZoneList<Statement*>* stmts) { | 205 void VisitStatements(ZoneList<Statement*>* stmts) { |
| 206 for (int i = 0; i < stmts->length(); ++i) { | 206 for (int i = 0; i < stmts->length(); ++i) { |
| 207 Statement* stmt = stmts->at(i); | 207 Statement* stmt = stmts->at(i); |
| 208 ExpressionStatement* e = stmt->AsExpressionStatement(); | 208 ExpressionStatement* e = stmt->AsExpressionStatement(); |
| 209 if (e != nullptr && e->expression()->IsUndefinedLiteral()) { | 209 if (e != nullptr && e->expression()->IsUndefinedLiteral()) { |
| 210 continue; | 210 continue; |
| 211 } | 211 } |
| 212 RECURSE(Visit(stmt)); | 212 RECURSE(Visit(stmt)); |
| 213 if (typer_failed_) break; | 213 if (typer_failed_) break; |
| 214 if (stmt->IsJump()) break; | |
| 215 } | 214 } |
| 216 } | 215 } |
| 217 | 216 |
| 218 void VisitBlock(Block* stmt) { | 217 void VisitBlock(Block* stmt) { |
| 219 if (stmt->statements()->length() == 1) { | 218 if (stmt->statements()->length() == 1) { |
| 220 ExpressionStatement* expr = | 219 ExpressionStatement* expr = |
| 221 stmt->statements()->at(0)->AsExpressionStatement(); | 220 stmt->statements()->at(0)->AsExpressionStatement(); |
| 222 if (expr != nullptr) { | 221 if (expr != nullptr) { |
| 223 if (expr->expression()->IsAssignment()) { | 222 if (expr->expression()->IsAssignment()) { |
| 224 RECURSE(VisitExpressionStatement(expr)); | 223 RECURSE(VisitExpressionStatement(expr)); |
| (...skipping 1776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2001 impl.builder_->WriteAsmJsOffsetTable(*asm_offsets_buffer); | 2000 impl.builder_->WriteAsmJsOffsetTable(*asm_offsets_buffer); |
| 2002 return {module_buffer, asm_offsets_buffer, success}; | 2001 return {module_buffer, asm_offsets_buffer, success}; |
| 2003 } | 2002 } |
| 2004 | 2003 |
| 2005 const char* AsmWasmBuilder::foreign_init_name = "__foreign_init__"; | 2004 const char* AsmWasmBuilder::foreign_init_name = "__foreign_init__"; |
| 2006 const char* AsmWasmBuilder::single_function_name = "__single_function__"; | 2005 const char* AsmWasmBuilder::single_function_name = "__single_function__"; |
| 2007 | 2006 |
| 2008 } // namespace wasm | 2007 } // namespace wasm |
| 2009 } // namespace internal | 2008 } // namespace internal |
| 2010 } // namespace v8 | 2009 } // namespace v8 |
| OLD | NEW |