| OLD | NEW |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef V8_WASM_OBJECTS_H_ | 5 #ifndef V8_WASM_OBJECTS_H_ |
| 6 #define V8_WASM_OBJECTS_H_ | 6 #define V8_WASM_OBJECTS_H_ |
| 7 | 7 |
| 8 #include "src/debug/interface-types.h" | 8 #include "src/debug/interface-types.h" |
| 9 #include "src/objects-inl.h" | 9 #include "src/objects-inl.h" |
| 10 #include "src/trap-handler/trap-handler.h" | 10 #include "src/trap-handler/trap-handler.h" |
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 // TODO(clemensh): Exclude this object from serialization. | 376 // TODO(clemensh): Exclude this object from serialization. |
| 377 class WasmDebugInfo : public FixedArray { | 377 class WasmDebugInfo : public FixedArray { |
| 378 enum Fields { kInstance, kFieldCount }; | 378 enum Fields { kInstance, kFieldCount }; |
| 379 | 379 |
| 380 public: | 380 public: |
| 381 static Handle<WasmDebugInfo> New(Handle<WasmInstanceObject>); | 381 static Handle<WasmDebugInfo> New(Handle<WasmInstanceObject>); |
| 382 | 382 |
| 383 static bool IsDebugInfo(Object*); | 383 static bool IsDebugInfo(Object*); |
| 384 static WasmDebugInfo* cast(Object*); | 384 static WasmDebugInfo* cast(Object*); |
| 385 | 385 |
| 386 static void RunInterpreter(Handle<WasmDebugInfo>, int func_index, |
| 387 uint8_t* arg_buffer); |
| 388 |
| 386 DECLARE_GETTER(wasm_instance, WasmInstanceObject); | 389 DECLARE_GETTER(wasm_instance, WasmInstanceObject); |
| 387 }; | 390 }; |
| 388 | 391 |
| 389 class WasmInstanceWrapper : public FixedArray { | 392 class WasmInstanceWrapper : public FixedArray { |
| 390 public: | 393 public: |
| 391 static Handle<WasmInstanceWrapper> New(Isolate* isolate, | 394 static Handle<WasmInstanceWrapper> New(Isolate* isolate, |
| 392 Handle<WasmInstanceObject> instance); | 395 Handle<WasmInstanceObject> instance); |
| 393 static WasmInstanceWrapper* cast(Object* fixed_array) { | 396 static WasmInstanceWrapper* cast(Object* fixed_array) { |
| 394 SLOW_DCHECK(IsWasmInstanceWrapper(fixed_array)); | 397 SLOW_DCHECK(IsWasmInstanceWrapper(fixed_array)); |
| 395 return reinterpret_cast<WasmInstanceWrapper*>(fixed_array); | 398 return reinterpret_cast<WasmInstanceWrapper*>(fixed_array); |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 441 }; | 444 }; |
| 442 }; | 445 }; |
| 443 | 446 |
| 444 #undef DECLARE_ACCESSORS | 447 #undef DECLARE_ACCESSORS |
| 445 #undef DECLARE_OPTIONAL_ACCESSORS | 448 #undef DECLARE_OPTIONAL_ACCESSORS |
| 446 | 449 |
| 447 } // namespace internal | 450 } // namespace internal |
| 448 } // namespace v8 | 451 } // namespace v8 |
| 449 | 452 |
| 450 #endif // V8_WASM_OBJECTS_H_ | 453 #endif // V8_WASM_OBJECTS_H_ |
| OLD | NEW |