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

Side by Side Diff: src/contexts.h

Issue 698073005: Classes: Fix issue with default constructor crash (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix context issue by using EmitNewClosure Created 6 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « src/bootstrapper.cc ('k') | src/full-codegen.cc » ('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_CONTEXTS_H_ 5 #ifndef V8_CONTEXTS_H_
6 #define V8_CONTEXTS_H_ 6 #define V8_CONTEXTS_H_
7 7
8 #include "src/heap/heap.h" 8 #include "src/heap/heap.h"
9 #include "src/objects.h" 9 #include "src/objects.h"
10 10
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 V(NATIVE_OBJECT_NOTIFIER_PERFORM_CHANGE, JSFunction, \ 176 V(NATIVE_OBJECT_NOTIFIER_PERFORM_CHANGE, JSFunction, \
177 native_object_notifier_perform_change) \ 177 native_object_notifier_perform_change) \
178 V(SLOPPY_GENERATOR_FUNCTION_MAP_INDEX, Map, sloppy_generator_function_map) \ 178 V(SLOPPY_GENERATOR_FUNCTION_MAP_INDEX, Map, sloppy_generator_function_map) \
179 V(STRICT_GENERATOR_FUNCTION_MAP_INDEX, Map, strict_generator_function_map) \ 179 V(STRICT_GENERATOR_FUNCTION_MAP_INDEX, Map, strict_generator_function_map) \
180 V(GENERATOR_OBJECT_PROTOTYPE_MAP_INDEX, Map, generator_object_prototype_map) \ 180 V(GENERATOR_OBJECT_PROTOTYPE_MAP_INDEX, Map, generator_object_prototype_map) \
181 V(ITERATOR_RESULT_MAP_INDEX, Map, iterator_result_map) \ 181 V(ITERATOR_RESULT_MAP_INDEX, Map, iterator_result_map) \
182 V(MAP_ITERATOR_MAP_INDEX, Map, map_iterator_map) \ 182 V(MAP_ITERATOR_MAP_INDEX, Map, map_iterator_map) \
183 V(SET_ITERATOR_MAP_INDEX, Map, set_iterator_map) \ 183 V(SET_ITERATOR_MAP_INDEX, Map, set_iterator_map) \
184 V(ITERATOR_SYMBOL_INDEX, Symbol, iterator_symbol) \ 184 V(ITERATOR_SYMBOL_INDEX, Symbol, iterator_symbol) \
185 V(UNSCOPABLES_SYMBOL_INDEX, Symbol, unscopables_symbol) \ 185 V(UNSCOPABLES_SYMBOL_INDEX, Symbol, unscopables_symbol) \
186 V(ARRAY_VALUES_ITERATOR_INDEX, JSFunction, array_values_iterator) 186 V(ARRAY_VALUES_ITERATOR_INDEX, JSFunction, array_values_iterator) \
187 V(DEFAULT_CONSTRUCTOR_INDEX, JSFunction, default_constructor) \
188 V(DEFAULT_CONSTRUCTOR_NO_SUPER_INDEX, JSFunction, \
189 default_constructor_no_super)
187 190
188 // JSFunctions are pairs (context, function code), sometimes also called 191 // JSFunctions are pairs (context, function code), sometimes also called
189 // closures. A Context object is used to represent function contexts and 192 // closures. A Context object is used to represent function contexts and
190 // dynamically pushed 'with' contexts (or 'scopes' in ECMA-262 speak). 193 // dynamically pushed 'with' contexts (or 'scopes' in ECMA-262 speak).
191 // 194 //
192 // At runtime, the contexts build a stack in parallel to the execution 195 // At runtime, the contexts build a stack in parallel to the execution
193 // stack, with the top-most context being the current context. All contexts 196 // stack, with the top-most context being the current context. All contexts
194 // have the following slots: 197 // have the following slots:
195 // 198 //
196 // [ closure ] This is the current function. It is the same for all 199 // [ closure ] This is the current function. It is the same for all
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 NATIVE_OBJECT_NOTIFIER_PERFORM_CHANGE, 356 NATIVE_OBJECT_NOTIFIER_PERFORM_CHANGE,
354 SLOPPY_GENERATOR_FUNCTION_MAP_INDEX, 357 SLOPPY_GENERATOR_FUNCTION_MAP_INDEX,
355 STRICT_GENERATOR_FUNCTION_MAP_INDEX, 358 STRICT_GENERATOR_FUNCTION_MAP_INDEX,
356 GENERATOR_OBJECT_PROTOTYPE_MAP_INDEX, 359 GENERATOR_OBJECT_PROTOTYPE_MAP_INDEX,
357 ITERATOR_RESULT_MAP_INDEX, 360 ITERATOR_RESULT_MAP_INDEX,
358 MAP_ITERATOR_MAP_INDEX, 361 MAP_ITERATOR_MAP_INDEX,
359 SET_ITERATOR_MAP_INDEX, 362 SET_ITERATOR_MAP_INDEX,
360 ITERATOR_SYMBOL_INDEX, 363 ITERATOR_SYMBOL_INDEX,
361 UNSCOPABLES_SYMBOL_INDEX, 364 UNSCOPABLES_SYMBOL_INDEX,
362 ARRAY_VALUES_ITERATOR_INDEX, 365 ARRAY_VALUES_ITERATOR_INDEX,
366 DEFAULT_CONSTRUCTOR_INDEX,
367 DEFAULT_CONSTRUCTOR_NO_SUPER_INDEX,
363 368
364 // Properties from here are treated as weak references by the full GC. 369 // Properties from here are treated as weak references by the full GC.
365 // Scavenge treats them as strong references. 370 // Scavenge treats them as strong references.
366 OPTIMIZED_FUNCTIONS_LIST, // Weak. 371 OPTIMIZED_FUNCTIONS_LIST, // Weak.
367 OPTIMIZED_CODE_LIST, // Weak. 372 OPTIMIZED_CODE_LIST, // Weak.
368 DEOPTIMIZED_CODE_LIST, // Weak. 373 DEOPTIMIZED_CODE_LIST, // Weak.
369 MAP_CACHE_INDEX, // Weak. 374 MAP_CACHE_INDEX, // Weak.
370 NEXT_CONTEXT_LINK, // Weak. 375 NEXT_CONTEXT_LINK, // Weak.
371 376
372 // Total number of slots. 377 // Total number of slots.
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 static bool IsBootstrappingOrGlobalObject(Isolate* isolate, Object* object); 557 static bool IsBootstrappingOrGlobalObject(Isolate* isolate, Object* object);
553 #endif 558 #endif
554 559
555 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize); 560 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize);
556 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); 561 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex);
557 }; 562 };
558 563
559 } } // namespace v8::internal 564 } } // namespace v8::internal
560 565
561 #endif // V8_CONTEXTS_H_ 566 #endif // V8_CONTEXTS_H_
OLDNEW
« no previous file with comments | « src/bootstrapper.cc ('k') | src/full-codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698