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

Side by Side Diff: runtime/bin/builtin_gen_snapshot.cc

Issue 12114021: Use browsers JSON.parse for parsing JSON. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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
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 #include <stdio.h> 5 #include <stdio.h>
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 8
9 #include "bin/builtin.h" 9 #include "bin/builtin.h"
10 #include "bin/dartutils.h" 10 #include "bin/dartutils.h"
11 11
12 12
13 Builtin::builtin_lib_props Builtin::builtin_libraries_[] = { 13 Builtin::builtin_lib_props Builtin::builtin_libraries_[] = {
14 /* { url_, source_, patch_url_, patch_source_, has_natives_ } */ 14 /* { url_, source_, patch_url_, patch_source_, has_natives_ } */
15 { DartUtils::kBuiltinLibURL, builtin_source_, NULL, NULL, true }, 15 { DartUtils::kBuiltinLibURL, builtin_source_, NULL, NULL, true },
16 { DartUtils::kJsonLibURL, json_source_, NULL, NULL, false }, 16 { DartUtils::kJsonLibURL, json_source_,
17 DartUtils::kJsonLibPatchURL, json_patch_, false },
17 { DartUtils::kUriLibURL, uri_source_, NULL, NULL, false }, 18 { DartUtils::kUriLibURL, uri_source_, NULL, NULL, false },
18 { DartUtils::kCryptoLibURL, crypto_source_, NULL, NULL, false }, 19 { DartUtils::kCryptoLibURL, crypto_source_, NULL, NULL, false },
19 { DartUtils::kIOLibURL, io_source_, 20 { DartUtils::kIOLibURL, io_source_,
20 DartUtils::kIOLibPatchURL, io_patch_, true }, 21 DartUtils::kIOLibPatchURL, io_patch_, true },
21 { DartUtils::kUtfLibURL, utf_source_, NULL, NULL, false } 22 { DartUtils::kUtfLibURL, utf_source_, NULL, NULL, false }
22 }; 23 };
23 24
24 25
25 Dart_Handle Builtin::Source(BuiltinLibraryId id) { 26 Dart_Handle Builtin::Source(BuiltinLibraryId id) {
26 ASSERT((sizeof(builtin_libraries_) / sizeof(builtin_lib_props)) == 27 ASSERT((sizeof(builtin_libraries_) / sizeof(builtin_lib_props)) ==
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 Dart_Handle patch_url = 63 Dart_Handle patch_url =
63 DartUtils::NewString(builtin_libraries_[id].patch_url_); 64 DartUtils::NewString(builtin_libraries_[id].patch_url_);
64 Dart_Handle patch_source = 65 Dart_Handle patch_source =
65 DartUtils::NewString(builtin_libraries_[id].patch_source_); 66 DartUtils::NewString(builtin_libraries_[id].patch_source_);
66 DART_CHECK_VALID(Dart_LoadPatch(library, patch_url, patch_source)); 67 DART_CHECK_VALID(Dart_LoadPatch(library, patch_url, patch_source));
67 } 68 }
68 } 69 }
69 DART_CHECK_VALID(library); 70 DART_CHECK_VALID(library);
70 return library; 71 return library;
71 } 72 }
OLDNEW
« no previous file with comments | « runtime/bin/builtin.cc ('k') | runtime/bin/dartutils.h » ('j') | sdk/lib/json/json.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698