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

Side by Side Diff: src/runtime.cc

Issue 17064002: Refactor only: Rename JSGlobaPropertyCell to PropertyCell (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « src/property.h ('k') | src/spaces.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 4496 matching lines...) Expand 10 before | Expand all | Expand 10 after
4507 return receiver->FastPropertyAt(result.representation(), offset); 4507 return receiver->FastPropertyAt(result.representation(), offset);
4508 } 4508 }
4509 } else { 4509 } else {
4510 // Attempt dictionary lookup. 4510 // Attempt dictionary lookup.
4511 NameDictionary* dictionary = receiver->property_dictionary(); 4511 NameDictionary* dictionary = receiver->property_dictionary();
4512 int entry = dictionary->FindEntry(key); 4512 int entry = dictionary->FindEntry(key);
4513 if ((entry != NameDictionary::kNotFound) && 4513 if ((entry != NameDictionary::kNotFound) &&
4514 (dictionary->DetailsAt(entry).type() == NORMAL)) { 4514 (dictionary->DetailsAt(entry).type() == NORMAL)) {
4515 Object* value = dictionary->ValueAt(entry); 4515 Object* value = dictionary->ValueAt(entry);
4516 if (!receiver->IsGlobalObject()) return value; 4516 if (!receiver->IsGlobalObject()) return value;
4517 value = JSGlobalPropertyCell::cast(value)->value(); 4517 value = PropertyCell::cast(value)->value();
4518 if (!value->IsTheHole()) return value; 4518 if (!value->IsTheHole()) return value;
4519 // If value is the hole do the general lookup. 4519 // If value is the hole do the general lookup.
4520 } 4520 }
4521 } 4521 }
4522 } else if (FLAG_smi_only_arrays && args.at<Object>(1)->IsSmi()) { 4522 } else if (FLAG_smi_only_arrays && args.at<Object>(1)->IsSmi()) {
4523 // JSObject without a name key. If the key is a Smi, check for a 4523 // JSObject without a name key. If the key is a Smi, check for a
4524 // definite out-of-bounds access to elements, which is a strong indicator 4524 // definite out-of-bounds access to elements, which is a strong indicator
4525 // that subsequent accesses will also call the runtime. Proactively 4525 // that subsequent accesses will also call the runtime. Proactively
4526 // transition elements to FAST_*_ELEMENTS to avoid excessive boxing of 4526 // transition elements to FAST_*_ELEMENTS to avoid excessive boxing of
4527 // doubles for those future calls in the case that the elements would 4527 // doubles for those future calls in the case that the elements would
(...skipping 9107 matching lines...) Expand 10 before | Expand all | Expand 10 after
13635 // Handle last resort GC and make sure to allow future allocations 13635 // Handle last resort GC and make sure to allow future allocations
13636 // to grow the heap without causing GCs (if possible). 13636 // to grow the heap without causing GCs (if possible).
13637 isolate->counters()->gc_last_resort_from_js()->Increment(); 13637 isolate->counters()->gc_last_resort_from_js()->Increment();
13638 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, 13638 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags,
13639 "Runtime::PerformGC"); 13639 "Runtime::PerformGC");
13640 } 13640 }
13641 } 13641 }
13642 13642
13643 13643
13644 } } // namespace v8::internal 13644 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/property.h ('k') | src/spaces.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698