~ubuntu-branches/ubuntu/saucy/libv8/saucy

« back to all changes in this revision

Viewing changes to src/flag-definitions.h

  • Committer: Package Import Robot
  • Author(s): Jérémy Lal
  • Date: 2012-04-07 16:26:13 UTC
  • mfrom: (15.1.27 sid)
  • Revision ID: package-import@ubuntu.com-20120407162613-dqo1m6w9r3fh8tst
Tags: 3.8.9.16-3
* mipsel build fixes :
  + v8_use_mips_abi_hardfloat=false, this lowers EABI requirements.
  + v8_can_use_fpu_instructions=false, detect if FPU is present.
  + set -Wno-unused-but-set-variable only on mipsel.

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
  extern ctype FLAG_##nam;
42
42
#define FLAG_READONLY(ftype, ctype, nam, def, cmt) \
43
43
  static ctype const FLAG_##nam = def;
 
44
#define DEFINE_implication(whenflag, thenflag)
44
45
 
45
46
// We want to supply the actual storage and value for the flag variable in the
46
47
// .cc file.  We only do this for writable flags.
48
49
#define FLAG_FULL(ftype, ctype, nam, def, cmt) \
49
50
  ctype FLAG_##nam = def;
50
51
#define FLAG_READONLY(ftype, ctype, nam, def, cmt)
 
52
#define DEFINE_implication(whenflag, thenflag)
51
53
 
52
54
// We need to define all of our default values so that the Flag structure can
53
55
// access them by pointer.  These are just used internally inside of one .cc,
56
58
#define FLAG_FULL(ftype, ctype, nam, def, cmt) \
57
59
  static ctype const FLAGDEFAULT_##nam = def;
58
60
#define FLAG_READONLY(ftype, ctype, nam, def, cmt)
59
 
 
 
61
#define DEFINE_implication(whenflag, thenflag)
60
62
 
61
63
// We want to write entries into our meta data table, for internal parsing and
62
64
// printing / etc in the flag parser code.  We only do this for writable flags.
64
66
#define FLAG_FULL(ftype, ctype, nam, def, cmt) \
65
67
  { Flag::TYPE_##ftype, #nam, &FLAG_##nam, &FLAGDEFAULT_##nam, cmt, false },
66
68
#define FLAG_READONLY(ftype, ctype, nam, def, cmt)
 
69
#define DEFINE_implication(whenflag, thenflag)
 
70
 
 
71
// We produce the code to set flags when it is implied by another flag.
 
72
#elif defined(FLAG_MODE_DEFINE_IMPLICATIONS)
 
73
#define FLAG_FULL(ftype, ctype, nam, def, cmt)
 
74
#define FLAG_READONLY(ftype, ctype, nam, def, cmt)
 
75
#define DEFINE_implication(whenflag, thenflag) \
 
76
  if (FLAG_##whenflag) FLAG_##thenflag = true;
67
77
 
68
78
#else
69
79
#error No mode supplied when including flags.defs
103
113
DEFINE_bool(harmony_collections, false,
104
114
            "enable harmony collections (sets, maps, and weak maps)")
105
115
DEFINE_bool(harmony, false, "enable all harmony features")
 
116
DEFINE_implication(harmony, harmony_typeof)
 
117
DEFINE_implication(harmony, harmony_scoping)
 
118
DEFINE_implication(harmony, harmony_proxies)
 
119
DEFINE_implication(harmony, harmony_collections)
106
120
 
107
121
// Flags for experimental implementation features.
108
122
DEFINE_bool(unbox_double_arrays, true, "automatically unbox arrays of doubles")
296
310
            "Flush code caches in maps during mark compact cycle.")
297
311
DEFINE_bool(never_compact, false,
298
312
            "Never perform compaction on full GC - testing only")
299
 
DEFINE_bool(compact_code_space, false, "Compact code space")
 
313
DEFINE_bool(compact_code_space, true,
 
314
            "Compact code space on full non-incremental collections")
300
315
DEFINE_bool(cleanup_code_caches_at_gc, true,
301
316
            "Flush inline caches prior to mark compact collection and "
302
317
            "flush code caches in maps during mark compact cycle.")
335
350
            "print stack trace when throwing exceptions")
336
351
DEFINE_bool(preallocate_message_memory, false,
337
352
            "preallocate some memory to build stack traces.")
 
353
DEFINE_bool(randomize_hashes,
 
354
            true,
 
355
            "randomize hashes to avoid predictable hash collisions "
 
356
            "(with snapshots this option cannot override the baked-in seed)")
 
357
DEFINE_int(hash_seed,
 
358
           0,
 
359
           "Fixed seed to use to hash property keys (0 means random)"
 
360
           "(with snapshots this option cannot override the baked-in seed)")
338
361
 
339
362
// v8.cc
340
363
DEFINE_bool(preemption, false,
542
565
DEFINE_bool(print_code_verbose, false, "print more information for code")
543
566
DEFINE_bool(print_builtin_code, false, "print generated code for builtins")
544
567
 
 
568
#ifdef ENABLE_DISASSEMBLER
 
569
DEFINE_bool(print_all_code, false, "enable all flags related to printing code")
 
570
DEFINE_implication(print_all_code, print_code)
 
571
DEFINE_implication(print_all_code, print_opt_code)
 
572
DEFINE_implication(print_all_code, print_unopt_code)
 
573
DEFINE_implication(print_all_code, print_code_verbose)
 
574
DEFINE_implication(print_all_code, print_builtin_code)
 
575
DEFINE_implication(print_all_code, print_code_stubs)
 
576
DEFINE_implication(print_all_code, code_comments)
 
577
#ifdef DEBUG
 
578
DEFINE_implication(print_all_code, trace_codegen)
 
579
#endif
 
580
#endif
 
581
 
545
582
// Cleanup...
546
583
#undef FLAG_FULL
547
584
#undef FLAG_READONLY
550
587
#undef DEFINE_bool
551
588
#undef DEFINE_int
552
589
#undef DEFINE_string
 
590
#undef DEFINE_implication
553
591
 
554
592
#undef FLAG_MODE_DECLARE
555
593
#undef FLAG_MODE_DEFINE
556
594
#undef FLAG_MODE_DEFINE_DEFAULTS
557
595
#undef FLAG_MODE_META
 
596
#undef FLAG_MODE_DEFINE_IMPLICATIONS