Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(120)

Side by Side Diff: src/ast.cc

Issue 11941016: Migrate FunctionPrototype (Keyed|Named)LoadIC to CodeStub (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/arm/stub-cache-arm.cc ('k') | src/builtins.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 ArrayLengthStub array_stub(Code::LOAD_IC);
417 FunctionPrototypeStub proto_stub(Code::LOAD_IC);
417 StringLengthStub string_stub(Code::LOAD_IC, false); 418 StringLengthStub string_stub(Code::LOAD_IC, false);
418 if (oracle->LoadIsStub(this, &array_stub)) { 419 if (oracle->LoadIsStub(this, &array_stub)) {
419 is_array_length_ = true; 420 is_array_length_ = true;
420 } else if (oracle->LoadIsStub(this, &string_stub)) { 421 } else if (oracle->LoadIsStub(this, &string_stub)) {
421 is_string_length_ = true; 422 is_string_length_ = true;
422 } else if (oracle->LoadIsBuiltin(this, 423 } else if (oracle->LoadIsStub(this, &proto_stub)) {
423 Builtins::kLoadIC_FunctionPrototype)) {
424 is_function_prototype_ = true; 424 is_function_prototype_ = true;
425 } else { 425 } else {
426 Literal* lit_key = key()->AsLiteral(); 426 Literal* lit_key = key()->AsLiteral();
427 ASSERT(lit_key != NULL && lit_key->handle()->IsString()); 427 ASSERT(lit_key != NULL && lit_key->handle()->IsString());
428 Handle<String> name = Handle<String>::cast(lit_key->handle()); 428 Handle<String> name = Handle<String>::cast(lit_key->handle());
429 oracle->LoadReceiverTypes(this, name, &receiver_types_); 429 oracle->LoadReceiverTypes(this, name, &receiver_types_);
430 } 430 }
431 } else if (oracle->LoadIsBuiltin(this, Builtins::kKeyedLoadIC_String)) { 431 } else if (oracle->LoadIsBuiltin(this, Builtins::kKeyedLoadIC_String)) {
432 is_string_access_ = true; 432 is_string_access_ = true;
433 } else if (is_monomorphic_) { 433 } else if (is_monomorphic_) {
(...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after
1114 OS::SNPrintF(buffer, "%d", Smi::cast(*handle_)->value()); 1114 OS::SNPrintF(buffer, "%d", Smi::cast(*handle_)->value());
1115 str = arr; 1115 str = arr;
1116 } else { 1116 } else {
1117 str = DoubleToCString(handle_->Number(), buffer); 1117 str = DoubleToCString(handle_->Number(), buffer);
1118 } 1118 }
1119 return FACTORY->NewStringFromAscii(CStrVector(str)); 1119 return FACTORY->NewStringFromAscii(CStrVector(str));
1120 } 1120 }
1121 1121
1122 1122
1123 } } // namespace v8::internal 1123 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/stub-cache-arm.cc ('k') | src/builtins.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698