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

Side by Side Diff: src/objects-inl.h

Issue 189263009: Fix kraken/oscillator performance regression after r19635. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 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 | « no previous file | no next file » | 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 5395 matching lines...) Expand 10 before | Expand all | Expand 10 after
5406 ASSERT(!GetHeap()->InNewSpace(value)); 5406 ASSERT(!GetHeap()->InNewSpace(value));
5407 Address entry = value->entry(); 5407 Address entry = value->entry();
5408 WRITE_INTPTR_FIELD(this, kCodeEntryOffset, reinterpret_cast<intptr_t>(entry)); 5408 WRITE_INTPTR_FIELD(this, kCodeEntryOffset, reinterpret_cast<intptr_t>(entry));
5409 } 5409 }
5410 5410
5411 5411
5412 void JSFunction::ReplaceCode(Code* code) { 5412 void JSFunction::ReplaceCode(Code* code) {
5413 bool was_optimized = IsOptimized(); 5413 bool was_optimized = IsOptimized();
5414 bool is_optimized = code->kind() == Code::OPTIMIZED_FUNCTION; 5414 bool is_optimized = code->kind() == Code::OPTIMIZED_FUNCTION;
5415 5415
5416 if (was_optimized && is_optimized) {
5417 shared()->EvictFromOptimizedCodeMap(this->code(),
5418 "Replacing with another optimized code");
5419 }
5420
5416 set_code(code); 5421 set_code(code);
5417 5422
5418 // Add/remove the function from the list of optimized functions for this 5423 // Add/remove the function from the list of optimized functions for this
5419 // context based on the state change. 5424 // context based on the state change.
5420 if (!was_optimized && is_optimized) { 5425 if (!was_optimized && is_optimized) {
5421 context()->native_context()->AddOptimizedFunction(this); 5426 context()->native_context()->AddOptimizedFunction(this);
5422 } 5427 }
5423 if (was_optimized && !is_optimized) { 5428 if (was_optimized && !is_optimized) {
5424 // TODO(titzer): linear in the number of optimized functions; fix! 5429 // TODO(titzer): linear in the number of optimized functions; fix!
5425 context()->native_context()->RemoveOptimizedFunction(this); 5430 context()->native_context()->RemoveOptimizedFunction(this);
(...skipping 1304 matching lines...) Expand 10 before | Expand all | Expand 10 after
6730 #undef READ_UINT32_FIELD 6735 #undef READ_UINT32_FIELD
6731 #undef WRITE_UINT32_FIELD 6736 #undef WRITE_UINT32_FIELD
6732 #undef READ_SHORT_FIELD 6737 #undef READ_SHORT_FIELD
6733 #undef WRITE_SHORT_FIELD 6738 #undef WRITE_SHORT_FIELD
6734 #undef READ_BYTE_FIELD 6739 #undef READ_BYTE_FIELD
6735 #undef WRITE_BYTE_FIELD 6740 #undef WRITE_BYTE_FIELD
6736 6741
6737 } } // namespace v8::internal 6742 } } // namespace v8::internal
6738 6743
6739 #endif // V8_OBJECTS_INL_H_ 6744 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698