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

Side by Side Diff: src/ast.cc

Issue 254623002: Simplify feedback vector creation and store in SharedFunctionInfo. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Code comments Created 6 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/compiler.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 // Recording of type feedback 587 // Recording of type feedback
588 588
589 // TODO(rossberg): all RecordTypeFeedback functions should disappear 589 // TODO(rossberg): all RecordTypeFeedback functions should disappear
590 // once we use the common type field in the AST consistently. 590 // once we use the common type field in the AST consistently.
591 591
592 void Expression::RecordToBooleanTypeFeedback(TypeFeedbackOracle* oracle) { 592 void Expression::RecordToBooleanTypeFeedback(TypeFeedbackOracle* oracle) {
593 to_boolean_types_ = oracle->ToBooleanTypes(test_id()); 593 to_boolean_types_ = oracle->ToBooleanTypes(test_id());
594 } 594 }
595 595
596 596
597 int Call::ComputeFeedbackSlotCount(Isolate* isolate) { 597 bool Call::IsUsingCallFeedbackSlot(Isolate* isolate) const {
598 CallType call_type = GetCallType(isolate); 598 CallType call_type = GetCallType(isolate);
599 if (call_type == LOOKUP_SLOT_CALL || call_type == OTHER_CALL) { 599 return call_type == LOOKUP_SLOT_CALL || call_type == OTHER_CALL;
600 // Call only uses a slot in some cases.
601 return 1;
602 }
603
604 return 0;
605 } 600 }
606 601
607 602
608 Call::CallType Call::GetCallType(Isolate* isolate) const { 603 Call::CallType Call::GetCallType(Isolate* isolate) const {
609 VariableProxy* proxy = expression()->AsVariableProxy(); 604 VariableProxy* proxy = expression()->AsVariableProxy();
610 if (proxy != NULL) { 605 if (proxy != NULL) {
611 if (proxy->var()->is_possibly_eval(isolate)) { 606 if (proxy->var()->is_possibly_eval(isolate)) {
612 return POSSIBLY_EVAL_CALL; 607 return POSSIBLY_EVAL_CALL;
613 } else if (proxy->var()->IsUnallocated()) { 608 } else if (proxy->var()->IsUnallocated()) {
614 return GLOBAL_CALL; 609 return GLOBAL_CALL;
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after
1177 OS::SNPrintF(buffer, "%d", Smi::cast(*value_)->value()); 1172 OS::SNPrintF(buffer, "%d", Smi::cast(*value_)->value());
1178 str = arr; 1173 str = arr;
1179 } else { 1174 } else {
1180 str = DoubleToCString(value_->Number(), buffer); 1175 str = DoubleToCString(value_->Number(), buffer);
1181 } 1176 }
1182 return isolate_->factory()->NewStringFromAsciiChecked(str); 1177 return isolate_->factory()->NewStringFromAsciiChecked(str);
1183 } 1178 }
1184 1179
1185 1180
1186 } } // namespace v8::internal 1181 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ast.h ('k') | src/compiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698