Index: src/objects.h |
diff --git a/src/objects.h b/src/objects.h |
index 7e531b28ae38ebbb5092934e196f483384cfddaf..fcfe8efea18a74b044f5a4772dfa8a38385c3c8c 100644 |
--- a/src/objects.h |
+++ b/src/objects.h |
@@ -4957,7 +4957,7 @@ class SharedFunctionInfo: public HeapObject { |
public: |
// Constants for optimizing codegen for strict mode function and |
// native tests. |
- // Allows to use byte-widgh instructions. |
+ // Allows to use byte-witgh instructions. |
PhistucK
2011/10/10 06:44:44
Almost there, s/witgh/width.
;)
Lasse Reichstein
2011/10/13 13:10:38
Good catch :)
|
static const int kStrictModeBitWithinByte = |
(kStrictModeFunction + kCompilerHintsSmiTagSize) % kBitsPerByte; |
@@ -5035,7 +5035,8 @@ class JSFunction: public JSObject { |
// Check whether or not this function is inlineable. |
bool IsInlineable(); |
- // [literals]: Fixed array holding the materialized literals. |
+ // [literals_or_bindings]: Fixed array holding either |
+ // the materialized literals or the bindings of a bound function. |
// |
// If the function contains object, regexp or array literals, the |
// literals array prefix contains the object, regexp, and array |
@@ -5044,7 +5045,17 @@ class JSFunction: public JSObject { |
// or array functions. Performing a dynamic lookup, we might end up |
// using the functions from a new context that we should not have |
// access to. |
- DECL_ACCESSORS(literals, FixedArray) |
+ // |
+ // On bound functions, the array is a (copy-on-write) fixed-array containing |
+ // the function that was bound, bound this-value and any bound |
+ // arguments. Bound functions never contain literals. |
+ DECL_ACCESSORS(literals_or_bindings, FixedArray) |
+ |
+ inline FixedArray* literals(); |
+ inline void set_literals(FixedArray* literals); |
+ |
+ inline FixedArray* function_bindings(); |
+ inline void set_function_bindings(FixedArray* bindings); |
// The initial map for an object created by this constructor. |
inline Map* initial_map(); |
@@ -5132,6 +5143,11 @@ class JSFunction: public JSObject { |
static const int kLiteralsPrefixSize = 1; |
static const int kLiteralGlobalContextIndex = 0; |
+ // Layout of the bound-function binding array. |
+ static const int kBoundFunctionIndex = 0; |
+ static const int kBoundThisIndex = 1; |
+ static const int kBoundArgumentsStartIndex = 2; |
+ |
private: |
DISALLOW_IMPLICIT_CONSTRUCTORS(JSFunction); |
}; |