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

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

Issue 2619353006: Refactor FrameSummary for JS and Wasm frames (Closed)
Patch Set: Address comment 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 | « src/wasm/wasm-objects.h ('k') | 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/debug/debug-interface.h" 8 #include "src/debug/debug-interface.h"
9 #include "src/wasm/module-decoder.h" 9 #include "src/wasm/module-decoder.h"
10 #include "src/wasm/wasm-module.h" 10 #include "src/wasm/wasm-module.h"
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 443
444 Handle<WasmCompiledModule> WasmCompiledModule::New( 444 Handle<WasmCompiledModule> WasmCompiledModule::New(
445 Isolate* isolate, Handle<WasmSharedModuleData> shared) { 445 Isolate* isolate, Handle<WasmSharedModuleData> shared) {
446 Handle<FixedArray> ret = 446 Handle<FixedArray> ret =
447 isolate->factory()->NewFixedArray(PropertyIndices::Count, TENURED); 447 isolate->factory()->NewFixedArray(PropertyIndices::Count, TENURED);
448 // WasmCompiledModule::cast would fail since fields are not set yet. 448 // WasmCompiledModule::cast would fail since fields are not set yet.
449 Handle<WasmCompiledModule> compiled_module( 449 Handle<WasmCompiledModule> compiled_module(
450 reinterpret_cast<WasmCompiledModule*>(*ret), isolate); 450 reinterpret_cast<WasmCompiledModule*>(*ret), isolate);
451 compiled_module->InitId(); 451 compiled_module->InitId();
452 compiled_module->set_shared(shared); 452 compiled_module->set_shared(shared);
453 compiled_module->set_native_context(isolate->native_context());
453 return compiled_module; 454 return compiled_module;
454 } 455 }
455 456
456 void WasmCompiledModule::InitId() { 457 void WasmCompiledModule::InitId() {
457 #if DEBUG 458 #if DEBUG
458 static uint32_t instance_id_counter = 0; 459 static uint32_t instance_id_counter = 0;
459 set(kID_instance_id, Smi::FromInt(instance_id_counter++)); 460 set(kID_instance_id, Smi::FromInt(instance_id_counter++));
460 TRACE("New compiled module id: %d\n", instance_id()); 461 TRACE("New compiled module id: %d\n", instance_id());
461 #endif 462 #endif
462 } 463 }
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
836 !array->get(kPreviousInstanceWrapper)->IsFixedArray()) 837 !array->get(kPreviousInstanceWrapper)->IsFixedArray())
837 return false; 838 return false;
838 return true; 839 return true;
839 } 840 }
840 841
841 void WasmInstanceWrapper::set_instance_object(Handle<JSObject> instance, 842 void WasmInstanceWrapper::set_instance_object(Handle<JSObject> instance,
842 Isolate* isolate) { 843 Isolate* isolate) {
843 Handle<WeakCell> cell = isolate->factory()->NewWeakCell(instance); 844 Handle<WeakCell> cell = isolate->factory()->NewWeakCell(instance);
844 set(kWrapperInstanceObject, *cell); 845 set(kWrapperInstanceObject, *cell);
845 } 846 }
OLDNEW
« no previous file with comments | « src/wasm/wasm-objects.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698