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 5829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5840 context->set_previous(previous); | 5840 context->set_previous(previous); |
5841 context->set_extension(name); | 5841 context->set_extension(name); |
5842 context->set_global_object(previous->global_object()); | 5842 context->set_global_object(previous->global_object()); |
5843 context->set(Context::THROWN_OBJECT_INDEX, thrown_object); | 5843 context->set(Context::THROWN_OBJECT_INDEX, thrown_object); |
5844 return context; | 5844 return context; |
5845 } | 5845 } |
5846 | 5846 |
5847 | 5847 |
5848 MaybeObject* Heap::AllocateWithContext(JSFunction* function, | 5848 MaybeObject* Heap::AllocateWithContext(JSFunction* function, |
5849 Context* previous, | 5849 Context* previous, |
5850 JSObject* extension) { | 5850 JSReceiver* extension) { |
5851 Object* result; | 5851 Object* result; |
5852 { MaybeObject* maybe_result = AllocateFixedArray(Context::MIN_CONTEXT_SLOTS); | 5852 { MaybeObject* maybe_result = AllocateFixedArray(Context::MIN_CONTEXT_SLOTS); |
5853 if (!maybe_result->ToObject(&result)) return maybe_result; | 5853 if (!maybe_result->ToObject(&result)) return maybe_result; |
5854 } | 5854 } |
5855 Context* context = reinterpret_cast<Context*>(result); | 5855 Context* context = reinterpret_cast<Context*>(result); |
5856 context->set_map_no_write_barrier(with_context_map()); | 5856 context->set_map_no_write_barrier(with_context_map()); |
5857 context->set_closure(function); | 5857 context->set_closure(function); |
5858 context->set_previous(previous); | 5858 context->set_previous(previous); |
5859 context->set_extension(extension); | 5859 context->set_extension(extension); |
5860 context->set_global_object(previous->global_object()); | 5860 context->set_global_object(previous->global_object()); |
(...skipping 2315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8176 if (FLAG_parallel_recompilation) { | 8176 if (FLAG_parallel_recompilation) { |
8177 heap_->relocation_mutex_->Lock(); | 8177 heap_->relocation_mutex_->Lock(); |
8178 #ifdef DEBUG | 8178 #ifdef DEBUG |
8179 heap_->relocation_mutex_locked_by_optimizer_thread_ = | 8179 heap_->relocation_mutex_locked_by_optimizer_thread_ = |
8180 heap_->isolate()->optimizing_compiler_thread()->IsOptimizerThread(); | 8180 heap_->isolate()->optimizing_compiler_thread()->IsOptimizerThread(); |
8181 #endif // DEBUG | 8181 #endif // DEBUG |
8182 } | 8182 } |
8183 } | 8183 } |
8184 | 8184 |
8185 } } // namespace v8::internal | 8185 } } // namespace v8::internal |
OLD | NEW |