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

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

Issue 2435023002: Use a different map to distinguish eval contexts (Closed)
Patch Set: Changes based on review commnets Created 4 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
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/heap/heap.h" 5 #include "src/heap/heap.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api.h" 8 #include "src/api.h"
9 #include "src/ast/context-slot-cache.h" 9 #include "src/ast/context-slot-cache.h"
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 2319 matching lines...) Expand 10 before | Expand all | Expand 10 after
2330 ALLOCATE_VARSIZE_MAP(FIXED_ARRAY_TYPE, hash_table) 2330 ALLOCATE_VARSIZE_MAP(FIXED_ARRAY_TYPE, hash_table)
2331 ALLOCATE_VARSIZE_MAP(FIXED_ARRAY_TYPE, ordered_hash_table) 2331 ALLOCATE_VARSIZE_MAP(FIXED_ARRAY_TYPE, ordered_hash_table)
2332 ALLOCATE_VARSIZE_MAP(FIXED_ARRAY_TYPE, unseeded_number_dictionary) 2332 ALLOCATE_VARSIZE_MAP(FIXED_ARRAY_TYPE, unseeded_number_dictionary)
2333 2333
2334 ALLOCATE_VARSIZE_MAP(FIXED_ARRAY_TYPE, function_context) 2334 ALLOCATE_VARSIZE_MAP(FIXED_ARRAY_TYPE, function_context)
2335 ALLOCATE_VARSIZE_MAP(FIXED_ARRAY_TYPE, catch_context) 2335 ALLOCATE_VARSIZE_MAP(FIXED_ARRAY_TYPE, catch_context)
2336 ALLOCATE_VARSIZE_MAP(FIXED_ARRAY_TYPE, with_context) 2336 ALLOCATE_VARSIZE_MAP(FIXED_ARRAY_TYPE, with_context)
2337 ALLOCATE_VARSIZE_MAP(FIXED_ARRAY_TYPE, debug_evaluate_context) 2337 ALLOCATE_VARSIZE_MAP(FIXED_ARRAY_TYPE, debug_evaluate_context)
2338 ALLOCATE_VARSIZE_MAP(FIXED_ARRAY_TYPE, block_context) 2338 ALLOCATE_VARSIZE_MAP(FIXED_ARRAY_TYPE, block_context)
2339 ALLOCATE_VARSIZE_MAP(FIXED_ARRAY_TYPE, module_context) 2339 ALLOCATE_VARSIZE_MAP(FIXED_ARRAY_TYPE, module_context)
2340 ALLOCATE_VARSIZE_MAP(FIXED_ARRAY_TYPE, eval_context)
2340 ALLOCATE_VARSIZE_MAP(FIXED_ARRAY_TYPE, script_context) 2341 ALLOCATE_VARSIZE_MAP(FIXED_ARRAY_TYPE, script_context)
2341 ALLOCATE_VARSIZE_MAP(FIXED_ARRAY_TYPE, script_context_table) 2342 ALLOCATE_VARSIZE_MAP(FIXED_ARRAY_TYPE, script_context_table)
2342 2343
2343 ALLOCATE_VARSIZE_MAP(FIXED_ARRAY_TYPE, native_context) 2344 ALLOCATE_VARSIZE_MAP(FIXED_ARRAY_TYPE, native_context)
2344 native_context_map()->set_dictionary_map(true); 2345 native_context_map()->set_dictionary_map(true);
2345 native_context_map()->set_visitor_id( 2346 native_context_map()->set_visitor_id(
2346 StaticVisitorBase::kVisitNativeContext); 2347 StaticVisitorBase::kVisitNativeContext);
2347 2348
2348 ALLOCATE_MAP(SHARED_FUNCTION_INFO_TYPE, SharedFunctionInfo::kAlignedSize, 2349 ALLOCATE_MAP(SHARED_FUNCTION_INFO_TYPE, SharedFunctionInfo::kAlignedSize,
2349 shared_function_info) 2350 shared_function_info)
(...skipping 4142 matching lines...) Expand 10 before | Expand all | Expand 10 after
6492 } 6493 }
6493 6494
6494 6495
6495 // static 6496 // static
6496 int Heap::GetStaticVisitorIdForMap(Map* map) { 6497 int Heap::GetStaticVisitorIdForMap(Map* map) {
6497 return StaticVisitorBase::GetVisitorId(map); 6498 return StaticVisitorBase::GetVisitorId(map);
6498 } 6499 }
6499 6500
6500 } // namespace internal 6501 } // namespace internal
6501 } // namespace v8 6502 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698