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

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

Issue 177683002: Mode clean-up pt 1: rename classic/non-strict mode to sloppy mode (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 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/codegen.cc ('k') | src/compiler.h » ('j') | src/globals.h » ('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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 DISALLOW_IMPLICIT_CONSTRUCTORS(CompilationCacheScript); 129 DISALLOW_IMPLICIT_CONSTRUCTORS(CompilationCacheScript);
130 }; 130 };
131 131
132 132
133 // Sub-cache for eval scripts. Two caches for eval are used. One for eval calls 133 // Sub-cache for eval scripts. Two caches for eval are used. One for eval calls
134 // in native contexts and one for eval calls in other contexts. The cache 134 // in native contexts and one for eval calls in other contexts. The cache
135 // considers the following pieces of information when checking for matching 135 // considers the following pieces of information when checking for matching
136 // entries: 136 // entries:
137 // 1. The source string. 137 // 1. The source string.
138 // 2. The shared function info of the calling function. 138 // 2. The shared function info of the calling function.
139 // 3. Whether the source should be compiled as strict code or as non-strict 139 // 3. Whether the source should be compiled as strict code or as sloppy code.
140 // code.
141 // Note: Currently there are clients of CompileEval that always compile 140 // Note: Currently there are clients of CompileEval that always compile
142 // non-strict code even if the calling function is a strict mode function. 141 // sloppy code even if the calling function is a strict mode function.
143 // More specifically these are the CompileString, DebugEvaluate and 142 // More specifically these are the CompileString, DebugEvaluate and
144 // DebugEvaluateGlobal runtime functions. 143 // DebugEvaluateGlobal runtime functions.
145 // 4. The start position of the calling scope. 144 // 4. The start position of the calling scope.
146 class CompilationCacheEval: public CompilationSubCache { 145 class CompilationCacheEval: public CompilationSubCache {
147 public: 146 public:
148 CompilationCacheEval(Isolate* isolate, int generations) 147 CompilationCacheEval(Isolate* isolate, int generations)
149 : CompilationSubCache(isolate, generations) { } 148 : CompilationSubCache(isolate, generations) { }
150 149
151 Handle<SharedFunctionInfo> Lookup(Handle<String> source, 150 Handle<SharedFunctionInfo> Lookup(Handle<String> source,
152 Handle<Context> context, 151 Handle<Context> context,
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 294
296 friend class Isolate; 295 friend class Isolate;
297 296
298 DISALLOW_COPY_AND_ASSIGN(CompilationCache); 297 DISALLOW_COPY_AND_ASSIGN(CompilationCache);
299 }; 298 };
300 299
301 300
302 } } // namespace v8::internal 301 } } // namespace v8::internal
303 302
304 #endif // V8_COMPILATION_CACHE_H_ 303 #endif // V8_COMPILATION_CACHE_H_
OLDNEW
« no previous file with comments | « src/codegen.cc ('k') | src/compiler.h » ('j') | src/globals.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698