| 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 8122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8133 if (arguments.is_null()) { | 8133 if (arguments.is_null()) { |
| 8134 // FunctionGetArguments can't throw an exception, so cast away the | 8134 // FunctionGetArguments can't throw an exception, so cast away the |
| 8135 // doubt with an assert. | 8135 // doubt with an assert. |
| 8136 arguments = Handle<Object>( | 8136 arguments = Handle<Object>( |
| 8137 Accessors::FunctionGetArguments(*function, | 8137 Accessors::FunctionGetArguments(*function, |
| 8138 NULL)->ToObjectUnchecked()); | 8138 NULL)->ToObjectUnchecked()); |
| 8139 ASSERT(*arguments != isolate->heap()->null_value()); | 8139 ASSERT(*arguments != isolate->heap()->null_value()); |
| 8140 ASSERT(*arguments != isolate->heap()->undefined_value()); | 8140 ASSERT(*arguments != isolate->heap()->undefined_value()); |
| 8141 } | 8141 } |
| 8142 frame->SetExpression(i, *arguments); | 8142 frame->SetExpression(i, *arguments); |
| 8143 if (FLAG_trace_deopt) { |
| 8144 PrintF("Materializing arguments object for frame %p - %p: %p ", |
| 8145 reinterpret_cast<void*>(frame->sp()), |
| 8146 reinterpret_cast<void*>(frame->fp()), |
| 8147 reinterpret_cast<void*>(*arguments)); |
| 8148 arguments->ShortPrint(); |
| 8149 PrintF("\n"); |
| 8150 } |
| 8143 } | 8151 } |
| 8144 } | 8152 } |
| 8145 } | 8153 } |
| 8146 | 8154 |
| 8147 | 8155 |
| 8148 RUNTIME_FUNCTION(MaybeObject*, Runtime_NotifyDeoptimized) { | 8156 RUNTIME_FUNCTION(MaybeObject*, Runtime_NotifyDeoptimized) { |
| 8149 HandleScope scope(isolate); | 8157 HandleScope scope(isolate); |
| 8150 ASSERT(args.length() == 1); | 8158 ASSERT(args.length() == 1); |
| 8151 RUNTIME_ASSERT(args[0]->IsSmi()); | 8159 RUNTIME_ASSERT(args[0]->IsSmi()); |
| 8152 Deoptimizer::BailoutType type = | 8160 Deoptimizer::BailoutType type = |
| (...skipping 5209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13362 // Handle last resort GC and make sure to allow future allocations | 13370 // Handle last resort GC and make sure to allow future allocations |
| 13363 // to grow the heap without causing GCs (if possible). | 13371 // to grow the heap without causing GCs (if possible). |
| 13364 isolate->counters()->gc_last_resort_from_js()->Increment(); | 13372 isolate->counters()->gc_last_resort_from_js()->Increment(); |
| 13365 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, | 13373 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, |
| 13366 "Runtime::PerformGC"); | 13374 "Runtime::PerformGC"); |
| 13367 } | 13375 } |
| 13368 } | 13376 } |
| 13369 | 13377 |
| 13370 | 13378 |
| 13371 } } // namespace v8::internal | 13379 } } // namespace v8::internal |
| OLD | NEW |