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

Side by Side Diff: src/objects.h

Issue 8700008: New approach to Crankshaft decision-making (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fix function self-optimization; address first comment Created 9 years 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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 5443 matching lines...) Expand 10 before | Expand all | Expand 10 after
5454 // before. 5454 // before.
5455 Object* SetInstanceClassName(String* name); 5455 Object* SetInstanceClassName(String* name);
5456 5456
5457 // Returns if this function has been compiled to native code yet. 5457 // Returns if this function has been compiled to native code yet.
5458 inline bool is_compiled(); 5458 inline bool is_compiled();
5459 5459
5460 // [next_function_link]: Field for linking functions. This list is treated as 5460 // [next_function_link]: Field for linking functions. This list is treated as
5461 // a weak list by the GC. 5461 // a weak list by the GC.
5462 DECL_ACCESSORS(next_function_link, Object) 5462 DECL_ACCESSORS(next_function_link, Object)
5463 5463
5464 inline int profiler_ticks();
fschneider 2011/12/12 11:31:21 Shouldn't be this on SharedFunctionInfo instead?
fschneider 2011/12/13 11:53:01 This increases the size of each JSFunction by 1 wo
Jakob Kummerow 2011/12/14 08:42:31 Done.
5465 inline void set_profiler_ticks(int ticks);
5466
5464 // Prints the name of the function using PrintF. 5467 // Prints the name of the function using PrintF.
5465 inline void PrintName() { 5468 inline void PrintName() {
5466 PrintName(stdout); 5469 PrintName(stdout);
5467 } 5470 }
5468 void PrintName(FILE* out); 5471 void PrintName(FILE* out);
5469 5472
5470 // Casting. 5473 // Casting.
5471 static inline JSFunction* cast(Object* obj); 5474 static inline JSFunction* cast(Object* obj);
5472 5475
5473 // Iterates the objects, including code objects indirectly referenced 5476 // Iterates the objects, including code objects indirectly referenced
(...skipping 19 matching lines...) Expand all
5493 5496
5494 // Layout descriptors. The last property (from kNonWeakFieldsEndOffset to 5497 // Layout descriptors. The last property (from kNonWeakFieldsEndOffset to
5495 // kSize) is weak and has special handling during garbage collection. 5498 // kSize) is weak and has special handling during garbage collection.
5496 static const int kCodeEntryOffset = JSObject::kHeaderSize; 5499 static const int kCodeEntryOffset = JSObject::kHeaderSize;
5497 static const int kPrototypeOrInitialMapOffset = 5500 static const int kPrototypeOrInitialMapOffset =
5498 kCodeEntryOffset + kPointerSize; 5501 kCodeEntryOffset + kPointerSize;
5499 static const int kSharedFunctionInfoOffset = 5502 static const int kSharedFunctionInfoOffset =
5500 kPrototypeOrInitialMapOffset + kPointerSize; 5503 kPrototypeOrInitialMapOffset + kPointerSize;
5501 static const int kContextOffset = kSharedFunctionInfoOffset + kPointerSize; 5504 static const int kContextOffset = kSharedFunctionInfoOffset + kPointerSize;
5502 static const int kLiteralsOffset = kContextOffset + kPointerSize; 5505 static const int kLiteralsOffset = kContextOffset + kPointerSize;
5503 static const int kNonWeakFieldsEndOffset = kLiteralsOffset + kPointerSize; 5506 static const int kProfilerTicksOffset = kLiteralsOffset + kPointerSize;
5507 static const int kNonWeakFieldsEndOffset =
5508 kProfilerTicksOffset + kPointerSize;
5504 static const int kNextFunctionLinkOffset = kNonWeakFieldsEndOffset; 5509 static const int kNextFunctionLinkOffset = kNonWeakFieldsEndOffset;
5505 static const int kSize = kNextFunctionLinkOffset + kPointerSize; 5510 static const int kSize = kNextFunctionLinkOffset + kPointerSize;
5506 5511
5507 // Layout of the literals array. 5512 // Layout of the literals array.
5508 static const int kLiteralsPrefixSize = 1; 5513 static const int kLiteralsPrefixSize = 1;
5509 static const int kLiteralGlobalContextIndex = 0; 5514 static const int kLiteralGlobalContextIndex = 0;
5510 5515
5511 // Layout of the bound-function binding array. 5516 // Layout of the bound-function binding array.
5512 static const int kBoundFunctionIndex = 0; 5517 static const int kBoundFunctionIndex = 0;
5513 static const int kBoundThisIndex = 1; 5518 static const int kBoundThisIndex = 1;
(...skipping 2469 matching lines...) Expand 10 before | Expand all | Expand 10 after
7983 } else { 7988 } else {
7984 value &= ~(1 << bit_position); 7989 value &= ~(1 << bit_position);
7985 } 7990 }
7986 return value; 7991 return value;
7987 } 7992 }
7988 }; 7993 };
7989 7994
7990 } } // namespace v8::internal 7995 } } // namespace v8::internal
7991 7996
7992 #endif // V8_OBJECTS_H_ 7997 #endif // V8_OBJECTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698