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

Side by Side Diff: src/objects-inl.h

Issue 1270393003: [GC] Align behavior of JSProxy with JSObject when embedded in optimized code (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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 | « no previous file | no next file » | 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 // Review notes: 5 // Review notes:
6 // 6 //
7 // - The use of macros in these inline functions may seem superfluous 7 // - The use of macros in these inline functions may seem superfluous
8 // but it is absolutely needed to make sure gcc generates optimal 8 // but it is absolutely needed to make sure gcc generates optimal
9 // code. gcc is not happy when attempting to inline too deep. 9 // code. gcc is not happy when attempting to inline too deep.
10 // 10 //
(...skipping 4717 matching lines...) Expand 10 before | Expand all | Expand 10 after
4728 bool Code::IsWeakObjectInOptimizedCode(Object* object) { 4728 bool Code::IsWeakObjectInOptimizedCode(Object* object) {
4729 if (object->IsMap()) { 4729 if (object->IsMap()) {
4730 return Map::cast(object)->CanTransition() && 4730 return Map::cast(object)->CanTransition() &&
4731 FLAG_weak_embedded_maps_in_optimized_code; 4731 FLAG_weak_embedded_maps_in_optimized_code;
4732 } 4732 }
4733 if (object->IsCell()) { 4733 if (object->IsCell()) {
4734 object = Cell::cast(object)->value(); 4734 object = Cell::cast(object)->value();
4735 } else if (object->IsPropertyCell()) { 4735 } else if (object->IsPropertyCell()) {
4736 object = PropertyCell::cast(object)->value(); 4736 object = PropertyCell::cast(object)->value();
4737 } 4737 }
4738 if (object->IsJSObject()) { 4738 if (object->IsJSObject() || object->IsJSProxy()) {
4739 // JSProxy is handled like JSObject because it can morph into one.
4739 return FLAG_weak_embedded_objects_in_optimized_code; 4740 return FLAG_weak_embedded_objects_in_optimized_code;
4740 } 4741 }
4741 if (object->IsFixedArray()) { 4742 if (object->IsFixedArray()) {
4742 // Contexts of inlined functions are embedded in optimized code. 4743 // Contexts of inlined functions are embedded in optimized code.
4743 Map* map = HeapObject::cast(object)->map(); 4744 Map* map = HeapObject::cast(object)->map();
4744 Heap* heap = map->GetHeap(); 4745 Heap* heap = map->GetHeap();
4745 return FLAG_weak_embedded_objects_in_optimized_code && 4746 return FLAG_weak_embedded_objects_in_optimized_code &&
4746 map == heap->function_context_map(); 4747 map == heap->function_context_map();
4747 } 4748 }
4748 return false; 4749 return false;
(...skipping 2472 matching lines...) Expand 10 before | Expand all | Expand 10 after
7221 #undef READ_INT64_FIELD 7222 #undef READ_INT64_FIELD
7222 #undef WRITE_INT64_FIELD 7223 #undef WRITE_INT64_FIELD
7223 #undef READ_BYTE_FIELD 7224 #undef READ_BYTE_FIELD
7224 #undef WRITE_BYTE_FIELD 7225 #undef WRITE_BYTE_FIELD
7225 #undef NOBARRIER_READ_BYTE_FIELD 7226 #undef NOBARRIER_READ_BYTE_FIELD
7226 #undef NOBARRIER_WRITE_BYTE_FIELD 7227 #undef NOBARRIER_WRITE_BYTE_FIELD
7227 7228
7228 } } // namespace v8::internal 7229 } } // namespace v8::internal
7229 7230
7230 #endif // V8_OBJECTS_INL_H_ 7231 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698