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 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
553 } | 553 } |
554 | 554 |
555 | 555 |
556 // ---------------------------------------------------------------------------- | 556 // ---------------------------------------------------------------------------- |
557 // Recording of type feedback | 557 // Recording of type feedback |
558 | 558 |
559 // TODO(rossberg): all RecordTypeFeedback functions should disappear | 559 // TODO(rossberg): all RecordTypeFeedback functions should disappear |
560 // once we use the common type field in the AST consistently. | 560 // once we use the common type field in the AST consistently. |
561 | 561 |
562 void Expression::RecordToBooleanTypeFeedback(TypeFeedbackOracle* oracle) { | 562 void Expression::RecordToBooleanTypeFeedback(TypeFeedbackOracle* oracle) { |
563 to_boolean_types_ = oracle->ToBooleanTypes(test_id()); | 563 set_to_boolean_types(oracle->ToBooleanTypes(test_id())); |
564 } | 564 } |
565 | 565 |
566 | 566 |
567 bool Call::IsUsingCallFeedbackSlot(Isolate* isolate) const { | 567 bool Call::IsUsingCallFeedbackSlot(Isolate* isolate) const { |
568 CallType call_type = GetCallType(isolate); | 568 CallType call_type = GetCallType(isolate); |
569 return (call_type != POSSIBLY_EVAL_CALL); | 569 return (call_type != POSSIBLY_EVAL_CALL); |
570 } | 570 } |
571 | 571 |
572 | 572 |
573 Call::CallType Call::GetCallType(Isolate* isolate) const { | 573 Call::CallType Call::GetCallType(Isolate* isolate) const { |
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1137 SNPrintF(buffer, "%d", Smi::cast(*value())->value()); | 1137 SNPrintF(buffer, "%d", Smi::cast(*value())->value()); |
1138 str = arr; | 1138 str = arr; |
1139 } else { | 1139 } else { |
1140 str = DoubleToCString(value()->Number(), buffer); | 1140 str = DoubleToCString(value()->Number(), buffer); |
1141 } | 1141 } |
1142 return isolate_->factory()->NewStringFromAsciiChecked(str); | 1142 return isolate_->factory()->NewStringFromAsciiChecked(str); |
1143 } | 1143 } |
1144 | 1144 |
1145 | 1145 |
1146 } } // namespace v8::internal | 1146 } } // namespace v8::internal |
OLD | NEW |