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

Side by Side Diff: src/objects.cc

Issue 1535523003: [runtime] Drop FIRST/LAST_NONCALLABLE_SPEC_OBJECT instance type range. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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/objects.h ('k') | src/objects-inl.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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/objects.h" 5 #include "src/objects.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <iomanip> 8 #include <iomanip>
9 #include <sstream> 9 #include <sstream>
10 10
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 } 70 }
71 71
72 72
73 Handle<HeapType> Object::OptimalType(Isolate* isolate, 73 Handle<HeapType> Object::OptimalType(Isolate* isolate,
74 Representation representation) { 74 Representation representation) {
75 if (representation.IsNone()) return HeapType::None(isolate); 75 if (representation.IsNone()) return HeapType::None(isolate);
76 if (FLAG_track_field_types) { 76 if (FLAG_track_field_types) {
77 if (representation.IsHeapObject() && IsHeapObject()) { 77 if (representation.IsHeapObject() && IsHeapObject()) {
78 // We can track only JavaScript objects with stable maps. 78 // We can track only JavaScript objects with stable maps.
79 Handle<Map> map(HeapObject::cast(this)->map(), isolate); 79 Handle<Map> map(HeapObject::cast(this)->map(), isolate);
80 if (map->is_stable() && 80 if (map->is_stable() && map->IsJSReceiverMap()) {
81 map->instance_type() >= FIRST_NONCALLABLE_SPEC_OBJECT_TYPE &&
82 map->instance_type() <= LAST_NONCALLABLE_SPEC_OBJECT_TYPE) {
83 return HeapType::Class(map, isolate); 81 return HeapType::Class(map, isolate);
84 } 82 }
85 } 83 }
86 } 84 }
87 return HeapType::Any(isolate); 85 return HeapType::Any(isolate);
88 } 86 }
89 87
90 88
91 MaybeHandle<JSReceiver> Object::ToObject(Isolate* isolate, 89 MaybeHandle<JSReceiver> Object::ToObject(Isolate* isolate,
92 Handle<Object> object, 90 Handle<Object> object,
(...skipping 19265 matching lines...) Expand 10 before | Expand all | Expand 10 after
19358 if (cell->value() != *new_value) { 19356 if (cell->value() != *new_value) {
19359 cell->set_value(*new_value); 19357 cell->set_value(*new_value);
19360 Isolate* isolate = cell->GetIsolate(); 19358 Isolate* isolate = cell->GetIsolate();
19361 cell->dependent_code()->DeoptimizeDependentCodeGroup( 19359 cell->dependent_code()->DeoptimizeDependentCodeGroup(
19362 isolate, DependentCode::kPropertyCellChangedGroup); 19360 isolate, DependentCode::kPropertyCellChangedGroup);
19363 } 19361 }
19364 } 19362 }
19365 19363
19366 } // namespace internal 19364 } // namespace internal
19367 } // namespace v8 19365 } // namespace v8
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698