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

Side by Side Diff: src/flag-definitions.h

Issue 890563003: Fix --max_old_space_size=4096 integer overflow. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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 | « no previous file | src/flags.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 // This file defines all of the flags. It is separated into different section, 5 // This file defines all of the flags. It is separated into different section,
6 // for Debug, Release, Logging and Profiling, etc. To add a new flag, find the 6 // for Debug, Release, Logging and Profiling, etc. To add a new flag, find the
7 // correct section, and use one of the DEFINE_ macros, without a trailing ';'. 7 // correct section, and use one of the DEFINE_ macros, without a trailing ';'.
8 // 8 //
9 // This include does not have a guard, because it is a template-style include, 9 // This include does not have a guard, because it is a template-style include,
10 // which can be included multiple times in different modes. It expects to have 10 // which can be included multiple times in different modes. It expects to have
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 #else 144 #else
145 # define ENABLE_NEON_DEFAULT false 145 # define ENABLE_NEON_DEFAULT false
146 #endif 146 #endif
147 147
148 #define DEFINE_BOOL(nam, def, cmt) FLAG(BOOL, bool, nam, def, cmt) 148 #define DEFINE_BOOL(nam, def, cmt) FLAG(BOOL, bool, nam, def, cmt)
149 #define DEFINE_BOOL_READONLY(nam, def, cmt) \ 149 #define DEFINE_BOOL_READONLY(nam, def, cmt) \
150 FLAG_READONLY(BOOL, bool, nam, def, cmt) 150 FLAG_READONLY(BOOL, bool, nam, def, cmt)
151 #define DEFINE_MAYBE_BOOL(nam, cmt) \ 151 #define DEFINE_MAYBE_BOOL(nam, cmt) \
152 FLAG(MAYBE_BOOL, MaybeBoolFlag, nam, {false COMMA false}, cmt) 152 FLAG(MAYBE_BOOL, MaybeBoolFlag, nam, {false COMMA false}, cmt)
153 #define DEFINE_INT(nam, def, cmt) FLAG(INT, int, nam, def, cmt) 153 #define DEFINE_INT(nam, def, cmt) FLAG(INT, int, nam, def, cmt)
154 #define DEFINE_INTPTR(nam, def, cmt) FLAG(INTPTR, intptr_t, nam, def, cmt)
154 #define DEFINE_FLOAT(nam, def, cmt) FLAG(FLOAT, double, nam, def, cmt) 155 #define DEFINE_FLOAT(nam, def, cmt) FLAG(FLOAT, double, nam, def, cmt)
155 #define DEFINE_STRING(nam, def, cmt) FLAG(STRING, const char*, nam, def, cmt) 156 #define DEFINE_STRING(nam, def, cmt) FLAG(STRING, const char*, nam, def, cmt)
156 #define DEFINE_ARGS(nam, cmt) FLAG(ARGS, JSArguments, nam, {0 COMMA NULL}, cmt) 157 #define DEFINE_ARGS(nam, cmt) FLAG(ARGS, JSArguments, nam, {0 COMMA NULL}, cmt)
157 158
158 #define DEFINE_ALIAS_BOOL(alias, nam) FLAG_ALIAS(BOOL, bool, alias, nam) 159 #define DEFINE_ALIAS_BOOL(alias, nam) FLAG_ALIAS(BOOL, bool, alias, nam)
159 #define DEFINE_ALIAS_INT(alias, nam) FLAG_ALIAS(INT, int, alias, nam) 160 #define DEFINE_ALIAS_INT(alias, nam) FLAG_ALIAS(INT, int, alias, nam)
160 #define DEFINE_ALIAS_FLOAT(alias, nam) FLAG_ALIAS(FLOAT, double, alias, nam) 161 #define DEFINE_ALIAS_FLOAT(alias, nam) FLAG_ALIAS(FLOAT, double, alias, nam)
161 #define DEFINE_ALIAS_STRING(alias, nam) \ 162 #define DEFINE_ALIAS_STRING(alias, nam) \
162 FLAG_ALIAS(STRING, const char*, alias, nam) 163 FLAG_ALIAS(STRING, const char*, alias, nam)
163 #define DEFINE_ALIAS_ARGS(alias, nam) FLAG_ALIAS(ARGS, JSArguments, alias, nam) 164 #define DEFINE_ALIAS_ARGS(alias, nam) FLAG_ALIAS(ARGS, JSArguments, alias, nam)
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 DEFINE_BOOL(trace_external_array_abuse, false, 535 DEFINE_BOOL(trace_external_array_abuse, false,
535 "trace out-of-bounds-accesses to external arrays") 536 "trace out-of-bounds-accesses to external arrays")
536 DEFINE_BOOL(trace_array_abuse, false, 537 DEFINE_BOOL(trace_array_abuse, false,
537 "trace out-of-bounds accesses to all arrays") 538 "trace out-of-bounds accesses to all arrays")
538 DEFINE_IMPLICATION(trace_array_abuse, trace_js_array_abuse) 539 DEFINE_IMPLICATION(trace_array_abuse, trace_js_array_abuse)
539 DEFINE_IMPLICATION(trace_array_abuse, trace_external_array_abuse) 540 DEFINE_IMPLICATION(trace_array_abuse, trace_external_array_abuse)
540 DEFINE_BOOL(enable_liveedit, true, "enable liveedit experimental feature") 541 DEFINE_BOOL(enable_liveedit, true, "enable liveedit experimental feature")
541 DEFINE_BOOL(hard_abort, true, "abort by crashing") 542 DEFINE_BOOL(hard_abort, true, "abort by crashing")
542 543
543 // execution.cc 544 // execution.cc
544 DEFINE_INT(stack_size, V8_DEFAULT_STACK_SIZE_KB, 545 DEFINE_INTPTR(stack_size, V8_DEFAULT_STACK_SIZE_KB,
545 "default size of stack region v8 is allowed to use (in kBytes)") 546 "default size of stack region v8 is allowed to use (in kBytes)")
546 547
547 // frames.cc 548 // frames.cc
548 DEFINE_INT(max_stack_trace_source_length, 300, 549 DEFINE_INT(max_stack_trace_source_length, 300,
549 "maximum length of function source code printed in a stack trace.") 550 "maximum length of function source code printed in a stack trace.")
550 551
551 // full-codegen.cc 552 // full-codegen.cc
552 DEFINE_BOOL(always_inline_smi_code, false, 553 DEFINE_BOOL(always_inline_smi_code, false,
553 "always inline smi code in non-opt code") 554 "always inline smi code in non-opt code")
554 555
555 // heap.cc 556 // heap.cc
556 DEFINE_INT(min_semi_space_size, 0, 557 DEFINE_INTPTR(min_semi_space_size, 0,
557 "min size of a semi-space (in MBytes), the new space consists of two" 558 "min size of a semi-space (in MBytes), the new space consists "
558 "semi-spaces") 559 "of two semi-spaces")
559 DEFINE_INT(target_semi_space_size, 0, 560 DEFINE_INTPTR(target_semi_space_size, 0,
560 "target size of a semi-space (in MBytes) before triggering a GC") 561 "target size of a semi-space (in MBytes) before triggering a GC")
561 DEFINE_INT(max_semi_space_size, 0, 562 DEFINE_INTPTR(max_semi_space_size, 0,
562 "max size of a semi-space (in MBytes), the new space consists of two" 563 "max size of a semi-space (in MBytes), the new space consists "
563 "semi-spaces") 564 "of two semi-spaces")
564 DEFINE_INT(semi_space_growth_factor, 2, "factor by which to grow the new space") 565 DEFINE_INT(semi_space_growth_factor, 2, "factor by which to grow the new space")
565 DEFINE_BOOL(experimental_new_space_growth_heuristic, false, 566 DEFINE_BOOL(experimental_new_space_growth_heuristic, false,
566 "Grow the new space based on the percentage of survivors instead " 567 "Grow the new space based on the percentage of survivors instead "
567 "of their absolute value.") 568 "of their absolute value.")
568 DEFINE_INT(max_old_space_size, 0, "max size of the old space (in Mbytes)") 569 DEFINE_INTPTR(max_old_space_size, 0, "max size of the old space (in Mbytes)")
569 DEFINE_INT(initial_old_space_size, 0, "initial old space size (in Mbytes)") 570 DEFINE_INTPTR(initial_old_space_size, 0, "initial old space size (in Mbytes)")
570 DEFINE_INT(max_executable_size, 0, "max size of executable memory (in Mbytes)") 571 DEFINE_INTPTR(max_executable_size, 0,
572 "max size of executable memory (in Mbytes)")
571 DEFINE_BOOL(gc_global, false, "always perform global GCs") 573 DEFINE_BOOL(gc_global, false, "always perform global GCs")
572 DEFINE_INT(gc_interval, -1, "garbage collect after <n> allocations") 574 DEFINE_INT(gc_interval, -1, "garbage collect after <n> allocations")
573 DEFINE_BOOL(trace_gc, false, 575 DEFINE_BOOL(trace_gc, false,
574 "print one trace line following each garbage collection") 576 "print one trace line following each garbage collection")
575 DEFINE_BOOL(trace_gc_nvp, false, 577 DEFINE_BOOL(trace_gc_nvp, false,
576 "print one detailed trace line in name=value format " 578 "print one detailed trace line in name=value format "
577 "after each garbage collection") 579 "after each garbage collection")
578 DEFINE_BOOL(trace_gc_ignore_scavenger, false, 580 DEFINE_BOOL(trace_gc_ignore_scavenger, false,
579 "do not print trace line after scavenger collection") 581 "do not print trace line after scavenger collection")
580 DEFINE_BOOL(trace_idle_notification, false, 582 DEFINE_BOOL(trace_idle_notification, false,
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
1010 #undef DEFINE_ALIAS_FLOAT 1012 #undef DEFINE_ALIAS_FLOAT
1011 #undef DEFINE_ALIAS_ARGS 1013 #undef DEFINE_ALIAS_ARGS
1012 1014
1013 #undef FLAG_MODE_DECLARE 1015 #undef FLAG_MODE_DECLARE
1014 #undef FLAG_MODE_DEFINE 1016 #undef FLAG_MODE_DEFINE
1015 #undef FLAG_MODE_DEFINE_DEFAULTS 1017 #undef FLAG_MODE_DEFINE_DEFAULTS
1016 #undef FLAG_MODE_META 1018 #undef FLAG_MODE_META
1017 #undef FLAG_MODE_DEFINE_IMPLICATIONS 1019 #undef FLAG_MODE_DEFINE_IMPLICATIONS
1018 1020
1019 #undef COMMA 1021 #undef COMMA
OLDNEW
« no previous file with comments | « no previous file | src/flags.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698