OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 "src/contexts.h" | 5 #include "src/contexts.h" |
6 | 6 |
7 #include "src/ast/scopeinfo.h" | 7 #include "src/ast/scopeinfo.h" |
8 #include "src/bootstrapper.h" | 8 #include "src/bootstrapper.h" |
9 #include "src/debug/debug.h" | 9 #include "src/debug/debug.h" |
10 #include "src/isolate-inl.h" | 10 #include "src/isolate-inl.h" |
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
459 } | 459 } |
460 | 460 |
461 // Check that the context belongs to the weak native contexts list. | 461 // Check that the context belongs to the weak native contexts list. |
462 bool found = false; | 462 bool found = false; |
463 Object* context = GetHeap()->native_contexts_list(); | 463 Object* context = GetHeap()->native_contexts_list(); |
464 while (!context->IsUndefined()) { | 464 while (!context->IsUndefined()) { |
465 if (context == this) { | 465 if (context == this) { |
466 found = true; | 466 found = true; |
467 break; | 467 break; |
468 } | 468 } |
469 context = Context::cast(context)->get(Context::NEXT_CONTEXT_LINK); | 469 context = Context::cast(context)->next_context_link(); |
470 } | 470 } |
471 CHECK(found); | 471 CHECK(found); |
472 #endif | 472 #endif |
473 | 473 |
474 // If the function link field is already used then the function was | 474 // If the function link field is already used then the function was |
475 // enqueued as a code flushing candidate and we remove it now. | 475 // enqueued as a code flushing candidate and we remove it now. |
476 if (!function->next_function_link()->IsUndefined()) { | 476 if (!function->next_function_link()->IsUndefined()) { |
477 CodeFlusher* flusher = GetHeap()->mark_compact_collector()->code_flusher(); | 477 CodeFlusher* flusher = GetHeap()->mark_compact_collector()->code_flusher(); |
478 flusher->EvictCandidate(function); | 478 flusher->EvictCandidate(function); |
479 } | 479 } |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
613 | 613 |
614 int previous_value = errors_thrown()->value(); | 614 int previous_value = errors_thrown()->value(); |
615 set_errors_thrown(Smi::FromInt(previous_value + 1)); | 615 set_errors_thrown(Smi::FromInt(previous_value + 1)); |
616 } | 616 } |
617 | 617 |
618 | 618 |
619 int Context::GetErrorsThrown() { return errors_thrown()->value(); } | 619 int Context::GetErrorsThrown() { return errors_thrown()->value(); } |
620 | 620 |
621 } // namespace internal | 621 } // namespace internal |
622 } // namespace v8 | 622 } // namespace v8 |
OLD | NEW |