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 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 | 406 |
407 void Property::RecordTypeFeedback(TypeFeedbackOracle* oracle, | 407 void Property::RecordTypeFeedback(TypeFeedbackOracle* oracle, |
408 Zone* zone) { | 408 Zone* zone) { |
409 // Record type feedback from the oracle in the AST. | 409 // Record type feedback from the oracle in the AST. |
410 is_uninitialized_ = oracle->LoadIsUninitialized(this); | 410 is_uninitialized_ = oracle->LoadIsUninitialized(this); |
411 if (is_uninitialized_) return; | 411 if (is_uninitialized_) return; |
412 | 412 |
413 is_monomorphic_ = oracle->LoadIsMonomorphicNormal(this); | 413 is_monomorphic_ = oracle->LoadIsMonomorphicNormal(this); |
414 receiver_types_.Clear(); | 414 receiver_types_.Clear(); |
415 if (key()->IsPropertyName()) { | 415 if (key()->IsPropertyName()) { |
| 416 ArrayLengthStub array_stub(Code::LOAD_IC); |
416 StringLengthStub string_stub(Code::LOAD_IC, false); | 417 StringLengthStub string_stub(Code::LOAD_IC, false); |
417 if (oracle->LoadIsBuiltin(this, Builtins::kLoadIC_ArrayLength)) { | 418 if (oracle->LoadIsStub(this, &array_stub)) { |
418 is_array_length_ = true; | 419 is_array_length_ = true; |
419 } else if (oracle->LoadIsStub(this, &string_stub)) { | 420 } else if (oracle->LoadIsStub(this, &string_stub)) { |
420 is_string_length_ = true; | 421 is_string_length_ = true; |
421 } else if (oracle->LoadIsBuiltin(this, | 422 } else if (oracle->LoadIsBuiltin(this, |
422 Builtins::kLoadIC_FunctionPrototype)) { | 423 Builtins::kLoadIC_FunctionPrototype)) { |
423 is_function_prototype_ = true; | 424 is_function_prototype_ = true; |
424 } else { | 425 } else { |
425 Literal* lit_key = key()->AsLiteral(); | 426 Literal* lit_key = key()->AsLiteral(); |
426 ASSERT(lit_key != NULL && lit_key->handle()->IsString()); | 427 ASSERT(lit_key != NULL && lit_key->handle()->IsString()); |
427 Handle<String> name = Handle<String>::cast(lit_key->handle()); | 428 Handle<String> name = Handle<String>::cast(lit_key->handle()); |
(...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1113 OS::SNPrintF(buffer, "%d", Smi::cast(*handle_)->value()); | 1114 OS::SNPrintF(buffer, "%d", Smi::cast(*handle_)->value()); |
1114 str = arr; | 1115 str = arr; |
1115 } else { | 1116 } else { |
1116 str = DoubleToCString(handle_->Number(), buffer); | 1117 str = DoubleToCString(handle_->Number(), buffer); |
1117 } | 1118 } |
1118 return FACTORY->NewStringFromAscii(CStrVector(str)); | 1119 return FACTORY->NewStringFromAscii(CStrVector(str)); |
1119 } | 1120 } |
1120 | 1121 |
1121 | 1122 |
1122 } } // namespace v8::internal | 1123 } } // namespace v8::internal |
OLD | NEW |