| 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() || CpuProfiler::is_profiling(isolate)) { | 2272 if (isolate->logger()->is_logging_code_events() || |
| 2273 CpuProfiler::is_profiling(isolate)) { |
| 2273 isolate->logger()->LogExistingFunction( | 2274 isolate->logger()->LogExistingFunction( |
| 2274 source_shared, Handle<Code>(source_shared->code())); | 2275 source_shared, Handle<Code>(source_shared->code())); |
| 2275 } | 2276 } |
| 2276 | 2277 |
| 2277 return *target; | 2278 return *target; |
| 2278 } | 2279 } |
| 2279 | 2280 |
| 2280 | 2281 |
| 2281 RUNTIME_FUNCTION(MaybeObject*, Runtime_SetExpectedNumberOfProperties) { | 2282 RUNTIME_FUNCTION(MaybeObject*, Runtime_SetExpectedNumberOfProperties) { |
| 2282 HandleScope scope(isolate); | 2283 HandleScope scope(isolate); |
| (...skipping 11084 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13367 // Handle last resort GC and make sure to allow future allocations | 13368 // Handle last resort GC and make sure to allow future allocations |
| 13368 // to grow the heap without causing GCs (if possible). | 13369 // to grow the heap without causing GCs (if possible). |
| 13369 isolate->counters()->gc_last_resort_from_js()->Increment(); | 13370 isolate->counters()->gc_last_resort_from_js()->Increment(); |
| 13370 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, | 13371 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, |
| 13371 "Runtime::PerformGC"); | 13372 "Runtime::PerformGC"); |
| 13372 } | 13373 } |
| 13373 } | 13374 } |
| 13374 | 13375 |
| 13375 | 13376 |
| 13376 } } // namespace v8::internal | 13377 } } // namespace v8::internal |
| OLD | NEW |