Reviewers: Michael Starzinger,
Description:
[turbofan] Remove context canonicalization hack from generic lowering.
This hack doesn't help currently, since it only applies to asm.js where
we do function context specialization and there we already have a
canonicalized context (and the CodeGenerator materializes that from the
frame).
[email protected]
Please review this at https://codereview.chromium.org/1177033006/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+3, -11 lines):
M src/compiler/js-generic-lowering.cc
Index: src/compiler/js-generic-lowering.cc
diff --git a/src/compiler/js-generic-lowering.cc
b/src/compiler/js-generic-lowering.cc
index
da0ccb0580fee7a868ccd8f51622ce9e7b3ec78b..322654cad57371f7f5f49dc39af36d8a768b1f1a
100644
--- a/src/compiler/js-generic-lowering.cc
+++ b/src/compiler/js-generic-lowering.cc
@@ -535,17 +535,9 @@ bool JSGenericLowering::TryLowerDirectJSCall(Node*
node) {
Type* ok_receiver = Type::Union(Type::Undefined(), Type::Receiver(),
zone());
if (!NodeProperties::GetBounds(receiver).upper->Is(ok_receiver)) return
false;
- int index = NodeProperties::FirstContextIndex(node);
-
- // TODO(titzer): total hack to share function context constants.
- // Remove this when the JSGraph canonicalizes heap constants.
- Node* context = node->InputAt(index);
- HeapObjectMatcher<Context> context_const(context);
- if (!context_const.HasValue() ||
- *(context_const.Value().handle()) != function->context()) {
- context =
jsgraph()->HeapConstant(Handle<Context>(function->context()));
- }
- node->ReplaceInput(index, context);
+ // Update to the function context.
+ NodeProperties::ReplaceContextInput(
+ node, jsgraph()->HeapConstant(Handle<Context>(function->context())));
CallDescriptor::Flags flags = FlagsForNode(node);
if (is_strict(p.language_mode())) flags |=
CallDescriptor::kSupportsTailCalls;
CallDescriptor* desc =
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.