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

Side by Side Diff: src/wasm/encoder.cc

Issue 1571713002: [wasm] s/NULL/nullptr/g (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: DCHECK Created 4 years, 11 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/wasm/encoder.h ('k') | src/wasm/wasm-js.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/signature.h" 5 #include "src/signature.h"
6 6
7 #include "src/handles.h" 7 #include "src/handles.h"
8 #include "src/v8.h" 8 #include "src/v8.h"
9 #include "src/zone-containers.h" 9 #include "src/zone-containers.h"
10 10
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 uint16_t WasmFunctionBuilder::AddVar(LocalType type, bool param) { 94 uint16_t WasmFunctionBuilder::AddVar(LocalType type, bool param) {
95 locals_.push_back({param, type}); 95 locals_.push_back({param, type});
96 return static_cast<uint16_t>(locals_.size() - 1); 96 return static_cast<uint16_t>(locals_.size() - 1);
97 } 97 }
98 98
99 99
100 void WasmFunctionBuilder::ReturnType(LocalType type) { return_type_ = type; } 100 void WasmFunctionBuilder::ReturnType(LocalType type) { return_type_ = type; }
101 101
102 102
103 void WasmFunctionBuilder::EmitCode(const byte* code, uint32_t code_size) { 103 void WasmFunctionBuilder::EmitCode(const byte* code, uint32_t code_size) {
104 EmitCode(code, code_size, NULL, 0); 104 EmitCode(code, code_size, nullptr, 0);
105 } 105 }
106 106
107 107
108 void WasmFunctionBuilder::EmitCode(const byte* code, uint32_t code_size, 108 void WasmFunctionBuilder::EmitCode(const byte* code, uint32_t code_size,
109 const uint32_t* local_indices, 109 const uint32_t* local_indices,
110 uint32_t indices_size) { 110 uint32_t indices_size) {
111 size_t size = body_.size(); 111 size_t size = body_.size();
112 for (size_t i = 0; i < code_size; i++) { 112 for (size_t i = 0; i < code_size; i++) {
113 body_.push_back(code[i]); 113 body_.push_back(code[i]);
114 } 114 }
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 next = next | 0x80; 579 next = next | 0x80;
580 } 580 }
581 output.push_back(next); 581 output.push_back(next);
582 shift += 7; 582 shift += 7;
583 } while ((next & 0x80) != 0); 583 } while ((next & 0x80) != 0);
584 return output; 584 return output;
585 } 585 }
586 } // namespace wasm 586 } // namespace wasm
587 } // namespace internal 587 } // namespace internal
588 } // namespace v8 588 } // namespace v8
OLDNEW
« no previous file with comments | « src/wasm/encoder.h ('k') | src/wasm/wasm-js.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698