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

Side by Side Diff: runtime/vm/bootstrap_natives.cc

Issue 368483004: Avoid unnecessary copying when parsing doubles. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Also use the native parse directly in JSON parsing. Created 6 years, 5 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 "vm/bootstrap.h" 5 #include "vm/bootstrap.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 8
9 #include "vm/bootstrap_natives.h" 9 #include "vm/bootstrap_natives.h"
10 #include "vm/dart_api_impl.h" 10 #include "vm/dart_api_impl.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 73
74 Dart_NativeEntrySymbol symbol_resolver = 74 Dart_NativeEntrySymbol symbol_resolver =
75 reinterpret_cast<Dart_NativeEntrySymbol>( 75 reinterpret_cast<Dart_NativeEntrySymbol>(
76 BootstrapNatives::Symbol); 76 BootstrapNatives::Symbol);
77 77
78 library = Library::AsyncLibrary(); 78 library = Library::AsyncLibrary();
79 ASSERT(!library.IsNull()); 79 ASSERT(!library.IsNull());
80 library.set_native_entry_resolver(resolver); 80 library.set_native_entry_resolver(resolver);
81 library.set_native_entry_symbol_resolver(symbol_resolver); 81 library.set_native_entry_symbol_resolver(symbol_resolver);
82 82
83 library = Library::ConvertLibrary();
84 ASSERT(!library.IsNull());
85 library.set_native_entry_resolver(resolver);
86 library.set_native_entry_symbol_resolver(symbol_resolver);
87
83 library = Library::CoreLibrary(); 88 library = Library::CoreLibrary();
84 ASSERT(!library.IsNull()); 89 ASSERT(!library.IsNull());
85 library.set_native_entry_resolver(resolver); 90 library.set_native_entry_resolver(resolver);
86 library.set_native_entry_symbol_resolver(symbol_resolver); 91 library.set_native_entry_symbol_resolver(symbol_resolver);
87 92
88 library = Library::MathLibrary(); 93 library = Library::MathLibrary();
89 ASSERT(!library.IsNull()); 94 ASSERT(!library.IsNull());
90 library.set_native_entry_resolver(resolver); 95 library.set_native_entry_resolver(resolver);
91 library.set_native_entry_symbol_resolver(symbol_resolver); 96 library.set_native_entry_symbol_resolver(symbol_resolver);
92 97
(...skipping 23 matching lines...) Expand all
116 library.set_native_entry_symbol_resolver(symbol_resolver); 121 library.set_native_entry_symbol_resolver(symbol_resolver);
117 } 122 }
118 123
119 124
120 bool Bootstrap::IsBootstapResolver(Dart_NativeEntryResolver resolver) { 125 bool Bootstrap::IsBootstapResolver(Dart_NativeEntryResolver resolver) {
121 return (resolver == 126 return (resolver ==
122 reinterpret_cast<Dart_NativeEntryResolver>(BootstrapNatives::Lookup)); 127 reinterpret_cast<Dart_NativeEntryResolver>(BootstrapNatives::Lookup));
123 } 128 }
124 129
125 } // namespace dart 130 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698