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

Side by Side Diff: src/objects.h

Issue 19638014: Factor out common code from platform-specific deoptimization. Fix Deoptimizer not to need to partit… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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
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 4536 matching lines...) Expand 10 before | Expand all | Expand 10 after
4547 DECL_ACCESSORS(relocation_info, ByteArray) 4547 DECL_ACCESSORS(relocation_info, ByteArray)
4548 void InvalidateRelocation(); 4548 void InvalidateRelocation();
4549 4549
4550 // [handler_table]: Fixed array containing offsets of exception handlers. 4550 // [handler_table]: Fixed array containing offsets of exception handlers.
4551 DECL_ACCESSORS(handler_table, FixedArray) 4551 DECL_ACCESSORS(handler_table, FixedArray)
4552 4552
4553 // [deoptimization_data]: Array containing data for deopt. 4553 // [deoptimization_data]: Array containing data for deopt.
4554 DECL_ACCESSORS(deoptimization_data, FixedArray) 4554 DECL_ACCESSORS(deoptimization_data, FixedArray)
4555 4555
4556 // [type_feedback_info]: Struct containing type feedback information for 4556 // [type_feedback_info]: Struct containing type feedback information for
4557 // unoptimized code. Optimized code can temporarily store the head of 4557 // unoptimized code. Optimized code can temporarily store the head of
ulan 2013/07/22 09:23:08 This comment is out of sync with code.
titzer 2013/07/23 12:41:00 Done.
4558 // the list of the dependent optimized functions during deoptimization. 4558 // the list of the dependent optimized functions during deoptimization.
4559 // STUBs can use this slot to store arbitrary information as a Smi. 4559 // STUBs can use this slot to store arbitrary information as a Smi.
4560 // Will contain either a TypeFeedbackInfo object, or JSFunction object, 4560 // Will contain either a TypeFeedbackInfo object, or JSFunction object,
4561 // or undefined, or a Smi. 4561 // or undefined, or a Smi.
4562 DECL_ACCESSORS(type_feedback_info, Object) 4562 DECL_ACCESSORS(type_feedback_info, Object)
4563 inline void InitializeTypeFeedbackInfoNoWriteBarrier(Object* value); 4563 inline void InitializeTypeFeedbackInfoNoWriteBarrier(Object* value);
4564 inline int stub_info(); 4564 inline int stub_info();
4565 inline void set_stub_info(int info); 4565 inline void set_stub_info(int info);
4566 inline Object* deoptimizing_functions();
4567 inline void set_deoptimizing_functions(Object* value);
4568 4566
4569 // [gc_metadata]: Field used to hold GC related metadata. The contents of this 4567 // [gc_metadata]: Field used to hold GC related metadata. The contents of this
4570 // field does not have to be traced during garbage collection since 4568 // field does not have to be traced during garbage collection since
4571 // it is only used by the garbage collector itself. 4569 // it is only used by the garbage collector itself.
4572 DECL_ACCESSORS(gc_metadata, Object) 4570 DECL_ACCESSORS(gc_metadata, Object)
4573 4571
4574 // [ic_age]: Inline caching age: the value of the Heap::global_ic_age 4572 // [ic_age]: Inline caching age: the value of the Heap::global_ic_age
4575 // at the moment when this object was created. 4573 // at the moment when this object was created.
4576 inline void set_ic_age(int count); 4574 inline void set_ic_age(int count);
4577 inline int ic_age(); 4575 inline int ic_age();
(...skipping 2170 matching lines...) Expand 10 before | Expand all | Expand 10 after
6748 // Dispatched behavior. 6746 // Dispatched behavior.
6749 DECLARE_PRINTER(JSFunction) 6747 DECLARE_PRINTER(JSFunction)
6750 DECLARE_VERIFIER(JSFunction) 6748 DECLARE_VERIFIER(JSFunction)
6751 6749
6752 // Returns the number of allocated literals. 6750 // Returns the number of allocated literals.
6753 inline int NumberOfLiterals(); 6751 inline int NumberOfLiterals();
6754 6752
6755 // Retrieve the native context from a function's literal array. 6753 // Retrieve the native context from a function's literal array.
6756 static Context* NativeContextFromLiterals(FixedArray* literals); 6754 static Context* NativeContextFromLiterals(FixedArray* literals);
6757 6755
6758 #ifdef DEBUG
6759 bool FunctionsInFunctionListShareSameCode() {
6760 Object* current = this;
6761 while (!current->IsUndefined()) {
6762 JSFunction* function = JSFunction::cast(current);
6763 current = function->next_function_link();
6764 if (function->code() != this->code()) return false;
6765 }
6766 return true;
6767 }
6768 #endif
6769
6770 bool PassesHydrogenFilter(); 6756 bool PassesHydrogenFilter();
6771 6757
6772 // Layout descriptors. The last property (from kNonWeakFieldsEndOffset to 6758 // Layout descriptors. The last property (from kNonWeakFieldsEndOffset to
6773 // kSize) is weak and has special handling during garbage collection. 6759 // kSize) is weak and has special handling during garbage collection.
6774 static const int kCodeEntryOffset = JSObject::kHeaderSize; 6760 static const int kCodeEntryOffset = JSObject::kHeaderSize;
6775 static const int kPrototypeOrInitialMapOffset = 6761 static const int kPrototypeOrInitialMapOffset =
6776 kCodeEntryOffset + kPointerSize; 6762 kCodeEntryOffset + kPointerSize;
6777 static const int kSharedFunctionInfoOffset = 6763 static const int kSharedFunctionInfoOffset =
6778 kPrototypeOrInitialMapOffset + kPointerSize; 6764 kPrototypeOrInitialMapOffset + kPointerSize;
6779 static const int kContextOffset = kSharedFunctionInfoOffset + kPointerSize; 6765 static const int kContextOffset = kSharedFunctionInfoOffset + kPointerSize;
(...skipping 3068 matching lines...) Expand 10 before | Expand all | Expand 10 after
9848 } else { 9834 } else {
9849 value &= ~(1 << bit_position); 9835 value &= ~(1 << bit_position);
9850 } 9836 }
9851 return value; 9837 return value;
9852 } 9838 }
9853 }; 9839 };
9854 9840
9855 } } // namespace v8::internal 9841 } } // namespace v8::internal
9856 9842
9857 #endif // V8_OBJECTS_H_ 9843 #endif // V8_OBJECTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698