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 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
453 void Property::RecordTypeFeedback(TypeFeedbackOracle* oracle, | 453 void Property::RecordTypeFeedback(TypeFeedbackOracle* oracle, |
454 Zone* zone) { | 454 Zone* zone) { |
455 // Record type feedback from the oracle in the AST. | 455 // Record type feedback from the oracle in the AST. |
456 is_uninitialized_ = oracle->LoadIsUninitialized(this); | 456 is_uninitialized_ = oracle->LoadIsUninitialized(this); |
457 if (is_uninitialized_) return; | 457 if (is_uninitialized_) return; |
458 | 458 |
459 is_monomorphic_ = oracle->LoadIsMonomorphicNormal(this); | 459 is_monomorphic_ = oracle->LoadIsMonomorphicNormal(this); |
460 receiver_types_.Clear(); | 460 receiver_types_.Clear(); |
461 if (key()->IsPropertyName()) { | 461 if (key()->IsPropertyName()) { |
462 FunctionPrototypeStub proto_stub(Code::LOAD_IC); | 462 FunctionPrototypeStub proto_stub(Code::LOAD_IC); |
463 StringLengthStub string_stub(Code::LOAD_IC, false); | 463 if (oracle->LoadIsStub(this, &proto_stub)) { |
464 if (oracle->LoadIsStub(this, &string_stub)) { | |
465 is_string_length_ = true; | |
466 } else if (oracle->LoadIsStub(this, &proto_stub)) { | |
467 is_function_prototype_ = true; | 464 is_function_prototype_ = true; |
468 } else { | 465 } else { |
469 Literal* lit_key = key()->AsLiteral(); | 466 Literal* lit_key = key()->AsLiteral(); |
470 ASSERT(lit_key != NULL && lit_key->value()->IsString()); | 467 ASSERT(lit_key != NULL && lit_key->value()->IsString()); |
471 Handle<String> name = Handle<String>::cast(lit_key->value()); | 468 Handle<String> name = Handle<String>::cast(lit_key->value()); |
472 oracle->LoadReceiverTypes(this, name, &receiver_types_); | 469 oracle->LoadReceiverTypes(this, name, &receiver_types_); |
473 } | 470 } |
474 } else if (oracle->LoadIsBuiltin(this, Builtins::kKeyedLoadIC_String)) { | 471 } else if (oracle->LoadIsBuiltin(this, Builtins::kKeyedLoadIC_String)) { |
475 is_string_access_ = true; | 472 is_string_access_ = true; |
476 } else if (is_monomorphic_) { | 473 } else if (is_monomorphic_) { |
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1190 OS::SNPrintF(buffer, "%d", Smi::cast(*value_)->value()); | 1187 OS::SNPrintF(buffer, "%d", Smi::cast(*value_)->value()); |
1191 str = arr; | 1188 str = arr; |
1192 } else { | 1189 } else { |
1193 str = DoubleToCString(value_->Number(), buffer); | 1190 str = DoubleToCString(value_->Number(), buffer); |
1194 } | 1191 } |
1195 return isolate_->factory()->NewStringFromAscii(CStrVector(str)); | 1192 return isolate_->factory()->NewStringFromAscii(CStrVector(str)); |
1196 } | 1193 } |
1197 | 1194 |
1198 | 1195 |
1199 } } // namespace v8::internal | 1196 } } // namespace v8::internal |
OLD | NEW |