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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/js_backend/native_emitter.dart

Issue 12499005: dart2js: Create noSuchMethod handlers at runtime to reduce overhead. (Closed) Base URL: https://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
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 part of js_backend; 5 part of js_backend;
6 6
7 class NativeEmitter { 7 class NativeEmitter {
8 8
9 CodeEmitterTask emitter; 9 CodeEmitterTask emitter;
10 CodeBuffer nativeBuffer; 10 CodeBuffer nativeBuffer;
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 536
537 if (emitter.compiler.enableMinification) targetBuffer.add(';'); 537 if (emitter.compiler.enableMinification) targetBuffer.add(';');
538 targetBuffer.add(jsAst.prettyPrint( 538 targetBuffer.add(jsAst.prettyPrint(
539 new jsAst.ExpressionStatement(init), compiler)); 539 new jsAst.ExpressionStatement(init), compiler));
540 targetBuffer.add('\n'); 540 targetBuffer.add('\n');
541 } 541 }
542 542
543 targetBuffer.add(nativeBuffer); 543 targetBuffer.add(nativeBuffer);
544 targetBuffer.add('\n'); 544 targetBuffer.add('\n');
545 } 545 }
546
547 String get objectToPutNoSuchMethodHandlersOn {
548 if (handleNoSuchMethod) return "Object.prototype";
549 return emitter.objectToPutNoSuchMethodHandlersOn;
550 }
546 } 551 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698