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

Side by Side Diff: src/api.cc

Issue 2226753002: [wasm] external serialization APIs (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 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 | « include/v8.h ('k') | src/objects.h » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/api.h" 5 #include "src/api.h"
6 6
7 #include <string.h> // For memcpy, strlen. 7 #include <string.h> // For memcpy, strlen.
8 #ifdef V8_USE_ADDRESS_SANITIZER 8 #ifdef V8_USE_ADDRESS_SANITIZER
9 #include <sanitizer/asan_interface.h> 9 #include <sanitizer/asan_interface.h>
10 #endif // V8_USE_ADDRESS_SANITIZER 10 #endif // V8_USE_ADDRESS_SANITIZER
(...skipping 2940 matching lines...) Expand 10 before | Expand all | Expand 10 after
2951 bool Value::IsObject() const { return Utils::OpenHandle(this)->IsJSReceiver(); } 2951 bool Value::IsObject() const { return Utils::OpenHandle(this)->IsJSReceiver(); }
2952 2952
2953 2953
2954 bool Value::IsNumber() const { 2954 bool Value::IsNumber() const {
2955 return Utils::OpenHandle(this)->IsNumber(); 2955 return Utils::OpenHandle(this)->IsNumber();
2956 } 2956 }
2957 2957
2958 2958
2959 bool Value::IsProxy() const { return Utils::OpenHandle(this)->IsJSProxy(); } 2959 bool Value::IsProxy() const { return Utils::OpenHandle(this)->IsJSProxy(); }
2960 2960
2961 bool Value::IsWebAssemblyCompiledModule() const {
2962 return Utils::OpenHandle(this)->IsWebAssemblyCompiledModule();
2963 }
2961 2964
2962 #define VALUE_IS_SPECIFIC_TYPE(Type, Class) \ 2965 #define VALUE_IS_SPECIFIC_TYPE(Type, Class) \
2963 bool Value::Is##Type() const { \ 2966 bool Value::Is##Type() const { \
2964 i::Handle<i::Object> obj = Utils::OpenHandle(this); \ 2967 i::Handle<i::Object> obj = Utils::OpenHandle(this); \
2965 if (!obj->IsHeapObject()) return false; \ 2968 if (!obj->IsHeapObject()) return false; \
2966 i::Isolate* isolate = i::HeapObject::cast(*obj)->GetIsolate(); \ 2969 i::Isolate* isolate = i::HeapObject::cast(*obj)->GetIsolate(); \
2967 return obj->HasSpecificClassOf(isolate->heap()->Class##_string()); \ 2970 return obj->HasSpecificClassOf(isolate->heap()->Class##_string()); \
2968 } 2971 }
2969 2972
2970 VALUE_IS_SPECIFIC_TYPE(ArgumentsObject, Arguments) 2973 VALUE_IS_SPECIFIC_TYPE(ArgumentsObject, Arguments)
(...skipping 6018 matching lines...) Expand 10 before | Expand all | Expand 10 after
8989 Address callback_address = 8992 Address callback_address =
8990 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 8993 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
8991 VMState<EXTERNAL> state(isolate); 8994 VMState<EXTERNAL> state(isolate);
8992 ExternalCallbackScope call_scope(isolate, callback_address); 8995 ExternalCallbackScope call_scope(isolate, callback_address);
8993 callback(info); 8996 callback(info);
8994 } 8997 }
8995 8998
8996 8999
8997 } // namespace internal 9000 } // namespace internal
8998 } // namespace v8 9001 } // namespace v8
OLDNEW
« no previous file with comments | « include/v8.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698