OLD | NEW |
---|---|
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 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
421 // TODO(rossberg): all RecordTypeFeedback functions should disappear | 421 // TODO(rossberg): all RecordTypeFeedback functions should disappear |
422 // once we use the common type field in the AST consistently. | 422 // once we use the common type field in the AST consistently. |
423 | 423 |
424 | 424 |
425 void ForInStatement::RecordTypeFeedback(TypeFeedbackOracle* oracle) { | 425 void ForInStatement::RecordTypeFeedback(TypeFeedbackOracle* oracle) { |
426 for_in_type_ = static_cast<ForInType>(oracle->ForInType(this)); | 426 for_in_type_ = static_cast<ForInType>(oracle->ForInType(this)); |
427 } | 427 } |
428 | 428 |
429 | 429 |
430 void Expression::RecordToBooleanTypeFeedback(TypeFeedbackOracle* oracle) { | 430 void Expression::RecordToBooleanTypeFeedback(TypeFeedbackOracle* oracle) { |
431 to_boolean_types_ = oracle->ToBooleanTypes(test_id()); | 431 to_boolean_types_ |= oracle->ToBooleanTypes(test_id()); |
432 } | 432 } |
433 | 433 |
434 | 434 |
435 void Expression::RecordToBooleanTypeFeedback(TypeFeedbackOracle* oracle, | |
436 TypeFeedbackId origin) { | |
Jakob Kummerow
2013/06/24 09:25:07
nit: align arguments with each other
| |
437 to_boolean_types_ |= oracle->ToBooleanTypes(origin); | |
438 } | |
439 | |
440 | |
435 void Property::RecordTypeFeedback(TypeFeedbackOracle* oracle, | 441 void Property::RecordTypeFeedback(TypeFeedbackOracle* oracle, |
436 Zone* zone) { | 442 Zone* zone) { |
437 // Record type feedback from the oracle in the AST. | 443 // Record type feedback from the oracle in the AST. |
438 is_uninitialized_ = oracle->LoadIsUninitialized(this); | 444 is_uninitialized_ = oracle->LoadIsUninitialized(this); |
439 if (is_uninitialized_) return; | 445 if (is_uninitialized_) return; |
440 | 446 |
441 is_monomorphic_ = oracle->LoadIsMonomorphicNormal(this); | 447 is_monomorphic_ = oracle->LoadIsMonomorphicNormal(this); |
442 receiver_types_.Clear(); | 448 receiver_types_.Clear(); |
443 if (key()->IsPropertyName()) { | 449 if (key()->IsPropertyName()) { |
444 FunctionPrototypeStub proto_stub(Code::LOAD_IC); | 450 FunctionPrototypeStub proto_stub(Code::LOAD_IC); |
(...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1163 OS::SNPrintF(buffer, "%d", Smi::cast(*handle_)->value()); | 1169 OS::SNPrintF(buffer, "%d", Smi::cast(*handle_)->value()); |
1164 str = arr; | 1170 str = arr; |
1165 } else { | 1171 } else { |
1166 str = DoubleToCString(handle_->Number(), buffer); | 1172 str = DoubleToCString(handle_->Number(), buffer); |
1167 } | 1173 } |
1168 return factory->NewStringFromAscii(CStrVector(str)); | 1174 return factory->NewStringFromAscii(CStrVector(str)); |
1169 } | 1175 } |
1170 | 1176 |
1171 | 1177 |
1172 } } // namespace v8::internal | 1178 } } // namespace v8::internal |
OLD | NEW |