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

Side by Side Diff: src/heap/heap.h

Issue 1318043002: Native context: do not put public symbols and flags on the js builtins object. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix and rebase Created 5 years, 3 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/heap-snapshot-generator.cc ('k') | src/heap/heap.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_HEAP_HEAP_H_ 5 #ifndef V8_HEAP_HEAP_H_
6 #define V8_HEAP_HEAP_H_ 6 #define V8_HEAP_HEAP_H_
7 7
8 #include <cmath> 8 #include <cmath>
9 #include <map> 9 #include <map>
10 10
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 V(nan_string, "NaN") \ 251 V(nan_string, "NaN") \
252 V(source_string, "source") \ 252 V(source_string, "source") \
253 V(source_url_string, "source_url") \ 253 V(source_url_string, "source_url") \
254 V(source_mapping_url_string, "source_mapping_url") \ 254 V(source_mapping_url_string, "source_mapping_url") \
255 V(this_string, "this") \ 255 V(this_string, "this") \
256 V(global_string, "global") \ 256 V(global_string, "global") \
257 V(ignore_case_string, "ignoreCase") \ 257 V(ignore_case_string, "ignoreCase") \
258 V(multiline_string, "multiline") \ 258 V(multiline_string, "multiline") \
259 V(sticky_string, "sticky") \ 259 V(sticky_string, "sticky") \
260 V(unicode_string, "unicode") \ 260 V(unicode_string, "unicode") \
261 V(harmony_regexps_string, "harmony_regexps") \
262 V(harmony_tostring_string, "harmony_tostring") \
263 V(harmony_unicode_regexps_string, "harmony_unicode_regexps") \
264 V(input_string, "input") \ 261 V(input_string, "input") \
265 V(index_string, "index") \ 262 V(index_string, "index") \
266 V(last_index_string, "lastIndex") \ 263 V(last_index_string, "lastIndex") \
267 V(object_string, "object") \ 264 V(object_string, "object") \
268 V(prototype_string, "prototype") \ 265 V(prototype_string, "prototype") \
269 V(string_string, "string") \ 266 V(string_string, "string") \
270 V(String_string, "String") \ 267 V(String_string, "String") \
271 V(symbol_string, "symbol") \ 268 V(symbol_string, "symbol") \
272 V(Symbol_string, "Symbol") \ 269 V(Symbol_string, "Symbol") \
273 V(Map_string, "Map") \ 270 V(Map_string, "Map") \
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 V(promise_on_reject_symbol) \ 338 V(promise_on_reject_symbol) \
342 V(promise_raw_symbol) \ 339 V(promise_raw_symbol) \
343 V(promise_status_symbol) \ 340 V(promise_status_symbol) \
344 V(promise_value_symbol) \ 341 V(promise_value_symbol) \
345 V(sealed_symbol) \ 342 V(sealed_symbol) \
346 V(stack_trace_symbol) \ 343 V(stack_trace_symbol) \
347 V(string_iterator_iterated_string_symbol) \ 344 V(string_iterator_iterated_string_symbol) \
348 V(string_iterator_next_index_symbol) \ 345 V(string_iterator_next_index_symbol) \
349 V(uninitialized_symbol) 346 V(uninitialized_symbol)
350 347
351 348 #define PUBLIC_SYMBOL_LIST(V) \
352 #define PUBLIC_SYMBOL_LIST(V) \ 349 V(has_instance_symbol, Symbol.hasInstance) \
353 V(has_instance_symbol, symbolHasInstance, Symbol.hasInstance) \ 350 V(is_concat_spreadable_symbol, Symbol.isConcatSpreadable) \
354 V(is_concat_spreadable_symbol, symbolIsConcatSpreadable, \ 351 V(is_regexp_symbol, Symbol.isRegExp) \
355 Symbol.isConcatSpreadable) \ 352 V(iterator_symbol, Symbol.iterator) \
356 V(is_regexp_symbol, symbolIsRegExp, Symbol.isRegExp) \ 353 V(to_primitive_symbol, Symbol.toPrimitive) \
357 V(iterator_symbol, symbolIterator, Symbol.iterator) \ 354 V(to_string_tag_symbol, Symbol.toStringTag) \
358 V(to_primitive_symbol, symbolToPrimitive, Symbol.toPrimitive) \ 355 V(unscopables_symbol, Symbol.unscopables)
359 V(to_string_tag_symbol, symbolToStringTag, Symbol.toStringTag) \
360 V(unscopables_symbol, symbolUnscopables, Symbol.unscopables)
361 356
362 // Heap roots that are known to be immortal immovable, for which we can safely 357 // Heap roots that are known to be immortal immovable, for which we can safely
363 // skip write barriers. This list is not complete and has omissions. 358 // skip write barriers. This list is not complete and has omissions.
364 #define IMMORTAL_IMMOVABLE_ROOT_LIST(V) \ 359 #define IMMORTAL_IMMOVABLE_ROOT_LIST(V) \
365 V(ByteArrayMap) \ 360 V(ByteArrayMap) \
366 V(BytecodeArrayMap) \ 361 V(BytecodeArrayMap) \
367 V(FreeSpaceMap) \ 362 V(FreeSpaceMap) \
368 V(OnePointerFillerMap) \ 363 V(OnePointerFillerMap) \
369 V(TwoPointerFillerMap) \ 364 V(TwoPointerFillerMap) \
370 V(UndefinedValue) \ 365 V(UndefinedValue) \
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 #undef ROOT_INDEX_DECLARATION 551 #undef ROOT_INDEX_DECLARATION
557 552
558 #define STRING_INDEX_DECLARATION(name, str) k##name##RootIndex, 553 #define STRING_INDEX_DECLARATION(name, str) k##name##RootIndex,
559 INTERNALIZED_STRING_LIST(STRING_INDEX_DECLARATION) 554 INTERNALIZED_STRING_LIST(STRING_INDEX_DECLARATION)
560 #undef STRING_DECLARATION 555 #undef STRING_DECLARATION
561 556
562 #define SYMBOL_INDEX_DECLARATION(name) k##name##RootIndex, 557 #define SYMBOL_INDEX_DECLARATION(name) k##name##RootIndex,
563 PRIVATE_SYMBOL_LIST(SYMBOL_INDEX_DECLARATION) 558 PRIVATE_SYMBOL_LIST(SYMBOL_INDEX_DECLARATION)
564 #undef SYMBOL_INDEX_DECLARATION 559 #undef SYMBOL_INDEX_DECLARATION
565 560
566 #define SYMBOL_INDEX_DECLARATION(name, varname, description) k##name##RootIndex, 561 #define SYMBOL_INDEX_DECLARATION(name, description) k##name##RootIndex,
567 PUBLIC_SYMBOL_LIST(SYMBOL_INDEX_DECLARATION) 562 PUBLIC_SYMBOL_LIST(SYMBOL_INDEX_DECLARATION)
568 #undef SYMBOL_INDEX_DECLARATION 563 #undef SYMBOL_INDEX_DECLARATION
569 564
570 // Utility type maps 565 // Utility type maps
571 #define DECLARE_STRUCT_MAP(NAME, Name, name) k##Name##MapRootIndex, 566 #define DECLARE_STRUCT_MAP(NAME, Name, name) k##Name##MapRootIndex,
572 STRUCT_LIST(DECLARE_STRUCT_MAP) 567 STRUCT_LIST(DECLARE_STRUCT_MAP)
573 #undef DECLARE_STRUCT_MAP 568 #undef DECLARE_STRUCT_MAP
574 kStringTableRootIndex, 569 kStringTableRootIndex,
575 570
576 #define ROOT_INDEX_DECLARATION(type, name, camel_name) k##camel_name##RootIndex, 571 #define ROOT_INDEX_DECLARATION(type, name, camel_name) k##camel_name##RootIndex,
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after
1191 #undef STRUCT_MAP_ACCESSOR 1186 #undef STRUCT_MAP_ACCESSOR
1192 1187
1193 #define STRING_ACCESSOR(name, str) inline String* name(); 1188 #define STRING_ACCESSOR(name, str) inline String* name();
1194 INTERNALIZED_STRING_LIST(STRING_ACCESSOR) 1189 INTERNALIZED_STRING_LIST(STRING_ACCESSOR)
1195 #undef STRING_ACCESSOR 1190 #undef STRING_ACCESSOR
1196 1191
1197 #define SYMBOL_ACCESSOR(name) inline Symbol* name(); 1192 #define SYMBOL_ACCESSOR(name) inline Symbol* name();
1198 PRIVATE_SYMBOL_LIST(SYMBOL_ACCESSOR) 1193 PRIVATE_SYMBOL_LIST(SYMBOL_ACCESSOR)
1199 #undef SYMBOL_ACCESSOR 1194 #undef SYMBOL_ACCESSOR
1200 1195
1201 #define SYMBOL_ACCESSOR(name, varname, description) inline Symbol* name(); 1196 #define SYMBOL_ACCESSOR(name, description) inline Symbol* name();
1202 PUBLIC_SYMBOL_LIST(SYMBOL_ACCESSOR) 1197 PUBLIC_SYMBOL_LIST(SYMBOL_ACCESSOR)
1203 #undef SYMBOL_ACCESSOR 1198 #undef SYMBOL_ACCESSOR
1204 1199
1205 Object* root(RootListIndex index) { return roots_[index]; } 1200 Object* root(RootListIndex index) { return roots_[index]; }
1206 Handle<Object> root_handle(RootListIndex index) { 1201 Handle<Object> root_handle(RootListIndex index) {
1207 return Handle<Object>(&roots_[index]); 1202 return Handle<Object>(&roots_[index]);
1208 } 1203 }
1209 1204
1210 // Generated code can embed this address to get access to the roots. 1205 // Generated code can embed this address to get access to the roots.
1211 Object** roots_array_start() { return roots_; } 1206 Object** roots_array_start() { return roots_; }
(...skipping 1587 matching lines...) Expand 10 before | Expand all | Expand 10 after
2799 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. 2794 DisallowHeapAllocation no_allocation; // i.e. no gc allowed.
2800 2795
2801 private: 2796 private:
2802 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 2797 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
2803 }; 2798 };
2804 #endif // DEBUG 2799 #endif // DEBUG
2805 } 2800 }
2806 } // namespace v8::internal 2801 } // namespace v8::internal
2807 2802
2808 #endif // V8_HEAP_HEAP_H_ 2803 #endif // V8_HEAP_HEAP_H_
OLDNEW
« no previous file with comments | « src/heap-snapshot-generator.cc ('k') | src/heap/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698