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

Side by Side Diff: src/ast.cc

Issue 224903005: Reland "create a function call IC" (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Comments. Created 6 years, 8 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/arm64/lithium-codegen-arm64.cc ('k') | src/builtins.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 576 matching lines...) Expand 10 before | Expand all | Expand 10 after
587 // TODO(rossberg): all RecordTypeFeedback functions should disappear 587 // TODO(rossberg): all RecordTypeFeedback functions should disappear
588 // once we use the common type field in the AST consistently. 588 // once we use the common type field in the AST consistently.
589 589
590 void Expression::RecordToBooleanTypeFeedback(TypeFeedbackOracle* oracle) { 590 void Expression::RecordToBooleanTypeFeedback(TypeFeedbackOracle* oracle) {
591 to_boolean_types_ = oracle->ToBooleanTypes(test_id()); 591 to_boolean_types_ = oracle->ToBooleanTypes(test_id());
592 } 592 }
593 593
594 594
595 int Call::ComputeFeedbackSlotCount(Isolate* isolate) { 595 int Call::ComputeFeedbackSlotCount(Isolate* isolate) {
596 CallType call_type = GetCallType(isolate); 596 CallType call_type = GetCallType(isolate);
597 if (call_type == LOOKUP_SLOT_CALL || call_type == OTHER_CALL) { 597 if (call_type == POSSIBLY_EVAL_CALL) {
598 // Call only uses a slot in some cases. 598 return 0;
599 return 1;
600 } 599 }
601 600
602 return 0; 601 return 1;
603 } 602 }
604 603
605 604
606 Call::CallType Call::GetCallType(Isolate* isolate) const { 605 Call::CallType Call::GetCallType(Isolate* isolate) const {
607 VariableProxy* proxy = expression()->AsVariableProxy(); 606 VariableProxy* proxy = expression()->AsVariableProxy();
608 if (proxy != NULL) { 607 if (proxy != NULL) {
609 if (proxy->var()->is_possibly_eval(isolate)) { 608 if (proxy->var()->is_possibly_eval(isolate)) {
610 return POSSIBLY_EVAL_CALL; 609 return POSSIBLY_EVAL_CALL;
611 } else if (proxy->var()->IsUnallocated()) { 610 } else if (proxy->var()->IsUnallocated()) {
612 return GLOBAL_CALL; 611 return GLOBAL_CALL;
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after
1175 OS::SNPrintF(buffer, "%d", Smi::cast(*value_)->value()); 1174 OS::SNPrintF(buffer, "%d", Smi::cast(*value_)->value());
1176 str = arr; 1175 str = arr;
1177 } else { 1176 } else {
1178 str = DoubleToCString(value_->Number(), buffer); 1177 str = DoubleToCString(value_->Number(), buffer);
1179 } 1178 }
1180 return isolate_->factory()->NewStringFromAscii(CStrVector(str)); 1179 return isolate_->factory()->NewStringFromAscii(CStrVector(str));
1181 } 1180 }
1182 1181
1183 1182
1184 } } // namespace v8::internal 1183 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm64/lithium-codegen-arm64.cc ('k') | src/builtins.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698