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

Side by Side Diff: src/compiler.h

Issue 22807003: Fix regressions triggered by map invalidation during graph creation. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
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
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 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 291
292 Handle<Foreign> object_wrapper() { 292 Handle<Foreign> object_wrapper() {
293 if (object_wrapper_.is_null()) { 293 if (object_wrapper_.is_null()) {
294 object_wrapper_ = 294 object_wrapper_ =
295 isolate()->factory()->NewForeign(reinterpret_cast<Address>(this)); 295 isolate()->factory()->NewForeign(reinterpret_cast<Address>(this));
296 } 296 }
297 return object_wrapper_; 297 return object_wrapper_;
298 } 298 }
299 299
300 void AbortDueToDependencyChange() { 300 void AbortDueToDependencyChange() {
301 mode_ = DEPENDENCY_CHANGE_ABORT; 301 ASSERT(!FLAG_parallel_recompilation ||
302 !isolate()->optimizing_compiler_thread()->IsOptimizerThread());
Jakob Kummerow 2013/08/12 13:48:24 IsOptimizerThread contains "if (!FLAG_parallel_rec
303 abort_due_to_map_dependency_ = true;
Jakob Kummerow 2013/08/12 13:48:24 naming nit: could be any dependency change, not ju
302 } 304 }
303 305
304 bool HasAbortedDueToDependencyChange() { 306 bool HasAbortedDueToDependencyChange() {
305 return mode_ == DEPENDENCY_CHANGE_ABORT; 307 ASSERT(!FLAG_parallel_recompilation ||
308 !isolate()->optimizing_compiler_thread()->IsOptimizerThread());
309 return abort_due_to_map_dependency_;
306 } 310 }
307 311
308 protected: 312 protected:
309 CompilationInfo(Handle<Script> script, 313 CompilationInfo(Handle<Script> script,
310 Zone* zone); 314 Zone* zone);
311 CompilationInfo(Handle<SharedFunctionInfo> shared_info, 315 CompilationInfo(Handle<SharedFunctionInfo> shared_info,
312 Zone* zone); 316 Zone* zone);
313 CompilationInfo(HydrogenCodeStub* stub, 317 CompilationInfo(HydrogenCodeStub* stub,
314 Isolate* isolate, 318 Isolate* isolate,
315 Zone* zone); 319 Zone* zone);
316 320
317 private: 321 private:
318 Isolate* isolate_; 322 Isolate* isolate_;
319 323
320 // Compilation mode. 324 // Compilation mode.
321 // BASE is generated by the full codegen, optionally prepared for bailouts. 325 // BASE is generated by the full codegen, optionally prepared for bailouts.
322 // OPTIMIZE is optimized code generated by the Hydrogen-based backend. 326 // OPTIMIZE is optimized code generated by the Hydrogen-based backend.
323 // NONOPT is generated by the full codegen and is not prepared for 327 // NONOPT is generated by the full codegen and is not prepared for
324 // recompilation/bailouts. These functions are never recompiled. 328 // recompilation/bailouts. These functions are never recompiled.
325 enum Mode { 329 enum Mode {
326 BASE, 330 BASE,
327 OPTIMIZE, 331 OPTIMIZE,
328 NONOPT, 332 NONOPT,
329 STUB, 333 STUB
330 DEPENDENCY_CHANGE_ABORT
331 }; 334 };
332 335
333 void Initialize(Isolate* isolate, Mode mode, Zone* zone); 336 void Initialize(Isolate* isolate, Mode mode, Zone* zone);
334 337
335 void SetMode(Mode mode) { 338 void SetMode(Mode mode) {
336 ASSERT(V8::UseCrankshaft()); 339 ASSERT(V8::UseCrankshaft());
337 mode_ = mode; 340 mode_ = mode;
338 } 341 }
339 342
340 // Flags using template class BitField<type, start, length>. All are 343 // Flags using template class BitField<type, start, length>. All are
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 ScriptDataImpl* pre_parse_data_; 397 ScriptDataImpl* pre_parse_data_;
395 398
396 // The context of the caller for eval code, and the global context for a 399 // The context of the caller for eval code, and the global context for a
397 // global script. Will be a null handle otherwise. 400 // global script. Will be a null handle otherwise.
398 Handle<Context> context_; 401 Handle<Context> context_;
399 402
400 // Compilation mode flag and whether deoptimization is allowed. 403 // Compilation mode flag and whether deoptimization is allowed.
401 Mode mode_; 404 Mode mode_;
402 BailoutId osr_ast_id_; 405 BailoutId osr_ast_id_;
403 406
407 // Flag whether compilation needs to be aborted due to map dependency.
408 bool abort_due_to_map_dependency_;
409
404 // The zone from which the compilation pipeline working on this 410 // The zone from which the compilation pipeline working on this
405 // CompilationInfo allocates. 411 // CompilationInfo allocates.
406 Zone* zone_; 412 Zone* zone_;
407 413
408 DeferredHandles* deferred_handles_; 414 DeferredHandles* deferred_handles_;
409 415
410 ZoneList<Handle<HeapObject> >* dependencies_[DependentCode::kGroupCount]; 416 ZoneList<Handle<HeapObject> >* dependencies_[DependentCode::kGroupCount];
411 417
412 template<typename T> 418 template<typename T>
413 void SaveHandle(Handle<T> *object) { 419 void SaveHandle(Handle<T> *object) {
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
641 unsigned info_zone_start_allocation_size_; 647 unsigned info_zone_start_allocation_size_;
642 int64_t start_ticks_; 648 int64_t start_ticks_;
643 649
644 DISALLOW_COPY_AND_ASSIGN(CompilationPhase); 650 DISALLOW_COPY_AND_ASSIGN(CompilationPhase);
645 }; 651 };
646 652
647 653
648 } } // namespace v8::internal 654 } } // namespace v8::internal
649 655
650 #endif // V8_COMPILER_H_ 656 #endif // V8_COMPILER_H_
OLDNEW
« no previous file with comments | « src/assert-scope.h ('k') | src/compiler.cc » ('j') | src/compiler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698