| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 3253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3264 MaybeObject* Heap::AllocateSharedFunctionInfo(Object* name) { | 3264 MaybeObject* Heap::AllocateSharedFunctionInfo(Object* name) { |
| 3265 SharedFunctionInfo* share; | 3265 SharedFunctionInfo* share; |
| 3266 MaybeObject* maybe = Allocate(shared_function_info_map(), OLD_POINTER_SPACE); | 3266 MaybeObject* maybe = Allocate(shared_function_info_map(), OLD_POINTER_SPACE); |
| 3267 if (!maybe->To<SharedFunctionInfo>(&share)) return maybe; | 3267 if (!maybe->To<SharedFunctionInfo>(&share)) return maybe; |
| 3268 | 3268 |
| 3269 // Set pointer fields. | 3269 // Set pointer fields. |
| 3270 share->set_name(name); | 3270 share->set_name(name); |
| 3271 Code* illegal = isolate_->builtins()->builtin(Builtins::kIllegal); | 3271 Code* illegal = isolate_->builtins()->builtin(Builtins::kIllegal); |
| 3272 share->set_code(illegal); | 3272 share->set_code(illegal); |
| 3273 share->ClearOptimizedCodeMap(); | 3273 share->ClearOptimizedCodeMap(); |
| 3274 share->set_scope_info(ScopeInfo::Empty()); | 3274 share->set_scope_info(ScopeInfo::Empty(isolate_)); |
| 3275 Code* construct_stub = | 3275 Code* construct_stub = |
| 3276 isolate_->builtins()->builtin(Builtins::kJSConstructStubGeneric); | 3276 isolate_->builtins()->builtin(Builtins::kJSConstructStubGeneric); |
| 3277 share->set_construct_stub(construct_stub); | 3277 share->set_construct_stub(construct_stub); |
| 3278 share->set_instance_class_name(Object_symbol()); | 3278 share->set_instance_class_name(Object_symbol()); |
| 3279 share->set_function_data(undefined_value(), SKIP_WRITE_BARRIER); | 3279 share->set_function_data(undefined_value(), SKIP_WRITE_BARRIER); |
| 3280 share->set_script(undefined_value(), SKIP_WRITE_BARRIER); | 3280 share->set_script(undefined_value(), SKIP_WRITE_BARRIER); |
| 3281 share->set_debug_info(undefined_value(), SKIP_WRITE_BARRIER); | 3281 share->set_debug_info(undefined_value(), SKIP_WRITE_BARRIER); |
| 3282 share->set_inferred_name(empty_string(), SKIP_WRITE_BARRIER); | 3282 share->set_inferred_name(empty_string(), SKIP_WRITE_BARRIER); |
| 3283 share->set_initial_map(undefined_value(), SKIP_WRITE_BARRIER); | 3283 share->set_initial_map(undefined_value(), SKIP_WRITE_BARRIER); |
| 3284 share->set_this_property_assignments(undefined_value(), SKIP_WRITE_BARRIER); | 3284 share->set_this_property_assignments(undefined_value(), SKIP_WRITE_BARRIER); |
| (...skipping 4233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7518 static_cast<int>(object_sizes_last_time_[index])); | 7518 static_cast<int>(object_sizes_last_time_[index])); |
| 7519 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(ADJUST_LAST_TIME_OBJECT_COUNT) | 7519 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(ADJUST_LAST_TIME_OBJECT_COUNT) |
| 7520 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 7520 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
| 7521 | 7521 |
| 7522 memcpy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 7522 memcpy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
| 7523 memcpy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 7523 memcpy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
| 7524 ClearObjectStats(); | 7524 ClearObjectStats(); |
| 7525 } | 7525 } |
| 7526 | 7526 |
| 7527 } } // namespace v8::internal | 7527 } } // namespace v8::internal |
| OLD | NEW |