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

Side by Side Diff: src/compilation-cache.cc

Issue 149290: Add ENABLE_DEBUGGER_SUPPPORT around 4 functions, set complation cache generat... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 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 | « no previous file | src/objects-debug.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 2008 the V8 project authors. All rights reserved. 1 // Copyright 2008 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 "compilation-cache.h" 30 #include "compilation-cache.h"
31 31
32 namespace v8 { 32 namespace v8 {
33 namespace internal { 33 namespace internal {
34 34
35 35
36 // The number of sub caches covering the different types to cache. 36 // The number of sub caches covering the different types to cache.
37 static const int kSubCacheCount = 4; 37 static const int kSubCacheCount = 4;
38 38
39 // The number of generations for each sub cache. 39 // The number of generations for each sub cache.
40 #if V8_TARGET_ARCH_ARM
41 static const int kScriptGenerations = 1;
42 static const int kEvalGlobalGenerations = 1;
43 static const int kEvalContextualGenerations = 1;
44 static const int kRegExpGenerations = 1;
45 #else
40 static const int kScriptGenerations = 5; 46 static const int kScriptGenerations = 5;
41 static const int kEvalGlobalGenerations = 2; 47 static const int kEvalGlobalGenerations = 2;
42 static const int kEvalContextualGenerations = 2; 48 static const int kEvalContextualGenerations = 2;
43 static const int kRegExpGenerations = 2; 49 static const int kRegExpGenerations = 2;
50 #endif
44 51
45 // Initial of each compilation cache table allocated. 52 // Initial of each compilation cache table allocated.
46 static const int kInitialCacheSize = 64; 53 static const int kInitialCacheSize = 64;
47 54
48 // The compilation cache consists of several generational sub-caches which uses 55 // The compilation cache consists of several generational sub-caches which uses
49 // this class as a base class. A sub-cache contains a compilation cache tables 56 // this class as a base class. A sub-cache contains a compilation cache tables
50 // for each generation of the sub-cache. As the same source code string has 57 // for each generation of the sub-cache. As the same source code string has
51 // different compiled code for scripts and evals. Internally, we use separate 58 // different compiled code for scripts and evals. Internally, we use separate
52 // sub-caches to avoid getting the wrong kind of result when looking up. 59 // sub-caches to avoid getting the wrong kind of result when looking up.
53 class CompilationSubCache { 60 class CompilationSubCache {
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 } 477 }
471 478
472 479
473 void CompilationCache::Disable() { 480 void CompilationCache::Disable() {
474 enabled = false; 481 enabled = false;
475 Clear(); 482 Clear();
476 } 483 }
477 484
478 485
479 } } // namespace v8::internal 486 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/objects-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698