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

Side by Side Diff: src/isolate.cc

Issue 2807031: [Isolates] RegExpStack and memory allocation limits (statics #6) (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: -> is different than . Created 10 years, 5 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/platform-linux.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 2006-2010 the V8 project authors. All rights reserved. 1 // Copyright 2006-2010 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 19 matching lines...) Expand all
30 #include "v8.h" 30 #include "v8.h"
31 31
32 #include "ast.h" 32 #include "ast.h"
33 #include "bootstrapper.h" 33 #include "bootstrapper.h"
34 #include "codegen.h" 34 #include "codegen.h"
35 #include "compilation-cache.h" 35 #include "compilation-cache.h"
36 #include "debug.h" 36 #include "debug.h"
37 #include "heap-profiler.h" 37 #include "heap-profiler.h"
38 #include "isolate.h" 38 #include "isolate.h"
39 #include "log.h" 39 #include "log.h"
40 #include "regexp-stack.h"
40 #include "serialize.h" 41 #include "serialize.h"
41 #include "scanner.h" 42 #include "scanner.h"
42 #include "scopeinfo.h" 43 #include "scopeinfo.h"
43 #include "simulator.h" 44 #include "simulator.h"
44 #include "stub-cache.h" 45 #include "stub-cache.h"
45 #include "spaces.h" 46 #include "spaces.h"
46 #include "oprofile-agent.h" 47 #include "oprofile-agent.h"
47 #include "version.h" 48 #include "version.h"
48 49
49 namespace v8 { 50 namespace v8 {
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 handle_scope_implementer_(NULL), 247 handle_scope_implementer_(NULL),
247 scanner_character_classes_(NULL), 248 scanner_character_classes_(NULL),
248 in_use_list_(0), 249 in_use_list_(0),
249 free_list_(0), 250 free_list_(0),
250 preallocated_storage_preallocated_(false), 251 preallocated_storage_preallocated_(false),
251 write_input_buffer_(NULL), 252 write_input_buffer_(NULL),
252 global_handles_(NULL), 253 global_handles_(NULL),
253 context_switcher_(NULL), 254 context_switcher_(NULL),
254 thread_manager_(NULL), 255 thread_manager_(NULL),
255 ast_sentinels_(NULL), 256 ast_sentinels_(NULL),
257 inline_runtime_functions_table_(NULL),
256 string_tracker_(NULL), 258 string_tracker_(NULL),
259 regexp_stack_(NULL),
257 frame_element_constant_list_(0), 260 frame_element_constant_list_(0),
258 result_constant_list_(0) { 261 result_constant_list_(0) {
259 memset(isolate_addresses_, 0, 262 memset(isolate_addresses_, 0,
260 sizeof(isolate_addresses_[0]) * (k_isolate_address_count + 1)); 263 sizeof(isolate_addresses_[0]) * (k_isolate_address_count + 1));
261 264
262 heap_.isolate_ = this; 265 heap_.isolate_ = this;
263 zone_.isolate_ = this; 266 zone_.isolate_ = this;
264 stack_guard_.isolate_ = this; 267 stack_guard_.isolate_ = this;
265 268
266 #ifdef DEBUG 269 #ifdef DEBUG
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 } 332 }
330 333
331 #ifdef ENABLE_LOGGING_AND_PROFILING 334 #ifdef ENABLE_LOGGING_AND_PROFILING
332 delete producer_heap_profile_; 335 delete producer_heap_profile_;
333 producer_heap_profile_ = NULL; 336 producer_heap_profile_ = NULL;
334 #endif 337 #endif
335 338
336 delete scanner_character_classes_; 339 delete scanner_character_classes_;
337 scanner_character_classes_ = NULL; 340 scanner_character_classes_ = NULL;
338 341
342 delete regexp_stack_;
343 regexp_stack_ = NULL;
344
339 delete inline_runtime_functions_table_; 345 delete inline_runtime_functions_table_;
340 inline_runtime_functions_table_ = NULL; 346 inline_runtime_functions_table_ = NULL;
341 347
342 delete ast_sentinels_; 348 delete ast_sentinels_;
343 ast_sentinels_ = NULL; 349 ast_sentinels_ = NULL;
344 350
345 delete descriptor_lookup_cache_; 351 delete descriptor_lookup_cache_;
346 descriptor_lookup_cache_ = NULL; 352 descriptor_lookup_cache_ = NULL;
347 delete context_slot_cache_; 353 delete context_slot_cache_;
348 context_slot_cache_ = NULL; 354 context_slot_cache_ = NULL;
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 descriptor_lookup_cache_ = new DescriptorLookupCache(); 447 descriptor_lookup_cache_ = new DescriptorLookupCache();
442 scanner_character_classes_ = new ScannerCharacterClasses(); 448 scanner_character_classes_ = new ScannerCharacterClasses();
443 write_input_buffer_ = new StringInputBuffer(); 449 write_input_buffer_ = new StringInputBuffer();
444 global_handles_ = new GlobalHandles(); 450 global_handles_ = new GlobalHandles();
445 bootstrapper_ = new Bootstrapper(); 451 bootstrapper_ = new Bootstrapper();
446 cpu_features_ = new CpuFeatures(); 452 cpu_features_ = new CpuFeatures();
447 handle_scope_implementer_ = new HandleScopeImplementer(); 453 handle_scope_implementer_ = new HandleScopeImplementer();
448 stub_cache_ = new StubCache(); 454 stub_cache_ = new StubCache();
449 ast_sentinels_ = new AstSentinels(); 455 ast_sentinels_ = new AstSentinels();
450 inline_runtime_functions_table_ = new InlineRuntimeFunctionsTable(); 456 inline_runtime_functions_table_ = new InlineRuntimeFunctionsTable();
457 regexp_stack_ = new RegExpStack();
458 regexp_stack_->isolate_ = this;
451 459
452 #ifdef ENABLE_DEBUGGER_SUPPORT 460 #ifdef ENABLE_DEBUGGER_SUPPORT
453 debugger_ = new Debugger(); 461 debugger_ = new Debugger();
454 debugger_->isolate_ = this; 462 debugger_->isolate_ = this;
455 #endif 463 #endif
456 464
457 #ifdef ENABLE_LOGGING_AND_PROFILING 465 #ifdef ENABLE_LOGGING_AND_PROFILING
458 producer_heap_profile_ = new ProducerHeapProfile(); 466 producer_heap_profile_ = new ProducerHeapProfile();
459 producer_heap_profile_->isolate_ = this; 467 producer_heap_profile_->isolate_ = this;
460 #endif 468 #endif
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 LOG(LogCodeObjects()); 572 LOG(LogCodeObjects());
565 LOG(LogCompiledFunctions()); 573 LOG(LogCompiledFunctions());
566 } 574 }
567 575
568 state_ = INITIALIZED; 576 state_ = INITIALIZED;
569 return true; 577 return true;
570 } 578 }
571 579
572 580
573 } } // namespace v8::internal 581 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/isolate.h ('k') | src/platform-linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698