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

Unified Diff: sdk/lib/_internal/compiler/implementation/js_backend/backend.dart

Issue 11817013: Do not apply optimizations based on an element if that element cannot be resolved. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/js_backend/backend.dart (revision 16853)
+++ sdk/lib/_internal/compiler/implementation/js_backend/backend.dart (working copy)
@@ -781,20 +781,20 @@
jsBoolClass = compiler.findInterceptor(const SourceString('JSBool'))];
jsArrayClass.ensureResolved(compiler);
- jsArrayLength =
- jsArrayClass.lookupLocalMember(const SourceString('length'));
- jsArrayRemoveLast =
- jsArrayClass.lookupLocalMember(const SourceString('removeLast'));
- jsArrayAdd =
- jsArrayClass.lookupLocalMember(const SourceString('add'));
+ jsArrayLength = compiler.lookupElementIn(
+ jsArrayClass, const SourceString('length'));
+ jsArrayRemoveLast = compiler.lookupElementIn(
+ jsArrayClass, const SourceString('removeLast'));
+ jsArrayAdd = compiler.lookupElementIn(
+ jsArrayClass, const SourceString('add'));
jsStringClass.ensureResolved(compiler);
- jsStringLength =
- jsStringClass.lookupLocalMember(const SourceString('length'));
- jsStringSplit =
- jsStringClass.lookupLocalMember(const SourceString('split'));
- jsStringConcat =
- jsStringClass.lookupLocalMember(const SourceString('concat'));
+ jsStringLength = compiler.lookupElementIn(
+ jsStringClass, const SourceString('length'));
+ jsStringSplit = compiler.lookupElementIn(
+ jsStringClass, const SourceString('split'));
+ jsStringConcat = compiler.lookupElementIn(
+ jsStringClass, const SourceString('concat'));
for (ClassElement cls in classes) {
if (cls != null) interceptedClasses[cls] = null;
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/elements/elements.dart ('k') | tests/compiler/dart2js/builtin_interceptor_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698