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

Side by Side Diff: src/compiler.h

Issue 1563213002: Type Feedback Vector lives in the closure (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Ports. Created 4 years, 11 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
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 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 bool is_first_compile() const { return GetFlag(kFirstCompile); } 269 bool is_first_compile() const { return GetFlag(kFirstCompile); }
270 270
271 bool GeneratePreagedPrologue() const { 271 bool GeneratePreagedPrologue() const {
272 // Generate a pre-aged prologue if we are optimizing for size, which 272 // Generate a pre-aged prologue if we are optimizing for size, which
273 // will make code flushing more aggressive. The code for WASM functions 273 // will make code flushing more aggressive. The code for WASM functions
274 // cannot be flushed, so it does not make sense to age them. 274 // cannot be flushed, so it does not make sense to age them.
275 return FLAG_optimize_for_size && FLAG_age_code && !will_serialize() && 275 return FLAG_optimize_for_size && FLAG_age_code && !will_serialize() &&
276 !is_debug() && output_code_kind_ != Code::WASM_FUNCTION; 276 !is_debug() && output_code_kind_ != Code::WASM_FUNCTION;
277 } 277 }
278 278
279 void EnsureFeedbackVector(); 279 void EnsureFeedbackMetadata();
280 Handle<TypeFeedbackVector> feedback_vector() const { 280 Handle<TypeFeedbackMetadata> feedback_metadata() const {
281 return feedback_vector_; 281 return feedback_metadata_;
282 } 282 }
283 void SetCode(Handle<Code> code) { code_ = code; } 283 void SetCode(Handle<Code> code) { code_ = code; }
284 284
285 void SetBytecodeArray(Handle<BytecodeArray> bytecode_array) { 285 void SetBytecodeArray(Handle<BytecodeArray> bytecode_array) {
286 bytecode_array_ = bytecode_array; 286 bytecode_array_ = bytecode_array;
287 } 287 }
288 288
289 bool ShouldTrapOnDeopt() const { 289 bool ShouldTrapOnDeopt() const {
290 return (FLAG_trap_on_deopt && IsOptimizing()) || 290 return (FLAG_trap_on_deopt && IsOptimizing()) ||
291 (FLAG_trap_on_stub_deopt && IsStub()); 291 (FLAG_trap_on_stub_deopt && IsStub());
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 unsigned flags_; 467 unsigned flags_;
468 468
469 Code::Kind output_code_kind_; 469 Code::Kind output_code_kind_;
470 470
471 // For compiled stubs, the stub object 471 // For compiled stubs, the stub object
472 CodeStub* code_stub_; 472 CodeStub* code_stub_;
473 // The compiled code. 473 // The compiled code.
474 Handle<Code> code_; 474 Handle<Code> code_;
475 475
476 // Used by codegen, ultimately kept rooted by the SharedFunctionInfo. 476 // Used by codegen, ultimately kept rooted by the SharedFunctionInfo.
477 Handle<TypeFeedbackVector> feedback_vector_; 477 Handle<TypeFeedbackMetadata> feedback_metadata_;
478 478
479 // Compilation mode flag and whether deoptimization is allowed. 479 // Compilation mode flag and whether deoptimization is allowed.
480 Mode mode_; 480 Mode mode_;
481 BailoutId osr_ast_id_; 481 BailoutId osr_ast_id_;
482 // The unoptimized code we patched for OSR may not be the shared code 482 // The unoptimized code we patched for OSR may not be the shared code
483 // afterwards, since we may need to compile it again to include deoptimization 483 // afterwards, since we may need to compile it again to include deoptimization
484 // data. Keep track which code we patched. 484 // data. Keep track which code we patched.
485 Handle<Code> unoptimized_code_; 485 Handle<Code> unoptimized_code_;
486 486
487 // Holds the bytecode array generated by the interpreter. 487 // Holds the bytecode array generated by the interpreter.
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 size_t info_zone_start_allocation_size_; 719 size_t info_zone_start_allocation_size_;
720 base::ElapsedTimer timer_; 720 base::ElapsedTimer timer_;
721 721
722 DISALLOW_COPY_AND_ASSIGN(CompilationPhase); 722 DISALLOW_COPY_AND_ASSIGN(CompilationPhase);
723 }; 723 };
724 724
725 } // namespace internal 725 } // namespace internal
726 } // namespace v8 726 } // namespace v8
727 727
728 #endif // V8_COMPILER_H_ 728 #endif // V8_COMPILER_H_
OLDNEW
« no previous file with comments | « src/code-stubs-hydrogen.cc ('k') | src/compiler.cc » ('j') | src/crankshaft/hydrogen.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698