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

Unified Diff: src/code-stubs.h

Issue 8598014: Implement code stub for object literal creation. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 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 | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stubs.h
diff --git a/src/code-stubs.h b/src/code-stubs.h
index 16826db9e8e819a1be2f9ef41955ec799463ba20..8ee694f25f97799accc726f24816bd7b3e777f89 100644
--- a/src/code-stubs.h
+++ b/src/code-stubs.h
@@ -58,6 +58,7 @@ namespace internal {
V(FastNewContext) \
V(FastNewBlockContext) \
V(FastCloneShallowArray) \
+ V(FastCloneShallowObject) \
V(ToBoolean) \
V(ToNumber) \
V(ArgumentsAccess) \
@@ -380,6 +381,26 @@ class FastCloneShallowArrayStub : public CodeStub {
};
+class FastCloneShallowObjectStub : public CodeStub {
+ public:
+ // Maximum number of properties in copied object.
+ static const int kMaximumClonedProperties = 6;
+
+ FastCloneShallowObjectStub(int length) : length_(length) {
+ ASSERT(length_ >= 0);
fschneider 2011/11/21 12:27:03 Maybe use ASSERT_GE / ASSERT_LE instead of ASSERT.
Michael Starzinger 2011/11/21 13:28:15 Done.
+ ASSERT(length_ <= kMaximumClonedProperties);
+ }
+
+ void Generate(MacroAssembler* masm);
+
+ private:
+ int length_;
+
+ Major MajorKey() { return FastCloneShallowObject; }
+ int MinorKey() { return length_; }
+};
+
+
class InstanceofStub: public CodeStub {
public:
enum Flags {
« no previous file with comments | « no previous file | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698