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 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
453 } | 453 } |
454 | 454 |
455 // Check that the context belongs to the weak native contexts list. | 455 // Check that the context belongs to the weak native contexts list. |
456 bool found = false; | 456 bool found = false; |
457 Object* context = GetHeap()->native_contexts_list(); | 457 Object* context = GetHeap()->native_contexts_list(); |
458 while (!context->IsUndefined()) { | 458 while (!context->IsUndefined()) { |
459 if (context == this) { | 459 if (context == this) { |
460 found = true; | 460 found = true; |
461 break; | 461 break; |
462 } | 462 } |
463 context = Context::cast(context)->get(Context::NEXT_CONTEXT_LINK); | 463 context = Context::cast(context)->next_context_link(); |
464 } | 464 } |
465 CHECK(found); | 465 CHECK(found); |
466 #endif | 466 #endif |
467 | 467 |
468 // If the function link field is already used then the function was | 468 // If the function link field is already used then the function was |
469 // enqueued as a code flushing candidate and we remove it now. | 469 // enqueued as a code flushing candidate and we remove it now. |
470 if (!function->next_function_link()->IsUndefined()) { | 470 if (!function->next_function_link()->IsUndefined()) { |
471 CodeFlusher* flusher = GetHeap()->mark_compact_collector()->code_flusher(); | 471 CodeFlusher* flusher = GetHeap()->mark_compact_collector()->code_flusher(); |
472 flusher->EvictCandidate(function); | 472 flusher->EvictCandidate(function); |
473 } | 473 } |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
607 | 607 |
608 int previous_value = errors_thrown()->value(); | 608 int previous_value = errors_thrown()->value(); |
609 set_errors_thrown(Smi::FromInt(previous_value + 1)); | 609 set_errors_thrown(Smi::FromInt(previous_value + 1)); |
610 } | 610 } |
611 | 611 |
612 | 612 |
613 int Context::GetErrorsThrown() { return errors_thrown()->value(); } | 613 int Context::GetErrorsThrown() { return errors_thrown()->value(); } |
614 | 614 |
615 } // namespace internal | 615 } // namespace internal |
616 } // namespace v8 | 616 } // namespace v8 |
OLD | NEW |