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

Side by Side Diff: src/compiler.h

Issue 581993002: Introduce TypeFeedbackVector, as FixedArray grew constrictive. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Initial patch. Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « src/bootstrapper.cc ('k') | 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.h" 9 #include "src/ast.h"
10 #include "src/zone.h" 10 #include "src/zone.h"
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 219
220 void SetFunction(FunctionLiteral* literal) { 220 void SetFunction(FunctionLiteral* literal) {
221 DCHECK(function_ == NULL); 221 DCHECK(function_ == NULL);
222 function_ = literal; 222 function_ = literal;
223 } 223 }
224 void PrepareForCompilation(Scope* scope); 224 void PrepareForCompilation(Scope* scope);
225 void SetGlobalScope(Scope* global_scope) { 225 void SetGlobalScope(Scope* global_scope) {
226 DCHECK(global_scope_ == NULL); 226 DCHECK(global_scope_ == NULL);
227 global_scope_ = global_scope; 227 global_scope_ = global_scope;
228 } 228 }
229 Handle<FixedArray> feedback_vector() const { 229 Handle<TypeFeedbackVector> feedback_vector() const {
230 return feedback_vector_; 230 return feedback_vector_;
231 } 231 }
232 void SetCode(Handle<Code> code) { code_ = code; } 232 void SetCode(Handle<Code> code) { code_ = code; }
233 void SetExtension(v8::Extension* extension) { 233 void SetExtension(v8::Extension* extension) {
234 DCHECK(!is_lazy()); 234 DCHECK(!is_lazy());
235 extension_ = extension; 235 extension_ = extension;
236 } 236 }
237 void SetCachedData(ScriptData** cached_data, 237 void SetCachedData(ScriptData** cached_data,
238 ScriptCompiler::CompileOptions compile_options) { 238 ScriptCompiler::CompileOptions compile_options) {
239 compile_options_ = compile_options; 239 compile_options_ = compile_options;
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 // Fields possibly needed for eager compilation, NULL by default. 444 // Fields possibly needed for eager compilation, NULL by default.
445 v8::Extension* extension_; 445 v8::Extension* extension_;
446 ScriptData** cached_data_; 446 ScriptData** cached_data_;
447 ScriptCompiler::CompileOptions compile_options_; 447 ScriptCompiler::CompileOptions compile_options_;
448 448
449 // The context of the caller for eval code, and the global context for a 449 // The context of the caller for eval code, and the global context for a
450 // global script. Will be a null handle otherwise. 450 // global script. Will be a null handle otherwise.
451 Handle<Context> context_; 451 Handle<Context> context_;
452 452
453 // Used by codegen, ultimately kept rooted by the SharedFunctionInfo. 453 // Used by codegen, ultimately kept rooted by the SharedFunctionInfo.
454 Handle<FixedArray> feedback_vector_; 454 Handle<TypeFeedbackVector> feedback_vector_;
455 455
456 // Compilation mode flag and whether deoptimization is allowed. 456 // Compilation mode flag and whether deoptimization is allowed.
457 Mode mode_; 457 Mode mode_;
458 BailoutId osr_ast_id_; 458 BailoutId osr_ast_id_;
459 // The unoptimized code we patched for OSR may not be the shared code 459 // The unoptimized code we patched for OSR may not be the shared code
460 // afterwards, since we may need to compile it again to include deoptimization 460 // afterwards, since we may need to compile it again to include deoptimization
461 // data. Keep track which code we patched. 461 // data. Keep track which code we patched.
462 Handle<Code> unoptimized_code_; 462 Handle<Code> unoptimized_code_;
463 463
464 // Flag whether compilation needs to be aborted due to dependency change. 464 // Flag whether compilation needs to be aborted due to dependency change.
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
737 Zone zone_; 737 Zone zone_;
738 unsigned info_zone_start_allocation_size_; 738 unsigned info_zone_start_allocation_size_;
739 base::ElapsedTimer timer_; 739 base::ElapsedTimer timer_;
740 740
741 DISALLOW_COPY_AND_ASSIGN(CompilationPhase); 741 DISALLOW_COPY_AND_ASSIGN(CompilationPhase);
742 }; 742 };
743 743
744 } } // namespace v8::internal 744 } } // namespace v8::internal
745 745
746 #endif // V8_COMPILER_H_ 746 #endif // V8_COMPILER_H_
OLDNEW
« no previous file with comments | « src/bootstrapper.cc ('k') | src/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698