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

Unified Diff: src/compiler/js-generic-lowering.cc

Issue 2435023002: Use a different map to distinguish eval contexts (Closed)
Patch Set: relax dchecks Created 4 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: src/compiler/js-generic-lowering.cc
diff --git a/src/compiler/js-generic-lowering.cc b/src/compiler/js-generic-lowering.cc
index 57b976976c20f804b9e28d51ae8a55605a3e11c4..8a07976a66136e8576e514ab902baff6413ff88c 100644
--- a/src/compiler/js-generic-lowering.cc
+++ b/src/compiler/js-generic-lowering.cc
@@ -458,6 +458,18 @@ void JSGenericLowering::LowerJSCreateFunctionContext(Node* node) {
}
}
+void JSGenericLowering::LowerJSCreateEvalContext(Node* node) {
+ int const slot_count = OpParameter<int>(node->op());
+ CallDescriptor::Flags flags = FrameStateFlagForCall(node);
+
+ if (slot_count <= FastNewFunctionContextStub::kMaximumSlots) {
+ Callable callable = CodeFactory::FastNewEvalContext(isolate());
+ node->InsertInput(zone(), 1, jsgraph()->Int32Constant(slot_count));
+ ReplaceWithStubCall(node, callable, flags);
+ } else {
+ ReplaceWithRuntimeCall(node, Runtime::kNewEvalContext);
+ }
+}
void JSGenericLowering::LowerJSCreateIterResultObject(Node* node) {
ReplaceWithRuntimeCall(node, Runtime::kCreateIterResultObject);

Powered by Google App Engine
This is Rietveld 408576698