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

Side by Side Diff: src/ast.cc

Issue 7039036: Fix calls of strict mode function with an implicit receiver. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address comments. Created 9 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
« no previous file with comments | « src/ast.h ('k') | src/code-stubs.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 694 matching lines...) Expand 10 before | Expand all | Expand 10 after
705 if (!HEAP->InNewSpace(*candidate) && 705 if (!HEAP->InNewSpace(*candidate) &&
706 CanCallWithoutIC(candidate, arguments()->length())) { 706 CanCallWithoutIC(candidate, arguments()->length())) {
707 target_ = candidate; 707 target_ = candidate;
708 return true; 708 return true;
709 } 709 }
710 } 710 }
711 return false; 711 return false;
712 } 712 }
713 713
714 714
715 void Call::RecordTypeFeedback(TypeFeedbackOracle* oracle) { 715 void Call::RecordTypeFeedback(TypeFeedbackOracle* oracle,
716 CallKind call_kind) {
716 Property* property = expression()->AsProperty(); 717 Property* property = expression()->AsProperty();
717 ASSERT(property != NULL); 718 ASSERT(property != NULL);
718 // Specialize for the receiver types seen at runtime. 719 // Specialize for the receiver types seen at runtime.
719 Literal* key = property->key()->AsLiteral(); 720 Literal* key = property->key()->AsLiteral();
720 ASSERT(key != NULL && key->handle()->IsString()); 721 ASSERT(key != NULL && key->handle()->IsString());
721 Handle<String> name = Handle<String>::cast(key->handle()); 722 Handle<String> name = Handle<String>::cast(key->handle());
722 receiver_types_ = oracle->CallReceiverTypes(this, name); 723 receiver_types_ = oracle->CallReceiverTypes(this, name, call_kind);
723 #ifdef DEBUG 724 #ifdef DEBUG
724 if (FLAG_enable_slow_asserts) { 725 if (FLAG_enable_slow_asserts) {
725 if (receiver_types_ != NULL) { 726 if (receiver_types_ != NULL) {
726 int length = receiver_types_->length(); 727 int length = receiver_types_->length();
727 for (int i = 0; i < length; i++) { 728 for (int i = 0; i < length; i++) {
728 Handle<Map> map = receiver_types_->at(i); 729 Handle<Map> map = receiver_types_->at(i);
729 ASSERT(!map.is_null() && *map != NULL); 730 ASSERT(!map.is_null() && *map != NULL);
730 } 731 }
731 } 732 }
732 } 733 }
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
1136 int pos) 1137 int pos)
1137 : label_(label), 1138 : label_(label),
1138 statements_(statements), 1139 statements_(statements),
1139 position_(pos), 1140 position_(pos),
1140 compare_type_(NONE), 1141 compare_type_(NONE),
1141 compare_id_(AstNode::GetNextId()), 1142 compare_id_(AstNode::GetNextId()),
1142 entry_id_(AstNode::GetNextId()) { 1143 entry_id_(AstNode::GetNextId()) {
1143 } 1144 }
1144 1145
1145 } } // namespace v8::internal 1146 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ast.h ('k') | src/code-stubs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698