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

Side by Side Diff: runtime/vm/precompiler.cc

Issue 2786483002: AOT compiler changes for dart_content_handler: (Closed)
Patch Set: . Created 3 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
« no previous file with comments | « runtime/vm/BUILD.gn ('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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 "vm/precompiler.h" 5 #include "vm/precompiler.h"
6 6
7 #include "vm/aot_optimizer.h" 7 #include "vm/aot_optimizer.h"
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/ast_printer.h" 9 #include "vm/ast_printer.h"
10 #include "vm/branch_optimizer.h" 10 #include "vm/branch_optimizer.h"
(...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after
646 if ((cid == kDynamicCid) || (cid == kVoidCid) || 646 if ((cid == kDynamicCid) || (cid == kVoidCid) ||
647 (cid == kFreeListElement) || (cid == kForwardingCorpse)) { 647 (cid == kFreeListElement) || (cid == kForwardingCorpse)) {
648 continue; 648 continue;
649 } 649 }
650 cls = isolate()->class_table()->At(cid); 650 cls = isolate()->class_table()->At(cid);
651 AddInstantiatedClass(cls); 651 AddInstantiatedClass(cls);
652 } 652 }
653 653
654 Dart_QualifiedFunctionName vm_entry_points[] = { 654 Dart_QualifiedFunctionName vm_entry_points[] = {
655 // Functions 655 // Functions
656 {"dart:async", "::", "_setScheduleImmediateClosure"},
657 {"dart:core", "::", "_completeDeferredLoads"}, 656 {"dart:core", "::", "_completeDeferredLoads"},
658 {"dart:core", "AbstractClassInstantiationError", 657 {"dart:core", "AbstractClassInstantiationError",
659 "AbstractClassInstantiationError._create"}, 658 "AbstractClassInstantiationError._create"},
660 {"dart:core", "ArgumentError", "ArgumentError."}, 659 {"dart:core", "ArgumentError", "ArgumentError."},
661 {"dart:core", "CyclicInitializationError", "CyclicInitializationError."}, 660 {"dart:core", "CyclicInitializationError", "CyclicInitializationError."},
662 {"dart:core", "FallThroughError", "FallThroughError._create"}, 661 {"dart:core", "FallThroughError", "FallThroughError._create"},
663 {"dart:core", "FormatException", "FormatException."}, 662 {"dart:core", "FormatException", "FormatException."},
664 {"dart:core", "NoSuchMethodError", "NoSuchMethodError._withType"}, 663 {"dart:core", "NoSuchMethodError", "NoSuchMethodError._withType"},
665 {"dart:core", "NullThrownError", "NullThrownError."}, 664 {"dart:core", "NullThrownError", "NullThrownError."},
666 {"dart:core", "OutOfMemoryError", "OutOfMemoryError."}, 665 {"dart:core", "OutOfMemoryError", "OutOfMemoryError."},
667 {"dart:core", "RangeError", "RangeError."}, 666 {"dart:core", "RangeError", "RangeError."},
668 {"dart:core", "RangeError", "RangeError.range"}, 667 {"dart:core", "RangeError", "RangeError.range"},
669 {"dart:core", "StackOverflowError", "StackOverflowError."}, 668 {"dart:core", "StackOverflowError", "StackOverflowError."},
670 {"dart:core", "UnsupportedError", "UnsupportedError."}, 669 {"dart:core", "UnsupportedError", "UnsupportedError."},
671 {"dart:core", "_AssertionError", "_AssertionError._create"}, 670 {"dart:core", "_AssertionError", "_AssertionError._create"},
672 {"dart:core", "_CastError", "_CastError._create"}, 671 {"dart:core", "_CastError", "_CastError._create"},
673 {"dart:core", "_InternalError", "_InternalError."}, 672 {"dart:core", "_InternalError", "_InternalError."},
674 {"dart:core", "_InvocationMirror", "_allocateInvocationMirror"}, 673 {"dart:core", "_InvocationMirror", "_allocateInvocationMirror"},
675 {"dart:core", "_TypeError", "_TypeError._create"}, 674 {"dart:core", "_TypeError", "_TypeError._create"},
676 {"dart:isolate", "IsolateSpawnException", "IsolateSpawnException."}, 675 {"dart:isolate", "IsolateSpawnException", "IsolateSpawnException."},
677 {"dart:isolate", "::", "_getIsolateScheduleImmediateClosure"},
678 {"dart:isolate", "::", "_setupHooks"},
679 {"dart:isolate", "::", "_startMainIsolate"},
680 {"dart:isolate", "::", "_startIsolate"}, 676 {"dart:isolate", "::", "_startIsolate"},
681 {"dart:isolate", "_RawReceivePortImpl", "_handleMessage"}, 677 {"dart:isolate", "_RawReceivePortImpl", "_handleMessage"},
682 {"dart:isolate", "_RawReceivePortImpl", "_lookupHandler"}, 678 {"dart:isolate", "_RawReceivePortImpl", "_lookupHandler"},
683 {"dart:isolate", "_SendPortImpl", "send"}, 679 {"dart:isolate", "_SendPortImpl", "send"},
684 {"dart:typed_data", "ByteData", "ByteData."}, 680 {"dart:typed_data", "ByteData", "ByteData."},
685 {"dart:typed_data", "ByteData", "ByteData._view"}, 681 {"dart:typed_data", "ByteData", "ByteData._view"},
686 {"dart:typed_data", "_ByteBuffer", "_ByteBuffer._New"}, 682 {"dart:typed_data", "_ByteBuffer", "_ByteBuffer._New"},
687 {"dart:_vmservice", "::", "boot"}, 683 {"dart:_vmservice", "::", "boot"},
688 #if !defined(PRODUCT) 684 #if !defined(PRODUCT)
689 {"dart:_vmservice", "::", "_registerIsolate"}, 685 {"dart:_vmservice", "::", "_registerIsolate"},
(...skipping 19 matching lines...) Expand all
709 Field& field = Field::Handle(Z); 705 Field& field = Field::Handle(Z);
710 String& library_uri = String::Handle(Z); 706 String& library_uri = String::Handle(Z);
711 String& class_name = String::Handle(Z); 707 String& class_name = String::Handle(Z);
712 String& function_name = String::Handle(Z); 708 String& function_name = String::Handle(Z);
713 709
714 for (intptr_t i = 0; entry_points[i].library_uri != NULL; i++) { 710 for (intptr_t i = 0; entry_points[i].library_uri != NULL; i++) {
715 library_uri = Symbols::New(thread(), entry_points[i].library_uri); 711 library_uri = Symbols::New(thread(), entry_points[i].library_uri);
716 class_name = Symbols::New(thread(), entry_points[i].class_name); 712 class_name = Symbols::New(thread(), entry_points[i].class_name);
717 function_name = Symbols::New(thread(), entry_points[i].function_name); 713 function_name = Symbols::New(thread(), entry_points[i].function_name);
718 714
719 lib = Library::LookupLibrary(T, library_uri); 715 if (library_uri.raw() == Symbols::TopLevel().raw()) {
716 lib = I->object_store()->root_library();
717 } else {
718 lib = Library::LookupLibrary(T, library_uri);
719 }
720 if (lib.IsNull()) { 720 if (lib.IsNull()) {
721 String& msg = 721 String& msg =
722 String::Handle(Z, String::NewFormatted("Cannot find entry point %s\n", 722 String::Handle(Z, String::NewFormatted("Cannot find entry point %s\n",
723 entry_points[i].library_uri)); 723 entry_points[i].library_uri));
724 Jump(Error::Handle(Z, ApiError::New(msg))); 724 Jump(Error::Handle(Z, ApiError::New(msg)));
725 UNREACHABLE(); 725 UNREACHABLE();
726 } 726 }
727 727
728 if (class_name.raw() == Symbols::TopLevel().raw()) { 728 if (class_name.raw() == Symbols::TopLevel().raw()) {
729 if (Library::IsPrivate(function_name)) { 729 if (Library::IsPrivate(function_name)) {
(...skipping 2835 matching lines...) Expand 10 before | Expand all | Expand 10 after
3565 3565
3566 ASSERT(FLAG_precompiled_mode); 3566 ASSERT(FLAG_precompiled_mode);
3567 const bool optimized = function.IsOptimizable(); // False for natives. 3567 const bool optimized = function.IsOptimizable(); // False for natives.
3568 DartPrecompilationPipeline pipeline(zone, field_type_map); 3568 DartPrecompilationPipeline pipeline(zone, field_type_map);
3569 return PrecompileFunctionHelper(precompiler, &pipeline, function, optimized); 3569 return PrecompileFunctionHelper(precompiler, &pipeline, function, optimized);
3570 } 3570 }
3571 3571
3572 #endif // DART_PRECOMPILER 3572 #endif // DART_PRECOMPILER
3573 3573
3574 } // namespace dart 3574 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698