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

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: addressed comments 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 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(!isolate()->optimizing_compiler_thread()->IsOptimizerThread());
302 abort_due_to_dependency_ = true;
302 } 303 }
303 304
304 bool HasAbortedDueToDependencyChange() { 305 bool HasAbortedDueToDependencyChange() {
305 return mode_ == DEPENDENCY_CHANGE_ABORT; 306 ASSERT(!isolate()->optimizing_compiler_thread()->IsOptimizerThread());
307 return abort_due_to_dependency_;
306 } 308 }
307 309
308 protected: 310 protected:
309 CompilationInfo(Handle<Script> script, 311 CompilationInfo(Handle<Script> script,
310 Zone* zone); 312 Zone* zone);
311 CompilationInfo(Handle<SharedFunctionInfo> shared_info, 313 CompilationInfo(Handle<SharedFunctionInfo> shared_info,
312 Zone* zone); 314 Zone* zone);
313 CompilationInfo(HydrogenCodeStub* stub, 315 CompilationInfo(HydrogenCodeStub* stub,
314 Isolate* isolate, 316 Isolate* isolate,
315 Zone* zone); 317 Zone* zone);
316 318
317 private: 319 private:
318 Isolate* isolate_; 320 Isolate* isolate_;
319 321
320 // Compilation mode. 322 // Compilation mode.
321 // BASE is generated by the full codegen, optionally prepared for bailouts. 323 // BASE is generated by the full codegen, optionally prepared for bailouts.
322 // OPTIMIZE is optimized code generated by the Hydrogen-based backend. 324 // OPTIMIZE is optimized code generated by the Hydrogen-based backend.
323 // NONOPT is generated by the full codegen and is not prepared for 325 // NONOPT is generated by the full codegen and is not prepared for
324 // recompilation/bailouts. These functions are never recompiled. 326 // recompilation/bailouts. These functions are never recompiled.
325 enum Mode { 327 enum Mode {
326 BASE, 328 BASE,
327 OPTIMIZE, 329 OPTIMIZE,
328 NONOPT, 330 NONOPT,
329 STUB, 331 STUB
330 DEPENDENCY_CHANGE_ABORT
331 }; 332 };
332 333
333 void Initialize(Isolate* isolate, Mode mode, Zone* zone); 334 void Initialize(Isolate* isolate, Mode mode, Zone* zone);
334 335
335 void SetMode(Mode mode) { 336 void SetMode(Mode mode) {
336 ASSERT(V8::UseCrankshaft()); 337 ASSERT(V8::UseCrankshaft());
337 mode_ = mode; 338 mode_ = mode;
338 } 339 }
339 340
340 // Flags using template class BitField<type, start, length>. All are 341 // 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_; 395 ScriptDataImpl* pre_parse_data_;
395 396
396 // The context of the caller for eval code, and the global context for a 397 // The context of the caller for eval code, and the global context for a
397 // global script. Will be a null handle otherwise. 398 // global script. Will be a null handle otherwise.
398 Handle<Context> context_; 399 Handle<Context> context_;
399 400
400 // Compilation mode flag and whether deoptimization is allowed. 401 // Compilation mode flag and whether deoptimization is allowed.
401 Mode mode_; 402 Mode mode_;
402 BailoutId osr_ast_id_; 403 BailoutId osr_ast_id_;
403 404
405 // Flag whether compilation needs to be aborted due to dependency change.
406 bool abort_due_to_dependency_;
407
404 // The zone from which the compilation pipeline working on this 408 // The zone from which the compilation pipeline working on this
405 // CompilationInfo allocates. 409 // CompilationInfo allocates.
406 Zone* zone_; 410 Zone* zone_;
407 411
408 DeferredHandles* deferred_handles_; 412 DeferredHandles* deferred_handles_;
409 413
410 ZoneList<Handle<HeapObject> >* dependencies_[DependentCode::kGroupCount]; 414 ZoneList<Handle<HeapObject> >* dependencies_[DependentCode::kGroupCount];
411 415
412 template<typename T> 416 template<typename T>
413 void SaveHandle(Handle<T> *object) { 417 void SaveHandle(Handle<T> *object) {
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
641 unsigned info_zone_start_allocation_size_; 645 unsigned info_zone_start_allocation_size_;
642 int64_t start_ticks_; 646 int64_t start_ticks_;
643 647
644 DISALLOW_COPY_AND_ASSIGN(CompilationPhase); 648 DISALLOW_COPY_AND_ASSIGN(CompilationPhase);
645 }; 649 };
646 650
647 651
648 } } // namespace v8::internal 652 } } // namespace v8::internal
649 653
650 #endif // V8_COMPILER_H_ 654 #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