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

Side by Side Diff: src/wasm/wasm-objects.cc

Issue 2639903003: [wasm] Remove unused variable (Closed)
Patch Set: Created 3 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 | « no previous file | no next file » | 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/wasm/wasm-objects.h" 5 #include "src/wasm/wasm-objects.h"
6 #include "src/utils.h" 6 #include "src/utils.h"
7 7
8 #include "src/base/iterator.h" 8 #include "src/base/iterator.h"
9 #include "src/debug/debug-interface.h" 9 #include "src/debug/debug-interface.h"
10 #include "src/wasm/module-decoder.h" 10 #include "src/wasm/module-decoder.h"
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 int func_index, int offset_in_func) { 198 int func_index, int offset_in_func) {
199 DisallowHeapAllocation no_gc; 199 DisallowHeapAllocation no_gc;
200 AccountingAllocator alloc; 200 AccountingAllocator alloc;
201 Zone tmp(&alloc, ZONE_NAME); 201 Zone tmp(&alloc, ZONE_NAME);
202 BodyLocalDecls locals(&tmp); 202 BodyLocalDecls locals(&tmp);
203 const byte* module_start = compiled_module->module_bytes()->GetChars(); 203 const byte* module_start = compiled_module->module_bytes()->GetChars();
204 WasmFunction& func = compiled_module->module()->functions[func_index]; 204 WasmFunction& func = compiled_module->module()->functions[func_index];
205 BytecodeIterator iterator(module_start + func.code_start_offset, 205 BytecodeIterator iterator(module_start + func.code_start_offset,
206 module_start + func.code_end_offset, &locals); 206 module_start + func.code_end_offset, &locals);
207 DCHECK_LT(0, locals.encoded_size); 207 DCHECK_LT(0, locals.encoded_size);
208 uint32_t found_position = 0;
209 for (uint32_t offset : iterator.offsets()) { 208 for (uint32_t offset : iterator.offsets()) {
210 if (offset > static_cast<uint32_t>(offset_in_func)) break; 209 if (offset > static_cast<uint32_t>(offset_in_func)) break;
211 if (offset == static_cast<uint32_t>(offset_in_func)) return true; 210 if (offset == static_cast<uint32_t>(offset_in_func)) return true;
212 } 211 }
213 return false; 212 return false;
214 } 213 }
215 #endif // DEBUG 214 #endif // DEBUG
216 215
217 } // namespace 216 } // namespace
218 217
(...skipping 928 matching lines...) Expand 10 before | Expand all | Expand 10 after
1147 !array->get(kPreviousInstanceWrapper)->IsFixedArray()) 1146 !array->get(kPreviousInstanceWrapper)->IsFixedArray())
1148 return false; 1147 return false;
1149 return true; 1148 return true;
1150 } 1149 }
1151 1150
1152 void WasmInstanceWrapper::set_instance_object(Handle<JSObject> instance, 1151 void WasmInstanceWrapper::set_instance_object(Handle<JSObject> instance,
1153 Isolate* isolate) { 1152 Isolate* isolate) {
1154 Handle<WeakCell> cell = isolate->factory()->NewWeakCell(instance); 1153 Handle<WeakCell> cell = isolate->factory()->NewWeakCell(instance);
1155 set(kWrapperInstanceObject, *cell); 1154 set(kWrapperInstanceObject, *cell);
1156 } 1155 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698