This merges the dart:uri library into dart:core removing the dart:uri library. Besides moving the library the Url class has been changed.
* Removed existing Uri constructor as it was equivalent with Uri.parse
* Remamed constructor Uri.fromComponents to Uri
* Moved toplevel function encodeUriComponent to static method Uri.encodeComponent
* Moved toplevel function decodeUriComponent to static method Uri.decodeComponent
* Moved toplevel function encodeUri to static method Uri.encodeFull
* Moved toplevel function decodeUri to static method Uri.decodeFull
* Rename domain to host
* Added static methods Uri.encodeQueryComponent and Uri.decodeQueryComponent
* Added support for path generation and splitting
* Added support for query generation and splitting
* Added some level of normalization
R=floitsch@google.com, lrn@google.com, nweiz@google.com, scheglov@google.com
BUG=
Review URL: https://codereview.chromium.org//16019002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23266 260f80e4-7a28-3924-810f-c04153c831b5
compatible with webkit and will allow for easy externalization of
strings. One byte strings are retained for pure ASCII strings.
(The language specification was changed recently to reflect this as
follows "A string is a sequence of UTF-16 code units").
- Remove four byte string class and all references to it.
- Rename some of the string functions in Dart API to make them
consistent and better describe the underlying functionality
Dart_NewString => Dart_NewStringFromCString
Dart_NewString8 => Dart_NewStringFromUTF8
Dart_NewString16 => Dart_NewStringFromUTF16
Dart_NewString32 => Dart_NewStringFromUTF32
Dart_NewExternalString8 => Dart_NewExternalUTF8String
Dart_NewExternalString16 => Dart_NewExternalUTF16String
Dart_NewExternalString32 => Dart_NewExternalUTF32String
Dart_StringGet8 => Dart_StringToUTF8
Dart_StringGet16 => Dart_StringToUTF16
Dart_StringToCString => Dart_StringToCString
Dart_IsString8 => Removed
Dart_IsString16 -> Removed
Dart_StringToBytes -> Removed
Dart_StringGet32 -> Removed
Review URL: https://codereview.chromium.org//11318018
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14357 260f80e4-7a28-3924-810f-c04153c831b5
Dart_ExternalStringGetPeer. This change is basically an unrolling
of the templates that previously defined the method, to reduce
the number of handles allocated.
This change is supported by the DartStringAccess VM benchmark, which
showed a ~20x improvement from the above change. Currently this
benchmark focuses on Dart_ExternalStringGetPeer, rather than String
performance in general.
Please review this carefully. Commented-out is a "NoGCScope no_gc_scope;"
line, which when enabled asserts that GC doesn't happen when this function
is called. However, one of the tests fails this check, though when I
set a breakpoint in gdb before the NoGCScope item is allocated, it's not
hit before the assertion fails. I commented out that line, in the hope
that more senior reviewers suggest improvements.
Review URL: https://chromiumcodereview.appspot.com//10897014
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11534 260f80e4-7a28-3924-810f-c04153c831b5
On x86:
Original sizes:
Size of isolate snapshot = 925655
New space (0k of 32768k) Old space (1700k of 1792k) Code space (0k of 0k)
out/ReleaseIA32/run_vm_tests --benchmarks
CorelibCompileAll(RunTime): 80944
CorelibIsolateStartup(RunTime): 5636
UseDartApi(RunTime): 404620
Dart2JSCompileAll(RunTime): 1379683
FrameLookup(RunTime): 45
Size with the new TokenStream implementation:
Size of isolate snapshot = 851352
New space (0k of 32768k) Old space (1368k of 1536k) Code space (0k of 0k)
out/ReleaseIA32/run_vm_tests --benchmarks
CorelibCompileAll(RunTime): 76918
CorelibIsolateStartup(RunTime): 4056
UseDartApi(RunTime): 502111
Dart2JSCompileAll(RunTime): 1251646
FrameLookup(RunTime): 45
(saves about 332k out of the original TokenStream size of 410k)
On x64:
Original sizes:
Size of isolate snapshot = 924865
New space (0k of 32768k) Old space (3234k of 3444k) Code space (0k of 0k)
out/ReleaseX64/run_vm_tests --benchmarks
CorelibCompileAll(RunTime): 109660
CorelibIsolateStartup(RunTime): 3985
UseDartApi(RunTime): 463009
Dart2JSCompileAll(RunTime): 2170309
FrameLookup(RunTime): 35
Size with the new TokenStream implementation:
Size of isolate snapshot = 849675
New space (0k of 32768k) Old space (2436k of 2560k) Code space (0k of 0k)
out/ReleaseX64/run_vm_tests --benchmarks
CorelibCompileAll(RunTime): 98716
CorelibIsolateStartup(RunTime): 2938
UseDartApi(RunTime): 509149
Dart2JSCompileAll(RunTime): 2042273
FrameLookup(RunTime): 39
(saves about 798k out of the original TokenStream size of 810k)
Token stats:
Number of tokens: 101470
Literal tokens: 4550
Ident tokens: 33020
Review URL: https://chromiumcodereview.appspot.com//10697055
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9539 260f80e4-7a28-3924-810f-c04153c831b5
launch an isolate running a different script. Finally.
Reviewers: This isn't as hard to review as it looks. Dive right in!
Siggi: Take a look at my test status file changes and make sure I'm
excluding the right stuff.
Much of the churn in the CL comes from moving ownership of the
import_map. It used to be set per-library and is now set per-isolate.
This caused a lot of superficial diffs.
DART EMBEDDING API CHANGES:
- Dart_IsolateCreateCallback now takes a script_uri and main argument
instead of a name_prefix argument. The script_uri argument allows
the callback to launch different scripts. The main argument is used
in creating the isolate debug name.
- Dart_CreateIsolate now takes script_uri and main arguments. These
are used to build the isolate's debug name.
- Dart_LibraryTagHandler, Dart_LoadScript, and Dart_LoadLibrary no
longer take an import_map.
- Added Dart_SetImportMap.
- Added Dart_RootLibrary to provide access to the root library for the
current isolate.
OTHER STUFF
Add a couple of tests for spawnUri -- the existing tests assume that
scripts end in a .js suffix which isn't going to work out for us.
Changed how the debug name for isolates get built a bit.
Refactored bin/main.cc a bit. Fixed some problems with error handling
while creating isolates.
Minor refactoring in builtin.dart to always pass is_windows rather
than relying on it being squirreled away.
Review URL: https://chromiumcodereview.appspot.com//10386107
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7756 260f80e4-7a28-3924-810f-c04153c831b5