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

Side by Side Diff: src/compiler.cc

Issue 283383006: Inobject slack tracking is done on a per-closure basis instead of per-shared info basis. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressing review comments Created 6 years, 7 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 | « src/builtins.h ('k') | src/factory.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 "v8.h" 5 #include "v8.h"
6 6
7 #include "compiler.h" 7 #include "compiler.h"
8 8
9 #include "bootstrapper.h" 9 #include "bootstrapper.h"
10 #include "codegen.h" 10 #include "codegen.h"
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 isolate()->GetHStatistics()->IncrementSubtotals(time_taken_to_create_graph_, 501 isolate()->GetHStatistics()->IncrementSubtotals(time_taken_to_create_graph_,
502 time_taken_to_optimize_, 502 time_taken_to_optimize_,
503 time_taken_to_codegen_); 503 time_taken_to_codegen_);
504 } 504 }
505 } 505 }
506 506
507 507
508 // Sets the expected number of properties based on estimate from compiler. 508 // Sets the expected number of properties based on estimate from compiler.
509 void SetExpectedNofPropertiesFromEstimate(Handle<SharedFunctionInfo> shared, 509 void SetExpectedNofPropertiesFromEstimate(Handle<SharedFunctionInfo> shared,
510 int estimate) { 510 int estimate) {
511 // See the comment in SetExpectedNofProperties.
512 if (shared->live_objects_may_exist()) return;
513
514 // If no properties are added in the constructor, they are more likely 511 // If no properties are added in the constructor, they are more likely
515 // to be added later. 512 // to be added later.
516 if (estimate == 0) estimate = 2; 513 if (estimate == 0) estimate = 2;
517 514
518 // TODO(yangguo): check whether those heuristics are still up-to-date. 515 // TODO(yangguo): check whether those heuristics are still up-to-date.
519 // We do not shrink objects that go into a snapshot (yet), so we adjust 516 // We do not shrink objects that go into a snapshot (yet), so we adjust
520 // the estimate conservatively. 517 // the estimate conservatively.
521 if (Serializer::enabled(shared->GetIsolate())) { 518 if (Serializer::enabled(shared->GetIsolate())) {
522 estimate += 2; 519 estimate += 2;
523 } else if (FLAG_clever_optimizations) { 520 } else if (FLAG_clever_optimizations) {
(...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after
1285 AllowHandleDereference allow_deref; 1282 AllowHandleDereference allow_deref;
1286 bool tracing_on = info()->IsStub() 1283 bool tracing_on = info()->IsStub()
1287 ? FLAG_trace_hydrogen_stubs 1284 ? FLAG_trace_hydrogen_stubs
1288 : (FLAG_trace_hydrogen && 1285 : (FLAG_trace_hydrogen &&
1289 info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter)); 1286 info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter));
1290 return (tracing_on && 1287 return (tracing_on &&
1291 OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL); 1288 OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL);
1292 } 1289 }
1293 1290
1294 } } // namespace v8::internal 1291 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/builtins.h ('k') | src/factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698