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

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

Issue 1663863002: Add product mode: (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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/symbols.h" 5 #include "vm/symbols.h"
6 6
7 #include "vm/handles.h" 7 #include "vm/handles.h"
8 #include "vm/handles_impl.h" 8 #include "vm/handles_impl.h"
9 #include "vm/hash_table.h" 9 #include "vm/hash_table.h"
10 #include "vm/isolate.h" 10 #include "vm/isolate.h"
(...skipping 18 matching lines...) Expand all
29 #undef DEFINE_SYMBOL_LITERAL 29 #undef DEFINE_SYMBOL_LITERAL
30 30
31 "", // matches kKwTableStart. 31 "", // matches kKwTableStart.
32 32
33 #define DEFINE_KEYWORD_SYMBOL_INDEX(t, s, p, a) \ 33 #define DEFINE_KEYWORD_SYMBOL_INDEX(t, s, p, a) \
34 s, 34 s,
35 DART_KEYWORD_LIST(DEFINE_KEYWORD_SYMBOL_INDEX) 35 DART_KEYWORD_LIST(DEFINE_KEYWORD_SYMBOL_INDEX)
36 #undef DEFINE_KEYWORD_SYMBOL_INDEX 36 #undef DEFINE_KEYWORD_SYMBOL_INDEX
37 }; 37 };
38 38
39 DEFINE_FLAG(bool, dump_symbol_stats, false, "Dump symbol table statistics"); 39 PRODUCT_FLAG(false, bool, dump_symbol_stats, false,
40 "Dump symbol table statistics");
siva 2016/02/03 20:33:51 Do you anticipate the product value being differen
40 41
41 42
42 RawString* StringFrom(const uint8_t* data, intptr_t len, Heap::Space space) { 43 RawString* StringFrom(const uint8_t* data, intptr_t len, Heap::Space space) {
43 return String::FromLatin1(data, len, space); 44 return String::FromLatin1(data, len, space);
44 } 45 }
45 RawString* StringFrom(const uint16_t* data, intptr_t len, Heap::Space space) { 46 RawString* StringFrom(const uint16_t* data, intptr_t len, Heap::Space space) {
46 return String::FromUTF16(data, len, space); 47 return String::FromUTF16(data, len, space);
47 } 48 }
48 RawString* StringFrom(const int32_t* data, intptr_t len, Heap::Space space) { 49 RawString* StringFrom(const int32_t* data, intptr_t len, Heap::Space space) {
49 return String::FromUTF32(data, len, space); 50 return String::FromUTF32(data, len, space);
(...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after
689 RawObject* Symbols::GetVMSymbol(intptr_t object_id) { 690 RawObject* Symbols::GetVMSymbol(intptr_t object_id) {
690 ASSERT(IsVMSymbolId(object_id)); 691 ASSERT(IsVMSymbolId(object_id));
691 intptr_t i = (object_id - kMaxPredefinedObjectIds); 692 intptr_t i = (object_id - kMaxPredefinedObjectIds);
692 if ((i > kIllegal) && (i < Symbols::kMaxPredefinedId)) { 693 if ((i > kIllegal) && (i < Symbols::kMaxPredefinedId)) {
693 return symbol_handles_[i]->raw(); 694 return symbol_handles_[i]->raw();
694 } 695 }
695 return Object::null(); 696 return Object::null();
696 } 697 }
697 698
698 } // namespace dart 699 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698