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

Side by Side Diff: src/handles.cc

Issue 8229005: Add --noclever-optimizations to disable some things that have (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 2 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/flag-definitions.h ('k') | src/mark-compact.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 // If no properties are added in the constructor, they are more likely 183 // If no properties are added in the constructor, they are more likely
184 // to be added later. 184 // to be added later.
185 if (estimate == 0) estimate = 2; 185 if (estimate == 0) estimate = 2;
186 186
187 // We do not shrink objects that go into a snapshot (yet), so we adjust 187 // We do not shrink objects that go into a snapshot (yet), so we adjust
188 // the estimate conservatively. 188 // the estimate conservatively.
189 if (Serializer::enabled()) return estimate + 2; 189 if (Serializer::enabled()) return estimate + 2;
190 190
191 // Inobject slack tracking will reclaim redundant inobject space later, 191 // Inobject slack tracking will reclaim redundant inobject space later,
192 // so we can afford to adjust the estimate generously. 192 // so we can afford to adjust the estimate generously.
193 return estimate + 8; 193 if (FLAG_clever_optimizations) {
194 return estimate + 8;
195 } else {
196 return estimate + 3;
197 }
194 } 198 }
195 199
196 200
197 void SetExpectedNofPropertiesFromEstimate(Handle<SharedFunctionInfo> shared, 201 void SetExpectedNofPropertiesFromEstimate(Handle<SharedFunctionInfo> shared,
198 int estimate) { 202 int estimate) {
199 // See the comment in SetExpectedNofProperties. 203 // See the comment in SetExpectedNofProperties.
200 if (shared->live_objects_may_exist()) return; 204 if (shared->live_objects_may_exist()) return;
201 205
202 shared->set_expected_nof_properties( 206 shared->set_expected_nof_properties(
203 ExpectedNofPropertiesFromEstimate(estimate)); 207 ExpectedNofPropertiesFromEstimate(estimate));
(...skipping 734 matching lines...) Expand 10 before | Expand all | Expand 10 after
938 942
939 bool CompileOptimized(Handle<JSFunction> function, 943 bool CompileOptimized(Handle<JSFunction> function,
940 int osr_ast_id, 944 int osr_ast_id,
941 ClearExceptionFlag flag) { 945 ClearExceptionFlag flag) {
942 CompilationInfo info(function); 946 CompilationInfo info(function);
943 info.SetOptimizing(osr_ast_id); 947 info.SetOptimizing(osr_ast_id);
944 return CompileLazyHelper(&info, flag); 948 return CompileLazyHelper(&info, flag);
945 } 949 }
946 950
947 } } // namespace v8::internal 951 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | src/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698