| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/ast.h" | 5 #include "src/ast.h" |
| 6 | 6 |
| 7 #include <cmath> // For isfinite. | 7 #include <cmath> // For isfinite. |
| 8 #include "src/builtins.h" | 8 #include "src/builtins.h" |
| 9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
| 10 #include "src/contexts.h" | 10 #include "src/contexts.h" |
| (...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 566 set_to_boolean_types(oracle->ToBooleanTypes(test_id())); | 566 set_to_boolean_types(oracle->ToBooleanTypes(test_id())); |
| 567 } | 567 } |
| 568 | 568 |
| 569 | 569 |
| 570 bool Call::IsUsingCallFeedbackSlot(Isolate* isolate) const { | 570 bool Call::IsUsingCallFeedbackSlot(Isolate* isolate) const { |
| 571 CallType call_type = GetCallType(isolate); | 571 CallType call_type = GetCallType(isolate); |
| 572 return (call_type != POSSIBLY_EVAL_CALL); | 572 return (call_type != POSSIBLY_EVAL_CALL); |
| 573 } | 573 } |
| 574 | 574 |
| 575 | 575 |
| 576 FeedbackVectorRequirements Call::ComputeFeedbackRequirements(Isolate* isolate) { |
| 577 int ic_slots = IsUsingCallFeedbackSlot(isolate) ? 1 : 0; |
| 578 return FeedbackVectorRequirements(0, ic_slots); |
| 579 } |
| 580 |
| 581 |
| 576 Call::CallType Call::GetCallType(Isolate* isolate) const { | 582 Call::CallType Call::GetCallType(Isolate* isolate) const { |
| 577 VariableProxy* proxy = expression()->AsVariableProxy(); | 583 VariableProxy* proxy = expression()->AsVariableProxy(); |
| 578 if (proxy != NULL) { | 584 if (proxy != NULL) { |
| 579 if (proxy->var()->is_possibly_eval(isolate)) { | 585 if (proxy->var()->is_possibly_eval(isolate)) { |
| 580 return POSSIBLY_EVAL_CALL; | 586 return POSSIBLY_EVAL_CALL; |
| 581 } else if (proxy->var()->IsUnallocated()) { | 587 } else if (proxy->var()->IsUnallocated()) { |
| 582 return GLOBAL_CALL; | 588 return GLOBAL_CALL; |
| 583 } else if (proxy->var()->IsLookupSlot()) { | 589 } else if (proxy->var()->IsLookupSlot()) { |
| 584 return LOOKUP_SLOT_CALL; | 590 return LOOKUP_SLOT_CALL; |
| 585 } | 591 } |
| (...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1011 // static | 1017 // static |
| 1012 bool Literal::Match(void* literal1, void* literal2) { | 1018 bool Literal::Match(void* literal1, void* literal2) { |
| 1013 const AstValue* x = static_cast<Literal*>(literal1)->raw_value(); | 1019 const AstValue* x = static_cast<Literal*>(literal1)->raw_value(); |
| 1014 const AstValue* y = static_cast<Literal*>(literal2)->raw_value(); | 1020 const AstValue* y = static_cast<Literal*>(literal2)->raw_value(); |
| 1015 return (x->IsString() && y->IsString() && *x->AsString() == *y->AsString()) || | 1021 return (x->IsString() && y->IsString() && *x->AsString() == *y->AsString()) || |
| 1016 (x->IsNumber() && y->IsNumber() && x->AsNumber() == y->AsNumber()); | 1022 (x->IsNumber() && y->IsNumber() && x->AsNumber() == y->AsNumber()); |
| 1017 } | 1023 } |
| 1018 | 1024 |
| 1019 | 1025 |
| 1020 } } // namespace v8::internal | 1026 } } // namespace v8::internal |
| OLD | NEW |