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

Side by Side Diff: src/compiler.h

Issue 7395030: Correctly mark functions from our natives files during compilation. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 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/arm/code-stubs-arm.cc ('k') | src/compiler.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 enum Mode { 166 enum Mode {
167 BASE, 167 BASE,
168 OPTIMIZE, 168 OPTIMIZE,
169 NONOPT 169 NONOPT
170 }; 170 };
171 171
172 CompilationInfo() : function_(NULL) {} 172 CompilationInfo() : function_(NULL) {}
173 173
174 void Initialize(Mode mode) { 174 void Initialize(Mode mode) {
175 mode_ = V8::UseCrankshaft() ? mode : NONOPT; 175 mode_ = V8::UseCrankshaft() ? mode : NONOPT;
176 if (!shared_info_.is_null()) { 176 ASSERT(!script_.is_null());
177 if (shared_info_->strict_mode()) MarkAsStrictMode(); 177 if (script_->type()->value() == Script::TYPE_NATIVE) {
178 if (shared_info_->native()) MarkAsNative(); 178 MarkAsNative();
179 }
180 if (!shared_info_.is_null() && shared_info_->strict_mode()) {
181 MarkAsStrictMode();
179 } 182 }
180 } 183 }
181 184
182 void SetMode(Mode mode) { 185 void SetMode(Mode mode) {
183 ASSERT(V8::UseCrankshaft()); 186 ASSERT(V8::UseCrankshaft());
184 mode_ = mode; 187 mode_ = mode;
185 } 188 }
186 189
187 // Flags using template class BitField<type, start, length>. All are 190 // Flags using template class BitField<type, start, length>. All are
188 // false by default. 191 // false by default.
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 298
296 static void RecordFunctionCompilation(Logger::LogEventsAndTags tag, 299 static void RecordFunctionCompilation(Logger::LogEventsAndTags tag,
297 CompilationInfo* info, 300 CompilationInfo* info,
298 Handle<SharedFunctionInfo> shared); 301 Handle<SharedFunctionInfo> shared);
299 }; 302 };
300 303
301 304
302 } } // namespace v8::internal 305 } } // namespace v8::internal
303 306
304 #endif // V8_COMPILER_H_ 307 #endif // V8_COMPILER_H_
OLDNEW
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698