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

Side by Side Diff: src/snapshot/code-serializer.cc

Issue 2250863002: WIP: prototype ffi support (from 2084663004) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 years 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/runtime/runtime-ffi.cc ('k') | src/v8.gyp » ('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 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 #include "src/snapshot/code-serializer.h" 5 #include "src/snapshot/code-serializer.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/log.h" 10 #include "src/log.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 case Code::STUB: 87 case Code::STUB:
88 #define IC_KIND_CASE(KIND) case Code::KIND: 88 #define IC_KIND_CASE(KIND) case Code::KIND:
89 IC_KIND_LIST(IC_KIND_CASE) 89 IC_KIND_LIST(IC_KIND_CASE)
90 #undef IC_KIND_CASE 90 #undef IC_KIND_CASE
91 SerializeCodeStub(code_object, how_to_code, where_to_point); 91 SerializeCodeStub(code_object, how_to_code, where_to_point);
92 return; 92 return;
93 case Code::FUNCTION: 93 case Code::FUNCTION:
94 DCHECK(code_object->has_reloc_info_for_serialization()); 94 DCHECK(code_object->has_reloc_info_for_serialization());
95 SerializeGeneric(code_object, how_to_code, where_to_point); 95 SerializeGeneric(code_object, how_to_code, where_to_point);
96 return; 96 return;
97 case Code::JS_TO_NATIVE_FUNCTION:
98 UNREACHABLE();
97 default: 99 default:
98 return SerializeCodeObject(code_object, how_to_code, where_to_point); 100 return SerializeCodeObject(code_object, how_to_code, where_to_point);
99 } 101 }
100 UNREACHABLE(); 102 UNREACHABLE();
101 } 103 }
102 104
103 if (ElideObject(obj)) { 105 if (ElideObject(obj)) {
104 return SerializeObject(isolate()->heap()->undefined_value(), how_to_code, 106 return SerializeObject(isolate()->heap()->undefined_value(), how_to_code,
105 where_to_point, skip); 107 where_to_point, skip);
106 } 108 }
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 *rejection_result = scd.SanityCheck(isolate, expected_source_hash); 437 *rejection_result = scd.SanityCheck(isolate, expected_source_hash);
436 if (*rejection_result != CHECK_SUCCESS) { 438 if (*rejection_result != CHECK_SUCCESS) {
437 cached_data->Reject(); 439 cached_data->Reject();
438 return SerializedCodeData(nullptr, 0); 440 return SerializedCodeData(nullptr, 0);
439 } 441 }
440 return scd; 442 return scd;
441 } 443 }
442 444
443 } // namespace internal 445 } // namespace internal
444 } // namespace v8 446 } // namespace v8
OLDNEW
« no previous file with comments | « src/runtime/runtime-ffi.cc ('k') | src/v8.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698