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

Unified Diff: pkg/compiler/lib/src/ssa/optimize.dart

Issue 1408043002: Move native and js interop properties from the element model to the JS backend (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. Created 5 years, 2 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
« no previous file with comments | « pkg/compiler/lib/src/ssa/interceptor_simplifier.dart ('k') | pkg/compiler/lib/src/types/types.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/ssa/optimize.dart
diff --git a/pkg/compiler/lib/src/ssa/optimize.dart b/pkg/compiler/lib/src/ssa/optimize.dart
index 563b503220b340968225e5ac30f91b702af3828c..8f7819b8398c9d699fafa83c062ff04cbc8e5e84 100644
--- a/pkg/compiler/lib/src/ssa/optimize.dart
+++ b/pkg/compiler/lib/src/ssa/optimize.dart
@@ -424,7 +424,7 @@ class SsaInstructionSimplifier extends HBaseVisitor
&& element.name == node.selector.name) {
FunctionElement method = element;
- if (method.isNative) {
+ if (backend.isNative(method)) {
HInstruction folded = tryInlineNativeMethod(node, method);
if (folded != null) return folded;
} else {
@@ -858,7 +858,7 @@ class SsaInstructionSimplifier extends HBaseVisitor
bool isAssignable = !compiler.world.fieldNeverChanges(field);
TypeMask type;
- if (field.enclosingClass.isNative) {
+ if (backend.isNative(field.enclosingClass)) {
type = TypeMaskFactory.fromNativeBehavior(
native.NativeBehavior.ofFieldLoad(field, compiler),
compiler);
@@ -2129,6 +2129,8 @@ class MemorySet {
MemorySet(this.compiler);
+ JavaScriptBackend get backend => compiler.backend;
+
/**
* Returns whether [first] and [second] always alias to the same object.
*/
@@ -2185,7 +2187,9 @@ class MemorySet {
void registerFieldValueUpdate(Element element,
HInstruction receiver,
HInstruction value) {
- if (element.isNative) return; // TODO(14955): Remove this restriction?
+ if (backend.isNative(element)) {
+ return; // TODO(14955): Remove this restriction?
+ }
// [value] is being set in some place in memory, we remove it from
// the non-escaping set.
nonEscapingReceivers.remove(value);
@@ -2203,7 +2207,9 @@ class MemorySet {
void registerFieldValue(Element element,
HInstruction receiver,
HInstruction value) {
- if (element.isNative) return; // TODO(14955): Remove this restriction?
+ if (backend.isNative(element)) {
+ return; // TODO(14955): Remove this restriction?
+ }
Map<HInstruction, HInstruction> map = fieldValues.putIfAbsent(
element, () => <HInstruction, HInstruction> {});
map[receiver] = value;
« no previous file with comments | « pkg/compiler/lib/src/ssa/interceptor_simplifier.dart ('k') | pkg/compiler/lib/src/types/types.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698