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

Side by Side Diff: runtime/vm/object.h

Issue 466813002: Support non-ASCII script URLs in VM service by using IRIs (generalized URIs). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 4 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 | runtime/vm/object.cc » ('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) 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 #ifndef VM_OBJECT_H_ 5 #ifndef VM_OBJECT_H_
6 #define VM_OBJECT_H_ 6 #define VM_OBJECT_H_
7 7
8 #include "include/dart_api.h" 8 #include "include/dart_api.h"
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "platform/utils.h" 10 #include "platform/utils.h"
(...skipping 5533 matching lines...) Expand 10 before | Expand all | Expand 10 after
5544 intptr_t dst_offset, 5544 intptr_t dst_offset,
5545 const uint16_t* characters, 5545 const uint16_t* characters,
5546 intptr_t len); 5546 intptr_t len);
5547 static void Copy(const String& dst, 5547 static void Copy(const String& dst,
5548 intptr_t dst_offset, 5548 intptr_t dst_offset,
5549 const String& src, 5549 const String& src,
5550 intptr_t src_offset, 5550 intptr_t src_offset,
5551 intptr_t len); 5551 intptr_t len);
5552 5552
5553 static RawString* EscapeSpecialCharacters(const String& str); 5553 static RawString* EscapeSpecialCharacters(const String& str);
5554 static RawString* EncodeURI(const String& str); 5554 // Encodes 'str' for use in an Internationalized Resource Identifier (IRI),
5555 static RawString* DecodeURI(const String& str); 5555 // a generalization of URI (percent-encoding). See RFC 3987.
5556 static RawString* EncodeIRI(const String& str);
5557 // Returns null if 'str' is not a valid encoding.
5558 static RawString* DecodeIRI(const String& str);
5556 static RawString* Concat(const String& str1, 5559 static RawString* Concat(const String& str1,
5557 const String& str2, 5560 const String& str2,
5558 Heap::Space space = Heap::kNew); 5561 Heap::Space space = Heap::kNew);
5559 static RawString* ConcatAll(const Array& strings, 5562 static RawString* ConcatAll(const Array& strings,
5560 Heap::Space space = Heap::kNew); 5563 Heap::Space space = Heap::kNew);
5561 // Concat all strings in 'strings' from 'start' to 'end' (excluding). 5564 // Concat all strings in 'strings' from 'start' to 'end' (excluding).
5562 static RawString* ConcatAllRange(const Array& strings, 5565 static RawString* ConcatAllRange(const Array& strings,
5563 intptr_t start, 5566 intptr_t start,
5564 intptr_t end, 5567 intptr_t end,
5565 Heap::Space space = Heap::kNew); 5568 Heap::Space space = Heap::kNew);
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
5898 intptr_t len, 5901 intptr_t len,
5899 void* peer, 5902 void* peer,
5900 Dart_PeerFinalizer callback, 5903 Dart_PeerFinalizer callback,
5901 Heap::Space space); 5904 Heap::Space space);
5902 5905
5903 static RawExternalOneByteString* null() { 5906 static RawExternalOneByteString* null() {
5904 return reinterpret_cast<RawExternalOneByteString*>(Object::null()); 5907 return reinterpret_cast<RawExternalOneByteString*>(Object::null());
5905 } 5908 }
5906 5909
5907 static RawOneByteString* EscapeSpecialCharacters(const String& str); 5910 static RawOneByteString* EscapeSpecialCharacters(const String& str);
5908 static RawOneByteString* EncodeURI(const String& str); 5911 static RawOneByteString* EncodeIRI(const String& str);
5909 static RawOneByteString* DecodeURI(const String& str); 5912 static RawOneByteString* DecodeIRI(const String& str);
5910 5913
5911 static const ClassId kClassId = kExternalOneByteStringCid; 5914 static const ClassId kClassId = kExternalOneByteStringCid;
5912 5915
5913 private: 5916 private:
5914 static RawExternalOneByteString* raw(const String& str) { 5917 static RawExternalOneByteString* raw(const String& str) {
5915 return reinterpret_cast<RawExternalOneByteString*>(str.raw()); 5918 return reinterpret_cast<RawExternalOneByteString*>(str.raw());
5916 } 5919 }
5917 5920
5918 static RawExternalOneByteString* raw_ptr(const String& str) { 5921 static RawExternalOneByteString* raw_ptr(const String& str) {
5919 return reinterpret_cast<RawExternalOneByteString*>(str.raw_ptr()); 5922 return reinterpret_cast<RawExternalOneByteString*>(str.raw_ptr());
(...skipping 1397 matching lines...) Expand 10 before | Expand all | Expand 10 after
7317 7320
7318 7321
7319 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 7322 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
7320 intptr_t index) { 7323 intptr_t index) {
7321 return array.At((index * kEntryLength) + kTargetFunctionIndex); 7324 return array.At((index * kEntryLength) + kTargetFunctionIndex);
7322 } 7325 }
7323 7326
7324 } // namespace dart 7327 } // namespace dart
7325 7328
7326 #endif // VM_OBJECT_H_ 7329 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698