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

Side by Side Diff: src/lookup.cc

Issue 1110393003: drop interalization of strings entering global constant slots (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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/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 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 } 325 }
326 326
327 327
328 Handle<Object> LookupIterator::GetDataValue() const { 328 Handle<Object> LookupIterator::GetDataValue() const {
329 DCHECK_EQ(DATA, state_); 329 DCHECK_EQ(DATA, state_);
330 Handle<Object> value = FetchValue(); 330 Handle<Object> value = FetchValue();
331 return value; 331 return value;
332 } 332 }
333 333
334 334
335 Handle<Object> LookupIterator::WriteDataValue(Handle<Object> value) { 335 void LookupIterator::WriteDataValue(Handle<Object> value) {
336 DCHECK_EQ(DATA, state_); 336 DCHECK_EQ(DATA, state_);
337 Handle<JSObject> holder = GetHolder<JSObject>(); 337 Handle<JSObject> holder = GetHolder<JSObject>();
338 if (holder_map_->is_dictionary_map()) { 338 if (holder_map_->is_dictionary_map()) {
339 Handle<NameDictionary> property_dictionary = 339 Handle<NameDictionary> property_dictionary =
340 handle(holder->property_dictionary()); 340 handle(holder->property_dictionary());
341 if (holder->IsGlobalObject()) { 341 if (holder->IsGlobalObject()) {
342 value = PropertyCell::UpdateCell(property_dictionary, dictionary_entry(), 342 PropertyCell::UpdateCell(property_dictionary, dictionary_entry(), value,
343 value, property_details_); 343 property_details_);
344 } else { 344 } else {
345 property_dictionary->ValueAtPut(dictionary_entry(), *value); 345 property_dictionary->ValueAtPut(dictionary_entry(), *value);
346 } 346 }
347 } else if (property_details_.type() == v8::internal::DATA) { 347 } else if (property_details_.type() == v8::internal::DATA) {
348 holder->WriteToField(descriptor_number(), *value); 348 holder->WriteToField(descriptor_number(), *value);
349 } else { 349 } else {
350 DCHECK_EQ(v8::internal::DATA_CONSTANT, property_details_.type()); 350 DCHECK_EQ(v8::internal::DATA_CONSTANT, property_details_.type());
351 } 351 }
352 return value;
353 } 352 }
354 353
355 354
356 bool LookupIterator::IsIntegerIndexedExotic(JSReceiver* holder) { 355 bool LookupIterator::IsIntegerIndexedExotic(JSReceiver* holder) {
357 DCHECK(exotic_index_state_ != ExoticIndexState::kNoIndex); 356 DCHECK(exotic_index_state_ != ExoticIndexState::kNoIndex);
358 // Currently typed arrays are the only such objects. 357 // Currently typed arrays are the only such objects.
359 if (!holder->IsJSTypedArray()) return false; 358 if (!holder->IsJSTypedArray()) return false;
360 if (exotic_index_state_ == ExoticIndexState::kIndex) return true; 359 if (exotic_index_state_ == ExoticIndexState::kIndex) return true;
361 DCHECK(exotic_index_state_ == ExoticIndexState::kUninitialized); 360 DCHECK(exotic_index_state_ == ExoticIndexState::kUninitialized);
362 bool result = false; 361 bool result = false;
(...skipping 26 matching lines...) Expand all
389 // Fall through. 388 // Fall through.
390 case InterceptorState::kSkipNonMasking: 389 case InterceptorState::kSkipNonMasking:
391 return true; 390 return true;
392 case InterceptorState::kProcessNonMasking: 391 case InterceptorState::kProcessNonMasking:
393 return false; 392 return false;
394 } 393 }
395 } 394 }
396 return interceptor_state_ == InterceptorState::kProcessNonMasking; 395 return interceptor_state_ == InterceptorState::kProcessNonMasking;
397 } 396 }
398 } } // namespace v8::internal 397 } } // 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