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

Side by Side Diff: src/ast.cc

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

Powered by Google App Engine
This is Rietveld 408576698