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

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

Issue 2440953002: [wasm] Binary 0xD: update encoding of opcodes, types, and add immediates. (Closed)
Patch Set: 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 | « no previous file | src/wasm/ast-decoder.h » ('j') | src/wasm/wasm-opcodes.h » ('J')
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 1374 matching lines...) Expand 10 before | Expand all | Expand 10 after
1385 // We have to use a temporary for the correct order of evaluation. 1385 // We have to use a temporary for the correct order of evaluation.
1386 current_function_builder_->EmitI32Const(indices->start_index); 1386 current_function_builder_->EmitI32Const(indices->start_index);
1387 current_function_builder_->Emit(kExprI32Add); 1387 current_function_builder_->Emit(kExprI32Add);
1388 WasmTemporary tmp(current_function_builder_, kAstI32); 1388 WasmTemporary tmp(current_function_builder_, kAstI32);
1389 current_function_builder_->EmitSetLocal(tmp.index()); 1389 current_function_builder_->EmitSetLocal(tmp.index());
1390 1390
1391 VisitCallArgs(expr); 1391 VisitCallArgs(expr);
1392 1392
1393 current_function_builder_->EmitGetLocal(tmp.index()); 1393 current_function_builder_->EmitGetLocal(tmp.index());
1394 current_function_builder_->AddAsmWasmOffset(expr->position()); 1394 current_function_builder_->AddAsmWasmOffset(expr->position());
1395 current_function_builder_->Emit(kExprCallIndirect); 1395 current_function_builder_->EmitWithU8(kExprCallIndirect, 0);
1396 current_function_builder_->EmitVarInt(indices->signature_index); 1396 current_function_builder_->EmitVarInt(indices->signature_index);
1397 returns_value = 1397 returns_value =
1398 builder_->GetSignature(indices->signature_index)->return_count() > 1398 builder_->GetSignature(indices->signature_index)->return_count() >
1399 0; 1399 0;
1400 break; 1400 break;
1401 } 1401 }
1402 default: 1402 default:
1403 UNREACHABLE(); 1403 UNREACHABLE();
1404 } 1404 }
1405 return returns_value; 1405 return returns_value;
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
1884 impl.builder_->WriteAsmJsOffsetTable(*asm_offsets_buffer); 1884 impl.builder_->WriteAsmJsOffsetTable(*asm_offsets_buffer);
1885 return {module_buffer, asm_offsets_buffer}; 1885 return {module_buffer, asm_offsets_buffer};
1886 } 1886 }
1887 1887
1888 const char* AsmWasmBuilder::foreign_init_name = "__foreign_init__"; 1888 const char* AsmWasmBuilder::foreign_init_name = "__foreign_init__";
1889 const char* AsmWasmBuilder::single_function_name = "__single_function__"; 1889 const char* AsmWasmBuilder::single_function_name = "__single_function__";
1890 1890
1891 } // namespace wasm 1891 } // namespace wasm
1892 } // namespace internal 1892 } // namespace internal
1893 } // namespace v8 1893 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/wasm/ast-decoder.h » ('j') | src/wasm/wasm-opcodes.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698