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

Side by Side Diff: runtime/lib/linked_hash_map.cc

Issue 936613007: Default to compact Map/Set implementation. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
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 | Annotate | Revision Log
« no previous file with comments | « no previous file | tests/corelib/hash_map2_internal_test.dart » ('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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 "platform/assert.h" 5 #include "platform/assert.h"
6 6
7 #include "vm/assembler.h" 7 #include "vm/assembler.h"
8 #include "vm/bootstrap_natives.h" 8 #include "vm/bootstrap_natives.h"
9 #include "vm/exceptions.h" 9 #include "vm/exceptions.h"
10 #include "vm/flags.h" 10 #include "vm/flags.h"
11 #include "vm/native_entry.h" 11 #include "vm/native_entry.h"
12 #include "vm/object.h" 12 #include "vm/object.h"
13 13
14 namespace dart { 14 namespace dart {
15 15
16 DEFINE_FLAG(bool, use_internal_hash_map, false, "Use internal hash map."); 16 DEFINE_FLAG(bool, use_internal_hash_map, false, "Use internal hash map.");
17 DEFINE_FLAG(bool, use_compact_hash, false, "Use compact hash map and set."); 17 DEFINE_FLAG(bool, use_compact_hash, true, "Use compact hash map and set.");
18 18
19 DEFINE_NATIVE_ENTRY(LinkedHashMap_allocate, 1) { 19 DEFINE_NATIVE_ENTRY(LinkedHashMap_allocate, 1) {
20 const TypeArguments& type_arguments = 20 const TypeArguments& type_arguments =
21 TypeArguments::CheckedHandle(arguments->NativeArgAt(0)); 21 TypeArguments::CheckedHandle(arguments->NativeArgAt(0));
22 const LinkedHashMap& map = 22 const LinkedHashMap& map =
23 LinkedHashMap::Handle(LinkedHashMap::New()); 23 LinkedHashMap::Handle(LinkedHashMap::New());
24 map.SetTypeArguments(type_arguments); 24 map.SetTypeArguments(type_arguments);
25 return map.raw(); 25 return map.raw();
26 } 26 }
27 27
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 return Bool::Get(FLAG_use_internal_hash_map).raw(); 95 return Bool::Get(FLAG_use_internal_hash_map).raw();
96 } 96 }
97 97
98 98
99 DEFINE_NATIVE_ENTRY(LinkedHashMap_useCompact, 0) { 99 DEFINE_NATIVE_ENTRY(LinkedHashMap_useCompact, 0) {
100 ASSERT(!(FLAG_use_internal_hash_map && FLAG_use_compact_hash)); 100 ASSERT(!(FLAG_use_internal_hash_map && FLAG_use_compact_hash));
101 return Bool::Get(FLAG_use_compact_hash).raw(); 101 return Bool::Get(FLAG_use_compact_hash).raw();
102 } 102 }
103 103
104 } // namespace dart 104 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | tests/corelib/hash_map2_internal_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698