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

Unified Diff: src/code-stubs.h

Issue 8066002: Fast allocation of block contexts. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 3 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
Index: src/code-stubs.h
diff --git a/src/code-stubs.h b/src/code-stubs.h
index 9480fc4b1da26c84edf0deda689d272950e95e7b..62d480afff354c75de295934e1286c7fa432679f 100644
--- a/src/code-stubs.h
+++ b/src/code-stubs.h
@@ -62,6 +62,7 @@ namespace internal {
V(StackCheck) \
V(FastNewClosure) \
V(FastNewContext) \
+ V(FastNewBlockContext) \
V(FastCloneShallowArray) \
V(RevertToNumber) \
V(ToBoolean) \
@@ -349,6 +350,24 @@ class FastNewContextStub : public CodeStub {
};
+class FastNewBlockContextStub : public CodeStub {
+ public:
+ static const int kMaximumSlots = 64;
+
+ explicit FastNewBlockContextStub(int slots) : slots_(slots) {
+ ASSERT(slots_ > 0 && slots <= kMaximumSlots);
danno 2011/10/05 12:30:09 nit: use either both slots_ or slots
Steven 2011/10/05 15:40:03 Done.
+ }
+
+ void Generate(MacroAssembler* masm);
+
+ private:
+ int slots_;
+
+ Major MajorKey() { return FastNewBlockContext; }
+ int MinorKey() { return slots_; }
+};
+
+
class FastCloneShallowArrayStub : public CodeStub {
public:
// Maximum length of copied elements array.
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/full-codegen.cc » ('j') | src/ia32/code-stubs-ia32.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698