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 2213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2224 Handle<FixedArray> literals = | 2224 Handle<FixedArray> literals = |
2225 isolate->factory()->NewFixedArray(number_of_literals, TENURED); | 2225 isolate->factory()->NewFixedArray(number_of_literals, TENURED); |
2226 if (number_of_literals > 0) { | 2226 if (number_of_literals > 0) { |
2227 literals->set(JSFunction::kLiteralNativeContextIndex, | 2227 literals->set(JSFunction::kLiteralNativeContextIndex, |
2228 context->native_context()); | 2228 context->native_context()); |
2229 } | 2229 } |
2230 target->set_context(*context); | 2230 target->set_context(*context); |
2231 target->set_literals(*literals); | 2231 target->set_literals(*literals); |
2232 | 2232 |
2233 if (isolate->logger()->is_logging_code_events() || | 2233 if (isolate->logger()->is_logging_code_events() || |
2234 CpuProfiler::is_profiling(isolate)) { | 2234 isolate->cpu_profiler()->is_profiling()) { |
2235 isolate->logger()->LogExistingFunction( | 2235 isolate->logger()->LogExistingFunction( |
2236 source_shared, Handle<Code>(source_shared->code())); | 2236 source_shared, Handle<Code>(source_shared->code())); |
2237 } | 2237 } |
2238 | 2238 |
2239 return *target; | 2239 return *target; |
2240 } | 2240 } |
2241 | 2241 |
2242 | 2242 |
2243 RUNTIME_FUNCTION(MaybeObject*, Runtime_SetExpectedNumberOfProperties) { | 2243 RUNTIME_FUNCTION(MaybeObject*, Runtime_SetExpectedNumberOfProperties) { |
2244 HandleScope scope(isolate); | 2244 HandleScope scope(isolate); |
(...skipping 11161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13406 // Handle last resort GC and make sure to allow future allocations | 13406 // Handle last resort GC and make sure to allow future allocations |
13407 // to grow the heap without causing GCs (if possible). | 13407 // to grow the heap without causing GCs (if possible). |
13408 isolate->counters()->gc_last_resort_from_js()->Increment(); | 13408 isolate->counters()->gc_last_resort_from_js()->Increment(); |
13409 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, | 13409 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, |
13410 "Runtime::PerformGC"); | 13410 "Runtime::PerformGC"); |
13411 } | 13411 } |
13412 } | 13412 } |
13413 | 13413 |
13414 | 13414 |
13415 } } // namespace v8::internal | 13415 } } // namespace v8::internal |
OLD | NEW |