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

Side by Side Diff: src/compiler.cc

Issue 260003006: Added a Isolate* parameter to Serializer::enabled(). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 // See the comment in SetExpectedNofProperties. 534 // See the comment in SetExpectedNofProperties.
535 if (shared->live_objects_may_exist()) return; 535 if (shared->live_objects_may_exist()) return;
536 536
537 // If no properties are added in the constructor, they are more likely 537 // If no properties are added in the constructor, they are more likely
538 // to be added later. 538 // to be added later.
539 if (estimate == 0) estimate = 2; 539 if (estimate == 0) estimate = 2;
540 540
541 // TODO(yangguo): check whether those heuristics are still up-to-date. 541 // TODO(yangguo): check whether those heuristics are still up-to-date.
542 // We do not shrink objects that go into a snapshot (yet), so we adjust 542 // We do not shrink objects that go into a snapshot (yet), so we adjust
543 // the estimate conservatively. 543 // the estimate conservatively.
544 if (Serializer::enabled()) { 544 if (Serializer::enabled(shared->GetIsolate())) {
545 estimate += 2; 545 estimate += 2;
546 } else if (FLAG_clever_optimizations) { 546 } else if (FLAG_clever_optimizations) {
547 // Inobject slack tracking will reclaim redundant inobject space later, 547 // Inobject slack tracking will reclaim redundant inobject space later,
548 // so we can afford to adjust the estimate generously. 548 // so we can afford to adjust the estimate generously.
549 estimate += 8; 549 estimate += 8;
550 } else { 550 } else {
551 estimate += 3; 551 estimate += 3;
552 } 552 }
553 553
554 shared->set_expected_nof_properties(estimate); 554 shared->set_expected_nof_properties(estimate);
(...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after
1302 AllowHandleDereference allow_deref; 1302 AllowHandleDereference allow_deref;
1303 bool tracing_on = info()->IsStub() 1303 bool tracing_on = info()->IsStub()
1304 ? FLAG_trace_hydrogen_stubs 1304 ? FLAG_trace_hydrogen_stubs
1305 : (FLAG_trace_hydrogen && 1305 : (FLAG_trace_hydrogen &&
1306 info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter)); 1306 info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter));
1307 return (tracing_on && 1307 return (tracing_on &&
1308 OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL); 1308 OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL);
1309 } 1309 }
1310 1310
1311 } } // namespace v8::internal 1311 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/code-stubs.h ('k') | src/factory.cc » ('j') | src/objects-visiting-inl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698