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

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

Issue 12919020: Remove redundant Dart_LoadScript as it doesn't seem to be used in the VM and hopefully dartium uses… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 9 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/dartutils.cc ('k') | runtime/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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 // Generate a snapshot file after loading all the scripts specified on the 5 // Generate a snapshot file after loading all the scripts specified on the
6 // command line. 6 // command line.
7 7
8 #include <stdlib.h> 8 #include <stdlib.h>
9 #include <string.h> 9 #include <string.h>
10 #include <stdio.h> 10 #include <stdio.h>
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 Dart_Handle script_path = FilePathFromUri( 328 Dart_Handle script_path = FilePathFromUri(
329 DartUtils::GetStringValue(resolved_script_uri)); 329 DartUtils::GetStringValue(resolved_script_uri));
330 if (Dart_IsError(script_path)) { 330 if (Dart_IsError(script_path)) {
331 return script_path; 331 return script_path;
332 } 332 }
333 Dart_Handle source = DartUtils::ReadStringFromFile( 333 Dart_Handle source = DartUtils::ReadStringFromFile(
334 DartUtils::GetStringValue(script_path)); 334 DartUtils::GetStringValue(script_path));
335 if (Dart_IsError(source)) { 335 if (Dart_IsError(source)) {
336 return source; 336 return source;
337 } 337 }
338 return Dart_LoadScript(resolved_script_uri, source); 338 return Dart_LoadScript(resolved_script_uri, source, 0, 0);
339 } 339 }
340 340
341 341
342 static Dart_Handle LoadGenericSnapshotCreationScript( 342 static Dart_Handle LoadGenericSnapshotCreationScript(
343 Builtin::BuiltinLibraryId id) { 343 Builtin::BuiltinLibraryId id) {
344 Dart_Handle source = Builtin::Source(id); 344 Dart_Handle source = Builtin::Source(id);
345 if (Dart_IsError(source)) { 345 if (Dart_IsError(source)) {
346 return source; // source contains the error string. 346 return source; // source contains the error string.
347 } 347 }
348 Dart_Handle lib; 348 Dart_Handle lib;
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 CreateAndWriteSnapshot(); 519 CreateAndWriteSnapshot();
520 520
521 Dart_EnterIsolate(UriResolverIsolateScope::isolate); 521 Dart_EnterIsolate(UriResolverIsolateScope::isolate);
522 Dart_ShutdownIsolate(); 522 Dart_ShutdownIsolate();
523 } else { 523 } else {
524 SetupForGenericSnapshotCreation(); 524 SetupForGenericSnapshotCreation();
525 CreateAndWriteSnapshot(); 525 CreateAndWriteSnapshot();
526 } 526 }
527 return 0; 527 return 0;
528 } 528 }
OLDNEW
« no previous file with comments | « runtime/bin/dartutils.cc ('k') | runtime/include/dart_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698