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

Unified Diff: src/code-stubs.h

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/code-stubs.h
diff --git a/src/code-stubs.h b/src/code-stubs.h
index f110f21f451638e6f11d08d1fb792eaea8f5a1ae..9590fbc489cd7989e01f84130e02a07cda54255a 100644
--- a/src/code-stubs.h
+++ b/src/code-stubs.h
@@ -113,6 +113,7 @@ class ObjectLiteral;
V(FastCloneShallowObject) \
V(FastNewClosure) \
V(FastNewFunctionContext) \
+ V(FastNewEvalContext) \
V(KeyedLoadSloppyArguments) \
V(KeyedStoreSloppyArguments) \
V(LoadScriptContextField) \
@@ -865,6 +866,27 @@ class FastNewFunctionContextStub final : public TurboFanCodeStub {
DEFINE_TURBOFAN_CODE_STUB(FastNewFunctionContext, TurboFanCodeStub);
};
+class FastNewEvalContextStub final : public TurboFanCodeStub {
+ public:
+ static const int kMaximumSlots = 0x8000;
+
+ explicit FastNewEvalContextStub(Isolate* isolate)
+ : TurboFanCodeStub(isolate) {}
+
+ static compiler::Node* Generate(CodeStubAssembler* assembler,
+ compiler::Node* function,
+ compiler::Node* slots,
+ compiler::Node* context);
+
+ private:
+ // FastNewEvalContextStub can only allocate closures which fit in the
+ // new space.
+ STATIC_ASSERT(((kMaximumSlots + Context::MIN_CONTEXT_SLOTS) * kPointerSize +
+ FixedArray::kHeaderSize) < kMaxRegularHeapObjectSize);
+
+ DEFINE_CALL_INTERFACE_DESCRIPTOR(FastNewEvalContext);
+ DEFINE_TURBOFAN_CODE_STUB(FastNewEvalContext, TurboFanCodeStub);
+};
class FastNewObjectStub final : public PlatformCodeStub {
public:

Powered by Google App Engine
This is Rietveld 408576698