Also added one method to runtime to get the extensible value
Additionally, added a check on the number of arguments in the start of GetOwnProperty.
Review URL: http://codereview.chromium.org/545116
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3646
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
return ((1 << kHasInstanceCallHandler) & bit_field()) != 0;
}
+ inline void set_is_extensible() {
+ set_bit_field2(bit_field2() | (1 << kIsExtensible));
+ }
+
+ inline bool is_extensible() {
+ return ((1 << kIsExtensible) & bit_field2()) != 0;
+ }
+
// Tells whether the instance needs security checks when accessing its
// properties.
inline void set_is_access_check_needed(bool access_check_needed);
// Bit positions for bit field 2
static const int kNeedsLoading = 0;
+ static const int kIsExtensible = 1;
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(Map);
// if args[1] is an accessor on args[0]
// [true, GetFunction, SetFunction, Enumerable, Configurable]
static Object* Runtime_GetOwnProperty(Arguments args) {
+ ASSERT(args.lenght() == 2);
HandleScope scope;
Handle<FixedArray> elms = Factory::NewFixedArray(5);
Handle<JSArray> desc = Factory::NewJSArrayWithElements(elms);
}
+static Object* Runtime_IsExtensible(Arguments args) {
+ ASSERT(args.length() == 1);
+ CONVERT_CHECKED(JSObject, obj, args[0]);
+ return obj->map()->is_extensible() ? Heap::true_value()
+ : Heap::false_value();
+}
+
+
static Object* Runtime_RegExpCompile(Arguments args) {
HandleScope scope;
ASSERT(args.length() == 3);
\
F(GetOwnProperty, 2, 1) \
\
+ F(IsExtensible, 1, 1) \
+ \
/* Utilities */ \
F(GetCalledFunction, 0, 1) \
F(GetFunctionDelegate, 1, 1) \