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

Side by Side Diff: src/asmjs/asm-wasm-builder.cc

Issue 2397823003: [wasm] [asm.js] Fix asm.js issues around floating point globals. (Closed)
Patch Set: Fix 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 | « src/asmjs/asm-typer.cc ('k') | test/cctest/asmjs/test-asm-typer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1321 matching lines...) Expand 10 before | Expand all | Expand 10 after
1332 } 1332 }
1333 } 1333 }
1334 1334
1335 void VisitCall(Call* expr) { VisitCallExpression(expr); } 1335 void VisitCall(Call* expr) { VisitCallExpression(expr); }
1336 1336
1337 bool VisitCallExpression(Call* expr) { 1337 bool VisitCallExpression(Call* expr) {
1338 Call::CallType call_type = expr->GetCallType(); 1338 Call::CallType call_type = expr->GetCallType();
1339 bool returns_value = true; 1339 bool returns_value = true;
1340 switch (call_type) { 1340 switch (call_type) {
1341 case Call::OTHER_CALL: { 1341 case Call::OTHER_CALL: {
1342 DCHECK_EQ(kFuncScope, scope_);
1343 VariableProxy* proxy = expr->expression()->AsVariableProxy(); 1342 VariableProxy* proxy = expr->expression()->AsVariableProxy();
1344 if (proxy != nullptr) { 1343 if (proxy != nullptr) {
1344 DCHECK(kFuncScope == scope_ ||
1345 typer_->VariableAsStandardMember(proxy->var()) ==
1346 AsmTyper::kMathFround);
1345 if (VisitStdlibFunction(expr, proxy)) { 1347 if (VisitStdlibFunction(expr, proxy)) {
1346 return true; 1348 return true;
1347 } 1349 }
1348 } 1350 }
1351 DCHECK(kFuncScope == scope_);
1349 VariableProxy* vp = expr->expression()->AsVariableProxy(); 1352 VariableProxy* vp = expr->expression()->AsVariableProxy();
1350 DCHECK_NOT_NULL(vp); 1353 DCHECK_NOT_NULL(vp);
1351 if (typer_->TypeOf(vp)->AsFFIType() != nullptr) { 1354 if (typer_->TypeOf(vp)->AsFFIType() != nullptr) {
1352 LocalType return_type = TypeOf(expr); 1355 LocalType return_type = TypeOf(expr);
1353 ZoneList<Expression*>* args = expr->arguments(); 1356 ZoneList<Expression*>* args = expr->arguments();
1354 FunctionSig::Builder sig(zone(), return_type == kAstStmt ? 0 : 1, 1357 FunctionSig::Builder sig(zone(), return_type == kAstStmt ? 0 : 1,
1355 args->length()); 1358 args->length());
1356 if (return_type != kAstStmt) { 1359 if (return_type != kAstStmt) {
1357 sig.AddReturn(return_type); 1360 sig.AddReturn(return_type);
1358 } else { 1361 } else {
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after
1883 impl.builder_->WriteTo(*buffer); 1886 impl.builder_->WriteTo(*buffer);
1884 return buffer; 1887 return buffer;
1885 } 1888 }
1886 1889
1887 const char* AsmWasmBuilder::foreign_init_name = "__foreign_init__"; 1890 const char* AsmWasmBuilder::foreign_init_name = "__foreign_init__";
1888 const char* AsmWasmBuilder::single_function_name = "__single_function__"; 1891 const char* AsmWasmBuilder::single_function_name = "__single_function__";
1889 1892
1890 } // namespace wasm 1893 } // namespace wasm
1891 } // namespace internal 1894 } // namespace internal
1892 } // namespace v8 1895 } // namespace v8
OLDNEW
« no previous file with comments | « src/asmjs/asm-typer.cc ('k') | test/cctest/asmjs/test-asm-typer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698