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

Side by Side Diff: src/objects.cc

Issue 305493003: Reland "Customized support for feedback on calls to Array." and follow-up fixes. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Bugfix and tests Created 6 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/mips/code-stubs-mips.cc ('k') | src/type-info.h » ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "v8.h" 5 #include "v8.h"
6 6
7 #include "accessors.h" 7 #include "accessors.h"
8 #include "allocation-site-scopes.h" 8 #include "allocation-site-scopes.h"
9 #include "api.h" 9 #include "api.h"
10 #include "arguments.h" 10 #include "arguments.h"
(...skipping 11187 matching lines...) Expand 10 before | Expand all | Expand 10 after
11198 info->host()->constant_pool()); 11198 info->host()->constant_pool());
11199 } 11199 }
11200 } 11200 }
11201 } 11201 }
11202 } 11202 }
11203 11203
11204 11204
11205 void SharedFunctionInfo::ClearTypeFeedbackInfo() { 11205 void SharedFunctionInfo::ClearTypeFeedbackInfo() {
11206 FixedArray* vector = feedback_vector(); 11206 FixedArray* vector = feedback_vector();
11207 Heap* heap = GetHeap(); 11207 Heap* heap = GetHeap();
11208 for (int i = 0; i < vector->length(); i++) { 11208 int length = vector->length();
11209
11210 for (int i = 0; i < length; i++) {
11209 Object* obj = vector->get(i); 11211 Object* obj = vector->get(i);
11210 if (!obj->IsAllocationSite()) { 11212 if (obj->IsHeapObject()) {
11211 vector->set( 11213 InstanceType instance_type =
11212 i, 11214 HeapObject::cast(obj)->map()->instance_type();
11213 TypeFeedbackInfo::RawUninitializedSentinel(heap), 11215 switch (instance_type) {
11214 SKIP_WRITE_BARRIER); 11216 case ALLOCATION_SITE_TYPE:
11217 // AllocationSites are not cleared because they do not store
11218 // information that leaks.
11219 break;
11220 case JS_FUNCTION_TYPE:
11221 // No need to clear the native context array function.
11222 if (obj == JSFunction::cast(obj)->context()->native_context()->
11223 get(Context::ARRAY_FUNCTION_INDEX)) {
11224 break;
11225 }
11226 // Fall through...
11227
11228 default:
11229 vector->set(i, TypeFeedbackInfo::RawUninitializedSentinel(heap),
11230 SKIP_WRITE_BARRIER);
11231 }
11215 } 11232 }
11216 } 11233 }
11217 } 11234 }
11218 11235
11219 11236
11220 BailoutId Code::TranslatePcOffsetToAstId(uint32_t pc_offset) { 11237 BailoutId Code::TranslatePcOffsetToAstId(uint32_t pc_offset) {
11221 DisallowHeapAllocation no_gc; 11238 DisallowHeapAllocation no_gc;
11222 ASSERT(kind() == FUNCTION); 11239 ASSERT(kind() == FUNCTION);
11223 BackEdgeTable back_edges(this, &no_gc); 11240 BackEdgeTable back_edges(this, &no_gc);
11224 for (uint32_t i = 0; i < back_edges.length(); i++) { 11241 for (uint32_t i = 0; i < back_edges.length(); i++) {
(...skipping 6027 matching lines...) Expand 10 before | Expand all | Expand 10 after
17252 #define ERROR_MESSAGES_TEXTS(C, T) T, 17269 #define ERROR_MESSAGES_TEXTS(C, T) T,
17253 static const char* error_messages_[] = { 17270 static const char* error_messages_[] = {
17254 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) 17271 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS)
17255 }; 17272 };
17256 #undef ERROR_MESSAGES_TEXTS 17273 #undef ERROR_MESSAGES_TEXTS
17257 return error_messages_[reason]; 17274 return error_messages_[reason];
17258 } 17275 }
17259 17276
17260 17277
17261 } } // namespace v8::internal 17278 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mips/code-stubs-mips.cc ('k') | src/type-info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698