Chromium Code Reviews| Index: bin/builtin_nolib.cc |
| =================================================================== |
| --- bin/builtin_nolib.cc (revision 0) |
| +++ bin/builtin_nolib.cc (revision 0) |
| @@ -0,0 +1,32 @@ |
| +// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
| +// for details. All rights reserved. Use of this source code is governed by a |
| +// BSD-style license that can be found in the LICENSE file. |
| + |
| +#include <stdio.h> |
| + |
| +#include "include/dart_api.h" |
| + |
| +#include "bin/builtin.h" |
| +#include "bin/dartutils.h" |
| + |
| + |
| +Dart_Handle Builtin::Source() { |
| + UNREACHABLE(); |
| + return Dart_Null(); |
| +} |
| + |
| + |
| +void Builtin::SetupLibrary(Dart_Handle builtin_lib) { |
| + UNREACHABLE(); |
| +} |
| + |
| + |
| +void Builtin::ImportLibrary(Dart_Handle library) { |
| + Dart_Handle url = Dart_NewString(DartUtils::kBuiltinLibURL); |
| + Dart_Handle builtin_lib = Dart_LookupLibrary(url); |
| + ASSERT(!Dart_IsError(builtin_lib)); |
|
turnidge
2011/11/23 18:05:12
The above line is not needed, since you have the D
siva
2011/11/23 18:24:40
Removed.
On 2011/11/23 18:05:12, turnidge wrote:
|
| + // Import the builtin library into current library. |
| + DART_CHECK_VALID(builtin_lib); |
| + Dart_Handle result = Dart_LibraryImportLibrary(library, builtin_lib); |
| + DART_CHECK_VALID(result); |
|
turnidge
2011/11/23 18:05:12
You could get rid of the "result" variable here an
siva
2011/11/23 18:24:40
Removed result.
On 2011/11/23 18:05:12, turnidge
|
| +} |