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

Side by Side Diff: src/isolate.cc

Issue 214883002: Two-threaded parser (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: . Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « src/isolate.h ('k') | src/parser.h » ('j') | src/parser-thread.cc » ('J')
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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 24 matching lines...) Expand all
35 #include "compilation-cache.h" 35 #include "compilation-cache.h"
36 #include "cpu-profiler.h" 36 #include "cpu-profiler.h"
37 #include "debug.h" 37 #include "debug.h"
38 #include "deoptimizer.h" 38 #include "deoptimizer.h"
39 #include "heap-profiler.h" 39 #include "heap-profiler.h"
40 #include "hydrogen.h" 40 #include "hydrogen.h"
41 #include "isolate-inl.h" 41 #include "isolate-inl.h"
42 #include "lithium-allocator.h" 42 #include "lithium-allocator.h"
43 #include "log.h" 43 #include "log.h"
44 #include "messages.h" 44 #include "messages.h"
45 #include "parser-thread.h"
45 #include "platform.h" 46 #include "platform.h"
46 #include "regexp-stack.h" 47 #include "regexp-stack.h"
47 #include "runtime-profiler.h" 48 #include "runtime-profiler.h"
48 #include "sampler.h" 49 #include "sampler.h"
49 #include "scopeinfo.h" 50 #include "scopeinfo.h"
50 #include "serialize.h" 51 #include "serialize.h"
51 #include "simulator.h" 52 #include "simulator.h"
52 #include "spaces.h" 53 #include "spaces.h"
53 #include "stub-cache.h" 54 #include "stub-cache.h"
54 #include "sweeper-thread.h" 55 #include "sweeper-thread.h"
(...skipping 1425 matching lines...) Expand 10 before | Expand all | Expand 10 after
1480 // be fixed once the default isolate cleanup is done. 1481 // be fixed once the default isolate cleanup is done.
1481 random_number_generator_(NULL), 1482 random_number_generator_(NULL),
1482 has_fatal_error_(false), 1483 has_fatal_error_(false),
1483 use_crankshaft_(true), 1484 use_crankshaft_(true),
1484 initialized_from_snapshot_(false), 1485 initialized_from_snapshot_(false),
1485 cpu_profiler_(NULL), 1486 cpu_profiler_(NULL),
1486 heap_profiler_(NULL), 1487 heap_profiler_(NULL),
1487 function_entry_hook_(NULL), 1488 function_entry_hook_(NULL),
1488 deferred_handles_head_(NULL), 1489 deferred_handles_head_(NULL),
1489 optimizing_compiler_thread_(NULL), 1490 optimizing_compiler_thread_(NULL),
1491 fast_parser_thread_(NULL),
1490 sweeper_thread_(NULL), 1492 sweeper_thread_(NULL),
1491 num_sweeper_threads_(0), 1493 num_sweeper_threads_(0),
1492 stress_deopt_count_(0), 1494 stress_deopt_count_(0),
1493 next_optimization_id_(0) { 1495 next_optimization_id_(0) {
1494 id_ = NoBarrier_AtomicIncrement(&isolate_counter_, 1); 1496 id_ = NoBarrier_AtomicIncrement(&isolate_counter_, 1);
1495 TRACE_ISOLATE(constructor); 1497 TRACE_ISOLATE(constructor);
1496 1498
1497 memset(isolate_addresses_, 0, 1499 memset(isolate_addresses_, 0,
1498 sizeof(isolate_addresses_[0]) * (kIsolateAddressCount + 1)); 1500 sizeof(isolate_addresses_[0]) * (kIsolateAddressCount + 1));
1499 1501
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
1572 #ifdef ENABLE_DEBUGGER_SUPPORT 1574 #ifdef ENABLE_DEBUGGER_SUPPORT
1573 debugger()->UnloadDebugger(); 1575 debugger()->UnloadDebugger();
1574 #endif 1576 #endif
1575 1577
1576 if (concurrent_recompilation_enabled()) { 1578 if (concurrent_recompilation_enabled()) {
1577 optimizing_compiler_thread_->Stop(); 1579 optimizing_compiler_thread_->Stop();
1578 delete optimizing_compiler_thread_; 1580 delete optimizing_compiler_thread_;
1579 optimizing_compiler_thread_ = NULL; 1581 optimizing_compiler_thread_ = NULL;
1580 } 1582 }
1581 1583
1584 if (fast_parser_thread_) {
1585 fast_parser_thread_->Stop();
1586 delete fast_parser_thread_;
1587 fast_parser_thread_ = NULL;
1588 }
1589
1582 for (int i = 0; i < num_sweeper_threads_; i++) { 1590 for (int i = 0; i < num_sweeper_threads_; i++) {
1583 sweeper_thread_[i]->Stop(); 1591 sweeper_thread_[i]->Stop();
1584 delete sweeper_thread_[i]; 1592 delete sweeper_thread_[i];
1585 sweeper_thread_[i] = NULL; 1593 sweeper_thread_[i] = NULL;
1586 } 1594 }
1587 delete[] sweeper_thread_; 1595 delete[] sweeper_thread_;
1588 sweeper_thread_ = NULL; 1596 sweeper_thread_ = NULL;
1589 1597
1590 if (FLAG_job_based_sweeping && 1598 if (FLAG_job_based_sweeping &&
1591 heap_.mark_compact_collector()->IsConcurrentSweepingInProgress()) { 1599 heap_.mark_compact_collector()->IsConcurrentSweepingInProgress()) {
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
1943 } 1951 }
1944 1952
1945 if (num_sweeper_threads_ > 0) { 1953 if (num_sweeper_threads_ > 0) {
1946 sweeper_thread_ = new SweeperThread*[num_sweeper_threads_]; 1954 sweeper_thread_ = new SweeperThread*[num_sweeper_threads_];
1947 for (int i = 0; i < num_sweeper_threads_; i++) { 1955 for (int i = 0; i < num_sweeper_threads_; i++) {
1948 sweeper_thread_[i] = new SweeperThread(this); 1956 sweeper_thread_[i] = new SweeperThread(this);
1949 sweeper_thread_[i]->Start(); 1957 sweeper_thread_[i]->Start();
1950 } 1958 }
1951 } 1959 }
1952 1960
1961 if (FLAG_parallel_parse) {
1962 fast_parser_thread_ = new FastParserThread();
1963 fast_parser_thread_->Start();
1964 }
1965
1953 #ifdef ENABLE_DEBUGGER_SUPPORT 1966 #ifdef ENABLE_DEBUGGER_SUPPORT
1954 debug_->SetUp(create_heap_objects); 1967 debug_->SetUp(create_heap_objects);
1955 #endif 1968 #endif
1956 1969
1957 // If we are deserializing, read the state into the now-empty heap. 1970 // If we are deserializing, read the state into the now-empty heap.
1958 if (!create_heap_objects) { 1971 if (!create_heap_objects) {
1959 des->Deserialize(this); 1972 des->Deserialize(this);
1960 } 1973 }
1961 stub_cache_->Initialize(); 1974 stub_cache_->Initialize();
1962 1975
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
2250 Handle<JSObject> obj = factory()->NewJSObjectFromMap(map); 2263 Handle<JSObject> obj = factory()->NewJSObjectFromMap(map);
2251 JSObject::NormalizeProperties(obj, KEEP_INOBJECT_PROPERTIES, 8); 2264 JSObject::NormalizeProperties(obj, KEEP_INOBJECT_PROPERTIES, 8);
2252 JSObject::SetProperty(registry, name, obj, NONE, STRICT).Assert(); 2265 JSObject::SetProperty(registry, name, obj, NONE, STRICT).Assert();
2253 } 2266 }
2254 } 2267 }
2255 return Handle<JSObject>::cast(factory()->symbol_registry()); 2268 return Handle<JSObject>::cast(factory()->symbol_registry());
2256 } 2269 }
2257 2270
2258 2271
2259 } } // namespace v8::internal 2272 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/isolate.h ('k') | src/parser.h » ('j') | src/parser-thread.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698