| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 3320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3331 } | 3331 } |
| 3332 | 3332 |
| 3333 | 3333 |
| 3334 MaybeObject* Heap::AllocateArgumentsObject(Object* callee, int length) { | 3334 MaybeObject* Heap::AllocateArgumentsObject(Object* callee, int length) { |
| 3335 // To get fast allocation and map sharing for arguments objects we | 3335 // To get fast allocation and map sharing for arguments objects we |
| 3336 // allocate them based on an arguments boilerplate. | 3336 // allocate them based on an arguments boilerplate. |
| 3337 | 3337 |
| 3338 JSObject* boilerplate; | 3338 JSObject* boilerplate; |
| 3339 int arguments_object_size; | 3339 int arguments_object_size; |
| 3340 bool strict_mode_callee = callee->IsJSFunction() && | 3340 bool strict_mode_callee = callee->IsJSFunction() && |
| 3341 JSFunction::cast(callee)->shared()->strict_mode(); | 3341 JSFunction::cast(callee)->shared()->is_strict_or_extended_mode(); |
| 3342 if (strict_mode_callee) { | 3342 if (strict_mode_callee) { |
| 3343 boilerplate = | 3343 boilerplate = |
| 3344 isolate()->context()->global_context()-> | 3344 isolate()->context()->global_context()-> |
| 3345 strict_mode_arguments_boilerplate(); | 3345 strict_mode_arguments_boilerplate(); |
| 3346 arguments_object_size = kArgumentsObjectSizeStrict; | 3346 arguments_object_size = kArgumentsObjectSizeStrict; |
| 3347 } else { | 3347 } else { |
| 3348 boilerplate = | 3348 boilerplate = |
| 3349 isolate()->context()->global_context()->arguments_boilerplate(); | 3349 isolate()->context()->global_context()->arguments_boilerplate(); |
| 3350 arguments_object_size = kArgumentsObjectSize; | 3350 arguments_object_size = kArgumentsObjectSize; |
| 3351 } | 3351 } |
| (...skipping 3058 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6410 isolate_->heap()->store_buffer()->Compact(); | 6410 isolate_->heap()->store_buffer()->Compact(); |
| 6411 isolate_->heap()->store_buffer()->Filter(MemoryChunk::ABOUT_TO_BE_FREED); | 6411 isolate_->heap()->store_buffer()->Filter(MemoryChunk::ABOUT_TO_BE_FREED); |
| 6412 for (chunk = chunks_queued_for_free_; chunk != NULL; chunk = next) { | 6412 for (chunk = chunks_queued_for_free_; chunk != NULL; chunk = next) { |
| 6413 next = chunk->next_chunk(); | 6413 next = chunk->next_chunk(); |
| 6414 isolate_->memory_allocator()->Free(chunk); | 6414 isolate_->memory_allocator()->Free(chunk); |
| 6415 } | 6415 } |
| 6416 chunks_queued_for_free_ = NULL; | 6416 chunks_queued_for_free_ = NULL; |
| 6417 } | 6417 } |
| 6418 | 6418 |
| 6419 } } // namespace v8::internal | 6419 } } // namespace v8::internal |
| OLD | NEW |