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

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

Issue 1965343002: [Interpreter] Support compiling for baseline on return from interpreted function. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix test for nosnap build Created 4 years, 7 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-inl.h ('k') | src/x64/builtins-x64.cc » ('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/startup-serializer.h" 5 #include "src/snapshot/startup-serializer.h"
6 6
7 #include "src/objects-inl.h" 7 #include "src/objects-inl.h"
8 #include "src/v8threads.h" 8 #include "src/v8threads.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 16 matching lines...) Expand all
27 WhereToPoint where_to_point, int skip) { 27 WhereToPoint where_to_point, int skip) {
28 DCHECK(!obj->IsJSFunction()); 28 DCHECK(!obj->IsJSFunction());
29 29
30 if (function_code_handling_ == CLEAR_FUNCTION_CODE) { 30 if (function_code_handling_ == CLEAR_FUNCTION_CODE) {
31 if (obj->IsCode()) { 31 if (obj->IsCode()) {
32 Code* code = Code::cast(obj); 32 Code* code = Code::cast(obj);
33 // If the function code is compiled (either as native code or bytecode), 33 // If the function code is compiled (either as native code or bytecode),
34 // replace it with lazy-compile builtin. Only exception is when we are 34 // replace it with lazy-compile builtin. Only exception is when we are
35 // serializing the canonical interpreter-entry-trampoline builtin. 35 // serializing the canonical interpreter-entry-trampoline builtin.
36 if (code->kind() == Code::FUNCTION || 36 if (code->kind() == Code::FUNCTION ||
37 (!serializing_builtins_ && code->is_interpreter_entry_trampoline())) { 37 (!serializing_builtins_ &&
38 code->is_interpreter_trampoline_builtin())) {
38 obj = isolate()->builtins()->builtin(Builtins::kCompileLazy); 39 obj = isolate()->builtins()->builtin(Builtins::kCompileLazy);
39 } 40 }
40 } else if (obj->IsBytecodeArray()) { 41 } else if (obj->IsBytecodeArray()) {
41 obj = isolate()->heap()->undefined_value(); 42 obj = isolate()->heap()->undefined_value();
42 } 43 }
43 } else if (obj->IsCode()) { 44 } else if (obj->IsCode()) {
44 DCHECK_EQ(KEEP_FUNCTION_CODE, function_code_handling_); 45 DCHECK_EQ(KEEP_FUNCTION_CODE, function_code_handling_);
45 Code* code = Code::cast(obj); 46 Code* code = Code::cast(obj);
46 if (code->kind() == Code::FUNCTION) { 47 if (code->kind() == Code::FUNCTION) {
47 code->ClearInlineCaches(); 48 code->ClearInlineCaches();
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 if (root_index == Heap::kStackLimitRootIndex || 159 if (root_index == Heap::kStackLimitRootIndex ||
159 root_index == Heap::kRealStackLimitRootIndex) { 160 root_index == Heap::kRealStackLimitRootIndex) {
160 return true; 161 return true;
161 } 162 }
162 return Heap::RootIsImmortalImmovable(root_index) != 163 return Heap::RootIsImmortalImmovable(root_index) !=
163 serializing_immortal_immovables_roots_; 164 serializing_immortal_immovables_roots_;
164 } 165 }
165 166
166 } // namespace internal 167 } // namespace internal
167 } // namespace v8 168 } // namespace v8
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | src/x64/builtins-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698