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

Side by Side Diff: src/objects.h

Issue 10649008: Fix sharing of literal boilerplates for optimized code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 6 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/flag-definitions.h ('k') | src/objects.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 5209 matching lines...) Expand 10 before | Expand all | Expand 10 after
5220 5220
5221 // [optimized_code_map]: Map from global context to optimized code 5221 // [optimized_code_map]: Map from global context to optimized code
5222 // and a shared literals array or Smi 0 if none. 5222 // and a shared literals array or Smi 0 if none.
5223 DECL_ACCESSORS(optimized_code_map, Object) 5223 DECL_ACCESSORS(optimized_code_map, Object)
5224 5224
5225 // Returns index i of the entry with the specified context. At position 5225 // Returns index i of the entry with the specified context. At position
5226 // i - 1 is the context, position i the code, and i + 1 the literals array. 5226 // i - 1 is the context, position i the code, and i + 1 the literals array.
5227 // Returns -1 when no matching entry is found. 5227 // Returns -1 when no matching entry is found.
5228 int SearchOptimizedCodeMap(Context* global_context); 5228 int SearchOptimizedCodeMap(Context* global_context);
5229 5229
5230 // Installs optimized code from the code map on the given closure. The
5231 // index has to be consistent with a search result as defined above.
5232 void InstallFromOptimizedCodeMap(JSFunction* function, int index);
5233
5230 // Clear optimized code map. 5234 // Clear optimized code map.
5231 void ClearOptimizedCodeMap(); 5235 void ClearOptimizedCodeMap();
5232 5236
5233 // Add a new entry to the optimized code map. 5237 // Add a new entry to the optimized code map.
5234 static void AddToOptimizedCodeMap(Handle<SharedFunctionInfo> shared, 5238 static void AddToOptimizedCodeMap(Handle<SharedFunctionInfo> shared,
5235 Handle<Context> global_context, 5239 Handle<Context> global_context,
5236 Handle<Code> code, 5240 Handle<Code> code,
5237 Handle<FixedArray> literals); 5241 Handle<FixedArray> literals);
5238 static const int kEntryLength = 3; 5242 static const int kEntryLength = 3;
5239 5243
(...skipping 3549 matching lines...) Expand 10 before | Expand all | Expand 10 after
8789 } else { 8793 } else {
8790 value &= ~(1 << bit_position); 8794 value &= ~(1 << bit_position);
8791 } 8795 }
8792 return value; 8796 return value;
8793 } 8797 }
8794 }; 8798 };
8795 8799
8796 } } // namespace v8::internal 8800 } } // namespace v8::internal
8797 8801
8798 #endif // V8_OBJECTS_H_ 8802 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698