| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 2192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2203 // Insert the object, regexp and array functions in the literals | 2203 // Insert the object, regexp and array functions in the literals |
| 2204 // array prefix. These are the functions that will be used when | 2204 // array prefix. These are the functions that will be used when |
| 2205 // creating object, regexp and array literals. | 2205 // creating object, regexp and array literals. |
| 2206 literals->set(JSFunction::kLiteralGlobalContextIndex, | 2206 literals->set(JSFunction::kLiteralGlobalContextIndex, |
| 2207 context->global_context()); | 2207 context->global_context()); |
| 2208 } | 2208 } |
| 2209 // It's okay to skip the write barrier here because the literals | 2209 // It's okay to skip the write barrier here because the literals |
| 2210 // are guaranteed to be in old space. | 2210 // are guaranteed to be in old space. |
| 2211 target->set_literals(*literals, SKIP_WRITE_BARRIER); | 2211 target->set_literals(*literals, SKIP_WRITE_BARRIER); |
| 2212 target->set_next_function_link(isolate->heap()->undefined_value()); | 2212 target->set_next_function_link(isolate->heap()->undefined_value()); |
| 2213 |
| 2214 if (isolate->logger()->is_logging() || CpuProfiler::is_profiling(isolate)) { |
| 2215 isolate->logger()->LogExistingFunction(*shared, shared->code()); |
| 2216 } |
| 2213 } | 2217 } |
| 2214 | 2218 |
| 2215 target->set_context(*context); | 2219 target->set_context(*context); |
| 2216 return *target; | 2220 return *target; |
| 2217 } | 2221 } |
| 2218 | 2222 |
| 2219 | 2223 |
| 2220 RUNTIME_FUNCTION(MaybeObject*, Runtime_SetExpectedNumberOfProperties) { | 2224 RUNTIME_FUNCTION(MaybeObject*, Runtime_SetExpectedNumberOfProperties) { |
| 2221 HandleScope scope(isolate); | 2225 HandleScope scope(isolate); |
| 2222 ASSERT(args.length() == 2); | 2226 ASSERT(args.length() == 2); |
| (...skipping 10921 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13144 } else { | 13148 } else { |
| 13145 // Handle last resort GC and make sure to allow future allocations | 13149 // Handle last resort GC and make sure to allow future allocations |
| 13146 // to grow the heap without causing GCs (if possible). | 13150 // to grow the heap without causing GCs (if possible). |
| 13147 isolate->counters()->gc_last_resort_from_js()->Increment(); | 13151 isolate->counters()->gc_last_resort_from_js()->Increment(); |
| 13148 isolate->heap()->CollectAllGarbage(false); | 13152 isolate->heap()->CollectAllGarbage(false); |
| 13149 } | 13153 } |
| 13150 } | 13154 } |
| 13151 | 13155 |
| 13152 | 13156 |
| 13153 } } // namespace v8::internal | 13157 } } // namespace v8::internal |
| OLD | NEW |