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

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

Issue 1704553002: Implementing comma operator for asm->wasm. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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 | « no previous file | test/mjsunit/wasm/asm-wasm.js » ('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 #include "src/wasm/asm-wasm-builder.h" 7 #include "src/wasm/asm-wasm-builder.h"
8 #include "src/wasm/wasm-macro-gen.h" 8 #include "src/wasm/wasm-macro-gen.h"
9 #include "src/wasm/wasm-opcodes.h" 9 #include "src/wasm/wasm-opcodes.h"
10 10
(...skipping 1008 matching lines...) Expand 10 before | Expand all | Expand 10 after
1019 } else if (type == kUint32) { 1019 } else if (type == kUint32) {
1020 current_function_builder_->Emit(kExprI32RemU); 1020 current_function_builder_->Emit(kExprI32RemU);
1021 } else if (type == kFloat64) { 1021 } else if (type == kFloat64) {
1022 ModF64(expr); 1022 ModF64(expr);
1023 return; 1023 return;
1024 } else { 1024 } else {
1025 UNREACHABLE(); 1025 UNREACHABLE();
1026 } 1026 }
1027 break; 1027 break;
1028 } 1028 }
1029 case Token::COMMA: {
1030 current_function_builder_->EmitWithU8(kExprBlock, 2);
1031 break;
1032 }
1029 default: 1033 default:
1030 UNREACHABLE(); 1034 UNREACHABLE();
1031 } 1035 }
1032 RECURSE(Visit(expr->left())); 1036 RECURSE(Visit(expr->left()));
1033 RECURSE(Visit(expr->right())); 1037 RECURSE(Visit(expr->right()));
1034 } 1038 }
1035 } 1039 }
1036 1040
1037 void ModF64(BinaryOperation* expr) { 1041 void ModF64(BinaryOperation* expr) {
1038 current_function_builder_->EmitWithU8(kExprBlock, 3); 1042 current_function_builder_->EmitWithU8(kExprBlock, 3);
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
1280 // that zone in constructor may be thrown away once wasm module is written. 1284 // that zone in constructor may be thrown away once wasm module is written.
1281 WasmModuleIndex* AsmWasmBuilder::Run() { 1285 WasmModuleIndex* AsmWasmBuilder::Run() {
1282 AsmWasmBuilderImpl impl(isolate_, zone_, literal_, foreign_); 1286 AsmWasmBuilderImpl impl(isolate_, zone_, literal_, foreign_);
1283 impl.Compile(); 1287 impl.Compile();
1284 WasmModuleWriter* writer = impl.builder_->Build(zone_); 1288 WasmModuleWriter* writer = impl.builder_->Build(zone_);
1285 return writer->WriteTo(zone_); 1289 return writer->WriteTo(zone_);
1286 } 1290 }
1287 } // namespace wasm 1291 } // namespace wasm
1288 } // namespace internal 1292 } // namespace internal
1289 } // namespace v8 1293 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/wasm/asm-wasm.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698