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

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

Issue 57773002: Repro for OOM bug in test.dart (applies to r29345). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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
« no previous file with comments | « no previous file | dart/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
diff --git a/dart/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart b/dart/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
index 4cbc51c47d991770fc42e88b84859a33fa36754e..a5dc1c4afe3c24948bdb2ef736bad5d1216dafd8 100644
--- a/dart/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
+++ b/dart/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
@@ -81,6 +81,41 @@ class SubtypeCheckedModeHelper extends CheckedModeHelper {
class FunctionTypeCheckedModeHelper extends CheckedModeHelper {
const FunctionTypeCheckedModeHelper(String name) : super(name);
+ jsAst.Expression generateCall(SsaCodeGenerator codegen,
+ HTypeConversion node) {
+ codegen.use(node.inputs[0]);
+ return codegen.pop();
+// HInstruction functionType = node.typeRepresentation;
+//
+//
+//
+//
+// Element helperElement = getElement(codegen.compiler);
+// codegen.world.registerStaticUse(helperElement);
+// List<jsAst.Expression> arguments = <jsAst.Expression>[];
+// codegen.use(node.checkedInput);
+// arguments.add(codegen.pop());
+// generateAdditionalArguments(codegen, node, arguments);
+// String helperName = codegen.backend.namer.isolateAccess(helperElement);
+// return new jsAst.Call(new jsAst.VariableUse(helperName), arguments);
+//
+//
+// List arguments = [, expression];
+// pushInvokeDynamic(
+// node, new Selector.call('_isTest', compiler.jsHelperLibrary, 1),
+// arguments);
+//
+// return new HIs.compound(type, expression, pop());
+//
+//
+// generateRuntimeError(null, '<<as-test not implemented $type>>');
+
+
+
+
+ }
+
+ // DEAD CODE, delete this.
void generateAdditionalArguments(SsaCodeGenerator codegen,
HTypeConversion node,
List<jsAst.Expression> arguments) {
@@ -1018,7 +1053,25 @@ class JavaScriptBackend extends Backend {
enqueueClass(world, compiler.listClass, elements);
}
if (type is FunctionType) {
- enqueueInResolution(getCheckFunctionSubtype(), elements);
+ // enqueueInResolution(getCheckFunctionSubtype(), elements);
+ enqueueInResolution(getThrowRuntimeError(), elements);
+ enqueueInResolution(compiler.findHelper('buildFunctionType'), elements);
+ enqueueInResolution(
+ compiler.findHelper('buildNamedFunctionType'), elements);
+ enqueueInResolution(compiler.findHelper('buildInterfaceType'), elements);
+ enqueueInResolution(
+ compiler.findHelper('getDynamicRuntimeType'), elements);
+ enqueueInResolution(
+ compiler.findHelper('getVoidRuntimeType'), elements);
+ enqueueInResolution(compiler.findHelper('buildDummyType'), elements);
+ enqueueInResolution(
+ compiler.findHelper('convertRtiToRuntimeType'),elements);
+ compiler.enqueuer.resolution.registerInvocation(
+ new Selector.call('_isTest', compiler.jsHelperLibrary, 1));
+ compiler.enqueuer.resolution.registerInvocation(
+ new Selector.call('_asCheck', compiler.jsHelperLibrary, 1));
+ compiler.enqueuer.resolution.registerInvocation(
+ new Selector.call('_assertCheck', compiler.jsHelperLibrary, 1));
}
if (type.element.isNative()) {
// We will neeed to add the "$is" and "$as" properties on the
@@ -1533,10 +1586,6 @@ class JavaScriptBackend extends Backend {
return compiler.findHelper('assertSubtypeOfRuntimeType');
}
- Element getCheckFunctionSubtype() {
- return compiler.findHelper('checkFunctionSubtype');
- }
-
Element getThrowNoSuchMethod() {
return compiler.findHelper('throwNoSuchMethod');
}
« no previous file with comments | « no previous file | dart/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698