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

Side by Side Diff: src/type-info.cc

Issue 820673002: Follow-on to hydrogen fix keyed loads with string keys for vector ics. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 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
« no previous file with comments | « src/type-info.h ('k') | src/typing.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 // 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 "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/ast.h" 7 #include "src/ast.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/compiler.h" 9 #include "src/compiler.h"
10 #include "src/ic/ic.h" 10 #include "src/ic/ic.h"
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 Handle<String> name, 335 Handle<String> name,
336 SmallMapList* receiver_types) { 336 SmallMapList* receiver_types) {
337 receiver_types->Clear(); 337 receiver_types->Clear();
338 LoadICNexus nexus(feedback_vector_, slot); 338 LoadICNexus nexus(feedback_vector_, slot);
339 Code::Flags flags = Code::ComputeHandlerFlags(Code::LOAD_IC); 339 Code::Flags flags = Code::ComputeHandlerFlags(Code::LOAD_IC);
340 CollectReceiverTypes(&nexus, name, flags, receiver_types); 340 CollectReceiverTypes(&nexus, name, flags, receiver_types);
341 } 341 }
342 342
343 343
344 void TypeFeedbackOracle::KeyedPropertyReceiverTypes( 344 void TypeFeedbackOracle::KeyedPropertyReceiverTypes(
345 FeedbackVectorICSlot slot, SmallMapList* receiver_types, bool* is_string) { 345 FeedbackVectorICSlot slot, SmallMapList* receiver_types, bool* is_string,
346 IcCheckType* key_type) {
346 receiver_types->Clear(); 347 receiver_types->Clear();
347 KeyedLoadICNexus nexus(feedback_vector_, slot); 348 KeyedLoadICNexus nexus(feedback_vector_, slot);
348 CollectReceiverTypes<FeedbackNexus>(&nexus, receiver_types); 349 CollectReceiverTypes<FeedbackNexus>(&nexus, receiver_types);
349 *is_string = HasOnlyStringMaps(receiver_types); 350 *is_string = HasOnlyStringMaps(receiver_types);
351 *key_type = nexus.FindFirstName() != NULL ? PROPERTY : ELEMENT;
350 } 352 }
351 353
352 354
353 void TypeFeedbackOracle::AssignmentReceiverTypes( 355 void TypeFeedbackOracle::AssignmentReceiverTypes(
354 TypeFeedbackId id, Handle<String> name, SmallMapList* receiver_types) { 356 TypeFeedbackId id, Handle<String> name, SmallMapList* receiver_types) {
355 receiver_types->Clear(); 357 receiver_types->Clear();
356 Code::Flags flags = Code::ComputeHandlerFlags(Code::STORE_IC); 358 Code::Flags flags = Code::ComputeHandlerFlags(Code::STORE_IC);
357 CollectReceiverTypes(id, name, flags, receiver_types); 359 CollectReceiverTypes(id, name, flags, receiver_types);
358 } 360 }
359 361
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 UnseededNumberDictionary::kNotFound); 551 UnseededNumberDictionary::kNotFound);
550 // Dictionary has been allocated with sufficient size for all elements. 552 // Dictionary has been allocated with sufficient size for all elements.
551 DisallowHeapAllocation no_need_to_resize_dictionary; 553 DisallowHeapAllocation no_need_to_resize_dictionary;
552 HandleScope scope(isolate()); 554 HandleScope scope(isolate());
553 USE(UnseededNumberDictionary::AtNumberPut( 555 USE(UnseededNumberDictionary::AtNumberPut(
554 dictionary_, IdToKey(ast_id), handle(target, isolate()))); 556 dictionary_, IdToKey(ast_id), handle(target, isolate())));
555 } 557 }
556 558
557 559
558 } } // namespace v8::internal 560 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/type-info.h ('k') | src/typing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698