Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: src/deoptimizer.cc

Issue 1217893012: Remove deprecated v8::Object::TurnOnAccessCheck() from the V8 API. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Deoptimizer::DeoptimizeGlobalObject() removed Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/deoptimizer.h ('k') | src/objects-printer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/codegen.h" 8 #include "src/codegen.h"
9 #include "src/cpu-profiler.h" 9 #include "src/cpu-profiler.h"
10 #include "src/deoptimizer.h" 10 #include "src/deoptimizer.h"
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 // For all contexts, deoptimize code already marked. 447 // For all contexts, deoptimize code already marked.
448 Object* context = isolate->heap()->native_contexts_list(); 448 Object* context = isolate->heap()->native_contexts_list();
449 while (!context->IsUndefined()) { 449 while (!context->IsUndefined()) {
450 Context* native_context = Context::cast(context); 450 Context* native_context = Context::cast(context);
451 DeoptimizeMarkedCodeForContext(native_context); 451 DeoptimizeMarkedCodeForContext(native_context);
452 context = native_context->get(Context::NEXT_CONTEXT_LINK); 452 context = native_context->get(Context::NEXT_CONTEXT_LINK);
453 } 453 }
454 } 454 }
455 455
456 456
457 void Deoptimizer::DeoptimizeGlobalObject(JSObject* object) {
458 if (FLAG_trace_deopt) {
459 CodeTracer::Scope scope(object->GetHeap()->isolate()->GetCodeTracer());
460 PrintF(scope.file(), "[deoptimize global object @ 0x%08" V8PRIxPTR "]\n",
461 reinterpret_cast<intptr_t>(object));
462 }
463 if (object->IsJSGlobalProxy()) {
464 PrototypeIterator iter(object->GetIsolate(), object);
465 // TODO(verwaest): This CHECK will be hit if the global proxy is detached.
466 CHECK(iter.GetCurrent()->IsJSGlobalObject());
467 Context* native_context =
468 GlobalObject::cast(iter.GetCurrent())->native_context();
469 MarkAllCodeForContext(native_context);
470 DeoptimizeMarkedCodeForContext(native_context);
471 } else if (object->IsGlobalObject()) {
472 Context* native_context = GlobalObject::cast(object)->native_context();
473 MarkAllCodeForContext(native_context);
474 DeoptimizeMarkedCodeForContext(native_context);
475 }
476 }
477
478
479 void Deoptimizer::MarkAllCodeForContext(Context* context) { 457 void Deoptimizer::MarkAllCodeForContext(Context* context) {
480 Object* element = context->OptimizedCodeListHead(); 458 Object* element = context->OptimizedCodeListHead();
481 while (!element->IsUndefined()) { 459 while (!element->IsUndefined()) {
482 Code* code = Code::cast(element); 460 Code* code = Code::cast(element);
483 CHECK_EQ(code->kind(), Code::OPTIMIZED_FUNCTION); 461 CHECK_EQ(code->kind(), Code::OPTIMIZED_FUNCTION);
484 code->set_marked_for_deoptimization(true); 462 code->set_marked_for_deoptimization(true);
485 element = code->next_code_link(); 463 element = code->next_code_link();
486 } 464 }
487 } 465 }
488 466
(...skipping 2904 matching lines...) Expand 10 before | Expand all | Expand 10 after
3393 DCHECK(value_info->IsMaterializedObject()); 3371 DCHECK(value_info->IsMaterializedObject());
3394 3372
3395 value_info->value_ = 3373 value_info->value_ =
3396 Handle<Object>(previously_materialized_objects->get(i), isolate_); 3374 Handle<Object>(previously_materialized_objects->get(i), isolate_);
3397 } 3375 }
3398 } 3376 }
3399 } 3377 }
3400 3378
3401 } // namespace internal 3379 } // namespace internal
3402 } // namespace v8 3380 } // namespace v8
OLDNEW
« no previous file with comments | « src/deoptimizer.h ('k') | src/objects-printer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698