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

Side by Side Diff: bin/main.cc

Issue 10021072: Remove the deprecated method invocation and field access apis from the (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 8 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 | « no previous file | include/dart_api.h » ('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 <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 564 matching lines...) Expand 10 before | Expand all | Expand 10 after
575 // Set debug breakpoint if specified on the command line. 575 // Set debug breakpoint if specified on the command line.
576 if (breakpoint_at != NULL) { 576 if (breakpoint_at != NULL) {
577 result = SetBreakpoint(breakpoint_at, library); 577 result = SetBreakpoint(breakpoint_at, library);
578 if (Dart_IsError(result)) { 578 if (Dart_IsError(result)) {
579 return ErrorExit("Error setting breakpoint at '%s': %s\n", 579 return ErrorExit("Error setting breakpoint at '%s': %s\n",
580 breakpoint_at, 580 breakpoint_at,
581 Dart_GetError(result)); 581 Dart_GetError(result));
582 } 582 }
583 } 583 }
584 // Lookup and invoke the top level main function. 584 // Lookup and invoke the top level main function.
585 result = Dart_InvokeStatic(library, 585 result = Dart_Invoke(library, Dart_NewString("main"), 0, NULL);
586 Dart_NewString(""),
587 Dart_NewString("main"),
588 0, NULL);
589 if (Dart_IsError(result)) { 586 if (Dart_IsError(result)) {
590 return ErrorExit("%s\n", Dart_GetError(result)); 587 return ErrorExit("%s\n", Dart_GetError(result));
591 } 588 }
592 // Keep handling messages until the last active receive port is closed. 589 // Keep handling messages until the last active receive port is closed.
593 result = Dart_RunLoop(); 590 result = Dart_RunLoop();
594 if (Dart_IsError(result)) { 591 if (Dart_IsError(result)) {
595 return ErrorExit("%s\n", Dart_GetError(result)); 592 return ErrorExit("%s\n", Dart_GetError(result));
596 } 593 }
597 594
598 Dart_ExitScope(); 595 Dart_ExitScope();
599 // Dump symbol information for the profiler. 596 // Dump symbol information for the profiler.
600 DumpPprofSymbolInfo(); 597 DumpPprofSymbolInfo();
601 // Shutdown the isolate. 598 // Shutdown the isolate.
602 Dart_ShutdownIsolate(); 599 Dart_ShutdownIsolate();
603 // Terminate process exit-code handler. 600 // Terminate process exit-code handler.
604 Process::TerminateExitCodeHandler(); 601 Process::TerminateExitCodeHandler();
605 602
606 free(const_cast<char*>(original_script_name)); 603 free(const_cast<char*>(original_script_name));
607 free(const_cast<char*>(original_working_directory)); 604 free(const_cast<char*>(original_working_directory));
608 free(const_cast<char*>(original_script_url)); 605 free(const_cast<char*>(original_script_url));
609 606
610 return 0; 607 return 0;
611 } 608 }
OLDNEW
« no previous file with comments | « no previous file | include/dart_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698