| OLD | NEW |
| 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/scanner.h" | 5 #include "vm/scanner.h" |
| 6 | 6 |
| 7 #include "platform/assert.h" | 7 #include "platform/assert.h" |
| 8 #include "vm/flags.h" | 8 #include "vm/flags.h" |
| 9 #include "vm/object.h" | 9 #include "vm/object.h" |
| 10 #include "vm/object_store.h" | 10 #include "vm/object_store.h" |
| (...skipping 929 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 940 | 940 |
| 941 | 941 |
| 942 RawString* Scanner::AllocatePrivateKey(const Library& library) { | 942 RawString* Scanner::AllocatePrivateKey(const Library& library) { |
| 943 const String& url = String::Handle(library.url()); | 943 const String& url = String::Handle(library.url()); |
| 944 intptr_t key_value = url.Hash(); | 944 intptr_t key_value = url.Hash(); |
| 945 while (Library::IsKeyUsed(key_value)) { | 945 while (Library::IsKeyUsed(key_value)) { |
| 946 key_value++; | 946 key_value++; |
| 947 } | 947 } |
| 948 char private_key[32]; | 948 char private_key[32]; |
| 949 OS::SNPrint(private_key, sizeof(private_key), | 949 OS::SNPrint(private_key, sizeof(private_key), |
| 950 "%c%#"Px"", kPrivateKeySeparator, key_value); | 950 "%c%#" Px "", kPrivateKeySeparator, key_value); |
| 951 const String& result = String::Handle(String::New(private_key, Heap::kOld)); | 951 const String& result = String::Handle(String::New(private_key, Heap::kOld)); |
| 952 return result.raw(); | 952 return result.raw(); |
| 953 } | 953 } |
| 954 | 954 |
| 955 | 955 |
| 956 void Scanner::InitOnce() { | 956 void Scanner::InitOnce() { |
| 957 } | 957 } |
| 958 | 958 |
| 959 } // namespace dart | 959 } // namespace dart |
| OLD | NEW |