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

Unified Diff: src/objects.h

Issue 1693513002: [runtime] Introduce FastNewStrictArgumentsStub to optimize strict arguments. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix mips and mips64. Created 4 years, 10 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
« no previous file with comments | « src/mips64/interface-descriptors-mips64.cc ('k') | src/runtime/runtime.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index ebe4762d3b2580cc57a20ae34174b13b8bbca941..35e750c013d4107ce812bdc30615530febb5130d 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -2606,7 +2606,7 @@ class JSDataPropertyDescriptor: public JSObject {
// JSIteratorResult is just a JSObject with a specific initial map.
-// This initial map adds in-object properties for "done" and "value,
+// This initial map adds in-object properties for "done" and "value",
// as specified by ES6 section 25.1.1.3 The IteratorResult Interface
class JSIteratorResult: public JSObject {
public:
@@ -2623,6 +2623,47 @@ class JSIteratorResult: public JSObject {
};
+// Common superclass for JSSloppyArgumentsObject and JSStrictArgumentsObject.
+class JSArgumentsObject: public JSObject {
+ public:
+ // Offsets of object fields.
+ static const int kLengthOffset = JSObject::kHeaderSize;
+ static const int kHeaderSize = kLengthOffset + kPointerSize;
+ // Indices of in-object properties.
+ static const int kLengthIndex = 0;
+
+ private:
+ DISALLOW_IMPLICIT_CONSTRUCTORS(JSArgumentsObject);
+};
+
+
+// JSSloppyArgumentsObject is just a JSObject with specific initial map.
+// This initial map adds in-object properties for "length" and "callee".
+class JSSloppyArgumentsObject: public JSArgumentsObject {
+ public:
+ // Offsets of object fields.
+ static const int kCalleeOffset = JSArgumentsObject::kHeaderSize;
+ static const int kSize = kCalleeOffset + kPointerSize;
+ // Indices of in-object properties.
+ static const int kCalleeIndex = 1;
+
+ private:
+ DISALLOW_IMPLICIT_CONSTRUCTORS(JSSloppyArgumentsObject);
+};
+
+
+// JSStrictArgumentsObject is just a JSObject with specific initial map.
+// This initial map adds an in-object property for "length".
+class JSStrictArgumentsObject: public JSArgumentsObject {
+ public:
+ // Offsets of object fields.
+ static const int kSize = JSArgumentsObject::kHeaderSize;
+
+ private:
+ DISALLOW_IMPLICIT_CONSTRUCTORS(JSStrictArgumentsObject);
+};
+
+
// Common superclass for FixedArrays that allow implementations to share
// common accessors and some code paths.
class FixedArrayBase: public HeapObject {
« no previous file with comments | « src/mips64/interface-descriptors-mips64.cc ('k') | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698