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/objects.cc

Issue 668143003: Move BailoutReason and flags computation to post-pass (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased Created 6 years, 1 month 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 | « src/objects.h ('k') | src/objects-inl.h » ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 <sstream> 5 #include <sstream>
6 6
7 #include "src/v8.h" 7 #include "src/v8.h"
8 8
9 #include "src/accessors.h" 9 #include "src/accessors.h"
10 #include "src/allocation-site-scopes.h" 10 #include "src/allocation-site-scopes.h"
(...skipping 10137 matching lines...) Expand 10 before | Expand all | Expand 10 after
10148 10148
10149 10149
10150 void SharedFunctionInfo::DisableOptimization(BailoutReason reason) { 10150 void SharedFunctionInfo::DisableOptimization(BailoutReason reason) {
10151 // Disable optimization for the shared function info and mark the 10151 // Disable optimization for the shared function info and mark the
10152 // code as non-optimizable. The marker on the shared function info 10152 // code as non-optimizable. The marker on the shared function info
10153 // is there because we flush non-optimized code thereby loosing the 10153 // is there because we flush non-optimized code thereby loosing the
10154 // non-optimizable information for the code. When the code is 10154 // non-optimizable information for the code. When the code is
10155 // regenerated and set on the shared function info it is marked as 10155 // regenerated and set on the shared function info it is marked as
10156 // non-optimizable if optimization is disabled for the shared 10156 // non-optimizable if optimization is disabled for the shared
10157 // function info. 10157 // function info.
10158 DCHECK(reason != kNoReason);
10158 set_optimization_disabled(true); 10159 set_optimization_disabled(true);
10159 set_bailout_reason(reason); 10160 set_disable_optimization_reason(reason);
10160 // Code should be the lazy compilation stub or else unoptimized. If the 10161 // Code should be the lazy compilation stub or else unoptimized. If the
10161 // latter, disable optimization for the code too. 10162 // latter, disable optimization for the code too.
10162 DCHECK(code()->kind() == Code::FUNCTION || code()->kind() == Code::BUILTIN); 10163 DCHECK(code()->kind() == Code::FUNCTION || code()->kind() == Code::BUILTIN);
10163 if (code()->kind() == Code::FUNCTION) { 10164 if (code()->kind() == Code::FUNCTION) {
10164 code()->set_optimizable(false); 10165 code()->set_optimizable(false);
10165 } 10166 }
10166 PROFILE(GetIsolate(), CodeDisableOptEvent(code(), this)); 10167 PROFILE(GetIsolate(), CodeDisableOptEvent(code(), this));
10167 if (FLAG_trace_opt) { 10168 if (FLAG_trace_opt) {
10168 PrintF("[disabled optimization for "); 10169 PrintF("[disabled optimization for ");
10169 ShortPrint(); 10170 ShortPrint();
(...skipping 6606 matching lines...) Expand 10 before | Expand all | Expand 10 after
16776 Handle<DependentCode> codes = 16777 Handle<DependentCode> codes =
16777 DependentCode::Insert(handle(cell->dependent_code(), info->isolate()), 16778 DependentCode::Insert(handle(cell->dependent_code(), info->isolate()),
16778 DependentCode::kPropertyCellChangedGroup, 16779 DependentCode::kPropertyCellChangedGroup,
16779 info->object_wrapper()); 16780 info->object_wrapper());
16780 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes); 16781 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes);
16781 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add( 16782 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add(
16782 cell, info->zone()); 16783 cell, info->zone());
16783 } 16784 }
16784 16785
16785 } } // namespace v8::internal 16786 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698