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

Side by Side Diff: src/typing.cc

Issue 23537067: Add support for keyed-call on arrays of fast elements (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Compare with actual map loaded from the context Created 7 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
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 438
439 // We don't know anything about the result type. 439 // We don't know anything about the result type.
440 } 440 }
441 441
442 442
443 void AstTyper::VisitCall(Call* expr) { 443 void AstTyper::VisitCall(Call* expr) {
444 // Collect type feedback. 444 // Collect type feedback.
445 Expression* callee = expr->expression(); 445 Expression* callee = expr->expression();
446 Property* prop = callee->AsProperty(); 446 Property* prop = callee->AsProperty();
447 if (prop != NULL) { 447 if (prop != NULL) {
448 if (prop->key()->IsPropertyName()) 448 expr->RecordTypeFeedback(oracle(), CALL_AS_METHOD);
449 expr->RecordTypeFeedback(oracle(), CALL_AS_METHOD);
450 } else { 449 } else {
451 expr->RecordTypeFeedback(oracle(), CALL_AS_FUNCTION); 450 expr->RecordTypeFeedback(oracle(), CALL_AS_FUNCTION);
452 } 451 }
453 452
454 RECURSE(Visit(expr->expression())); 453 RECURSE(Visit(expr->expression()));
455 ZoneList<Expression*>* args = expr->arguments(); 454 ZoneList<Expression*>* args = expr->arguments();
456 for (int i = 0; i < args->length(); ++i) { 455 for (int i = 0; i < args->length(); ++i) {
457 Expression* arg = args->at(i); 456 Expression* arg = args->at(i);
458 RECURSE(Visit(arg)); 457 RECURSE(Visit(arg));
459 } 458 }
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
695 void AstTyper::VisitModuleUrl(ModuleUrl* module) { 694 void AstTyper::VisitModuleUrl(ModuleUrl* module) {
696 } 695 }
697 696
698 697
699 void AstTyper::VisitModuleStatement(ModuleStatement* stmt) { 698 void AstTyper::VisitModuleStatement(ModuleStatement* stmt) {
700 RECURSE(Visit(stmt->body())); 699 RECURSE(Visit(stmt->body()));
701 } 700 }
702 701
703 702
704 } } // namespace v8::internal 703 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698