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

Side by Side Diff: bin/main.cc

Issue 10911135: Simplify the builtin functions and get rid of unused code. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 3 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 | « bin/gen_snapshot.cc ('k') | no next file » | 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 <stdlib.h> 5 #include <stdlib.h>
6 #include <string.h> 6 #include <string.h>
7 #include <stdio.h> 7 #include <stdio.h>
8 8
9 #include "include/dart_api.h" 9 #include "include/dart_api.h"
10 #include "include/dart_debugger_api.h" 10 #include "include/dart_debugger_api.h"
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 Dart_Isolate isolate = 377 Dart_Isolate isolate =
378 Dart_CreateIsolate(script_uri, main, snapshot_buffer, data, error); 378 Dart_CreateIsolate(script_uri, main, snapshot_buffer, data, error);
379 if (isolate == NULL) { 379 if (isolate == NULL) {
380 return false; 380 return false;
381 } 381 }
382 382
383 Dart_EnterScope(); 383 Dart_EnterScope();
384 384
385 if (snapshot_buffer != NULL) { 385 if (snapshot_buffer != NULL) {
386 // Setup the native resolver as the snapshot does not carry it. 386 // Setup the native resolver as the snapshot does not carry it.
387 Builtin::SetupLibrary( 387 Builtin::SetNativeResolver(Builtin::kBuiltinLibrary);
388 Builtin::LoadAndCheckLibrary(Builtin::kBuiltinLibrary), 388 Builtin::SetNativeResolver(Builtin::kIOLibrary);
389 Builtin::kBuiltinLibrary);
390 Builtin::SetupLibrary(Builtin::LoadAndCheckLibrary(Builtin::kIOLibrary),
391 Builtin::kIOLibrary);
392 } 389 }
393 390
394 // Set up the library tag handler for this isolate. 391 // Set up the library tag handler for this isolate.
395 Dart_Handle result = Dart_SetLibraryTagHandler(DartUtils::LibraryTagHandler); 392 Dart_Handle result = Dart_SetLibraryTagHandler(DartUtils::LibraryTagHandler);
396 CHECK_RESULT(result); 393 CHECK_RESULT(result);
397 394
398 // Load the specified application script into the newly created isolate. 395 // Load the specified application script into the newly created isolate.
399 Dart_Handle library; 396 Dart_Handle library;
400 if (use_script_snapshot) { 397 if (use_script_snapshot) {
401 if (snapshot_file == NULL) { 398 if (snapshot_file == NULL) {
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
663 Dart_ExitScope(); 660 Dart_ExitScope();
664 // Dump symbol information for the profiler. 661 // Dump symbol information for the profiler.
665 DumpPprofSymbolInfo(); 662 DumpPprofSymbolInfo();
666 // Shutdown the isolate. 663 // Shutdown the isolate.
667 Dart_ShutdownIsolate(); 664 Dart_ShutdownIsolate();
668 // Terminate process exit-code handler. 665 // Terminate process exit-code handler.
669 Process::TerminateExitCodeHandler(); 666 Process::TerminateExitCodeHandler();
670 667
671 return 0; 668 return 0;
672 } 669 }
OLDNEW
« no previous file with comments | « bin/gen_snapshot.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698