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

Side by Side Diff: runtime/vm/flow_graph_compiler.cc

Issue 2984883002: Remove fields from Isolate in Product mode (Closed)
Patch Set: Address comments Created 3 years, 5 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
« no previous file with comments | « runtime/vm/flag_list.h ('k') | runtime/vm/heap.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 (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_XXX. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_XXX.
6 6
7 #include "vm/flow_graph_compiler.h" 7 #include "vm/flow_graph_compiler.h"
8 8
9 #include "vm/bit_vector.h" 9 #include "vm/bit_vector.h"
10 #include "vm/cha.h" 10 #include "vm/cha.h"
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 287
288 bool FlowGraphCompiler::CanOptimizeFunction() const { 288 bool FlowGraphCompiler::CanOptimizeFunction() const {
289 return CanOptimize() && !parsed_function().function().HasBreakpoint(); 289 return CanOptimize() && !parsed_function().function().HasBreakpoint();
290 } 290 }
291 291
292 bool FlowGraphCompiler::CanOSRFunction() const { 292 bool FlowGraphCompiler::CanOSRFunction() const {
293 return isolate()->use_osr() && CanOptimizeFunction() && !is_optimizing(); 293 return isolate()->use_osr() && CanOptimizeFunction() && !is_optimizing();
294 } 294 }
295 295
296 bool FlowGraphCompiler::ForceSlowPathForStackOverflow() const { 296 bool FlowGraphCompiler::ForceSlowPathForStackOverflow() const {
297 #if !defined(PRODUCT)
297 if ((FLAG_stacktrace_every > 0) || (FLAG_deoptimize_every > 0) || 298 if ((FLAG_stacktrace_every > 0) || (FLAG_deoptimize_every > 0) ||
298 (isolate()->reload_every_n_stack_overflow_checks() > 0)) { 299 (isolate()->reload_every_n_stack_overflow_checks() > 0)) {
299 return true; 300 return true;
300 } 301 }
301 if (FLAG_stacktrace_filter != NULL && 302 if (FLAG_stacktrace_filter != NULL &&
302 strstr(parsed_function().function().ToFullyQualifiedCString(), 303 strstr(parsed_function().function().ToFullyQualifiedCString(),
303 FLAG_stacktrace_filter) != NULL) { 304 FLAG_stacktrace_filter) != NULL) {
304 return true; 305 return true;
305 } 306 }
306 if (is_optimizing() && FLAG_deoptimize_filter != NULL && 307 if (is_optimizing() && FLAG_deoptimize_filter != NULL &&
307 strstr(parsed_function().function().ToFullyQualifiedCString(), 308 strstr(parsed_function().function().ToFullyQualifiedCString(),
308 FLAG_deoptimize_filter) != NULL) { 309 FLAG_deoptimize_filter) != NULL) {
309 return true; 310 return true;
310 } 311 }
312 #endif // !defined(PRODUCT)
311 return false; 313 return false;
312 } 314 }
313 315
314 static bool IsEmptyBlock(BlockEntryInstr* block) { 316 static bool IsEmptyBlock(BlockEntryInstr* block) {
315 return !block->IsCatchBlockEntry() && !block->HasNonRedundantParallelMove() && 317 return !block->IsCatchBlockEntry() && !block->HasNonRedundantParallelMove() &&
316 block->next()->IsGoto() && 318 block->next()->IsGoto() &&
317 !block->next()->AsGoto()->HasNonRedundantParallelMove() && 319 !block->next()->AsGoto()->HasNonRedundantParallelMove() &&
318 !block->IsIndirectEntry(); 320 !block->IsIndirectEntry();
319 } 321 }
320 322
(...skipping 1618 matching lines...) Expand 10 before | Expand all | Expand 10 after
1939 return true; 1941 return true;
1940 } 1942 }
1941 1943
1942 void FlowGraphCompiler::FrameStateClear() { 1944 void FlowGraphCompiler::FrameStateClear() {
1943 ASSERT(!is_optimizing()); 1945 ASSERT(!is_optimizing());
1944 frame_state_.TruncateTo(0); 1946 frame_state_.TruncateTo(0);
1945 } 1947 }
1946 #endif // defined(DEBUG) && !defined(TARGET_ARCH_DBC) 1948 #endif // defined(DEBUG) && !defined(TARGET_ARCH_DBC)
1947 1949
1948 } // namespace dart 1950 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flag_list.h ('k') | runtime/vm/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698