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

Side by Side Diff: src/objects.cc

Issue 279423005: Customized support for feedback on calls to Array. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Ports. Created 6 years, 7 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
« src/ic.cc ('K') | « src/ic.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 11208 matching lines...) Expand 10 before | Expand all | Expand 10 after
11219 info->host()->constant_pool()); 11219 info->host()->constant_pool());
11220 } 11220 }
11221 } 11221 }
11222 } 11222 }
11223 } 11223 }
11224 11224
11225 11225
11226 void SharedFunctionInfo::ClearTypeFeedbackInfo() { 11226 void SharedFunctionInfo::ClearTypeFeedbackInfo() {
11227 FixedArray* vector = feedback_vector(); 11227 FixedArray* vector = feedback_vector();
11228 Heap* heap = GetHeap(); 11228 Heap* heap = GetHeap();
11229 for (int i = 0; i < vector->length(); i++) { 11229 Context* context = GetIsolate()->context();
11230 JSFunction* array_function = context != NULL
11231 ? context->native_context()->array_function()
11232 : NULL;
11233 int length = vector->length();
11234
11235 for (int i = 0; i < length; i++) {
11230 Object* obj = vector->get(i); 11236 Object* obj = vector->get(i);
11231 if (!obj->IsAllocationSite()) { 11237 if (obj->IsHeapObject()) {
11232 vector->set( 11238 InstanceType instance_type =
11233 i, 11239 HeapObject::cast(obj)->map()->instance_type();
11234 TypeFeedbackInfo::RawUninitializedSentinel(heap), 11240 switch (instance_type) {
11235 SKIP_WRITE_BARRIER); 11241 case ALLOCATION_SITE_TYPE: break;
danno 2014/05/22 08:20:43 Perhaps comments here explaining why each of these
mvstanton 2014/05/22 09:29:47 Done.
11242 case JS_FUNCTION_TYPE:
11243 if (obj == array_function) break;
11244 // Fall through...
11245 default:
11246 vector->set(i, TypeFeedbackInfo::RawUninitializedSentinel(heap),
11247 SKIP_WRITE_BARRIER);
11248 }
11236 } 11249 }
11237 } 11250 }
11238 } 11251 }
11239 11252
11240 11253
11241 BailoutId Code::TranslatePcOffsetToAstId(uint32_t pc_offset) { 11254 BailoutId Code::TranslatePcOffsetToAstId(uint32_t pc_offset) {
11242 DisallowHeapAllocation no_gc; 11255 DisallowHeapAllocation no_gc;
11243 ASSERT(kind() == FUNCTION); 11256 ASSERT(kind() == FUNCTION);
11244 BackEdgeTable back_edges(this, &no_gc); 11257 BackEdgeTable back_edges(this, &no_gc);
11245 for (uint32_t i = 0; i < back_edges.length(); i++) { 11258 for (uint32_t i = 0; i < back_edges.length(); i++) {
(...skipping 6028 matching lines...) Expand 10 before | Expand all | Expand 10 after
17274 #define ERROR_MESSAGES_TEXTS(C, T) T, 17287 #define ERROR_MESSAGES_TEXTS(C, T) T,
17275 static const char* error_messages_[] = { 17288 static const char* error_messages_[] = {
17276 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) 17289 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS)
17277 }; 17290 };
17278 #undef ERROR_MESSAGES_TEXTS 17291 #undef ERROR_MESSAGES_TEXTS
17279 return error_messages_[reason]; 17292 return error_messages_[reason];
17280 } 17293 }
17281 17294
17282 17295
17283 } } // namespace v8::internal 17296 } } // namespace v8::internal
OLDNEW
« src/ic.cc ('K') | « src/ic.cc ('k') | src/type-info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698