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

Side by Side Diff: src/runtime/runtime-object.cc

Issue 733253004: PropertyDetails cleanup: NORMAL property type merged with FIELD. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: cleanup Created 6 years, 1 month 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/runtime/runtime-debug.cc ('k') | src/x64/macro-assembler-x64.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 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/arguments.h" 7 #include "src/arguments.h"
8 #include "src/bootstrapper.h" 8 #include "src/bootstrapper.h"
9 #include "src/debug.h" 9 #include "src/debug.h"
10 #include "src/runtime/runtime.h" 10 #include "src/runtime/runtime.h"
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 } 610 }
611 AllowHeapAllocation allow_allocation; 611 AllowHeapAllocation allow_allocation;
612 return *JSObject::FastPropertyAt(receiver, it.representation(), 612 return *JSObject::FastPropertyAt(receiver, it.representation(),
613 field_index); 613 field_index);
614 } 614 }
615 } else { 615 } else {
616 // Attempt dictionary lookup. 616 // Attempt dictionary lookup.
617 NameDictionary* dictionary = receiver->property_dictionary(); 617 NameDictionary* dictionary = receiver->property_dictionary();
618 int entry = dictionary->FindEntry(key); 618 int entry = dictionary->FindEntry(key);
619 if ((entry != NameDictionary::kNotFound) && 619 if ((entry != NameDictionary::kNotFound) &&
620 (dictionary->DetailsAt(entry).type() == NORMAL)) { 620 (dictionary->DetailsAt(entry).type() == FIELD)) {
621 Object* value = dictionary->ValueAt(entry); 621 Object* value = dictionary->ValueAt(entry);
622 if (!receiver->IsGlobalObject()) return value; 622 if (!receiver->IsGlobalObject()) return value;
623 value = PropertyCell::cast(value)->value(); 623 value = PropertyCell::cast(value)->value();
624 if (!value->IsTheHole()) return value; 624 if (!value->IsTheHole()) return value;
625 // If value is the hole (meaning, absent) do the general lookup. 625 // If value is the hole (meaning, absent) do the general lookup.
626 } 626 }
627 } 627 }
628 } else if (key_obj->IsSmi()) { 628 } else if (key_obj->IsSmi()) {
629 // JSObject without a name key. If the key is a Smi, check for a 629 // JSObject without a name key. If the key is a Smi, check for a
630 // definite out-of-bounds access to elements, which is a strong indicator 630 // definite out-of-bounds access to elements, which is a strong indicator
(...skipping 955 matching lines...) Expand 10 before | Expand all | Expand 10 after
1586 1586
1587 RUNTIME_FUNCTION(RuntimeReference_ClassOf) { 1587 RUNTIME_FUNCTION(RuntimeReference_ClassOf) {
1588 SealHandleScope shs(isolate); 1588 SealHandleScope shs(isolate);
1589 DCHECK(args.length() == 1); 1589 DCHECK(args.length() == 1);
1590 CONVERT_ARG_CHECKED(Object, obj, 0); 1590 CONVERT_ARG_CHECKED(Object, obj, 0);
1591 if (!obj->IsJSReceiver()) return isolate->heap()->null_value(); 1591 if (!obj->IsJSReceiver()) return isolate->heap()->null_value();
1592 return JSReceiver::cast(obj)->class_name(); 1592 return JSReceiver::cast(obj)->class_name();
1593 } 1593 }
1594 } 1594 }
1595 } // namespace v8::internal 1595 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/runtime/runtime-debug.cc ('k') | src/x64/macro-assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698