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

Side by Side Diff: src/lookup.cc

Issue 768633002: Add infrastructure to keep track of references to prototypes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: use WeakCellForMap() when appropriate Created 6 years 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/lookup.h ('k') | src/objects.h » ('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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/bootstrapper.h" 7 #include "src/bootstrapper.h"
8 #include "src/deoptimizer.h" 8 #include "src/deoptimizer.h"
9 #include "src/lookup.h" 9 #include "src/lookup.h"
10 #include "src/lookup-inl.h" 10 #include "src/lookup-inl.h"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 if (state_ == TRANSITION) return; 120 if (state_ == TRANSITION) return;
121 DCHECK(state_ != LookupIterator::ACCESSOR || 121 DCHECK(state_ != LookupIterator::ACCESSOR ||
122 GetAccessors()->IsDeclaredAccessorInfo()); 122 GetAccessors()->IsDeclaredAccessorInfo());
123 DCHECK(state_ == NOT_FOUND || !HolderIsReceiverOrHiddenPrototype()); 123 DCHECK(state_ == NOT_FOUND || !HolderIsReceiverOrHiddenPrototype());
124 124
125 // Can only be called when the receiver is a JSObject. JSProxy has to be 125 // Can only be called when the receiver is a JSObject. JSProxy has to be
126 // handled via a trap. Adding properties to primitive values is not 126 // handled via a trap. Adding properties to primitive values is not
127 // observable. 127 // observable.
128 Handle<JSObject> receiver = GetStoreTarget(); 128 Handle<JSObject> receiver = GetStoreTarget();
129 129
130 if (!name().is_identical_to(isolate()->factory()->hidden_string()) && 130 if (!isolate()->IsInternallyUsedPropertyName(name()) &&
131 !receiver->map()->is_extensible()) { 131 !receiver->map()->is_extensible()) {
132 return; 132 return;
133 } 133 }
134 134
135 transition_map_ = Map::TransitionToDataProperty( 135 transition_map_ = Map::TransitionToDataProperty(
136 handle(receiver->map(), isolate_), name_, value, attributes, store_mode); 136 handle(receiver->map(), isolate_), name_, value, attributes, store_mode);
137 state_ = TRANSITION; 137 state_ = TRANSITION;
138 } 138 }
139 139
140 140
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 } 330 }
331 return false; 331 return false;
332 } 332 }
333 333
334 334
335 void LookupIterator::InternalizeName() { 335 void LookupIterator::InternalizeName() {
336 if (name_->IsUniqueName()) return; 336 if (name_->IsUniqueName()) return;
337 name_ = factory()->InternalizeString(Handle<String>::cast(name_)); 337 name_ = factory()->InternalizeString(Handle<String>::cast(name_));
338 } 338 }
339 } } // namespace v8::internal 339 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/lookup.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698