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

Unified Diff: src/compiler.cc

Issue 181413002: Reset trunk to 3.24.35.4 (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: 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/contexts.h » ('j') | no next file with comments »
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 743d3336881a760894a6fabfe0a0855d86508b93..b9e13c166172595b298ae227348f5a40a35dca20 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -60,8 +60,7 @@ CompilationInfo::CompilationInfo(Handle<Script> script,
script_(script),
osr_ast_id_(BailoutId::None()),
parameter_count_(0),
- this_has_uses_(true),
- optimization_id_(-1) {
+ this_has_uses_(true) {
Initialize(script->GetIsolate(), BASE, zone);
}
@@ -73,8 +72,7 @@ CompilationInfo::CompilationInfo(Handle<SharedFunctionInfo> shared_info,
script_(Handle<Script>(Script::cast(shared_info->script()))),
osr_ast_id_(BailoutId::None()),
parameter_count_(0),
- this_has_uses_(true),
- optimization_id_(-1) {
+ this_has_uses_(true) {
Initialize(script_->GetIsolate(), BASE, zone);
}
@@ -88,8 +86,7 @@ CompilationInfo::CompilationInfo(Handle<JSFunction> closure,
context_(closure->context()),
osr_ast_id_(BailoutId::None()),
parameter_count_(0),
- this_has_uses_(true),
- optimization_id_(-1) {
+ this_has_uses_(true) {
Initialize(script_->GetIsolate(), BASE, zone);
}
@@ -101,8 +98,7 @@ CompilationInfo::CompilationInfo(HydrogenCodeStub* stub,
IsLazy::encode(true)),
osr_ast_id_(BailoutId::None()),
parameter_count_(0),
- this_has_uses_(true),
- optimization_id_(-1) {
+ this_has_uses_(true) {
Initialize(isolate, STUB, zone);
code_stub_ = stub;
}
@@ -215,7 +211,8 @@ Code::Flags CompilationInfo::flags() const {
return Code::ComputeFlags(code_stub()->GetCodeKind(),
code_stub()->GetICState(),
code_stub()->GetExtraICState(),
- code_stub()->GetStubType());
+ code_stub()->GetStubType(),
+ code_stub()->GetStubFlags());
} else {
return Code::ComputeFlags(Code::OPTIMIZED_FUNCTION);
}
@@ -246,13 +243,6 @@ bool CompilationInfo::ShouldSelfOptimize() {
}
-void CompilationInfo::PrepareForCompilation(Scope* scope) {
- ASSERT(scope_ == NULL);
- scope_ = scope;
- function()->ProcessFeedbackSlots(isolate_);
-}
-
-
class HOptimizedGraphBuilderWithPositions: public HOptimizedGraphBuilder {
public:
explicit HOptimizedGraphBuilderWithPositions(CompilationInfo* info)
@@ -373,7 +363,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.PrepareForCompilation(info()->scope());
+ unoptimized.SetScope(info()->scope());
unoptimized.SetContext(info()->context());
if (should_recompile) unoptimized.EnableDeoptimizationSupport();
bool succeeded = FullCodeGenerator::MakeCode(&unoptimized);
@@ -408,7 +398,7 @@ OptimizedCompileJob::Status OptimizedCompileJob::CreateGraph() {
// Type-check the function.
AstTyper::Run(info());
- graph_builder_ = FLAG_hydrogen_track_positions
+ graph_builder_ = FLAG_emit_opt_code_positions
? new(info()->zone()) HOptimizedGraphBuilderWithPositions(info())
: new(info()->zone()) HOptimizedGraphBuilder(info());
@@ -789,13 +779,6 @@ static Handle<SharedFunctionInfo> CompileToplevel(CompilationInfo* info) {
String::cast(script->source())->length() > FLAG_min_preparse_length) &&
!DebuggerWantsEagerCompilation(info);
- if (!parse_allow_lazy && info->pre_parse_data() != NULL) {
- // We are going to parse eagerly, but we have preparse data produced by lazy
- // preparsing. We cannot use it, since it won't contain all the symbols we
- // need for eager parsing.
- info->SetPreParseData(NULL);
- }
-
Handle<SharedFunctionInfo> result;
{ VMState<COMPILER> state(info->isolate());
@@ -999,7 +982,7 @@ Handle<SharedFunctionInfo> Compiler::BuildFunctionInfo(FunctionLiteral* literal,
// Precondition: code has been parsed and scopes have been analyzed.
CompilationInfoWithZone info(script);
info.SetFunction(literal);
- info.PrepareForCompilation(literal->scope());
+ info.SetScope(literal->scope());
info.SetLanguageMode(literal->scope()->language_mode());
Isolate* isolate = info.isolate();
@@ -1195,7 +1178,7 @@ Handle<Code> Compiler::GetOptimizedCode(Handle<JSFunction> function,
if (FLAG_trace_opt) {
PrintF("[failed to optimize ");
function->PrintName();
- PrintF(": %s]\n", GetBailoutReason(info->bailout_reason()));
+ PrintF("]\n");
}
if (isolate->has_pending_exception()) isolate->clear_pending_exception();
« no previous file with comments | « src/compiler.h ('k') | src/contexts.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698