OLD | NEW |
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 2873 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2884 | 2884 |
2885 // Fall back to GetObjectProperty. | 2885 // Fall back to GetObjectProperty. |
2886 return Runtime::GetObjectProperty(args.at<Object>(0), | 2886 return Runtime::GetObjectProperty(args.at<Object>(0), |
2887 args.at<Object>(1)); | 2887 args.at<Object>(1)); |
2888 } | 2888 } |
2889 | 2889 |
2890 | 2890 |
2891 static Object* Runtime_DefineOrRedefineAccessorProperty(Arguments args) { | 2891 static Object* Runtime_DefineOrRedefineAccessorProperty(Arguments args) { |
2892 ASSERT(args.length() == 5); | 2892 ASSERT(args.length() == 5); |
2893 HandleScope scope; | 2893 HandleScope scope; |
2894 Handle<JSObject> obj = args.at<JSObject>(0); | 2894 CONVERT_ARG_CHECKED(JSObject, obj, 0); |
2895 CONVERT_CHECKED(String, name, args[1]); | 2895 CONVERT_CHECKED(String, name, args[1]); |
2896 CONVERT_CHECKED(Smi, flag_setter, args[2]); | 2896 CONVERT_CHECKED(Smi, flag_setter, args[2]); |
2897 CONVERT_CHECKED(JSFunction, fun, args[3]); | 2897 CONVERT_CHECKED(JSFunction, fun, args[3]); |
2898 CONVERT_CHECKED(Smi, flag_attr, args[4]); | 2898 CONVERT_CHECKED(Smi, flag_attr, args[4]); |
2899 int unchecked = flag_attr->value(); | 2899 int unchecked = flag_attr->value(); |
2900 RUNTIME_ASSERT((unchecked & ~(READ_ONLY | DONT_ENUM | DONT_DELETE)) == 0); | 2900 RUNTIME_ASSERT((unchecked & ~(READ_ONLY | DONT_ENUM | DONT_DELETE)) == 0); |
2901 RUNTIME_ASSERT(!obj->IsNull()); | 2901 RUNTIME_ASSERT(!obj->IsNull()); |
2902 LookupResult result; | 2902 LookupResult result; |
2903 obj->LocalLookupRealNamedProperty(name, &result); | 2903 obj->LocalLookupRealNamedProperty(name, &result); |
2904 | 2904 |
(...skipping 5336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8241 } else { | 8241 } else { |
8242 // Handle last resort GC and make sure to allow future allocations | 8242 // Handle last resort GC and make sure to allow future allocations |
8243 // to grow the heap without causing GCs (if possible). | 8243 // to grow the heap without causing GCs (if possible). |
8244 Counters::gc_last_resort_from_js.Increment(); | 8244 Counters::gc_last_resort_from_js.Increment(); |
8245 Heap::CollectAllGarbage(false); | 8245 Heap::CollectAllGarbage(false); |
8246 } | 8246 } |
8247 } | 8247 } |
8248 | 8248 |
8249 | 8249 |
8250 } } // namespace v8::internal | 8250 } } // namespace v8::internal |
OLD | NEW |