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

Side by Side Diff: src/flags.cc

Issue 258993002: Simplified CPU/CpuFeatures a bit. (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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 353
354 static Flag* FindFlag(const char* name) { 354 static Flag* FindFlag(const char* name) {
355 for (size_t i = 0; i < num_flags; ++i) { 355 for (size_t i = 0; i < num_flags; ++i) {
356 if (EqualNames(name, flags[i].name())) 356 if (EqualNames(name, flags[i].name()))
357 return &flags[i]; 357 return &flags[i];
358 } 358 }
359 return NULL; 359 return NULL;
360 } 360 }
361 361
362 362
363 bool FlagList::serializer_enabled_ = false;
364
365
363 // static 366 // static
364 int FlagList::SetFlagsFromCommandLine(int* argc, 367 int FlagList::SetFlagsFromCommandLine(int* argc,
365 char** argv, 368 char** argv,
366 bool remove_flags) { 369 bool remove_flags,
370 bool serializer_enabled) {
371 serializer_enabled_ = serializer_enabled;
367 int return_code = 0; 372 int return_code = 0;
368 // parse arguments 373 // parse arguments
369 for (int i = 1; i < *argc;) { 374 for (int i = 1; i < *argc;) {
370 int j = i; // j > 0 375 int j = i; // j > 0
371 const char* arg = argv[i++]; 376 const char* arg = argv[i++];
372 377
373 // split arg into flag components 378 // split arg into flag components
374 char buffer[1*KB]; 379 char buffer[1*KB];
375 const char* name; 380 const char* name;
376 const char* value; 381 const char* value;
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 for (size_t i = 0; i < num_flags; ++i) { 543 for (size_t i = 0; i < num_flags; ++i) {
539 flags[i].Reset(); 544 flags[i].Reset();
540 } 545 }
541 } 546 }
542 547
543 548
544 // static 549 // static
545 void FlagList::PrintHelp() { 550 void FlagList::PrintHelp() {
546 #if V8_TARGET_ARCH_ARM 551 #if V8_TARGET_ARCH_ARM
547 CpuFeatures::PrintTarget(); 552 CpuFeatures::PrintTarget();
548 CpuFeatures::ProbeWithoutIsolate(); 553 CpuFeatures::Probe(serializer_enabled_);
549 CpuFeatures::PrintFeatures(); 554 CpuFeatures::PrintFeatures();
550 #endif // V8_TARGET_ARCH_ARM 555 #endif // V8_TARGET_ARCH_ARM
551 556
552 printf("Usage:\n"); 557 printf("Usage:\n");
553 printf(" shell [options] -e string\n"); 558 printf(" shell [options] -e string\n");
554 printf(" execute string in V8\n"); 559 printf(" execute string in V8\n");
555 printf(" shell [options] file1 file2 ... filek\n"); 560 printf(" shell [options] file1 file2 ... filek\n");
556 printf(" run JavaScript scripts in file1, file2, ..., filek\n"); 561 printf(" run JavaScript scripts in file1, file2, ..., filek\n");
557 printf(" shell [options]\n"); 562 printf(" shell [options]\n");
558 printf(" shell [options] --shell [file1 file2 ... filek]\n"); 563 printf(" shell [options] --shell [file1 file2 ... filek]\n");
(...skipping 13 matching lines...) Expand all
572 577
573 578
574 // static 579 // static
575 void FlagList::EnforceFlagImplications() { 580 void FlagList::EnforceFlagImplications() {
576 #define FLAG_MODE_DEFINE_IMPLICATIONS 581 #define FLAG_MODE_DEFINE_IMPLICATIONS
577 #include "flag-definitions.h" 582 #include "flag-definitions.h"
578 #undef FLAG_MODE_DEFINE_IMPLICATIONS 583 #undef FLAG_MODE_DEFINE_IMPLICATIONS
579 } 584 }
580 585
581 } } // namespace v8::internal 586 } } // namespace v8::internal
OLDNEW
« src/arm/assembler-arm.cc ('K') | « src/flags.h ('k') | src/ia32/assembler-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698