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

Side by Side Diff: src/isolate.cc

Issue 1980483003: [es6] Reintroduce the instanceof operator in the backends. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Igors comments. Created 4 years, 7 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/isolate.h ('k') | src/isolate-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 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/isolate.h" 5 #include "src/isolate.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include <fstream> // NOLINT(readability/streams) 9 #include <fstream> // NOLINT(readability/streams)
10 #include <sstream> 10 #include <sstream>
(...skipping 2634 matching lines...) Expand 10 before | Expand all | Expand 10 after
2645 void Isolate::UpdateArrayProtectorOnSetElement(Handle<JSObject> object) { 2645 void Isolate::UpdateArrayProtectorOnSetElement(Handle<JSObject> object) {
2646 DisallowHeapAllocation no_gc; 2646 DisallowHeapAllocation no_gc;
2647 if (!object->map()->is_prototype_map()) return; 2647 if (!object->map()->is_prototype_map()) return;
2648 if (!IsFastArrayConstructorPrototypeChainIntact()) return; 2648 if (!IsFastArrayConstructorPrototypeChainIntact()) return;
2649 if (!IsArrayOrObjectPrototype(*object)) return; 2649 if (!IsArrayOrObjectPrototype(*object)) return;
2650 PropertyCell::SetValueWithInvalidation( 2650 PropertyCell::SetValueWithInvalidation(
2651 factory()->array_protector(), 2651 factory()->array_protector(),
2652 handle(Smi::FromInt(kArrayProtectorInvalid), this)); 2652 handle(Smi::FromInt(kArrayProtectorInvalid), this));
2653 } 2653 }
2654 2654
2655 void Isolate::InvalidateHasInstanceProtector() {
2656 DCHECK(factory()->has_instance_protector()->value()->IsSmi());
2657 DCHECK(IsHasInstanceLookupChainIntact());
2658 PropertyCell::SetValueWithInvalidation(
2659 factory()->has_instance_protector(),
2660 handle(Smi::FromInt(kArrayProtectorInvalid), this));
2661 DCHECK(!IsHasInstanceLookupChainIntact());
2662 }
2663
2655 void Isolate::InvalidateIsConcatSpreadableProtector() { 2664 void Isolate::InvalidateIsConcatSpreadableProtector() {
2656 DCHECK(factory()->is_concat_spreadable_protector()->value()->IsSmi()); 2665 DCHECK(factory()->is_concat_spreadable_protector()->value()->IsSmi());
2657 DCHECK(IsIsConcatSpreadableLookupChainIntact()); 2666 DCHECK(IsIsConcatSpreadableLookupChainIntact());
2658 factory()->is_concat_spreadable_protector()->set_value( 2667 factory()->is_concat_spreadable_protector()->set_value(
2659 Smi::FromInt(kArrayProtectorInvalid)); 2668 Smi::FromInt(kArrayProtectorInvalid));
2660 DCHECK(!IsIsConcatSpreadableLookupChainIntact()); 2669 DCHECK(!IsIsConcatSpreadableLookupChainIntact());
2661 } 2670 }
2662 2671
2663 void Isolate::InvalidateArraySpeciesProtector() { 2672 void Isolate::InvalidateArraySpeciesProtector() {
2664 if (!FLAG_harmony_species) return; 2673 if (!FLAG_harmony_species) return;
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
3053 // Then check whether this scope intercepts. 3062 // Then check whether this scope intercepts.
3054 if ((flag & intercept_mask_)) { 3063 if ((flag & intercept_mask_)) {
3055 intercepted_flags_ |= flag; 3064 intercepted_flags_ |= flag;
3056 return true; 3065 return true;
3057 } 3066 }
3058 return false; 3067 return false;
3059 } 3068 }
3060 3069
3061 } // namespace internal 3070 } // namespace internal
3062 } // namespace v8 3071 } // namespace v8
OLDNEW
« no previous file with comments | « src/isolate.h ('k') | src/isolate-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698