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

Side by Side Diff: src/compiler.cc

Issue 723023003: Remove --clever-optimizations (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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
« no previous file with comments | « src/builtins.cc ('k') | src/flag-definitions.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 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/ast-numbering.h" 9 #include "src/ast-numbering.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 int estimate) { 561 int estimate) {
562 // If no properties are added in the constructor, they are more likely 562 // If no properties are added in the constructor, they are more likely
563 // to be added later. 563 // to be added later.
564 if (estimate == 0) estimate = 2; 564 if (estimate == 0) estimate = 2;
565 565
566 // TODO(yangguo): check whether those heuristics are still up-to-date. 566 // TODO(yangguo): check whether those heuristics are still up-to-date.
567 // We do not shrink objects that go into a snapshot (yet), so we adjust 567 // We do not shrink objects that go into a snapshot (yet), so we adjust
568 // the estimate conservatively. 568 // the estimate conservatively.
569 if (shared->GetIsolate()->serializer_enabled()) { 569 if (shared->GetIsolate()->serializer_enabled()) {
570 estimate += 2; 570 estimate += 2;
571 } else if (FLAG_clever_optimizations) { 571 } else {
572 // Inobject slack tracking will reclaim redundant inobject space later, 572 // Inobject slack tracking will reclaim redundant inobject space later,
573 // so we can afford to adjust the estimate generously. 573 // so we can afford to adjust the estimate generously.
574 estimate += 8; 574 estimate += 8;
575 } else {
576 estimate += 3;
577 } 575 }
578 576
579 shared->set_expected_nof_properties(estimate); 577 shared->set_expected_nof_properties(estimate);
580 } 578 }
581 579
582 580
583 static void MaybeDisableOptimization(Handle<SharedFunctionInfo> shared_info, 581 static void MaybeDisableOptimization(Handle<SharedFunctionInfo> shared_info,
584 BailoutReason bailout_reason) { 582 BailoutReason bailout_reason) {
585 if (bailout_reason != kNoReason) { 583 if (bailout_reason != kNoReason) {
586 shared_info->DisableOptimization(bailout_reason); 584 shared_info->DisableOptimization(bailout_reason);
(...skipping 908 matching lines...) Expand 10 before | Expand all | Expand 10 after
1495 AllowHandleDereference allow_deref; 1493 AllowHandleDereference allow_deref;
1496 bool tracing_on = info()->IsStub() 1494 bool tracing_on = info()->IsStub()
1497 ? FLAG_trace_hydrogen_stubs 1495 ? FLAG_trace_hydrogen_stubs
1498 : (FLAG_trace_hydrogen && 1496 : (FLAG_trace_hydrogen &&
1499 info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter)); 1497 info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter));
1500 return (tracing_on && 1498 return (tracing_on &&
1501 base::OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL); 1499 base::OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL);
1502 } 1500 }
1503 1501
1504 } } // namespace v8::internal 1502 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/builtins.cc ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698