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

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

Issue 9254026: Split dart:builtin into dart:builtin and dart:io. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comment and add binaries. Created 8 years, 11 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 | « runtime/bin/builtin_in.cc ('k') | runtime/bin/builtin_nolib.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 #include "bin/builtin.h" 5 #include "bin/builtin.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 #include <string.h> 8 #include <string.h>
9 9
10 #include "bin/dartutils.h" 10 #include "bin/dartutils.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 } 111 }
112 112
113 void FUNCTION_NAME(Exit)(Dart_NativeArguments args) { 113 void FUNCTION_NAME(Exit)(Dart_NativeArguments args) {
114 Dart_EnterScope(); 114 Dart_EnterScope();
115 int64_t status = DartUtils::GetIntegerValue(Dart_GetNativeArgument(args, 0)); 115 int64_t status = DartUtils::GetIntegerValue(Dart_GetNativeArgument(args, 0));
116 Dart_ExitScope(); 116 Dart_ExitScope();
117 exit(status); 117 exit(status);
118 } 118 }
119 119
120 120
121 void Builtin::SetNativeResolver() { 121 void Builtin::SetNativeResolver(Builtin::BuiltinLibraryId id) {
122 Dart_Handle url = Dart_NewString(DartUtils::kBuiltinLibURL); 122 Dart_Handle url;
123 if (id == Builtin::kBuiltinLibrary) {
124 url = Dart_NewString(DartUtils::kBuiltinLibURL);
125 } else {
126 ASSERT(id == Builtin::kIOLibrary);
127 url = Dart_NewString(DartUtils::kIOLibURL);
128 }
123 Dart_Handle builtin_lib = Dart_LookupLibrary(url); 129 Dart_Handle builtin_lib = Dart_LookupLibrary(url);
124 DART_CHECK_VALID(builtin_lib); 130 DART_CHECK_VALID(builtin_lib);
125 // Setup the native resolver for built in library functions. 131 // Setup the native resolver for built in library functions.
126 Dart_Handle result = Dart_SetNativeResolver(builtin_lib, NativeLookup); 132 Dart_Handle result = Dart_SetNativeResolver(builtin_lib, NativeLookup);
127 DART_CHECK_VALID(result); 133 DART_CHECK_VALID(result);
128 } 134 }
OLDNEW
« no previous file with comments | « runtime/bin/builtin_in.cc ('k') | runtime/bin/builtin_nolib.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698