| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 2906 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2917 JSFunction* object_function = | 2917 JSFunction* object_function = |
| 2918 function->context()->global_context()->object_function(); | 2918 function->context()->global_context()->object_function(); |
| 2919 Object* prototype; | 2919 Object* prototype; |
| 2920 { MaybeObject* maybe_prototype = AllocateJSObject(object_function); | 2920 { MaybeObject* maybe_prototype = AllocateJSObject(object_function); |
| 2921 if (!maybe_prototype->ToObject(&prototype)) return maybe_prototype; | 2921 if (!maybe_prototype->ToObject(&prototype)) return maybe_prototype; |
| 2922 } | 2922 } |
| 2923 // When creating the prototype for the function we must set its | 2923 // When creating the prototype for the function we must set its |
| 2924 // constructor to the function. | 2924 // constructor to the function. |
| 2925 Object* result; | 2925 Object* result; |
| 2926 { MaybeObject* maybe_result = | 2926 { MaybeObject* maybe_result = |
| 2927 JSObject::cast(prototype)->SetProperty(constructor_symbol(), | 2927 JSObject::cast(prototype)->SetLocalPropertyIgnoreAttributes( |
| 2928 function, | 2928 constructor_symbol(), function, DONT_ENUM); |
| 2929 DONT_ENUM); | |
| 2930 if (!maybe_result->ToObject(&result)) return maybe_result; | 2929 if (!maybe_result->ToObject(&result)) return maybe_result; |
| 2931 } | 2930 } |
| 2932 return prototype; | 2931 return prototype; |
| 2933 } | 2932 } |
| 2934 | 2933 |
| 2935 | 2934 |
| 2936 MaybeObject* Heap::AllocateFunction(Map* function_map, | 2935 MaybeObject* Heap::AllocateFunction(Map* function_map, |
| 2937 SharedFunctionInfo* shared, | 2936 SharedFunctionInfo* shared, |
| 2938 Object* prototype, | 2937 Object* prototype, |
| 2939 PretenureFlag pretenure) { | 2938 PretenureFlag pretenure) { |
| (...skipping 2648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5588 void ExternalStringTable::TearDown() { | 5587 void ExternalStringTable::TearDown() { |
| 5589 new_space_strings_.Free(); | 5588 new_space_strings_.Free(); |
| 5590 old_space_strings_.Free(); | 5589 old_space_strings_.Free(); |
| 5591 } | 5590 } |
| 5592 | 5591 |
| 5593 | 5592 |
| 5594 List<Object*> ExternalStringTable::new_space_strings_; | 5593 List<Object*> ExternalStringTable::new_space_strings_; |
| 5595 List<Object*> ExternalStringTable::old_space_strings_; | 5594 List<Object*> ExternalStringTable::old_space_strings_; |
| 5596 | 5595 |
| 5597 } } // namespace v8::internal | 5596 } } // namespace v8::internal |
| OLD | NEW |