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

Side by Side Diff: src/compiler.h

Issue 22984009: Merged r16150, r16174, r16175 into 3.19 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.19
Patch Set: Created 7 years, 4 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/assert-scope.h ('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 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 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 } 284 }
285 285
286 Handle<Foreign> object_wrapper() { 286 Handle<Foreign> object_wrapper() {
287 if (object_wrapper_.is_null()) { 287 if (object_wrapper_.is_null()) {
288 object_wrapper_ = 288 object_wrapper_ =
289 isolate()->factory()->NewForeign(reinterpret_cast<Address>(this)); 289 isolate()->factory()->NewForeign(reinterpret_cast<Address>(this));
290 } 290 }
291 return object_wrapper_; 291 return object_wrapper_;
292 } 292 }
293 293
294 void AbortDueToDependentMap() { 294 void AbortDueToDependencyChange() {
295 mode_ = DEPENDENT_MAP_ABORT; 295 ASSERT(!isolate()->optimizing_compiler_thread()->IsOptimizerThread());
296 abort_due_to_dependency_ = true;
296 } 297 }
297 298
298 bool HasAbortedDueToDependentMap() { 299 bool HasAbortedDueToDependencyChange() {
299 return mode_ == DEPENDENT_MAP_ABORT; 300 ASSERT(!isolate()->optimizing_compiler_thread()->IsOptimizerThread());
301 return abort_due_to_dependency_;
300 } 302 }
301 303
302 protected: 304 protected:
303 CompilationInfo(Handle<Script> script, Zone* zone); 305 CompilationInfo(Handle<Script> script, Zone* zone);
304 CompilationInfo(Handle<SharedFunctionInfo> shared_info, Zone* zone); 306 CompilationInfo(Handle<SharedFunctionInfo> shared_info, Zone* zone);
305 CompilationInfo(HydrogenCodeStub* stub, Isolate* isolate, Zone* zone); 307 CompilationInfo(HydrogenCodeStub* stub, Isolate* isolate, Zone* zone);
306 308
307 private: 309 private:
308 Isolate* isolate_; 310 Isolate* isolate_;
309 311
310 // Compilation mode. 312 // Compilation mode.
311 // BASE is generated by the full codegen, optionally prepared for bailouts. 313 // BASE is generated by the full codegen, optionally prepared for bailouts.
312 // OPTIMIZE is optimized code generated by the Hydrogen-based backend. 314 // OPTIMIZE is optimized code generated by the Hydrogen-based backend.
313 // NONOPT is generated by the full codegen and is not prepared for 315 // NONOPT is generated by the full codegen and is not prepared for
314 // recompilation/bailouts. These functions are never recompiled. 316 // recompilation/bailouts. These functions are never recompiled.
315 enum Mode { 317 enum Mode {
316 BASE, 318 BASE,
317 OPTIMIZE, 319 OPTIMIZE,
318 NONOPT, 320 NONOPT,
319 STUB, 321 STUB
320 DEPENDENT_MAP_ABORT
321 }; 322 };
322 323
323 void Initialize(Isolate* isolate, Mode mode, Zone* zone); 324 void Initialize(Isolate* isolate, Mode mode, Zone* zone);
324 325
325 void SetMode(Mode mode) { 326 void SetMode(Mode mode) {
326 ASSERT(V8::UseCrankshaft()); 327 ASSERT(V8::UseCrankshaft());
327 mode_ = mode; 328 mode_ = mode;
328 } 329 }
329 330
330 // Flags using template class BitField<type, start, length>. All are 331 // Flags using template class BitField<type, start, length>. All are
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 ScriptDataImpl* pre_parse_data_; 385 ScriptDataImpl* pre_parse_data_;
385 386
386 // The context of the caller for eval code, and the global context for a 387 // The context of the caller for eval code, and the global context for a
387 // global script. Will be a null handle otherwise. 388 // global script. Will be a null handle otherwise.
388 Handle<Context> context_; 389 Handle<Context> context_;
389 390
390 // Compilation mode flag and whether deoptimization is allowed. 391 // Compilation mode flag and whether deoptimization is allowed.
391 Mode mode_; 392 Mode mode_;
392 BailoutId osr_ast_id_; 393 BailoutId osr_ast_id_;
393 394
395 // Flag whether compilation needs to be aborted due to dependency change.
396 bool abort_due_to_dependency_;
397
394 // The zone from which the compilation pipeline working on this 398 // The zone from which the compilation pipeline working on this
395 // CompilationInfo allocates. 399 // CompilationInfo allocates.
396 Zone* zone_; 400 Zone* zone_;
397 401
398 DeferredHandles* deferred_handles_; 402 DeferredHandles* deferred_handles_;
399 403
400 ZoneList<Handle<Map> >* dependent_maps_[DependentCode::kGroupCount]; 404 ZoneList<Handle<Map> >* dependent_maps_[DependentCode::kGroupCount];
401 405
402 template<typename T> 406 template<typename T>
403 void SaveHandle(Handle<T> *object) { 407 void SaveHandle(Handle<T> *object) {
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 617
614 static void RecordFunctionCompilation(Logger::LogEventsAndTags tag, 618 static void RecordFunctionCompilation(Logger::LogEventsAndTags tag,
615 CompilationInfo* info, 619 CompilationInfo* info,
616 Handle<SharedFunctionInfo> shared); 620 Handle<SharedFunctionInfo> shared);
617 }; 621 };
618 622
619 623
620 } } // namespace v8::internal 624 } } // namespace v8::internal
621 625
622 #endif // V8_COMPILER_H_ 626 #endif // V8_COMPILER_H_
OLDNEW
« no previous file with comments | « src/assert-scope.h ('k') | src/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698