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

Unified Diff: src/full-codegen.cc

Issue 181283003: Symbols for type cells. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments. Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/heap.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/full-codegen.cc
diff --git a/src/full-codegen.cc b/src/full-codegen.cc
index 16bb6c0d01330e73bacb096ed5d70619ed615078..dc645952d8ff6dcb12c02016569b306e71031aee 100644
--- a/src/full-codegen.cc
+++ b/src/full-codegen.cc
@@ -388,10 +388,13 @@ unsigned FullCodeGenerator::EmitBackEdgeTable() {
void FullCodeGenerator::InitializeFeedbackVector() {
int length = info_->function()->slot_count();
- ASSERT_EQ(isolate()->heap()->the_hole_value(),
- *TypeFeedbackInfo::UninitializedSentinel(isolate()));
- feedback_vector_ = isolate()->factory()->NewFixedArrayWithHoles(length,
- TENURED);
+ feedback_vector_ = isolate()->factory()->NewFixedArray(length, TENURED);
+ Handle<Object> sentinel = TypeFeedbackInfo::UninitializedSentinel(isolate());
+ // Ensure that it's safe to set without using a write barrier.
+ ASSERT_EQ(isolate()->heap()->uninitialized_symbol(), *sentinel);
+ for (int i = 0; i < length; i++) {
+ feedback_vector_->set(i, *sentinel, SKIP_WRITE_BARRIER);
+ }
}
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698