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

Unified Diff: sdk/lib/_internal/compiler/implementation/ssa/codegen.dart

Issue 11411147: Address review comments on issue 11412105. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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/ssa/codegen.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/ssa/codegen.dart (revision 15278)
+++ sdk/lib/_internal/compiler/implementation/ssa/codegen.dart (working copy)
@@ -1724,6 +1724,9 @@
use(node.receiver);
if (node.element == backend.jsArrayLength
|| node.element == backend.jsStringLength) {
+ // We're accessing a native JavaScript property called 'length'
+ // on a JS String or a JS array. Therefore, the name of that
+ // property should not be mangled.
push(new js.PropertyAccess.field(pop(), 'length'), node);
} else {
String name = backend.namer.getName(node.element);
@@ -1737,21 +1740,6 @@
}
}
- // Determine if an instruction is a simple number computation
- // involving only things with guaranteed number types and a given
- // field.
- bool isSimpleFieldNumberComputation(HInstruction value, HFieldSet node) {
- if (value.guaranteedType.union(HType.NUMBER, compiler) == HType.NUMBER) {
- return true;
- }
- if (value is HBinaryArithmetic) {
- return (isSimpleFieldNumberComputation(value.left, node) &&
- isSimpleFieldNumberComputation(value.right, node));
- }
- if (value is HFieldGet) return value.element == node.element;
- return false;
- }
-
visitFieldSet(HFieldSet node) {
String name = backend.namer.getName(node.element);
DartType type = types[node.receiver].computeType(compiler);
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/ssa/builder.dart ('k') | sdk/lib/_internal/compiler/implementation/ssa/nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698