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

Side by Side Diff: src/isolate.cc

Issue 2131383002: [builtins] take slow path in IsConcatSpreadable if proxy in prototype (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Refactor Created 4 years, 5 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
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 2641 matching lines...) Expand 10 before | Expand all | Expand 10 after
2652 // @@isConcatSpreadable property on Array.prototype or Object.prototype 2652 // @@isConcatSpreadable property on Array.prototype or Object.prototype
2653 // hence the reverse implication doesn't hold. 2653 // hence the reverse implication doesn't hold.
2654 DCHECK(is_is_concat_spreadable_set); 2654 DCHECK(is_is_concat_spreadable_set);
2655 return false; 2655 return false;
2656 } 2656 }
2657 #endif // DEBUG 2657 #endif // DEBUG
2658 2658
2659 return !is_is_concat_spreadable_set; 2659 return !is_is_concat_spreadable_set;
2660 } 2660 }
2661 2661
2662 bool Isolate::IsIsConcatSpreadableLookupChainIntact(JSReceiver* receiver) {
2663 if (!IsIsConcatSpreadableLookupChainIntact()) return false;
2664 return !receiver->HasProxyInPrototype(this);
2665 }
2666
2662 void Isolate::UpdateArrayProtectorOnSetElement(Handle<JSObject> object) { 2667 void Isolate::UpdateArrayProtectorOnSetElement(Handle<JSObject> object) {
2663 DisallowHeapAllocation no_gc; 2668 DisallowHeapAllocation no_gc;
2664 if (!object->map()->is_prototype_map()) return; 2669 if (!object->map()->is_prototype_map()) return;
2665 if (!IsFastArrayConstructorPrototypeChainIntact()) return; 2670 if (!IsFastArrayConstructorPrototypeChainIntact()) return;
2666 if (!IsArrayOrObjectPrototype(*object)) return; 2671 if (!IsArrayOrObjectPrototype(*object)) return;
2667 PropertyCell::SetValueWithInvalidation( 2672 PropertyCell::SetValueWithInvalidation(
2668 factory()->array_protector(), 2673 factory()->array_protector(),
2669 handle(Smi::FromInt(kArrayProtectorInvalid), this)); 2674 handle(Smi::FromInt(kArrayProtectorInvalid), this));
2670 } 2675 }
2671 2676
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
3087 // Then check whether this scope intercepts. 3092 // Then check whether this scope intercepts.
3088 if ((flag & intercept_mask_)) { 3093 if ((flag & intercept_mask_)) {
3089 intercepted_flags_ |= flag; 3094 intercepted_flags_ |= flag;
3090 return true; 3095 return true;
3091 } 3096 }
3092 return false; 3097 return false;
3093 } 3098 }
3094 3099
3095 } // namespace internal 3100 } // namespace internal
3096 } // namespace v8 3101 } // namespace v8
OLDNEW
« no previous file with comments | « src/isolate.h ('k') | src/objects.h » ('j') | test/mjsunit/es6/array-concat.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698