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

Side by Side Diff: src/elements.cc

Issue 856503002: Massive renaming of PropertyType values and other implied stuff. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Spurious file addition fixed Created 5 years, 11 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/bootstrapper.cc ('k') | src/factory.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/arguments.h" 7 #include "src/arguments.h"
8 #include "src/conversions.h" 8 #include "src/conversions.h"
9 #include "src/elements.h" 9 #include "src/elements.h"
10 #include "src/objects.h" 10 #include "src/objects.h"
(...skipping 1448 matching lines...) Expand 10 before | Expand all | Expand 10 after
1459 Handle<JSObject> obj, 1459 Handle<JSObject> obj,
1460 uint32_t key, 1460 uint32_t key,
1461 Handle<FixedArrayBase> store) { 1461 Handle<FixedArrayBase> store) {
1462 Handle<SeededNumberDictionary> backing_store = 1462 Handle<SeededNumberDictionary> backing_store =
1463 Handle<SeededNumberDictionary>::cast(store); 1463 Handle<SeededNumberDictionary>::cast(store);
1464 Isolate* isolate = backing_store->GetIsolate(); 1464 Isolate* isolate = backing_store->GetIsolate();
1465 int entry = backing_store->FindEntry(key); 1465 int entry = backing_store->FindEntry(key);
1466 if (entry != SeededNumberDictionary::kNotFound) { 1466 if (entry != SeededNumberDictionary::kNotFound) {
1467 Handle<Object> element(backing_store->ValueAt(entry), isolate); 1467 Handle<Object> element(backing_store->ValueAt(entry), isolate);
1468 PropertyDetails details = backing_store->DetailsAt(entry); 1468 PropertyDetails details = backing_store->DetailsAt(entry);
1469 if (details.type() == CALLBACKS) { 1469 if (details.type() == ACCESSOR_CONSTANT) {
1470 return JSObject::GetElementWithCallback( 1470 return JSObject::GetElementWithCallback(
1471 obj, receiver, element, key, obj); 1471 obj, receiver, element, key, obj);
1472 } else { 1472 } else {
1473 return element; 1473 return element;
1474 } 1474 }
1475 } 1475 }
1476 return isolate->factory()->the_hole_value(); 1476 return isolate->factory()->the_hole_value();
1477 } 1477 }
1478 1478
1479 MUST_USE_RESULT static PropertyAttributes GetAttributesImpl( 1479 MUST_USE_RESULT static PropertyAttributes GetAttributesImpl(
(...skipping 12 matching lines...) Expand all
1492 1492
1493 MUST_USE_RESULT static MaybeHandle<AccessorPair> GetAccessorPairImpl( 1493 MUST_USE_RESULT static MaybeHandle<AccessorPair> GetAccessorPairImpl(
1494 Handle<Object> receiver, 1494 Handle<Object> receiver,
1495 Handle<JSObject> obj, 1495 Handle<JSObject> obj,
1496 uint32_t key, 1496 uint32_t key,
1497 Handle<FixedArrayBase> store) { 1497 Handle<FixedArrayBase> store) {
1498 Handle<SeededNumberDictionary> backing_store = 1498 Handle<SeededNumberDictionary> backing_store =
1499 Handle<SeededNumberDictionary>::cast(store); 1499 Handle<SeededNumberDictionary>::cast(store);
1500 int entry = backing_store->FindEntry(key); 1500 int entry = backing_store->FindEntry(key);
1501 if (entry != SeededNumberDictionary::kNotFound && 1501 if (entry != SeededNumberDictionary::kNotFound &&
1502 backing_store->DetailsAt(entry).type() == CALLBACKS && 1502 backing_store->DetailsAt(entry).type() == ACCESSOR_CONSTANT &&
1503 backing_store->ValueAt(entry)->IsAccessorPair()) { 1503 backing_store->ValueAt(entry)->IsAccessorPair()) {
1504 return handle(AccessorPair::cast(backing_store->ValueAt(entry))); 1504 return handle(AccessorPair::cast(backing_store->ValueAt(entry)));
1505 } 1505 }
1506 return MaybeHandle<AccessorPair>(); 1506 return MaybeHandle<AccessorPair>();
1507 } 1507 }
1508 1508
1509 static bool HasElementImpl(Handle<Object> receiver, 1509 static bool HasElementImpl(Handle<Object> receiver,
1510 Handle<JSObject> holder, 1510 Handle<JSObject> holder,
1511 uint32_t key, 1511 uint32_t key,
1512 Handle<FixedArrayBase> store) { 1512 Handle<FixedArrayBase> store) {
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
1885 UNREACHABLE(); 1885 UNREACHABLE();
1886 break; 1886 break;
1887 } 1887 }
1888 1888
1889 array->set_elements(*elms); 1889 array->set_elements(*elms);
1890 array->set_length(Smi::FromInt(number_of_elements)); 1890 array->set_length(Smi::FromInt(number_of_elements));
1891 return array; 1891 return array;
1892 } 1892 }
1893 1893
1894 } } // namespace v8::internal 1894 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/bootstrapper.cc ('k') | src/factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698