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

Side by Side Diff: src/type-info.cc

Issue 893073006: Add map-based read barrier to WeakCell Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix merge Created 5 years, 10 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/type-feedback-vector.cc ('k') | src/types.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 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 "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/ast.h" 7 #include "src/ast.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/compiler.h" 9 #include "src/compiler.h"
10 #include "src/ic/ic.h" 10 #include "src/ic/ic.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 DCHECK(slot.ToInt() >= 0 && slot.ToInt() < feedback_vector_->length()); 64 DCHECK(slot.ToInt() >= 0 && slot.ToInt() < feedback_vector_->length());
65 Handle<Object> undefined = 65 Handle<Object> undefined =
66 Handle<Object>::cast(isolate()->factory()->undefined_value()); 66 Handle<Object>::cast(isolate()->factory()->undefined_value());
67 Object* obj = feedback_vector_->Get(slot); 67 Object* obj = feedback_vector_->Get(slot);
68 68
69 // Vector-based ICs do not embed direct pointers to maps, functions. 69 // Vector-based ICs do not embed direct pointers to maps, functions.
70 // Instead a WeakCell is always used. 70 // Instead a WeakCell is always used.
71 if (obj->IsWeakCell()) { 71 if (obj->IsWeakCell()) {
72 WeakCell* cell = WeakCell::cast(obj); 72 WeakCell* cell = WeakCell::cast(obj);
73 if (cell->cleared()) return undefined; 73 if (cell->cleared()) return undefined;
74 obj = cell->value(); 74 obj = cell->value(isolate()->heap());
75 } 75 }
76 76
77 if (!obj->IsJSFunction() || 77 if (!obj->IsJSFunction() ||
78 !CanRetainOtherContext(JSFunction::cast(obj), *native_context_)) { 78 !CanRetainOtherContext(JSFunction::cast(obj), *native_context_)) {
79 return Handle<Object>(obj, isolate()); 79 return Handle<Object>(obj, isolate());
80 } 80 }
81 return undefined; 81 return undefined;
82 } 82 }
83 83
84 84
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 UnseededNumberDictionary::kNotFound); 562 UnseededNumberDictionary::kNotFound);
563 // Dictionary has been allocated with sufficient size for all elements. 563 // Dictionary has been allocated with sufficient size for all elements.
564 DisallowHeapAllocation no_need_to_resize_dictionary; 564 DisallowHeapAllocation no_need_to_resize_dictionary;
565 HandleScope scope(isolate()); 565 HandleScope scope(isolate());
566 USE(UnseededNumberDictionary::AtNumberPut( 566 USE(UnseededNumberDictionary::AtNumberPut(
567 dictionary_, IdToKey(ast_id), handle(target, isolate()))); 567 dictionary_, IdToKey(ast_id), handle(target, isolate())));
568 } 568 }
569 569
570 570
571 } } // namespace v8::internal 571 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/type-feedback-vector.cc ('k') | src/types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698