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

Side by Side Diff: src/compiler.h

Issue 1685633002: [interpreter] CompilationInfo::unoptimized_code only for OSR. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_interpreter-pipeline-1
Patch Set: Addressed comments. Created 4 years, 10 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 | « no previous file | src/compiler.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 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 #ifndef V8_COMPILER_H_ 5 #ifndef V8_COMPILER_H_
6 #define V8_COMPILER_H_ 6 #define V8_COMPILER_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/ast/ast.h" 9 #include "src/ast/ast.h"
10 #include "src/bailout-reason.h" 10 #include "src/bailout-reason.h"
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 240
241 bool has_global_object() const { return has_native_context(); } 241 bool has_global_object() const { return has_native_context(); }
242 242
243 JSGlobalObject* global_object() const { 243 JSGlobalObject* global_object() const {
244 return has_global_object() ? native_context()->global_object() : nullptr; 244 return has_global_object() ? native_context()->global_object() : nullptr;
245 } 245 }
246 246
247 // Accessors for the different compilation modes. 247 // Accessors for the different compilation modes.
248 bool IsOptimizing() const { return mode_ == OPTIMIZE; } 248 bool IsOptimizing() const { return mode_ == OPTIMIZE; }
249 bool IsStub() const { return mode_ == STUB; } 249 bool IsStub() const { return mode_ == STUB; }
250 void SetOptimizing(BailoutId osr_ast_id, Handle<Code> unoptimized) { 250 void SetOptimizing() {
251 DCHECK(has_shared_info()); 251 DCHECK(has_shared_info());
252 SetMode(OPTIMIZE); 252 SetMode(OPTIMIZE);
253 osr_ast_id_ = osr_ast_id;
254 unoptimized_code_ = unoptimized;
255 optimization_id_ = isolate()->NextOptimizationId(); 253 optimization_id_ = isolate()->NextOptimizationId();
256 code_flags_ = 254 code_flags_ =
257 Code::KindField::update(code_flags_, Code::OPTIMIZED_FUNCTION); 255 Code::KindField::update(code_flags_, Code::OPTIMIZED_FUNCTION);
258 } 256 }
257 void SetOptimizingForOsr(BailoutId osr_ast_id, Handle<Code> unoptimized) {
258 SetOptimizing();
259 osr_ast_id_ = osr_ast_id;
260 unoptimized_code_ = unoptimized;
261 }
259 262
260 // Deoptimization support. 263 // Deoptimization support.
261 bool HasDeoptimizationSupport() const { 264 bool HasDeoptimizationSupport() const {
262 return GetFlag(kDeoptimizationSupport); 265 return GetFlag(kDeoptimizationSupport);
263 } 266 }
264 void EnableDeoptimizationSupport() { 267 void EnableDeoptimizationSupport() {
265 DCHECK_EQ(BASE, mode_); 268 DCHECK_EQ(BASE, mode_);
266 SetFlag(kDeoptimizationSupport); 269 SetFlag(kDeoptimizationSupport);
267 } 270 }
268 bool ShouldEnsureSpaceForLazyDeopt() { return !IsStub(); } 271 bool ShouldEnsureSpaceForLazyDeopt() { return !IsStub(); }
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
662 size_t info_zone_start_allocation_size_; 665 size_t info_zone_start_allocation_size_;
663 base::ElapsedTimer timer_; 666 base::ElapsedTimer timer_;
664 667
665 DISALLOW_COPY_AND_ASSIGN(CompilationPhase); 668 DISALLOW_COPY_AND_ASSIGN(CompilationPhase);
666 }; 669 };
667 670
668 } // namespace internal 671 } // namespace internal
669 } // namespace v8 672 } // namespace v8
670 673
671 #endif // V8_COMPILER_H_ 674 #endif // V8_COMPILER_H_
OLDNEW
« no previous file with comments | « no previous file | src/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698