OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "v8.h" | 5 #include "v8.h" |
6 | 6 |
7 #include "api.h" | 7 #include "api.h" |
8 #include "arguments.h" | 8 #include "arguments.h" |
9 #include "bootstrapper.h" | 9 #include "bootstrapper.h" |
10 #include "code-stubs.h" | 10 #include "code-stubs.h" |
(...skipping 2192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2203 // compiled lazily without a context to not be compiled at all. Compilation | 2203 // compiled lazily without a context to not be compiled at all. Compilation |
2204 // will be triggered at points where we do not need a context. | 2204 // will be triggered at points where we do not need a context. |
2205 bool done = false; | 2205 bool done = false; |
2206 // The current candidate for the source position: | 2206 // The current candidate for the source position: |
2207 int target_start_position = RelocInfo::kNoPosition; | 2207 int target_start_position = RelocInfo::kNoPosition; |
2208 Handle<JSFunction> target_function; | 2208 Handle<JSFunction> target_function; |
2209 Handle<SharedFunctionInfo> target; | 2209 Handle<SharedFunctionInfo> target; |
2210 Heap* heap = isolate_->heap(); | 2210 Heap* heap = isolate_->heap(); |
2211 while (!done) { | 2211 while (!done) { |
2212 { // Extra scope for iterator and no-allocation. | 2212 { // Extra scope for iterator and no-allocation. |
2213 heap->EnsureHeapIsIterable(); | 2213 heap->MakeHeapIterable(); |
2214 DisallowHeapAllocation no_alloc_during_heap_iteration; | 2214 DisallowHeapAllocation no_alloc_during_heap_iteration; |
2215 HeapIterator iterator(heap); | 2215 HeapIterator iterator(heap); |
2216 for (HeapObject* obj = iterator.next(); | 2216 for (HeapObject* obj = iterator.next(); |
2217 obj != NULL; obj = iterator.next()) { | 2217 obj != NULL; obj = iterator.next()) { |
2218 bool found_next_candidate = false; | 2218 bool found_next_candidate = false; |
2219 Handle<JSFunction> function; | 2219 Handle<JSFunction> function; |
2220 Handle<SharedFunctionInfo> shared; | 2220 Handle<SharedFunctionInfo> shared; |
2221 if (obj->IsJSFunction()) { | 2221 if (obj->IsJSFunction()) { |
2222 function = Handle<JSFunction>(JSFunction::cast(obj)); | 2222 function = Handle<JSFunction>(JSFunction::cast(obj)); |
2223 shared = Handle<SharedFunctionInfo>(function->shared()); | 2223 shared = Handle<SharedFunctionInfo>(function->shared()); |
(...skipping 1507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3731 already_signalled_ = false; | 3731 already_signalled_ = false; |
3732 } | 3732 } |
3733 { | 3733 { |
3734 Locker locker(reinterpret_cast<v8::Isolate*>(isolate_)); | 3734 Locker locker(reinterpret_cast<v8::Isolate*>(isolate_)); |
3735 isolate_->debugger()->CallMessageDispatchHandler(); | 3735 isolate_->debugger()->CallMessageDispatchHandler(); |
3736 } | 3736 } |
3737 } | 3737 } |
3738 } | 3738 } |
3739 | 3739 |
3740 } } // namespace v8::internal | 3740 } } // namespace v8::internal |
OLD | NEW |