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

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

Issue 1409123003: [runtime] Avoid @@isConcatSpreadable lookup for fast path Array.prototype.concat (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: merging with master 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.cc ('k') | src/lookup.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 #ifndef V8_ISOLATE_INL_H_ 5 #ifndef V8_ISOLATE_INL_H_
6 #define V8_ISOLATE_INL_H_ 6 #define V8_ISOLATE_INL_H_
7 7
8 #include "src/isolate.h" 8 #include "src/isolate.h"
9 #include "src/objects-inl.h" 9 #include "src/objects-inl.h"
10 10
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 // what the protector stands for: 108 // what the protector stands for:
109 // - You'd need to traverse the heap to check that no Array instance has 109 // - You'd need to traverse the heap to check that no Array instance has
110 // a constructor property 110 // a constructor property
111 // - To check that Array[Symbol.species] == Array, JS code has to execute, 111 // - To check that Array[Symbol.species] == Array, JS code has to execute,
112 // but JS cannot be invoked in callstack overflow situations 112 // but JS cannot be invoked in callstack overflow situations
113 // All that could be checked reliably is that 113 // All that could be checked reliably is that
114 // Array.prototype.constructor == Array. Given that limitation, no check is 114 // Array.prototype.constructor == Array. Given that limitation, no check is
115 // done here. In place, there are mjsunit tests harmony/array-species* which 115 // done here. In place, there are mjsunit tests harmony/array-species* which
116 // ensure that behavior is correct in various invalid protector cases. 116 // ensure that behavior is correct in various invalid protector cases.
117 117
118 PropertyCell* species_cell = heap()->species_protector(); 118 Cell* species_cell = heap()->species_protector();
119 return species_cell->value()->IsSmi() && 119 return species_cell->value()->IsSmi() &&
120 Smi::cast(species_cell->value())->value() == kArrayProtectorValid; 120 Smi::cast(species_cell->value())->value() == kArrayProtectorValid;
121 } 121 }
122 122
123 } // namespace internal 123 } // namespace internal
124 } // namespace v8 124 } // namespace v8
125 125
126 #endif // V8_ISOLATE_INL_H_ 126 #endif // V8_ISOLATE_INL_H_
OLDNEW
« no previous file with comments | « src/isolate.cc ('k') | src/lookup.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698