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

Side by Side Diff: src/objects.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 | « src/objects.h ('k') | src/objects-inl.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 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/objects.h" 5 #include "src/objects.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <iomanip> 8 #include <iomanip>
9 #include <memory> 9 #include <memory>
10 #include <sstream> 10 #include <sstream>
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 #include "src/objects-body-descriptors-inl.h" 51 #include "src/objects-body-descriptors-inl.h"
52 #include "src/property-descriptor.h" 52 #include "src/property-descriptor.h"
53 #include "src/prototype.h" 53 #include "src/prototype.h"
54 #include "src/regexp/jsregexp.h" 54 #include "src/regexp/jsregexp.h"
55 #include "src/safepoint-table.h" 55 #include "src/safepoint-table.h"
56 #include "src/source-position-table.h" 56 #include "src/source-position-table.h"
57 #include "src/string-builder.h" 57 #include "src/string-builder.h"
58 #include "src/string-search.h" 58 #include "src/string-search.h"
59 #include "src/string-stream.h" 59 #include "src/string-stream.h"
60 #include "src/utils.h" 60 #include "src/utils.h"
61 #include "src/wasm/wasm-module.h"
61 #include "src/zone.h" 62 #include "src/zone.h"
62 63
63 #ifdef ENABLE_DISASSEMBLER 64 #ifdef ENABLE_DISASSEMBLER
64 #include "src/disasm.h" 65 #include "src/disasm.h"
65 #include "src/disassembler.h" 66 #include "src/disassembler.h"
66 #include "src/eh-frame.h" 67 #include "src/eh-frame.h"
67 #endif 68 #endif
68 69
69 namespace v8 { 70 namespace v8 {
70 namespace internal { 71 namespace internal {
(...skipping 18928 matching lines...) Expand 10 before | Expand all | Expand 10 after
18999 Handle<JSArrayBuffer> array_buffer(JSArrayBuffer::cast(buffer()), 19000 Handle<JSArrayBuffer> array_buffer(JSArrayBuffer::cast(buffer()),
19000 GetIsolate()); 19001 GetIsolate());
19001 if (array_buffer->was_neutered() || 19002 if (array_buffer->was_neutered() ||
19002 array_buffer->backing_store() != nullptr) { 19003 array_buffer->backing_store() != nullptr) {
19003 return array_buffer; 19004 return array_buffer;
19004 } 19005 }
19005 Handle<JSTypedArray> self(this); 19006 Handle<JSTypedArray> self(this);
19006 return MaterializeArrayBuffer(self); 19007 return MaterializeArrayBuffer(self);
19007 } 19008 }
19008 19009
19010 std::pair<std::unique_ptr<const byte>, size_t>
19011 WebAssemblyCompiledModule::Serialize() {
19012 // TODO(mtrofin): tie to the internal serialization API
19013 return {std::unique_ptr<const byte>(), 0};
19014 }
19015
19016 MaybeHandle<WebAssemblyCompiledModule> WebAssemblyCompiledModule::Deserialize(
19017 Isolate* isolate, const byte* data, size_t size) {
19018 // TODO(mtrofin): tie to the internal serialization API
19019 return MaybeHandle<WebAssemblyCompiledModule>();
19020 }
19009 19021
19010 Handle<PropertyCell> PropertyCell::InvalidateEntry( 19022 Handle<PropertyCell> PropertyCell::InvalidateEntry(
19011 Handle<GlobalDictionary> dictionary, int entry) { 19023 Handle<GlobalDictionary> dictionary, int entry) {
19012 Isolate* isolate = dictionary->GetIsolate(); 19024 Isolate* isolate = dictionary->GetIsolate();
19013 // Swap with a copy. 19025 // Swap with a copy.
19014 DCHECK(dictionary->ValueAt(entry)->IsPropertyCell()); 19026 DCHECK(dictionary->ValueAt(entry)->IsPropertyCell());
19015 Handle<PropertyCell> cell(PropertyCell::cast(dictionary->ValueAt(entry))); 19027 Handle<PropertyCell> cell(PropertyCell::cast(dictionary->ValueAt(entry)));
19016 Handle<PropertyCell> new_cell = isolate->factory()->NewPropertyCell(); 19028 Handle<PropertyCell> new_cell = isolate->factory()->NewPropertyCell();
19017 new_cell->set_value(cell->value()); 19029 new_cell->set_value(cell->value());
19018 dictionary->ValueAtPut(entry, *new_cell); 19030 dictionary->ValueAtPut(entry, *new_cell);
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
19187 for (PrototypeIterator iter(isolate, this, kStartAtReceiver, 19199 for (PrototypeIterator iter(isolate, this, kStartAtReceiver,
19188 PrototypeIterator::END_AT_NULL); 19200 PrototypeIterator::END_AT_NULL);
19189 !iter.IsAtEnd(); iter.AdvanceIgnoringProxies()) { 19201 !iter.IsAtEnd(); iter.AdvanceIgnoringProxies()) {
19190 if (iter.GetCurrent<Object>()->IsJSProxy()) return true; 19202 if (iter.GetCurrent<Object>()->IsJSProxy()) return true;
19191 } 19203 }
19192 return false; 19204 return false;
19193 } 19205 }
19194 19206
19195 } // namespace internal 19207 } // namespace internal
19196 } // namespace v8 19208 } // namespace v8
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698