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

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

Issue 602773003: Eliminate special keyed load string stub in favor of uniform handlers. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE and ports. Created 6 years, 2 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/objects.h ('k') | src/x64/code-stubs-x64.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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 SmallMapList* receiver_types) { 259 SmallMapList* receiver_types) {
260 receiver_types->Clear(); 260 receiver_types->Clear();
261 Code::Flags flags = Code::ComputeHandlerFlags(Code::LOAD_IC); 261 Code::Flags flags = Code::ComputeHandlerFlags(Code::LOAD_IC);
262 CollectReceiverTypes(id, name, flags, receiver_types); 262 CollectReceiverTypes(id, name, flags, receiver_types);
263 } 263 }
264 264
265 265
266 void TypeFeedbackOracle::KeyedPropertyReceiverTypes( 266 void TypeFeedbackOracle::KeyedPropertyReceiverTypes(
267 TypeFeedbackId id, SmallMapList* receiver_types, bool* is_string) { 267 TypeFeedbackId id, SmallMapList* receiver_types, bool* is_string) {
268 receiver_types->Clear(); 268 receiver_types->Clear();
269 *is_string = false; 269 CollectReceiverTypes(id, receiver_types);
270 if (LoadIsBuiltin(id, Builtins::kKeyedLoadIC_String)) { 270
271 *is_string = true; 271 // Are all the receiver maps string maps?
272 } else { 272 bool all_strings = receiver_types->length() > 0;
273 CollectReceiverTypes(id, receiver_types); 273 for (int i = 0; i < receiver_types->length(); i++) {
274 all_strings &= receiver_types->at(i)->IsStringMap();
274 } 275 }
276 *is_string = all_strings;
275 } 277 }
276 278
277 279
278 void TypeFeedbackOracle::AssignmentReceiverTypes( 280 void TypeFeedbackOracle::AssignmentReceiverTypes(
279 TypeFeedbackId id, Handle<String> name, SmallMapList* receiver_types) { 281 TypeFeedbackId id, Handle<String> name, SmallMapList* receiver_types) {
280 receiver_types->Clear(); 282 receiver_types->Clear();
281 Code::Flags flags = Code::ComputeHandlerFlags(Code::STORE_IC); 283 Code::Flags flags = Code::ComputeHandlerFlags(Code::STORE_IC);
282 CollectReceiverTypes(id, name, flags, receiver_types); 284 CollectReceiverTypes(id, name, flags, receiver_types);
283 } 285 }
284 286
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 UnseededNumberDictionary::kNotFound); 463 UnseededNumberDictionary::kNotFound);
462 // Dictionary has been allocated with sufficient size for all elements. 464 // Dictionary has been allocated with sufficient size for all elements.
463 DisallowHeapAllocation no_need_to_resize_dictionary; 465 DisallowHeapAllocation no_need_to_resize_dictionary;
464 HandleScope scope(isolate()); 466 HandleScope scope(isolate());
465 USE(UnseededNumberDictionary::AtNumberPut( 467 USE(UnseededNumberDictionary::AtNumberPut(
466 dictionary_, IdToKey(ast_id), handle(target, isolate()))); 468 dictionary_, IdToKey(ast_id), handle(target, isolate())));
467 } 469 }
468 470
469 471
470 } } // namespace v8::internal 472 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698