| 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 2251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2262 Handle<FixedArray> literals = | 2262 Handle<FixedArray> literals = |
| 2263 isolate->factory()->NewFixedArray(number_of_literals, TENURED); | 2263 isolate->factory()->NewFixedArray(number_of_literals, TENURED); |
| 2264 if (number_of_literals > 0) { | 2264 if (number_of_literals > 0) { |
| 2265 literals->set(JSFunction::kLiteralNativeContextIndex, | 2265 literals->set(JSFunction::kLiteralNativeContextIndex, |
| 2266 context->native_context()); | 2266 context->native_context()); |
| 2267 } | 2267 } |
| 2268 target->set_context(*context); | 2268 target->set_context(*context); |
| 2269 target->set_literals(*literals); | 2269 target->set_literals(*literals); |
| 2270 target->set_next_function_link(isolate->heap()->undefined_value()); | 2270 target->set_next_function_link(isolate->heap()->undefined_value()); |
| 2271 | 2271 |
| 2272 if (isolate->logger()->is_logging_code_events() || | 2272 if (isolate->logger()->is_logging() || CpuProfiler::is_profiling(isolate)) { |
| 2273 CpuProfiler::is_profiling(isolate)) { | |
| 2274 isolate->logger()->LogExistingFunction( | 2273 isolate->logger()->LogExistingFunction( |
| 2275 source_shared, Handle<Code>(source_shared->code())); | 2274 source_shared, Handle<Code>(source_shared->code())); |
| 2276 } | 2275 } |
| 2277 | 2276 |
| 2278 return *target; | 2277 return *target; |
| 2279 } | 2278 } |
| 2280 | 2279 |
| 2281 | 2280 |
| 2282 RUNTIME_FUNCTION(MaybeObject*, Runtime_SetExpectedNumberOfProperties) { | 2281 RUNTIME_FUNCTION(MaybeObject*, Runtime_SetExpectedNumberOfProperties) { |
| 2283 HandleScope scope(isolate); | 2282 HandleScope scope(isolate); |
| (...skipping 11452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13736 // Handle last resort GC and make sure to allow future allocations | 13735 // Handle last resort GC and make sure to allow future allocations |
| 13737 // to grow the heap without causing GCs (if possible). | 13736 // to grow the heap without causing GCs (if possible). |
| 13738 isolate->counters()->gc_last_resort_from_js()->Increment(); | 13737 isolate->counters()->gc_last_resort_from_js()->Increment(); |
| 13739 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, | 13738 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, |
| 13740 "Runtime::PerformGC"); | 13739 "Runtime::PerformGC"); |
| 13741 } | 13740 } |
| 13742 } | 13741 } |
| 13743 | 13742 |
| 13744 | 13743 |
| 13745 } } // namespace v8::internal | 13744 } } // namespace v8::internal |
| OLD | NEW |