| OLD | NEW |
| 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 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 511 // See the comment in SetExpectedNofProperties. | 511 // See the comment in SetExpectedNofProperties. |
| 512 if (shared->live_objects_may_exist()) return; | 512 if (shared->live_objects_may_exist()) return; |
| 513 | 513 |
| 514 // If no properties are added in the constructor, they are more likely | 514 // If no properties are added in the constructor, they are more likely |
| 515 // to be added later. | 515 // to be added later. |
| 516 if (estimate == 0) estimate = 2; | 516 if (estimate == 0) estimate = 2; |
| 517 | 517 |
| 518 // TODO(yangguo): check whether those heuristics are still up-to-date. | 518 // 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 | 519 // We do not shrink objects that go into a snapshot (yet), so we adjust |
| 520 // the estimate conservatively. | 520 // the estimate conservatively. |
| 521 if (Serializer::enabled(shared->GetIsolate())) { | 521 if (shared->GetIsolate()->serializer_enabled()) { |
| 522 estimate += 2; | 522 estimate += 2; |
| 523 } else if (FLAG_clever_optimizations) { | 523 } else if (FLAG_clever_optimizations) { |
| 524 // Inobject slack tracking will reclaim redundant inobject space later, | 524 // Inobject slack tracking will reclaim redundant inobject space later, |
| 525 // so we can afford to adjust the estimate generously. | 525 // so we can afford to adjust the estimate generously. |
| 526 estimate += 8; | 526 estimate += 8; |
| 527 } else { | 527 } else { |
| 528 estimate += 3; | 528 estimate += 3; |
| 529 } | 529 } |
| 530 | 530 |
| 531 shared->set_expected_nof_properties(estimate); | 531 shared->set_expected_nof_properties(estimate); |
| (...skipping 753 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1285 AllowHandleDereference allow_deref; | 1285 AllowHandleDereference allow_deref; |
| 1286 bool tracing_on = info()->IsStub() | 1286 bool tracing_on = info()->IsStub() |
| 1287 ? FLAG_trace_hydrogen_stubs | 1287 ? FLAG_trace_hydrogen_stubs |
| 1288 : (FLAG_trace_hydrogen && | 1288 : (FLAG_trace_hydrogen && |
| 1289 info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter)); | 1289 info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter)); |
| 1290 return (tracing_on && | 1290 return (tracing_on && |
| 1291 OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL); | 1291 OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL); |
| 1292 } | 1292 } |
| 1293 | 1293 |
| 1294 } } // namespace v8::internal | 1294 } } // namespace v8::internal |
| OLD | NEW |