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

Side by Side Diff: src/isolate.cc

Issue 2630343002: [Parser] Introduce AstStringConstants to share constants across AstValueFactory (Closed)
Patch Set: Fix test Created 3 years, 11 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.h ('k') | src/parsing/parser.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 #include "src/isolate.h" 5 #include "src/isolate.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include <fstream> // NOLINT(readability/streams) 9 #include <fstream> // NOLINT(readability/streams)
10 #include <sstream> 10 #include <sstream>
11 11
12 #include "src/ast/ast-value-factory.h"
12 #include "src/ast/context-slot-cache.h" 13 #include "src/ast/context-slot-cache.h"
13 #include "src/base/hashmap.h" 14 #include "src/base/hashmap.h"
14 #include "src/base/platform/platform.h" 15 #include "src/base/platform/platform.h"
15 #include "src/base/sys-info.h" 16 #include "src/base/sys-info.h"
16 #include "src/base/utils/random-number-generator.h" 17 #include "src/base/utils/random-number-generator.h"
17 #include "src/basic-block-profiler.h" 18 #include "src/basic-block-profiler.h"
18 #include "src/bootstrapper.h" 19 #include "src/bootstrapper.h"
19 #include "src/cancelable-task.h" 20 #include "src/cancelable-task.h"
20 #include "src/codegen.h" 21 #include "src/codegen.h"
21 #include "src/compilation-cache.h" 22 #include "src/compilation-cache.h"
(...skipping 2346 matching lines...) Expand 10 before | Expand all | Expand 10 after
2368 compiler_dispatcher_ = nullptr; 2369 compiler_dispatcher_ = nullptr;
2369 2370
2370 cancelable_task_manager()->CancelAndWait(); 2371 cancelable_task_manager()->CancelAndWait();
2371 2372
2372 heap_.TearDown(); 2373 heap_.TearDown();
2373 logger_->TearDown(); 2374 logger_->TearDown();
2374 2375
2375 delete interpreter_; 2376 delete interpreter_;
2376 interpreter_ = NULL; 2377 interpreter_ = NULL;
2377 2378
2379 delete ast_string_constants_;
2380 ast_string_constants_ = nullptr;
2381
2378 delete cpu_profiler_; 2382 delete cpu_profiler_;
2379 cpu_profiler_ = NULL; 2383 cpu_profiler_ = NULL;
2380 2384
2381 code_event_dispatcher_.reset(); 2385 code_event_dispatcher_.reset();
2382 2386
2383 delete root_index_map_; 2387 delete root_index_map_;
2384 root_index_map_ = NULL; 2388 root_index_map_ = NULL;
2385 2389
2386 ClearSerializerData(); 2390 ClearSerializerData();
2387 } 2391 }
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
2691 Internals::kIsolateEmbedderDataOffset); 2695 Internals::kIsolateEmbedderDataOffset);
2692 CHECK_EQ(static_cast<int>(OFFSET_OF(Isolate, heap_.roots_)), 2696 CHECK_EQ(static_cast<int>(OFFSET_OF(Isolate, heap_.roots_)),
2693 Internals::kIsolateRootsOffset); 2697 Internals::kIsolateRootsOffset);
2694 CHECK_EQ(static_cast<int>(OFFSET_OF(Isolate, heap_.external_memory_)), 2698 CHECK_EQ(static_cast<int>(OFFSET_OF(Isolate, heap_.external_memory_)),
2695 Internals::kExternalMemoryOffset); 2699 Internals::kExternalMemoryOffset);
2696 CHECK_EQ(static_cast<int>(OFFSET_OF(Isolate, heap_.external_memory_limit_)), 2700 CHECK_EQ(static_cast<int>(OFFSET_OF(Isolate, heap_.external_memory_limit_)),
2697 Internals::kExternalMemoryLimitOffset); 2701 Internals::kExternalMemoryLimitOffset);
2698 2702
2699 time_millis_at_init_ = heap_.MonotonicallyIncreasingTimeInMs(); 2703 time_millis_at_init_ = heap_.MonotonicallyIncreasingTimeInMs();
2700 2704
2705 {
2706 HandleScope scope(this);
2707 ast_string_constants_ = new AstStringConstants(this, heap()->HashSeed());
2708 }
2709
2701 if (!create_heap_objects) { 2710 if (!create_heap_objects) {
2702 // Now that the heap is consistent, it's OK to generate the code for the 2711 // Now that the heap is consistent, it's OK to generate the code for the
2703 // deopt entry table that might have been referred to by optimized code in 2712 // deopt entry table that might have been referred to by optimized code in
2704 // the snapshot. 2713 // the snapshot.
2705 HandleScope scope(this); 2714 HandleScope scope(this);
2706 Deoptimizer::EnsureCodeForDeoptimizationEntry( 2715 Deoptimizer::EnsureCodeForDeoptimizationEntry(
2707 this, Deoptimizer::LAZY, 2716 this, Deoptimizer::LAZY,
2708 ExternalReferenceTable::kDeoptTableSerializeEntryCount - 1); 2717 ExternalReferenceTable::kDeoptTableSerializeEntryCount - 1);
2709 } 2718 }
2710 2719
(...skipping 940 matching lines...) Expand 10 before | Expand all | Expand 10 after
3651 // Then check whether this scope intercepts. 3660 // Then check whether this scope intercepts.
3652 if ((flag & intercept_mask_)) { 3661 if ((flag & intercept_mask_)) {
3653 intercepted_flags_ |= flag; 3662 intercepted_flags_ |= flag;
3654 return true; 3663 return true;
3655 } 3664 }
3656 return false; 3665 return false;
3657 } 3666 }
3658 3667
3659 } // namespace internal 3668 } // namespace internal
3660 } // namespace v8 3669 } // namespace v8
OLDNEW
« no previous file with comments | « src/isolate.h ('k') | src/parsing/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698