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

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: REBASE (many changes due to CALL_IC gone). Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler.h ('k') | src/feedback_slots.h » ('j') | src/feedback_slots.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index b9e13c166172595b298ae227348f5a40a35dca20..7002260da5bd80df6d0577ec65b858ab242b37ed 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -243,6 +243,13 @@ bool CompilationInfo::ShouldSelfOptimize() {
}
+void CompilationInfo::InitializeScope(Scope* scope) {
+ ASSERT(scope_ == NULL);
+ scope_ = scope;
+ function()->ProcessFeedbackSlots(isolate_);
+}
+
+
class HOptimizedGraphBuilderWithPositions: public HOptimizedGraphBuilder {
public:
explicit HOptimizedGraphBuilderWithPositions(CompilationInfo* info)
@@ -363,7 +370,7 @@ OptimizedCompileJob::Status OptimizedCompileJob::CreateGraph() {
// Note that we use the same AST that we will use for generating the
// optimized code.
unoptimized.SetFunction(info()->function());
- unoptimized.SetScope(info()->scope());
+ unoptimized.InitializeScope(info()->scope());
unoptimized.SetContext(info()->context());
if (should_recompile) unoptimized.EnableDeoptimizationSupport();
bool succeeded = FullCodeGenerator::MakeCode(&unoptimized);
@@ -982,7 +989,7 @@ Handle<SharedFunctionInfo> Compiler::BuildFunctionInfo(FunctionLiteral* literal,
// Precondition: code has been parsed and scopes have been analyzed.
CompilationInfoWithZone info(script);
info.SetFunction(literal);
- info.SetScope(literal->scope());
+ info.InitializeScope(literal->scope());
info.SetLanguageMode(literal->scope()->language_mode());
Isolate* isolate = info.isolate();
« no previous file with comments | « src/compiler.h ('k') | src/feedback_slots.h » ('j') | src/feedback_slots.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698