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

Side by Side Diff: src/compiler.h

Issue 21340002: Generate a custom OSR entrypoint for OSR compiles on all platforms, and transition to optimized cod… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Remerge with recent changes. Created 7 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 // CompilationInfo encapsulates some information known at compile time. It 56 // CompilationInfo encapsulates some information known at compile time. It
57 // is constructed based on the resources available at compile-time. 57 // is constructed based on the resources available at compile-time.
58 class CompilationInfo { 58 class CompilationInfo {
59 public: 59 public:
60 CompilationInfo(Handle<JSFunction> closure, Zone* zone); 60 CompilationInfo(Handle<JSFunction> closure, Zone* zone);
61 virtual ~CompilationInfo(); 61 virtual ~CompilationInfo();
62 62
63 Isolate* isolate() const { 63 Isolate* isolate() const {
64 return isolate_; 64 return isolate_;
65 } 65 }
66 Zone* zone() const { return zone_; } 66 Zone* zone() { return zone_; }
67 bool is_osr() const { return !osr_ast_id_.IsNone(); }
67 bool is_lazy() const { return IsLazy::decode(flags_); } 68 bool is_lazy() const { return IsLazy::decode(flags_); }
68 bool is_eval() const { return IsEval::decode(flags_); } 69 bool is_eval() const { return IsEval::decode(flags_); }
69 bool is_global() const { return IsGlobal::decode(flags_); } 70 bool is_global() const { return IsGlobal::decode(flags_); }
70 bool is_classic_mode() const { return language_mode() == CLASSIC_MODE; } 71 bool is_classic_mode() const { return language_mode() == CLASSIC_MODE; }
71 bool is_extended_mode() const { return language_mode() == EXTENDED_MODE; } 72 bool is_extended_mode() const { return language_mode() == EXTENDED_MODE; }
72 LanguageMode language_mode() const { 73 LanguageMode language_mode() const {
73 return LanguageModeField::decode(flags_); 74 return LanguageModeField::decode(flags_);
74 } 75 }
75 bool is_in_loop() const { return IsInLoop::decode(flags_); } 76 bool is_in_loop() const { return IsInLoop::decode(flags_); }
76 FunctionLiteral* function() const { return function_; } 77 FunctionLiteral* function() const { return function_; }
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after
619 Handle<Script> script); 620 Handle<Script> script);
620 621
621 // Set the function info for a newly compiled function. 622 // Set the function info for a newly compiled function.
622 static void SetFunctionInfo(Handle<SharedFunctionInfo> function_info, 623 static void SetFunctionInfo(Handle<SharedFunctionInfo> function_info,
623 FunctionLiteral* lit, 624 FunctionLiteral* lit,
624 bool is_toplevel, 625 bool is_toplevel,
625 Handle<Script> script); 626 Handle<Script> script);
626 627
627 static bool InstallOptimizedCode(OptimizingCompiler* info); 628 static bool InstallOptimizedCode(OptimizingCompiler* info);
628 629
629 static BailoutId CompileForOnStackReplacement(Handle<JSFunction> function); 630 static Handle<Code> CompileForOnStackReplacement(Handle<JSFunction> function);
630 631
631 static BailoutId CompileForConcurrentOSR(Handle<JSFunction> function); 632 static Handle<Code> CompileForConcurrentOSR(Handle<JSFunction> function);
632 633
633 #ifdef ENABLE_DEBUGGER_SUPPORT 634 #ifdef ENABLE_DEBUGGER_SUPPORT
634 static bool MakeCodeForLiveEdit(CompilationInfo* info); 635 static bool MakeCodeForLiveEdit(CompilationInfo* info);
635 #endif 636 #endif
636 637
637 static void RecordFunctionCompilation(Logger::LogEventsAndTags tag, 638 static void RecordFunctionCompilation(Logger::LogEventsAndTags tag,
638 CompilationInfo* info, 639 CompilationInfo* info,
639 Handle<SharedFunctionInfo> shared); 640 Handle<SharedFunctionInfo> shared);
640 }; 641 };
641 642
(...skipping 18 matching lines...) Expand all
660 unsigned info_zone_start_allocation_size_; 661 unsigned info_zone_start_allocation_size_;
661 ElapsedTimer timer_; 662 ElapsedTimer timer_;
662 663
663 DISALLOW_COPY_AND_ASSIGN(CompilationPhase); 664 DISALLOW_COPY_AND_ASSIGN(CompilationPhase);
664 }; 665 };
665 666
666 667
667 } } // namespace v8::internal 668 } } // namespace v8::internal
668 669
669 #endif // V8_COMPILER_H_ 670 #endif // V8_COMPILER_H_
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/compiler.cc » ('j') | src/compiler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698