| 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 3089 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3100 ASSERT_EQ(frame->function(), generator_object->function()); | 3100 ASSERT_EQ(frame->function(), generator_object->function()); |
| 3101 ASSERT(frame->function()->is_compiled()); | 3101 ASSERT(frame->function()->is_compiled()); |
| 3102 | 3102 |
| 3103 STATIC_ASSERT(JSGeneratorObject::kGeneratorExecuting < 0); | 3103 STATIC_ASSERT(JSGeneratorObject::kGeneratorExecuting < 0); |
| 3104 STATIC_ASSERT(JSGeneratorObject::kGeneratorClosed == 0); | 3104 STATIC_ASSERT(JSGeneratorObject::kGeneratorClosed == 0); |
| 3105 | 3105 |
| 3106 Address pc = generator_object->function()->code()->instruction_start(); | 3106 Address pc = generator_object->function()->code()->instruction_start(); |
| 3107 int offset = generator_object->continuation(); | 3107 int offset = generator_object->continuation(); |
| 3108 ASSERT(offset > 0); | 3108 ASSERT(offset > 0); |
| 3109 frame->set_pc(pc + offset); | 3109 frame->set_pc(pc + offset); |
| 3110 if (FLAG_enable_ool_constant_pool) { |
| 3111 frame->set_constant_pool( |
| 3112 generator_object->function()->code()->constant_pool()); |
| 3113 } |
| 3110 generator_object->set_continuation(JSGeneratorObject::kGeneratorExecuting); | 3114 generator_object->set_continuation(JSGeneratorObject::kGeneratorExecuting); |
| 3111 | 3115 |
| 3112 FixedArray* operand_stack = generator_object->operand_stack(); | 3116 FixedArray* operand_stack = generator_object->operand_stack(); |
| 3113 int operands_count = operand_stack->length(); | 3117 int operands_count = operand_stack->length(); |
| 3114 if (operands_count != 0) { | 3118 if (operands_count != 0) { |
| 3115 frame->RestoreOperandStack(operand_stack, | 3119 frame->RestoreOperandStack(operand_stack, |
| 3116 generator_object->stack_handler_index()); | 3120 generator_object->stack_handler_index()); |
| 3117 generator_object->set_operand_stack(isolate->heap()->empty_fixed_array()); | 3121 generator_object->set_operand_stack(isolate->heap()->empty_fixed_array()); |
| 3118 generator_object->set_stack_handler_index(-1); | 3122 generator_object->set_stack_handler_index(-1); |
| 3119 } | 3123 } |
| (...skipping 11845 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14965 // Handle last resort GC and make sure to allow future allocations | 14969 // Handle last resort GC and make sure to allow future allocations |
| 14966 // to grow the heap without causing GCs (if possible). | 14970 // to grow the heap without causing GCs (if possible). |
| 14967 isolate->counters()->gc_last_resort_from_js()->Increment(); | 14971 isolate->counters()->gc_last_resort_from_js()->Increment(); |
| 14968 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, | 14972 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, |
| 14969 "Runtime::PerformGC"); | 14973 "Runtime::PerformGC"); |
| 14970 } | 14974 } |
| 14971 } | 14975 } |
| 14972 | 14976 |
| 14973 | 14977 |
| 14974 } } // namespace v8::internal | 14978 } } // namespace v8::internal |
| OLD | NEW |