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 8105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8116 if (arguments.is_null()) { | 8116 if (arguments.is_null()) { |
8117 // FunctionGetArguments can't throw an exception, so cast away the | 8117 // FunctionGetArguments can't throw an exception, so cast away the |
8118 // doubt with an assert. | 8118 // doubt with an assert. |
8119 arguments = Handle<Object>( | 8119 arguments = Handle<Object>( |
8120 Accessors::FunctionGetArguments(*function, | 8120 Accessors::FunctionGetArguments(*function, |
8121 NULL)->ToObjectUnchecked()); | 8121 NULL)->ToObjectUnchecked()); |
8122 ASSERT(*arguments != isolate->heap()->null_value()); | 8122 ASSERT(*arguments != isolate->heap()->null_value()); |
8123 ASSERT(*arguments != isolate->heap()->undefined_value()); | 8123 ASSERT(*arguments != isolate->heap()->undefined_value()); |
8124 } | 8124 } |
8125 frame->SetExpression(i, *arguments); | 8125 frame->SetExpression(i, *arguments); |
8126 if (FLAG_trace_deopt) { | |
8127 PrintF("Materializing arguments object for frame %p - %p: %p ", | |
8128 reinterpret_cast<void*>(frame->sp()), | |
8129 reinterpret_cast<void*>(frame->fp()), | |
8130 reinterpret_cast<void*>(*arguments)); | |
8131 arguments->ShortPrint(); | |
8132 PrintF("\n"); | |
8133 } | |
8134 } | 8126 } |
8135 } | 8127 } |
8136 } | 8128 } |
8137 | 8129 |
8138 | 8130 |
8139 RUNTIME_FUNCTION(MaybeObject*, Runtime_NotifyDeoptimized) { | 8131 RUNTIME_FUNCTION(MaybeObject*, Runtime_NotifyDeoptimized) { |
8140 HandleScope scope(isolate); | 8132 HandleScope scope(isolate); |
8141 ASSERT(args.length() == 1); | 8133 ASSERT(args.length() == 1); |
8142 RUNTIME_ASSERT(args[0]->IsSmi()); | 8134 RUNTIME_ASSERT(args[0]->IsSmi()); |
8143 Deoptimizer::BailoutType type = | 8135 Deoptimizer::BailoutType type = |
(...skipping 5209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13353 // Handle last resort GC and make sure to allow future allocations | 13345 // Handle last resort GC and make sure to allow future allocations |
13354 // to grow the heap without causing GCs (if possible). | 13346 // to grow the heap without causing GCs (if possible). |
13355 isolate->counters()->gc_last_resort_from_js()->Increment(); | 13347 isolate->counters()->gc_last_resort_from_js()->Increment(); |
13356 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, | 13348 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, |
13357 "Runtime::PerformGC"); | 13349 "Runtime::PerformGC"); |
13358 } | 13350 } |
13359 } | 13351 } |
13360 | 13352 |
13361 | 13353 |
13362 } } // namespace v8::internal | 13354 } } // namespace v8::internal |
OLD | NEW |