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

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

Issue 2405293002: [wasm] Add stack checks to loops. (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
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 <memory> 5 #include <memory>
6 6
7 #include "src/base/atomic-utils.h" 7 #include "src/base/atomic-utils.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 9
10 #include "src/macro-assembler.h" 10 #include "src/macro-assembler.h"
(...skipping 30 matching lines...) Expand all
41 namespace { 41 namespace {
42 42
43 static const int kPlaceholderMarker = 1000000000; 43 static const int kPlaceholderMarker = 1000000000;
44 44
45 enum JSFunctionExportInternalField { 45 enum JSFunctionExportInternalField {
46 kInternalModuleInstance, 46 kInternalModuleInstance,
47 kInternalArity, 47 kInternalArity,
48 kInternalSignature 48 kInternalSignature
49 }; 49 };
50 50
51 // Internal constants for the layout of the module object.
52 enum WasmInstanceObjectFields {
53 kWasmCompiledModule = 0,
54 kWasmModuleFunctionTable,
55 kWasmModuleCodeTable,
56 kWasmMemObject,
57 kWasmMemArrayBuffer,
58 kWasmGlobalsArrayBuffer,
59 kWasmDebugInfo,
60 kWasmModuleInternalFieldCount
61 };
62
63 enum WasmImportData { 51 enum WasmImportData {
64 kImportKind, // Smi. an ExternalKind 52 kImportKind, // Smi. an ExternalKind
65 kImportGlobalType, // Smi. Type for globals. 53 kImportGlobalType, // Smi. Type for globals.
66 kImportIndex, // Smi. index for the import. 54 kImportIndex, // Smi. index for the import.
67 kModuleName, // String 55 kModuleName, // String
68 kFunctionName, // maybe String 56 kFunctionName, // maybe String
69 kOutputCount, // Smi. an uint32_t 57 kOutputCount, // Smi. an uint32_t
70 kSignature, // ByteArray. A copy of the data in FunctionSig 58 kSignature, // ByteArray. A copy of the data in FunctionSig
71 kWasmImportDataSize // Sentinel value. 59 kWasmImportDataSize // Sentinel value.
72 }; 60 };
(...skipping 2205 matching lines...) Expand 10 before | Expand all | Expand 10 after
2278 WasmCompiledModule* compiled_module = 2266 WasmCompiledModule* compiled_module =
2279 WasmCompiledModule::cast(instance->GetInternalField(kWasmCompiledModule)); 2267 WasmCompiledModule::cast(instance->GetInternalField(kWasmCompiledModule));
2280 CHECK(compiled_module->has_weak_module_object()); 2268 CHECK(compiled_module->has_weak_module_object());
2281 CHECK(compiled_module->ptr_to_weak_module_object()->cleared()); 2269 CHECK(compiled_module->ptr_to_weak_module_object()->cleared());
2282 } 2270 }
2283 2271
2284 } // namespace testing 2272 } // namespace testing
2285 } // namespace wasm 2273 } // namespace wasm
2286 } // namespace internal 2274 } // namespace internal
2287 } // namespace v8 2275 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698