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 2346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2357 Handle<FixedArray> literals = | 2357 Handle<FixedArray> literals = |
2358 isolate->factory()->NewFixedArray(number_of_literals, TENURED); | 2358 isolate->factory()->NewFixedArray(number_of_literals, TENURED); |
2359 if (number_of_literals > 0) { | 2359 if (number_of_literals > 0) { |
2360 literals->set(JSFunction::kLiteralNativeContextIndex, | 2360 literals->set(JSFunction::kLiteralNativeContextIndex, |
2361 context->native_context()); | 2361 context->native_context()); |
2362 } | 2362 } |
2363 target->set_context(*context); | 2363 target->set_context(*context); |
2364 target->set_literals(*literals); | 2364 target->set_literals(*literals); |
2365 | 2365 |
2366 if (isolate->logger()->is_logging_code_events() || | 2366 if (isolate->logger()->is_logging_code_events() || |
2367 CpuProfiler::is_profiling(isolate)) { | 2367 isolate->cpu_profiler()->is_profiling()) { |
2368 isolate->logger()->LogExistingFunction( | 2368 isolate->logger()->LogExistingFunction( |
2369 source_shared, Handle<Code>(source_shared->code())); | 2369 source_shared, Handle<Code>(source_shared->code())); |
2370 } | 2370 } |
2371 | 2371 |
2372 return *target; | 2372 return *target; |
2373 } | 2373 } |
2374 | 2374 |
2375 | 2375 |
2376 RUNTIME_FUNCTION(MaybeObject*, Runtime_SetExpectedNumberOfProperties) { | 2376 RUNTIME_FUNCTION(MaybeObject*, Runtime_SetExpectedNumberOfProperties) { |
2377 HandleScope scope(isolate); | 2377 HandleScope scope(isolate); |
(...skipping 10772 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13150 // Handle last resort GC and make sure to allow future allocations | 13150 // Handle last resort GC and make sure to allow future allocations |
13151 // to grow the heap without causing GCs (if possible). | 13151 // to grow the heap without causing GCs (if possible). |
13152 isolate->counters()->gc_last_resort_from_js()->Increment(); | 13152 isolate->counters()->gc_last_resort_from_js()->Increment(); |
13153 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, | 13153 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, |
13154 "Runtime::PerformGC"); | 13154 "Runtime::PerformGC"); |
13155 } | 13155 } |
13156 } | 13156 } |
13157 | 13157 |
13158 | 13158 |
13159 } } // namespace v8::internal | 13159 } } // namespace v8::internal |
OLD | NEW |