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

Unified Diff: src/compiler.cc

Issue 137403009: Adding a type vector to replace type cells. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: PORTS. Created 6 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 side-by-side diff with in-line comments
Download patch
Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index b9e13c166172595b298ae227348f5a40a35dca20..674c88cc7bbe28b1f81148d71c8c2308c207a9de 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -243,6 +243,12 @@ bool CompilationInfo::ShouldSelfOptimize() {
}
+void CompilationInfo::ProcessFeedbackSlots() {
Benedikt Meurer 2014/02/04 08:53:50 Why is this in CompilationInfo? And why do we need
mvstanton 2014/02/04 13:03:27 I managed to reduce this to a single chokepoint, S
+ // Scope analysis must have been done.
Benedikt Meurer 2014/02/04 08:53:50 Can we ASSERT that?
mvstanton 2014/02/04 13:03:27 It's enough to do the work in InitializeScope() no
+ function()->ProcessFeedbackSlots(isolate_);
+}
+
+
class HOptimizedGraphBuilderWithPositions: public HOptimizedGraphBuilder {
public:
explicit HOptimizedGraphBuilderWithPositions(CompilationInfo* info)
@@ -613,6 +619,7 @@ static bool CompileUnoptimizedCode(CompilationInfo* info) {
if (!Rewriter::Rewrite(info)) return false;
if (!Scope::Analyze(info)) return false;
ASSERT(info->scope() != NULL);
+ info->ProcessFeedbackSlots();
if (!FullCodeGenerator::MakeCode(info)) {
Isolate* isolate = info->isolate();
@@ -978,11 +985,15 @@ Handle<SharedFunctionInfo> Compiler::CompileScript(Handle<String> source,
Handle<SharedFunctionInfo> Compiler::BuildFunctionInfo(FunctionLiteral* literal,
- Handle<Script> script) {
+ Handle<Script> script,
+ bool process_feedback) {
// Precondition: code has been parsed and scopes have been analyzed.
CompilationInfoWithZone info(script);
info.SetFunction(literal);
info.SetScope(literal->scope());
+ if (process_feedback) {
+ info.ProcessFeedbackSlots();
+ }
info.SetLanguageMode(literal->scope()->language_mode());
Isolate* isolate = info.isolate();
@@ -1083,6 +1094,7 @@ static bool CompileOptimizedPrologue(CompilationInfo* info) {
if (!Rewriter::Rewrite(info)) return false;
if (!Scope::Analyze(info)) return false;
+ info->ProcessFeedbackSlots();
ASSERT(info->scope() != NULL);
return true;
}

Powered by Google App Engine
This is Rietveld 408576698