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

Side by Side Diff: src/objects.h

Issue 10103035: Share optimized code for closures. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: rebased on r11394 Created 8 years, 8 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 5121 matching lines...) Expand 10 before | Expand all | Expand 10 after
5132 // SharedFunctionInfo describes the JSFunction information that can be 5132 // SharedFunctionInfo describes the JSFunction information that can be
5133 // shared by multiple instances of the function. 5133 // shared by multiple instances of the function.
5134 class SharedFunctionInfo: public HeapObject { 5134 class SharedFunctionInfo: public HeapObject {
5135 public: 5135 public:
5136 // [name]: Function name. 5136 // [name]: Function name.
5137 DECL_ACCESSORS(name, Object) 5137 DECL_ACCESSORS(name, Object)
5138 5138
5139 // [code]: Function code. 5139 // [code]: Function code.
5140 DECL_ACCESSORS(code, Code) 5140 DECL_ACCESSORS(code, Code)
5141 5141
5142 // [optimized_code_map]: Map from global context to optimized code
5143 // or Smi 0 if none.
5144 DECL_ACCESSORS(optimized_code_map, Object)
5145
5146 Code* SearchOptimizedCodeMap(Context* global_context);
5147
5142 // [scope_info]: Scope info. 5148 // [scope_info]: Scope info.
5143 DECL_ACCESSORS(scope_info, ScopeInfo) 5149 DECL_ACCESSORS(scope_info, ScopeInfo)
5144 5150
5145 // [construct stub]: Code stub for constructing instances of this function. 5151 // [construct stub]: Code stub for constructing instances of this function.
5146 DECL_ACCESSORS(construct_stub, Code) 5152 DECL_ACCESSORS(construct_stub, Code)
5147 5153
5148 inline Code* unchecked_code(); 5154 inline Code* unchecked_code();
5149 5155
5150 // Returns if this function has been compiled to native code yet. 5156 // Returns if this function has been compiled to native code yet.
5151 inline bool is_compiled(); 5157 inline bool is_compiled();
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
5239 // Stores the initial map and installs the countdown stub. 5245 // Stores the initial map and installs the countdown stub.
5240 // IsInobjectSlackTrackingInProgress is normally true after this call, 5246 // IsInobjectSlackTrackingInProgress is normally true after this call,
5241 // except when tracking have not been started (e.g. the map has no unused 5247 // except when tracking have not been started (e.g. the map has no unused
5242 // properties or the snapshot is being built). 5248 // properties or the snapshot is being built).
5243 void StartInobjectSlackTracking(Map* map); 5249 void StartInobjectSlackTracking(Map* map);
5244 5250
5245 // Completes the tracking. 5251 // Completes the tracking.
5246 // IsInobjectSlackTrackingInProgress is false after this call. 5252 // IsInobjectSlackTrackingInProgress is false after this call.
5247 void CompleteInobjectSlackTracking(); 5253 void CompleteInobjectSlackTracking();
5248 5254
5255 // Invoked before pointers in SharedFunctionInfo are being marked.
5256 inline void BeforeVisitingPointers();
5257
5249 // Clears the initial_map before the GC marking phase to ensure the reference 5258 // Clears the initial_map before the GC marking phase to ensure the reference
5250 // is weak. IsInobjectSlackTrackingInProgress is false after this call. 5259 // is weak. IsInobjectSlackTrackingInProgress is false after this call.
5251 void DetachInitialMap(); 5260 void DetachInitialMap();
5252 5261
5253 // Restores the link to the initial map after the GC marking phase. 5262 // Restores the link to the initial map after the GC marking phase.
5254 // IsInobjectSlackTrackingInProgress is true after this call. 5263 // IsInobjectSlackTrackingInProgress is true after this call.
5255 void AttachInitialMap(Map* map); 5264 void AttachInitialMap(Map* map);
5256 5265
5257 // False if there are definitely no live objects created from this function. 5266 // False if there are definitely no live objects created from this function.
5258 // True if live objects _may_ exist (existence not guaranteed). 5267 // True if live objects _may_ exist (existence not guaranteed).
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
5497 // Casting. 5506 // Casting.
5498 static inline SharedFunctionInfo* cast(Object* obj); 5507 static inline SharedFunctionInfo* cast(Object* obj);
5499 5508
5500 // Constants. 5509 // Constants.
5501 static const int kDontAdaptArgumentsSentinel = -1; 5510 static const int kDontAdaptArgumentsSentinel = -1;
5502 5511
5503 // Layout description. 5512 // Layout description.
5504 // Pointer fields. 5513 // Pointer fields.
5505 static const int kNameOffset = HeapObject::kHeaderSize; 5514 static const int kNameOffset = HeapObject::kHeaderSize;
5506 static const int kCodeOffset = kNameOffset + kPointerSize; 5515 static const int kCodeOffset = kNameOffset + kPointerSize;
5507 static const int kScopeInfoOffset = kCodeOffset + kPointerSize; 5516 static const int kOptimizedCodeMapOffset = kCodeOffset + kPointerSize;
5517 static const int kScopeInfoOffset = kOptimizedCodeMapOffset + kPointerSize;
5508 static const int kConstructStubOffset = kScopeInfoOffset + kPointerSize; 5518 static const int kConstructStubOffset = kScopeInfoOffset + kPointerSize;
5509 static const int kInstanceClassNameOffset = 5519 static const int kInstanceClassNameOffset =
5510 kConstructStubOffset + kPointerSize; 5520 kConstructStubOffset + kPointerSize;
5511 static const int kFunctionDataOffset = 5521 static const int kFunctionDataOffset =
5512 kInstanceClassNameOffset + kPointerSize; 5522 kInstanceClassNameOffset + kPointerSize;
5513 static const int kScriptOffset = kFunctionDataOffset + kPointerSize; 5523 static const int kScriptOffset = kFunctionDataOffset + kPointerSize;
5514 static const int kDebugInfoOffset = kScriptOffset + kPointerSize; 5524 static const int kDebugInfoOffset = kScriptOffset + kPointerSize;
5515 static const int kInferredNameOffset = kDebugInfoOffset + kPointerSize; 5525 static const int kInferredNameOffset = kDebugInfoOffset + kPointerSize;
5516 static const int kInitialMapOffset = 5526 static const int kInitialMapOffset =
5517 kInferredNameOffset + kPointerSize; 5527 kInferredNameOffset + kPointerSize;
(...skipping 3111 matching lines...) Expand 10 before | Expand all | Expand 10 after
8629 } else { 8639 } else {
8630 value &= ~(1 << bit_position); 8640 value &= ~(1 << bit_position);
8631 } 8641 }
8632 return value; 8642 return value;
8633 } 8643 }
8634 }; 8644 };
8635 8645
8636 } } // namespace v8::internal 8646 } } // namespace v8::internal
8637 8647
8638 #endif // V8_OBJECTS_H_ 8648 #endif // V8_OBJECTS_H_
OLDNEW
« src/ia32/lithium-codegen-ia32.cc ('K') | « src/mark-compact.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698