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

Side by Side Diff: lib/compiler/implementation/native_handler.dart

Issue 9956172: Revert "Refactoring if block-information." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
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 | lib/compiler/implementation/ssa/builder.dart » ('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 #library('native'); 5 #library('native');
6 #import('dart:uri'); 6 #import('dart:uri');
7 #import('leg.dart'); 7 #import('leg.dart');
8 #import('elements/elements.dart'); 8 #import('elements/elements.dart');
9 #import('scanner/scannerlib.dart'); 9 #import('scanner/scannerlib.dart');
10 #import('ssa/ssa.dart'); 10 #import('ssa/ssa.dart');
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 331
332 // If a method is overridden, we must check if the prototype of 332 // If a method is overridden, we must check if the prototype of
333 // 'this' has the method available. Otherwise, we may end up 333 // 'this' has the method available. Otherwise, we may end up
334 // calling the method from the super class. If the method is not 334 // calling the method from the super class. If the method is not
335 // available, we make a direct call to Object.prototype.$methodName. 335 // available, we make a direct call to Object.prototype.$methodName.
336 // This method will patch the prototype of 'this' to the real method. 336 // This method will patch the prototype of 'this' to the real method.
337 void generateMethodWithPrototypeCheck(Compiler compiler, 337 void generateMethodWithPrototypeCheck(Compiler compiler,
338 StringBuffer buffer, 338 StringBuffer buffer,
339 String methodName, 339 String methodName,
340 String code, 340 String code,
341 String parameters) { 341 String parameters) {
342 buffer.add(" if (Object.getPrototypeOf(this).hasOwnProperty"); 342 buffer.add(" if (Object.getPrototypeOf(this).hasOwnProperty");
343 buffer.add("('$methodName')) {\n"); 343 buffer.add("('$methodName')) {\n");
344 buffer.add(" $code"); 344 buffer.add(" $code");
345 buffer.add(" } else {\n"); 345 buffer.add(" } else {\n");
346 buffer.add(" return Object.prototype.$methodName.call(this"); 346 buffer.add(" return Object.prototype.$methodName.call(this");
347 buffer.add(parameters == '' ? '' : ', $parameters'); 347 buffer.add(parameters == '' ? '' : ', $parameters');
348 buffer.add(");\n"); 348 buffer.add(");\n");
349 buffer.add(" }\n"); 349 buffer.add(" }\n");
350 } 350 }
OLDNEW
« no previous file with comments | « no previous file | lib/compiler/implementation/ssa/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698