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

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

Issue 1510753005: Fix Function subclassing. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Adressing comments 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/runtime/runtime-function.cc ('k') | test/mjsunit/es6/classes-subclass-builtins.js » ('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 #ifndef V8_TRANSITIONS_INL_H_ 5 #ifndef V8_TRANSITIONS_INL_H_
6 #define V8_TRANSITIONS_INL_H_ 6 #define V8_TRANSITIONS_INL_H_
7 7
8 #include "src/transitions.h" 8 #include "src/transitions.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 } 105 }
106 106
107 107
108 #ifdef DEBUG 108 #ifdef DEBUG
109 bool TransitionArray::IsSpecialTransition(Name* name) { 109 bool TransitionArray::IsSpecialTransition(Name* name) {
110 if (!name->IsSymbol()) return false; 110 if (!name->IsSymbol()) return false;
111 Heap* heap = name->GetHeap(); 111 Heap* heap = name->GetHeap();
112 return name == heap->nonextensible_symbol() || 112 return name == heap->nonextensible_symbol() ||
113 name == heap->sealed_symbol() || name == heap->frozen_symbol() || 113 name == heap->sealed_symbol() || name == heap->frozen_symbol() ||
114 name == heap->elements_transition_symbol() || 114 name == heap->elements_transition_symbol() ||
115 name == heap->strict_function_transition_symbol() ||
116 name == heap->strong_function_transition_symbol() ||
115 name == heap->observed_symbol(); 117 name == heap->observed_symbol();
116 } 118 }
117 #endif 119 #endif
118 120
119 121
120 int TransitionArray::CompareKeys(Name* key1, uint32_t hash1, PropertyKind kind1, 122 int TransitionArray::CompareKeys(Name* key1, uint32_t hash1, PropertyKind kind1,
121 PropertyAttributes attributes1, Name* key2, 123 PropertyAttributes attributes1, Name* key2,
122 uint32_t hash2, PropertyKind kind2, 124 uint32_t hash2, PropertyKind kind2,
123 PropertyAttributes attributes2) { 125 PropertyAttributes attributes2) {
124 int cmp = CompareNames(key1, hash1, key2, hash2); 126 int cmp = CompareNames(key1, hash1, key2, hash2);
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 176
175 void TransitionArray::SetNumberOfTransitions(int number_of_transitions) { 177 void TransitionArray::SetNumberOfTransitions(int number_of_transitions) {
176 DCHECK(number_of_transitions <= Capacity(this)); 178 DCHECK(number_of_transitions <= Capacity(this));
177 set(kTransitionLengthIndex, Smi::FromInt(number_of_transitions)); 179 set(kTransitionLengthIndex, Smi::FromInt(number_of_transitions));
178 } 180 }
179 181
180 } // namespace internal 182 } // namespace internal
181 } // namespace v8 183 } // namespace v8
182 184
183 #endif // V8_TRANSITIONS_INL_H_ 185 #endif // V8_TRANSITIONS_INL_H_
OLDNEW
« no previous file with comments | « src/runtime/runtime-function.cc ('k') | test/mjsunit/es6/classes-subclass-builtins.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698