| 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/object.h" | 5 #include "vm/object.h" |
| 6 | 6 |
| 7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
| 8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
| 9 #include "vm/assembler.h" | 9 #include "vm/assembler.h" |
| 10 #include "vm/cpu.h" | 10 #include "vm/cpu.h" |
| (...skipping 16744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 16755 } | 16755 } |
| 16756 int32_t code_point = cpi.Current(); | 16756 int32_t code_point = cpi.Current(); |
| 16757 if (!IsHexCharacter(code_point)) { | 16757 if (!IsHexCharacter(code_point)) { |
| 16758 return String::null(); | 16758 return String::null(); |
| 16759 } | 16759 } |
| 16760 if (!cpi.Next()) { | 16760 if (!cpi.Next()) { |
| 16761 return String::null(); | 16761 return String::null(); |
| 16762 } | 16762 } |
| 16763 code_point = cpi.Current(); | 16763 code_point = cpi.Current(); |
| 16764 if (!IsHexCharacter(code_point)) { | 16764 if (!IsHexCharacter(code_point)) { |
| 16765 return str.raw(); | 16765 return String::null(); |
| 16766 } | 16766 } |
| 16767 num_escapes += 2; | 16767 num_escapes += 2; |
| 16768 } | 16768 } |
| 16769 } | 16769 } |
| 16770 } | 16770 } |
| 16771 intptr_t utf8_len = len - num_escapes; | 16771 intptr_t utf8_len = len - num_escapes; |
| 16772 ASSERT(utf8_len >= 0); | 16772 ASSERT(utf8_len >= 0); |
| 16773 Zone* zone = Isolate::Current()->current_zone(); | 16773 Zone* zone = Isolate::Current()->current_zone(); |
| 16774 uint8_t* utf8 = zone->Alloc<uint8_t>(utf8_len); | 16774 uint8_t* utf8 = zone->Alloc<uint8_t>(utf8_len); |
| 16775 { | 16775 { |
| (...skipping 2689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 19465 return tag_label.ToCString(); | 19465 return tag_label.ToCString(); |
| 19466 } | 19466 } |
| 19467 | 19467 |
| 19468 | 19468 |
| 19469 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { | 19469 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { |
| 19470 Instance::PrintJSONImpl(stream, ref); | 19470 Instance::PrintJSONImpl(stream, ref); |
| 19471 } | 19471 } |
| 19472 | 19472 |
| 19473 | 19473 |
| 19474 } // namespace dart | 19474 } // namespace dart |
| OLD | NEW |