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

Side by Side Diff: src/compiler.cc

Issue 648243002: Always compile functions in the snapshot with deoptimization support. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: bump up size of first old_pointer_space page Created 6 years, 2 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 | « no previous file | src/heap/spaces.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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/compiler.h" 7 #include "src/compiler.h"
8 8
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 dependencies_[i] = NULL; 158 dependencies_[i] = NULL;
159 } 159 }
160 if (mode == STUB) { 160 if (mode == STUB) {
161 mode_ = STUB; 161 mode_ = STUB;
162 return; 162 return;
163 } 163 }
164 mode_ = mode; 164 mode_ = mode;
165 if (!script_.is_null() && script_->type()->value() == Script::TYPE_NATIVE) { 165 if (!script_.is_null() && script_->type()->value() == Script::TYPE_NATIVE) {
166 MarkAsNative(); 166 MarkAsNative();
167 } 167 }
168 // Compiling for the snapshot typically results in different code than
169 // compiling later on. This means that code recompiled with deoptimization
170 // support won't be "equivalent" (as defined by SharedFunctionInfo::
171 // EnableDeoptimizationSupport), so it will replace the old code and all
172 // its type feedback. To avoid this, always compile functions in the snapshot
173 // with deoptimization support.
174 if (isolate_->serializer_enabled()) EnableDeoptimizationSupport();
175
168 if (isolate_->debug()->is_active()) MarkAsDebug(); 176 if (isolate_->debug()->is_active()) MarkAsDebug();
169 if (FLAG_context_specialization) MarkAsContextSpecializing(); 177 if (FLAG_context_specialization) MarkAsContextSpecializing();
170 if (FLAG_turbo_inlining) MarkAsInliningEnabled(); 178 if (FLAG_turbo_inlining) MarkAsInliningEnabled();
171 if (FLAG_turbo_types) MarkAsTypingEnabled(); 179 if (FLAG_turbo_types) MarkAsTypingEnabled();
172 180
173 if (!shared_info_.is_null()) { 181 if (!shared_info_.is_null()) {
174 DCHECK(strict_mode() == SLOPPY); 182 DCHECK(strict_mode() == SLOPPY);
175 SetStrictMode(shared_info_->strict_mode()); 183 SetStrictMode(shared_info_->strict_mode());
176 } 184 }
177 bailout_reason_ = kUnknown; 185 bailout_reason_ = kUnknown;
(...skipping 1260 matching lines...) Expand 10 before | Expand all | Expand 10 after
1438 AllowHandleDereference allow_deref; 1446 AllowHandleDereference allow_deref;
1439 bool tracing_on = info()->IsStub() 1447 bool tracing_on = info()->IsStub()
1440 ? FLAG_trace_hydrogen_stubs 1448 ? FLAG_trace_hydrogen_stubs
1441 : (FLAG_trace_hydrogen && 1449 : (FLAG_trace_hydrogen &&
1442 info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter)); 1450 info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter));
1443 return (tracing_on && 1451 return (tracing_on &&
1444 base::OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL); 1452 base::OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL);
1445 } 1453 }
1446 1454
1447 } } // namespace v8::internal 1455 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/heap/spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698